:root {
  --dex-main: #6F45F0;
  --dex-warning: #FFC013;
  --dex-error: #FF484C;
  --dex-success: #00BF71;
  --dex-secondary: #F2F1FF;
  --dex-text: #231f3d;
  --dex-surface: #ffffff;
  --dex-border: #e7e2ff;
}

body {
  background: radial-gradient(circle at 15% 10%, #ffffff 0%, #f8f6ff 35%, #eef6ff 100%);
  color: var(--dex-text);
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  letter-spacing: 0.01em;
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.01em;
}

.card {
  background: var(--dex-surface);
  border-color: var(--dex-border);
}

.card.shadow-sm {
  box-shadow: 0 12px 28px rgba(20, 16, 40, 0.08) !important;
}

.btn {
  border-radius: 0.85rem;
  font-weight: 600;
}

.form-control {
  border: 1px solid #ddd8ff;
  border-radius: 0.85rem;
}

.form-control:focus {
  border-color: rgba(111, 69, 240, 0.55);
  box-shadow: 0 0 0 0.2rem rgba(111, 69, 240, 0.15);
}

.app-navbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.86));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(111, 69, 240, 0.08);
  box-shadow: 0 12px 24px rgba(18, 12, 48, 0.08);
  animation: nav-float 14s ease-in-out infinite;
}

.navbar .btn {
  border-radius: 999px;
}

.app-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background:
    linear-gradient(120deg, rgba(111, 69, 240, 0.12), rgba(255, 255, 255, 0.6));
  border: 1px solid rgba(111, 69, 240, 0.16);
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  position: relative;
  overflow: hidden;
}

.app-nav-link {
  text-decoration: none;
  color: #3f3765;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  transition: all 0.18s ease;
}

.app-nav-link:hover {
  color: #231f3d;
  background: rgba(111, 69, 240, 0.16);
}

.app-nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, #5a37d6, #8d73f5);
  box-shadow: 0 12px 22px rgba(88, 55, 214, 0.3);
}

.app-nav::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.35), transparent 55%);
  opacity: 0.7;
  animation: nav-sheen 10s ease-in-out infinite;
  pointer-events: none;
}

.nav-cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #ffffff, #f6f2ff);
  border-color: rgba(111, 69, 240, 0.28) !important;
  color: #3b2f6b !important;
  box-shadow: 0 10px 22px rgba(40, 24, 92, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.nav-cta::after {
  content: "";
  position: absolute;
  inset: -60% 0 auto;
  height: 220%;
  background: linear-gradient(110deg, transparent, rgba(111, 69, 240, 0.22), transparent);
  transform: translateX(-80%);
  animation: cta-sheen 6s ease-in-out infinite;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(40, 24, 92, 0.18);
  border-color: rgba(111, 69, 240, 0.5) !important;
}

@keyframes nav-float {
  0%, 100% {
    box-shadow: 0 12px 24px rgba(18, 12, 48, 0.08);
  }
  50% {
    box-shadow: 0 16px 30px rgba(18, 12, 48, 0.12);
  }
}

@keyframes nav-sheen {
  0%, 100% {
    transform: translateX(-6%);
  }
  50% {
    transform: translateX(6%);
  }
}

@keyframes cta-sheen {
  0%, 100% {
    transform: translateX(-90%);
  }
  50% {
    transform: translateX(90%);
  }
}

.hero-card {
  background: linear-gradient(135deg, var(--dex-main), #8e72f4);
  color: #fff;
}

.hero-card .text-muted {
  color: rgba(255, 255, 255, 0.85) !important;
}

.btn-primary {
  --bs-btn-bg: var(--dex-main);
  --bs-btn-border-color: var(--dex-main);
  --bs-btn-hover-bg: #5e38d4;
  --bs-btn-hover-border-color: #5e38d4;
}

.btn-success {
  --bs-btn-bg: var(--dex-success);
  --bs-btn-border-color: var(--dex-success);
}

.btn-warning {
  --bs-btn-bg: var(--dex-warning);
  --bs-btn-border-color: var(--dex-warning);
  --bs-btn-color: #2f2200;
}

.alert-danger,
.text-bg-danger {
  --bs-danger: var(--dex-error);
}

.stat-card {
  background: #fff;
  border: 1px solid #ece8ff;
}

.leaderboard-private {
  background: linear-gradient(140deg, #f8f6ff, #f2f1ff);
  border: 1px solid #e8e4ff;
}

.feature-btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: var(--dex-text);
}

.feature-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 .5rem 1rem rgba(17, 12, 46, 0.08) !important;
}

.progress-bar {
  background-color: var(--dex-main);
}

.placeholder-illustration {
  width: 180px;
  height: 120px;
  border-radius: 24px;
  background: linear-gradient(130deg, var(--dex-main), var(--dex-secondary));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.join-shell {
  border: 1px solid #e7e2ff;
  background: #fff;
  position: relative;
}

.join-hero {
  position: relative;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.34), transparent 45%),
    linear-gradient(150deg, #6f45f0 0%, #7d5cf2 45%, #8f73f5 100%);
  color: #fff;
}

.join-hero::before,
.join-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(1px);
}

.join-hero::before {
  width: 180px;
  height: 180px;
  right: -50px;
  top: -30px;
  background: rgba(255, 255, 255, 0.18);
}

.join-hero::after {
  width: 160px;
  height: 160px;
  left: -45px;
  bottom: -60px;
  background: rgba(255, 255, 255, 0.11);
}

.join-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.join-title {
  font-size: clamp(1.6rem, 2vw + 1rem, 2.3rem);
  line-height: 1.15;
  font-weight: 800;
  max-width: 18ch;
}

.join-subtitle {
  color: rgba(255, 255, 255, 0.9);
  max-width: 36ch;
}

.join-benefits {
  display: grid;
  gap: 0.75rem;
}

.join-benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 0.9rem;
  padding: 0.72rem 0.8rem;
  backdrop-filter: blur(2px);
}

.join-benefit-item i {
  font-size: 1.02rem;
  margin-top: 0.1rem;
}

.join-benefit-item span {
  font-size: 0.93rem;
  line-height: 1.35;
}

.join-form-wrap {
  background:
    radial-gradient(circle at 85% 5%, rgba(242, 241, 255, 0.95), transparent 32%),
    #fff;
}

.join-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.form-error {
  color: var(--dex-error);
  font-size: 0.86rem;
  font-weight: 500;
}

.intro-flow {
  position: relative;
}

.intro-shell {
  position: relative;
  overflow: hidden;
  padding: 1.2rem;
  border: 1px solid #e8e2ff;
  border-radius: 1.85rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(249, 251, 255, 0.94)),
    linear-gradient(145deg, #ffffff 0%, #f8f7ff 48%, #f0fbff 100%);
  box-shadow: 0 24px 60px rgba(54, 41, 102, 0.08);
}

.intro-shell-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(44px);
  pointer-events: none;
  opacity: 0.55;
}

.intro-shell-glow-a {
  top: -2rem;
  right: 8%;
  width: 20rem;
  height: 20rem;
  background: rgba(111, 69, 240, 0.13);
  animation: introFloatA 9s ease-in-out infinite;
}

.intro-shell-glow-b {
  left: -4rem;
  bottom: 8%;
  width: 18rem;
  height: 18rem;
  background: rgba(20, 192, 125, 0.12);
  animation: introFloatB 11s ease-in-out infinite;
}

.intro-topbar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.intro-title {
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
  margin-right: 1rem;
}

.intro-subtitle {
  max-width: 48rem;
  color: #5a6273;
  font-size: 1.02rem;
}

.intro-progress-card {
  padding: 1rem 1.05rem;
  border-radius: 1.35rem;
  border: 1px solid rgba(111, 69, 240, 0.12);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.intro-progress-number {
  display: flex;
  align-items: baseline;
  gap: 0.22rem;
  margin-bottom: 0.8rem;
  font-size: 2rem;
  line-height: 1;
  font-weight: 700;
  color: #1e2430;
}

.intro-progress-number small {
  font-size: 0.95rem;
  color: #6c7385;
}

.intro-progress-bar {
  height: 0.68rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(111, 69, 240, 0.08);
}

.intro-progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #6f45f0, #14c07d);
  transition: width 0.35s ease;
  position: relative;
  overflow: hidden;
}

.intro-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.48), transparent);
  transform: translateX(-140%);
  animation: introShimmer 2.6s linear infinite;
}

.intro-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 0.72rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--dex-main);
  background: rgba(111, 69, 240, 0.12);
}

.intro-question-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.intro-question-card {
  position: relative;
  padding: 1.15rem;
  border: 1px solid rgba(224, 217, 255, 0.9);
  border-radius: 1.5rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 255, 0.96));
  box-shadow: 0 14px 40px rgba(64, 48, 110, 0.06);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  animation: introCardIn 0.55s ease both;
}

.intro-question-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(111, 69, 240, 0.16), rgba(20, 192, 125, 0.12), transparent 65%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.intro-question-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(64, 48, 110, 0.09);
}

.intro-question-card:nth-child(1) { animation-delay: 0.02s; }
.intro-question-card:nth-child(2) { animation-delay: 0.08s; }
.intro-question-card:nth-child(3) { animation-delay: 0.14s; }
.intro-question-card:nth-child(4) { animation-delay: 0.2s; }
.intro-question-card:nth-child(5) { animation-delay: 0.26s; }
.intro-question-card:nth-child(6) { animation-delay: 0.32s; }
.intro-question-card:nth-child(7) { animation-delay: 0.38s; }
.intro-question-card:nth-child(8) { animation-delay: 0.44s; }

.intro-question-card.is-active {
  border-color: rgba(111, 69, 240, 0.34);
  box-shadow: 0 20px 46px rgba(111, 69, 240, 0.12);
}

.intro-question-card.is-active::before,
.intro-question-card:hover::before {
  opacity: 1;
}

.intro-question-card.is-complete::after {
  content: "";
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #6f45f0, #14c07d);
  box-shadow: 0 0 0 6px rgba(111, 69, 240, 0.08);
}

.intro-question-card.is-complete {
  animation: introCompletePulse 0.42s ease;
}

.intro-question-card-wide {
  grid-column: 1 / -1;
}

.intro-question-card-half {
  grid-column: span 1;
}

.intro-question-head {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.intro-question-index {
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #6f45f0;
  background: linear-gradient(145deg, rgba(111, 69, 240, 0.12), rgba(20, 192, 125, 0.1));
}

.range-wrap {
  padding: 0.75rem 0.9rem 0.6rem;
  border: 1px solid #e8e3ff;
  border-radius: 0.9rem;
  background: linear-gradient(140deg, #fcfbff, #f7f5ff);
}

.intro-range-wrap {
  padding: 1.05rem 1rem 0.8rem;
  border-radius: 1.15rem;
}

.intro-range-input {
  margin-bottom: 0.5rem;
}

.intro-range-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: #72788a;
  font-size: 0.92rem;
}

.intro-range-value {
  min-width: 5.2rem;
  text-align: center;
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  color: #fff;
  background: linear-gradient(135deg, #6f45f0, #14c07d);
  box-shadow: 0 10px 24px rgba(111, 69, 240, 0.24);
}

.intro-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.intro-yn-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid #dcd6ff;
  background: #fff;
  color: #453c67;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.intro-choice-lg {
  min-width: 8rem;
  min-height: 3.2rem;
  padding: 0.85rem 1.25rem;
}

.intro-yn-option:hover {
  border-color: #b7a9ff;
  background: #f7f4ff;
}

.btn-check:checked + .intro-yn-option[data-value="yes"] {
  background: linear-gradient(135deg, #00bf71, #12cc80);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 191, 113, 0.18);
}

.btn-check:checked + .intro-yn-option[data-value="no"] {
  background: linear-gradient(135deg, #ff484c, #ff6a6e);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(255, 72, 76, 0.18);
}

.form-range::-webkit-slider-thumb {
  background: var(--dex-main);
}

.form-range::-moz-range-thumb {
  background: var(--dex-main);
}

.topic-interest-card {
  border: 1px solid #e9e4ff;
  background: linear-gradient(180deg, #ffffff, #fcfbff);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.topic-interest-card:hover {
  transform: translateY(-1px);
  border-color: #d7cbff;
  box-shadow: 0 12px 28px rgba(74, 52, 137, 0.06);
}

.intro-topic-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(111, 69, 240, 0.08);
  color: #6f45f0;
  font-size: 0.74rem;
  font-weight: 700;
}

.intro-select,
.intro-textarea {
  border-color: #ddd6ff;
  border-radius: 0.95rem;
  background: linear-gradient(180deg, #ffffff 0%, #fcfbff 100%);
}

.intro-select:focus,
.intro-textarea:focus {
  border-color: rgba(111, 69, 240, 0.42);
  box-shadow: 0 0 0 0.25rem rgba(111, 69, 240, 0.12);
}

.intro-textarea {
  min-height: 132px;
  resize: vertical;
}

.intro-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.intro-chip {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid #ded6ff;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.92);
  color: #322b4a;
  font-weight: 600;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  position: relative;
  overflow: hidden;
}

.intro-chip i {
  width: 2rem;
  height: 2rem;
  margin-top: 0.08rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: rgba(111, 69, 240, 0.08);
  color: #6f45f0;
}

.intro-chip:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: #b7a9ff;
  box-shadow: 0 10px 24px rgba(72, 54, 132, 0.08);
}

.intro-chip::after {
  content: "";
  position: absolute;
  inset: -35%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent 58%);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.intro-chip.is-selected {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #6f45f0, #14c07d);
  box-shadow: 0 14px 30px rgba(83, 60, 165, 0.2);
}

.intro-chip.is-selected::after {
  opacity: 1;
  transform: scale(1);
}

.intro-chip.is-selected i {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.intro-chip.is-bursting {
  animation: introChipBurst 0.36s ease;
}

.intro-chip-readiness span {
  max-width: 20rem;
}

.intro-chip-profile {
  min-height: 5.35rem;
}

.intro-chip-body {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.intro-chip-title {
  font-weight: 700;
  line-height: 1.2;
}

.intro-chip-meta {
  font-size: 0.84rem;
  line-height: 1.35;
  color: #747a8b;
}

.intro-chip.is-selected .intro-chip-meta {
  color: rgba(255, 255, 255, 0.82);
}

.topic-choice-group-modern {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.topic-choice-group {
  display: grid;
  gap: 0.55rem;
}

.topic-choice-btn {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid #dcd6ff;
  background: #fff;
  color: #453c67;
  border-radius: 0.85rem;
  padding: 0.62rem 0.78rem;
  font-weight: 600;
  font-size: 0.92rem;
  text-align: center;
  transition: all 0.18s ease;
}

.topic-choice-btn:hover {
  border-color: #b7a9ff;
  background: #f7f4ff;
}

.topic-choice-btn.active {
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(111, 69, 240, 0.15);
  transform: translateY(-1px) scale(1.01);
}

.topic-choice-btn.active-positive {
  background: linear-gradient(135deg, #00bf71, #12cc80);
}

.topic-choice-btn.active-neutral {
  background: linear-gradient(135deg, #7d6cb8, #8f80c6);
}

.topic-choice-btn.active-negative {
  background: linear-gradient(135deg, #ff484c, #ff6a6e);
}

.intro-pill {
  font-weight: 600;
  border-radius: 999px;
  padding: 0.45rem 0.68rem;
}

.intro-pill-positive {
  background: #d9f7ea;
  color: #0f7f54;
}

.intro-pill-neutral {
  background: #ece9ff;
  color: #5f4fb1;
}

.intro-pill-negative {
  background: #ffe2e3;
  color: #b13135;
}

.intro-pill-empty {
  background: #f2f3f7;
  color: #6f7386;
}

@keyframes introCardIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes introShimmer {
  from {
    transform: translateX(-140%);
  }
  to {
    transform: translateX(140%);
  }
}

@keyframes introFloatA {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-12px, 18px, 0);
  }
}

@keyframes introFloatB {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(18px, -12px, 0);
  }
}

@keyframes introChipBurst {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes introCompletePulse {
  0% {
    box-shadow: 0 14px 40px rgba(64, 48, 110, 0.06);
  }
  45% {
    box-shadow: 0 0 0 8px rgba(111, 69, 240, 0.08), 0 24px 50px rgba(111, 69, 240, 0.16);
  }
  100% {
    box-shadow: 0 20px 46px rgba(111, 69, 240, 0.12);
  }
}

@media (max-width: 991.98px) {
  .intro-topbar {
    grid-template-columns: 1fr;
  }

  .intro-question-grid {
    grid-template-columns: 1fr;
  }

  .intro-chip-grid,
  .topic-choice-group-modern {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .intro-shell {
    padding: 0.85rem;
    border-radius: 1.35rem;
  }

  .intro-title {
    font-size: 2.25rem;
  }

  .intro-question-card {
    padding: 1rem;
  }
}

.faq-compose-card {
  border: 1px solid #e8e2ff;
  background:
    radial-gradient(circle at 100% 0%, rgba(111, 69, 240, 0.09), transparent 38%),
    linear-gradient(145deg, #ffffff 0%, #fbfaff 100%);
}

.faq-compose-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #6f45f0, #8d73f5);
  box-shadow: 0 8px 18px rgba(111, 69, 240, 0.22);
}

.faq-textarea {
  min-height: 130px;
  resize: vertical;
}

.feedback-compose-card {
  border: 1px solid #e8e2ff;
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 191, 113, 0.12), transparent 38%),
    linear-gradient(145deg, #ffffff 0%, #f7fffb 100%);
}

.feedback-compose-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #00bf71, #12cc80);
  box-shadow: 0 8px 18px rgba(0, 191, 113, 0.22);
}

.feedback-emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.6rem;
}

.feedback-emoji-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.75rem 0.4rem;
  border-radius: 0.9rem;
  border: 1px solid #dcd6ff;
  background: #fff;
  color: #453c67;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
  min-height: 82px;
}

.feedback-emoji-option:hover {
  border-color: #b7a9ff;
  background: #f7f4ff;
}

.feedback-emoji {
  font-size: 1.45rem;
  line-height: 1;
}

.feedback-emoji-label {
  font-size: 0.75rem;
  color: #5f577f;
}

.btn-check:checked + .feedback-emoji-option {
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 18px rgba(30, 20, 80, 0.16);
}

.btn-check:checked + .feedback-emoji-option .feedback-emoji-label {
  color: rgba(255, 255, 255, 0.85);
}

.btn-check:checked + .feedback-emoji-option[data-score="1"] {
  background: linear-gradient(135deg, #ff484c, #ff6a6e);
}

.btn-check:checked + .feedback-emoji-option[data-score="2"] {
  background: linear-gradient(135deg, #ff9f43, #ffb85c);
}

.btn-check:checked + .feedback-emoji-option[data-score="3"] {
  background: linear-gradient(135deg, #7d6cb8, #8f80c6);
}

.btn-check:checked + .feedback-emoji-option[data-score="4"] {
  background: linear-gradient(135deg, #00bf71, #12cc80);
}

.btn-check:checked + .feedback-emoji-option[data-score="5"] {
  background: linear-gradient(135deg, #3ba7ff, #5ac2ff);
}

.feedback-textarea {
  min-height: 120px;
  resize: vertical;
}

.feedback-entry-card {
  border: 1px solid #e8e3ff;
  background: #fff;
}

.feedback-entry-emoji {
  font-size: 1.45rem;
}

.feedback-entry-block {
  border-top: 1px solid #f1edff;
  padding-top: 0.65rem;
}

.feedback-user-score {
  min-width: 120px;
}

.feedback-distribution {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.feedback-distribution-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-weight: 600;
  font-size: 0.82rem;
  background: #f2f1ff;
  color: #4b3f75;
  border: 1px solid #e1dcff;
}

.feedback-distribution-pill[data-score="1"] {
  background: #ffe2e3;
  color: #b13135;
  border-color: #ffd0d2;
}

.feedback-distribution-pill[data-score="2"] {
  background: #fff2dd;
  color: #a6621b;
  border-color: #ffe4bf;
}

.feedback-distribution-pill[data-score="3"] {
  background: #ece9ff;
  color: #5f4fb1;
  border-color: #ddd6ff;
}

.feedback-distribution-pill[data-score="4"] {
  background: #d9f7ea;
  color: #0f7f54;
  border-color: #bff0da;
}

.feedback-distribution-pill[data-score="5"] {
  background: #e3f2ff;
  color: #245b9a;
  border-color: #cde7ff;
}

.faq-question-card {
  border: 1px solid #e8e3ff;
  background: #fff;
}

.faq-answer-box {
  border: 1px solid #d6f1e6;
  background: linear-gradient(140deg, #f1fdf8, #ebfff6);
}

.voting-question-card {
  border: 1px solid #e8e3ff;
  background: linear-gradient(140deg, #fff, #fbfaff);
}

.exercise-list-hero,
.exercise-admin-hero,
.exercise-hero {
  border: 1px solid #e5ecff;
  background:
    radial-gradient(circle at top right, rgba(84, 140, 255, 0.18), transparent 32%),
    radial-gradient(circle at bottom left, rgba(27, 194, 142, 0.15), transparent 28%),
    linear-gradient(135deg, #fdfefe, #f4f8ff);
  box-shadow: 0 18px 46px rgba(32, 59, 119, 0.08);
}

.exercise-list-card {
  background:
    radial-gradient(circle at top right, rgba(95, 164, 255, 0.1), transparent 26%),
    linear-gradient(145deg, #ffffff, #f8fbff);
}

.exercise-list-mini-stat,
.exercise-admin-stat,
.exercise-hero-stat {
  border: 1px solid #e4ebff;
  background: rgba(255, 255, 255, 0.82);
}

.exercise-progress-shell {
  position: sticky;
  top: 5rem;
  z-index: 10;
}

.exercise-progress-bar,
.exercise-admin-option-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e7eefc;
  overflow: hidden;
}

.exercise-progress-bar-fill,
.exercise-admin-option-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4c7dff, #22c38d);
  transition: width 0.2s ease;
}

.exercise-jump-pill.is-answered {
  border-color: #8ed7b6;
  background: #f1fff8;
  color: #0c7750;
}

.exercise-question-pill,
.exercise-question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #3256a5;
  background: #edf3ff;
}

.exercise-question {
  scroll-margin-top: 8rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.exercise-question.is-answered {
  border-color: #d2defe;
}

.exercise-question.is-correct {
  border-color: #bceacc;
  box-shadow: 0 18px 34px rgba(15, 127, 84, 0.08);
}

.exercise-question.is-wrong {
  border-color: #f2c3c5;
  box-shadow: 0 18px 34px rgba(177, 49, 53, 0.08);
}

.exercise-admin-hint,
.exercise-admin-utility,
.exercise-admin-top-answer,
.exercise-admin-empty {
  border: 1px solid #e4ebff;
  background: linear-gradient(145deg, #ffffff, #f8fbff);
}

.exercise-admin-question-card {
  overflow: hidden;
}

.exercise-admin-option-row {
  border: 1px solid #e5ecff;
  background: #fff;
}

.exercise-admin-option-row.is-correct {
  border-color: #bfe6d1;
  background: linear-gradient(145deg, #ffffff, #f5fff9);
}

.exercise-admin-option-marker {
  min-width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eff4ff;
  color: #3c62b3;
  font-weight: 700;
}

.exercise-countdown {
  border: 1px solid #e9e4ff;
  background: linear-gradient(140deg, #f8f5ff, #f3efff);
}

.exercise-countdown-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 20, 54, 0.46);
  backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.exercise-countdown-panel {
  width: min(460px, 100%);
  border-radius: 1.2rem;
  border: 1px solid #e6deff;
  background: linear-gradient(145deg, #ffffff, #f7f4ff);
  padding: 1.35rem 1.25rem;
  text-align: center;
  box-shadow: 0 20px 38px rgba(30, 18, 70, 0.22);
}

.exercise-countdown-number {
  font-size: clamp(2.2rem, 8vw, 3.3rem);
  font-weight: 800;
  line-height: 1;
  color: var(--dex-main);
  margin-bottom: 0.55rem;
}

.exercise-feedback.is-correct {
  color: #0f7f54 !important;
  font-weight: 600;
}

.exercise-feedback.is-wrong {
  color: #b13135 !important;
  font-weight: 600;
}

.vote-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.vote-option {
  display: block;
  text-align: center;
  padding: 0.62rem 0.78rem;
  border-radius: 0.85rem;
  border: 1px solid #dcd6ff;
  background: #fff;
  color: #453c67;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.option-good:hover {
  border-color: #8ed7b6;
  background: #f3fff8;
}

.option-neutral:hover {
  border-color: #baaef0;
  background: #faf8ff;
}

.option-bad:hover {
  border-color: #f0a2a5;
  background: #fff6f6;
}

.btn-check:checked + .vote-option.option-good {
  background: linear-gradient(135deg, #00bf71, #12cc80);
  border-color: transparent;
  color: #fff;
}

.btn-check:checked + .vote-option.option-neutral {
  background: linear-gradient(135deg, #7d6cb8, #8f80c6);
  border-color: transparent;
  color: #fff;
}

.btn-check:checked + .vote-option.option-bad {
  background: linear-gradient(135deg, #ff484c, #ff6a6e);
  border-color: transparent;
  color: #fff;
}

#exercise-quiz-form[data-readonly="1"] .vote-option {
  cursor: default;
}

#exercise-quiz-form .vote-option {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  padding: 0.9rem 1rem;
}

.exercise-question .btn-check:checked + .vote-option {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(69, 60, 103, 0.12);
}

@media (max-width: 991.98px) {
  .exercise-progress-shell {
    position: static;
  }
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #ece8ff;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  z-index: 1020;
}

.bottom-nav-link {
  text-decoration: none;
  color: #6f688a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.2rem;
  font-size: 0.75rem;
}

.bottom-nav-link i {
  font-size: 1.1rem;
  line-height: 1.1;
}

.bottom-nav-link.active,
.bottom-nav-link:hover {
  color: var(--dex-main);
}

#confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2000;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 12px;
  opacity: 0;
  animation: confetti-fall 1.3s ease-out forwards;
}

.cora-header {
  background:
    radial-gradient(circle at 10% 10%, rgba(111, 69, 240, 0.12), transparent 45%),
    linear-gradient(140deg, #ffffff, #f7f4ff 45%, #f1f7ff 100%);
  position: relative;
  overflow: hidden;
}

.cora-header::after {
  content: "";
  position: absolute;
  right: -10%;
  top: -40%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(111, 69, 240, 0.18), transparent 60%);
  filter: blur(2px);
  pointer-events: none;
}

.cora-header {
  background: linear-gradient(180deg, rgba(245, 243, 255, 0.96), rgba(250, 249, 255, 0.92));
}

.cora-header-body {
  padding: 0.85rem 1rem !important;
}

.cora-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  min-height: 40px;
}

.cora-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(111, 69, 240, 0.12);
  color: #4b38c7;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.32rem 0.62rem;
}

.cora-title {
  font-size: clamp(1.6rem, 1.2vw + 1.4rem, 2.35rem);
  font-weight: 800;
  color: #2a2155;
}

.cora-subtitle {
  color: #4b3f75;
  max-width: 42ch;
}

.cora-mode-card {
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 0;
  box-shadow: none;
}

.cora-mode-switch {
  display: inline-flex;
  gap: 0.22rem;
  background: rgba(111, 69, 240, 0.1);
  padding: 0.2rem;
  border-radius: 999px;
}

.cora-mode-btn {
  border: none;
  background: transparent;
  color: #4b3f75;
  font-weight: 600;
  border-radius: 999px;
  font-size: 0.92rem;
  line-height: 1;
  padding: 0.5rem 0.8rem;
  transition: all 0.18s ease;
}

.cora-mode-btn.active {
  background: linear-gradient(135deg, #5a37d6, #8d73f5);
  color: #fff;
  box-shadow: 0 6px 16px rgba(90, 55, 214, 0.2);
}

.cora-mode-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cora-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.cora-mode-panel {
  display: none;
}

.cora-mode-panel.is-active {
  display: grid;
  animation: cora-panel-in 0.45s ease;
}

.cora-sidebar {
  background: #fff;
}

.cora-sidebar-stack {
  display: grid;
  gap: 1rem;
}

.cora-chat-toolbar-card {
  background: linear-gradient(145deg, rgba(248, 246, 255, 0.96), rgba(255, 255, 255, 0.92));
}

.cora-chat-toolbar-card .card-body {
  padding: 0.8rem !important;
}

.cora-sidebar .card-body,
.cora-chat .card-body,
.cora-eval .card-body {
  height: 100%;
}

.cora-thread-list {
  display: grid;
  gap: 0.65rem;
}

.cora-thread {
  border: 1px solid #e4defa;
  background: #fff;
  border-radius: 1rem;
  padding: 0.75rem 0.9rem;
  text-align: left;
  transition: all 0.18s ease;
}

.cora-thread:hover {
  border-color: #c8baff;
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(30, 20, 80, 0.08);
}

.cora-thread.active {
  background: linear-gradient(140deg, #f6f2ff, #ffffff);
  border-color: rgba(111, 69, 240, 0.35);
  box-shadow: inset 0 0 0 1px rgba(111, 69, 240, 0.15);
}

.cora-thread-title {
  font-weight: 700;
  color: #2e274f;
  margin-bottom: 0.2rem;
}

.cora-thread-meta {
  font-size: 0.8rem;
  color: #6b608d;
}

.cora-chat {
  background: linear-gradient(140deg, #ffffff 0%, #fbfaff 100%);
}

.cora-chat .card-body {
  display: flex;
  flex-direction: column;
}

.cora-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cora-chat-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #2a2155;
}

.cora-chat-subtitle {
  font-size: 0.85rem;
  color: #6b5ba6;
}

.cora-chat-actions {
  display: inline-flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
}

.cora-chat-control {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(111, 69, 240, 0.16);
  padding: 0.3rem 0.62rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.cora-control-label {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #6b5ba6;
}

.cora-select {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.cora-select .form-select {
  border: none;
  box-shadow: none;
  background: transparent;
  font-weight: 700;
  font-size: 0.94rem;
  color: #2e274f;
  min-width: 150px;
  padding-right: 1.35rem;
}

.cora-select i {
  position: absolute;
  right: 0.4rem;
  font-size: 0.85rem;
  color: #6b5ba6;
  pointer-events: none;
}

.cora-control-hint {
  font-size: 0.7rem;
  color: #6b5ba6;
}

.cora-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.cora-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.cora-toggle-slider {
  width: 42px;
  height: 24px;
  background: #e0daf2;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease;
}

.cora-toggle-slider::after {
  content: "";
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform 0.2s ease;
  box-shadow: 0 6px 12px rgba(30, 20, 80, 0.12);
}

.cora-toggle input:checked + .cora-toggle-slider {
  background: linear-gradient(135deg, #5a37d6, #8d73f5);
}

.cora-toggle input:checked + .cora-toggle-slider::after {
  transform: translateX(18px);
}

.cora-chat-log {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.cora-message {
  display: flex;
}

.cora-message.user {
  justify-content: flex-end;
}

.cora-bubble {
  max-width: min(620px, 88%);
  padding: 0.85rem 1.05rem;
  border-radius: 1.2rem;
  background: #f2f1ff;
  color: #2e294e;
  box-shadow: 0 12px 22px rgba(30, 20, 80, 0.08);
  white-space: pre-wrap;
}

.cora-message.user .cora-bubble {
  background: linear-gradient(135deg, #5a37d6, #8d73f5);
  color: #fff;
}

.cora-typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 0.9rem;
}

.cora-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #9a8ad1;
  opacity: 0.35;
  animation: cora-typing 1.1s infinite ease-in-out;
}

.cora-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.cora-dot:nth-child(3) {
  animation-delay: 0.3s;
}

.cora-chat-form textarea.form-control {
  resize: vertical;
  min-height: 56px;
  border-radius: 1.1rem;
}

.cora-input-shell {
  border: 1px solid #dfd7ff;
  border-radius: 1.2rem;
  padding: 0.6rem;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.cora-input-shell textarea.form-control {
  border: none;
  box-shadow: none;
  padding: 0.75rem 0.85rem;
}

.cora-input-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem 0.1rem;
}

.cora-input-actions .btn {
  border-radius: 0.9rem;
}

.cora-eval {
  background: linear-gradient(160deg, #ffffff 0%, #f7f6ff 55%, #eef6ff 100%);
}

.cora-eval .card-body {
  overflow-y: auto;
}

.cora-media-layout {
  gap: 1.2rem;
  overflow-x: clip;
}

.cora-media-header,
.cora-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cora-media-shell,
.cora-gallery-shell {
  background:
    radial-gradient(circle at top right, rgba(111, 69, 240, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 255, 0.98));
}

.cora-media-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.cora-media-hero-actions {
  display: grid;
  gap: 0.65rem;
  justify-items: end;
}

.cora-media-quota {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.cora-media-form {
  display: grid;
  gap: 1rem;
}

.cora-media-composer {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 1rem;
  align-items: stretch;
}

.cora-media-prompt-panel,
.cora-media-settings-panel {
  position: relative;
  border-radius: 1.35rem;
  border: 1px solid rgba(111, 69, 240, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 247, 255, 0.94));
  box-shadow: 0 18px 36px rgba(24, 17, 58, 0.06);
}

.cora-media-prompt-panel {
  padding: 1rem;
  overflow: hidden;
}

.cora-inline-subprompt {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.9rem;
}

.cora-reference-panel {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.9rem;
  padding: 0.9rem;
  border-radius: 1rem;
  border: 1px dashed rgba(111, 69, 240, 0.22);
  background: linear-gradient(145deg, rgba(250, 249, 255, 0.95), rgba(243, 248, 255, 0.92));
}

.cora-reference-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: #6b608d;
}

.cora-reference-preview {
  min-height: 120px;
  border-radius: 1rem;
  border: 1px solid rgba(111, 69, 240, 0.12);
  background: rgba(255, 255, 255, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cora-reference-preview img,
.cora-reference-preview video {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.cora-reference-empty {
  padding: 1rem;
  text-align: center;
  color: #6b608d;
  font-size: 0.84rem;
}

.cora-media-prompt-panel::before,
.cora-media-settings-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.45) 45%, transparent 65%);
  transform: translateX(-120%);
  animation: cora-sheen 5.5s linear infinite;
  pointer-events: none;
}

.cora-media-settings-panel {
  padding: 1rem;
  overflow: hidden;
}

.cora-image-settings-panel {
  display: grid;
  align-content: start;
  gap: 0.9rem;
}

.cora-settings-section {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 1.15rem;
  border: 1px solid rgba(111, 69, 240, 0.1);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 255, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.cora-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.cora-settings-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: #5b49b5;
}

.cora-settings-subtitle {
  margin-top: 0.18rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #75679f;
}

.cora-settings-section-reference {
  background:
    radial-gradient(circle at top right, rgba(111, 69, 240, 0.08), transparent 38%),
    linear-gradient(145deg, rgba(249, 248, 255, 0.98), rgba(242, 247, 255, 0.95));
}

.cora-media-form textarea.form-control {
  min-height: 12.5rem;
  resize: vertical;
  border-radius: 1.2rem;
  border-color: rgba(111, 69, 240, 0.14);
  background: rgba(255, 255, 255, 0.94);
  font-size: 1.02rem;
  line-height: 1.55;
  box-shadow: 0 12px 24px rgba(24, 17, 58, 0.05);
}

.cora-main-prompt {
  min-height: 9.5rem !important;
}

.cora-negative-prompt {
  min-height: 7.25rem !important;
  font-size: 0.98rem !important;
  line-height: 1.5;
}

.cora-media-form textarea.form-control:focus,
.cora-media-form .form-control:focus,
.cora-media-form .form-select:focus {
  border-color: rgba(111, 69, 240, 0.35);
  box-shadow: 0 0 0 0.22rem rgba(111, 69, 240, 0.1);
}

.cora-media-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.cora-media-settings-grid.is-video {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cora-field {
  display: grid;
  gap: 0.35rem;
}

.cora-field .form-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #6b5ba6;
}

.cora-field .form-control,
.cora-field .form-select {
  min-height: 44px;
  border-radius: 0.95rem;
  border-color: rgba(111, 69, 240, 0.12);
  background: rgba(255, 255, 255, 0.94);
}

.cora-switch-field {
  display: flex;
  align-items: end;
}

.cora-switch-field .form-check {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.9rem 0.75rem 2.9rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(111, 69, 240, 0.12);
  background: rgba(255, 255, 255, 0.94);
}

.cora-media-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(111, 69, 240, 0.08);
}

.cora-media-actions-stacked {
  display: grid;
  justify-items: stretch;
  gap: 0.65rem;
}

.cora-media-actions-under-prompts {
  margin-top: 1.1rem;
  justify-items: start;
}

.cora-media-actions-under-prompts .cora-media-submit-btn {
  width: min(100%, 38rem);
  min-height: 82px;
  padding: 1.05rem 1.25rem;
  border-radius: 1.3rem;
}

.cora-media-submit-btn {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  justify-content: flex-start;
  width: 100%;
  min-height: 74px;
  padding: 1rem 1.15rem;
  border: none;
  border-radius: 1.2rem;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(135deg, #6d48ef, #4d8dff);
  box-shadow: 0 18px 34px rgba(91, 72, 201, 0.24);
}

.cora-media-submit-btn:hover,
.cora-media-submit-btn:focus {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px rgba(91, 72, 201, 0.3);
}

.cora-media-submit-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  font-size: 1.15rem;
}

.cora-media-submit-copy {
  display: grid;
  gap: 0.12rem;
  text-align: left;
}

.cora-media-submit-copy strong {
  color: #fff;
  font-size: 1.08rem;
  line-height: 1.15;
}

.cora-media-submit-copy small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
  line-height: 1.35;
}

.cora-media-status-line {
  min-height: 1.15rem;
  padding-left: 0.15rem;
}

.cora-reference-clear-btn {
  border-radius: 999px;
  padding-inline: 0.9rem;
  border-color: rgba(111, 69, 240, 0.14);
  color: #5b49b5;
}

.cora-video-options {
  max-width: 16rem;
}

.cora-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
}

.cora-gallery-card {
  max-width: 220px;
  overflow: hidden;
  border: 1px solid #e7e2fb;
  border-radius: 1.3rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 30px rgba(24, 17, 58, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  justify-self: center;
  width: 100%;
}

.cora-gallery-media {
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(circle at top, rgba(141, 115, 245, 0.22), transparent 42%),
    linear-gradient(145deg, #f4f1ff, #eef7ff);
  overflow: hidden;
}

.cora-gallery-media img,
.cora-gallery-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.cora-gallery-zoomable {
  cursor: zoom-in;
}

.cora-gallery-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 28px 48px rgba(24, 17, 58, 0.16);
  border-color: #cfc1ff;
}

.cora-gallery-card:hover .cora-gallery-media img,
.cora-gallery-card:hover .cora-gallery-media video {
  transform: scale(1.04);
}

.cora-gallery-body {
  display: grid;
  gap: 0.5rem;
  padding: 0.9rem 0.9rem 1rem;
}

.cora-gallery-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: #6b608d;
}

.cora-gallery-prompt {
  color: #2e274f;
  font-weight: 600;
  line-height: 1.35;
  font-size: 0.9rem;
}

.cora-gallery-empty {
  padding: 1.15rem;
  border-radius: 1rem;
  background: linear-gradient(145deg, #faf9ff, #f3f8ff);
  border: 1px dashed #d8cff9;
  color: #6b608d;
}

.cora-generation-area {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 1.25rem;
  background: linear-gradient(180deg, rgba(247, 246, 255, 0.85), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(111, 69, 240, 0.08);
}

.cora-generation-stack {
  display: grid;
  gap: 0.8rem;
}

.cora-generation-empty {
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px dashed #d8cff9;
  color: #6b608d;
  background: linear-gradient(145deg, rgba(250, 249, 255, 0.95), rgba(243, 248, 255, 0.95));
}

.cora-generation-card {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
  border-radius: 1.25rem;
  border: 1px solid #dfd7ff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 247, 255, 0.98));
  box-shadow: 0 18px 32px rgba(24, 17, 58, 0.08);
  overflow: hidden;
  animation: cora-card-rise 0.35s ease;
}

.cora-generation-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.65) 40%, transparent 60%);
  transform: translateX(-120%);
  animation: cora-sheen 2.4s linear infinite;
}

.cora-generation-card.is-succeeded::before,
.cora-generation-card.is-failed::before {
  display: none;
}

.cora-generation-visual {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.95), rgba(233, 227, 255, 0.85));
}

.cora-loader-orb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6f45f0, #21b8ff);
  box-shadow: 0 0 24px rgba(111, 69, 240, 0.35);
  animation: cora-float 1.6s ease-in-out infinite;
}

.cora-loader-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(111, 69, 240, 0.18);
}

.cora-loader-ring-a {
  inset: 6px;
  animation: cora-spin 3.2s linear infinite;
}

.cora-loader-ring-b {
  inset: 16px;
  border-color: rgba(33, 184, 255, 0.24);
  animation: cora-spin-reverse 2.2s linear infinite;
}

.cora-generation-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.cora-generation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cora-generation-state {
  font-size: 0.83rem;
  color: #6b5ba6;
  font-weight: 700;
}

.cora-generation-prompt {
  color: #2e274f;
  font-weight: 600;
  line-height: 1.45;
}

.cora-generation-error {
  color: #b13135;
  font-size: 0.9rem;
}

.cora-generation-card.is-failed {
  border-color: #f0c1c4;
  background: linear-gradient(135deg, #fff8f8, #fffdfd);
}

.cora-generation-card.is-failed .cora-generation-state {
  color: #b13135;
}

.cora-generation-card.is-succeeded {
  border-color: #c6ecd9;
  background: linear-gradient(135deg, #f7fff9, #fcfffd);
}

.cora-generation-card.is-succeeded .cora-generation-state {
  color: #0f7f54;
}

body.cora-image-modal-open {
  overflow: hidden;
}

.cora-image-modal {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.cora-image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 12, 28, 0.72);
  backdrop-filter: blur(8px);
}

.cora-image-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1280px, 96vw);
  height: min(92vh, 920px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(27, 24, 48, 0.94), rgba(16, 14, 31, 0.96));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.cora-image-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cora-image-modal-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.cora-image-modal-caption {
  margin-top: 0.28rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  line-height: 1.45;
  max-width: 72ch;
}

.cora-image-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cora-image-modal-actions .btn {
  border-radius: 999px;
}

.cora-image-modal-stage {
  min-height: 0;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.02) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.02) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.02) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.02) 75%);
  background-position: 0 0, 16px 16px;
  background-size: 32px 32px;
}

.cora-image-modal-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.16s ease;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
  border-radius: 1rem;
}

.cora-eval-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cora-eval-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #2a2155;
}

.cora-eval-subtitle {
  font-size: 0.85rem;
  color: #6b5ba6;
}

.cora-eval-stars {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.cora-star {
  color: #d7d3e8;
  text-shadow: 0 6px 12px rgba(90, 55, 214, 0.15);
}

.cora-star.is-on {
  color: #ffc857;
}

.cora-eval-score {
  font-size: 0.9rem;
  font-weight: 600;
  color: #5c518c;
  margin-left: 0.35rem;
}

.cora-eval-section {
  padding: 0.7rem 0.9rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(111, 69, 240, 0.12);
  margin-bottom: 0.7rem;
}

.cora-eval-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #6b5ba6;
  margin-bottom: 0.45rem;
}

.cora-eval-text {
  margin-bottom: 0;
  color: #3c325f;
}

.cora-eval-list {
  margin: 0;
  padding-left: 1rem;
  color: #3c325f;
}

.cora-eval-list li {
  margin-bottom: 0.35rem;
}

.cora-eval-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.cora-eval-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #ece8ff;
  color: #5a4bb4;
}

.cora-eval-item.is-good .cora-eval-pill {
  background: #daf6ea;
  color: #0f7f54;
}

.cora-eval-item.is-missing .cora-eval-pill {
  background: #ffe6e7;
  color: #b13135;
}

.cora-eval-loading {
  display: none;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: #5f5488;
  padding: 0.6rem 0.75rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px dashed rgba(111, 69, 240, 0.25);
  margin-bottom: 1rem;
}

.cora-eval-loading.is-on {
  display: inline-flex;
}

.cora-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(111, 69, 240, 0.25);
  border-top-color: #6f45f0;
  animation: cora-spin 0.9s linear infinite;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-30px) rotate(0deg);
    opacity: 0.95;
  }
  100% {
    transform: translateY(80vh) rotate(420deg);
    opacity: 0;
  }
}

@keyframes cora-typing {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  50% {
    transform: translateY(-4px);
    opacity: 0.9;
  }
}

@keyframes cora-card-rise {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cora-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes cora-spin-reverse {
  0% {
    transform: rotate(360deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@keyframes cora-float {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.08);
  }
}

@keyframes cora-sheen {
  100% {
    transform: translateX(130%);
  }
}

@keyframes cora-panel-in {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 992px) {
  :root {
    --cora-panel-height: 860px;
  }

  .app-main {
    max-width: 1560px;
    margin-left: auto;
    margin-right: auto;
  }

  .cora-page {
    max-width: 1680px;
    margin-left: auto;
    margin-right: auto;
  }

  .cora-header {
    margin-bottom: 1rem !important;
  }

  .cora-header-body {
    padding: 0.8rem 1.2rem !important;
  }

  .app-main .row.g-3 {
    --bs-gutter-x: 1.25rem;
    --bs-gutter-y: 1.25rem;
  }

  .app-main .card-body.p-4 {
    padding: 2rem !important;
  }

  .feature-btn .card-body {
    padding: 2rem !important;
  }

  .stat-card {
    border-radius: 1.2rem;
  }

  .cora-workspace {
    grid-template-columns: minmax(300px, 340px) minmax(0, 1fr) minmax(340px, 400px);
    align-items: stretch;
  }

  .cora-sidebar-stack {
    position: sticky;
    top: 98px;
    height: var(--cora-panel-height);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .cora-sidebar {
    height: 100%;
  }

  .cora-eval {
    position: sticky;
    top: 98px;
    height: var(--cora-panel-height);
  }

  .cora-chat {
    height: var(--cora-panel-height);
  }

  .cora-sidebar .card-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .cora-thread-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.2rem;
  }

  .cora-chat-log {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }

  .cora-chat-form {
    margin-top: 1rem;
  }

  .cora-media-layout.is-active {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .app-main {
    padding-bottom: 1rem !important;
  }

  .join-shell {
    min-height: 560px;
  }

  .join-hero,
  .join-form-wrap {
    height: 100%;
  }

  .topic-choice-group {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .vote-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1199.98px) {
  .cora-media-composer {
    grid-template-columns: 1fr;
  }

  .cora-media-settings-grid.is-video {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .cora-media-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .cora-media-hero-actions {
    justify-items: stretch;
  }

  .cora-media-quota {
    justify-content: flex-start;
  }

  .cora-media-settings-grid,
  .cora-media-settings-grid.is-video {
    grid-template-columns: 1fr 1fr;
  }

  .cora-settings-head {
    flex-direction: column;
    align-items: stretch;
  }

  .cora-reference-clear-btn {
    align-self: flex-start;
  }

  .cora-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cora-gallery-card {
    max-width: none;
  }
}
