@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@500;600;700&family=Nunito:wght@600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@600&display=swap');
@import "./variables.css";

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

html[data-shell="dashboard"] body {
  font-family: var(--font);
  background: var(--bg-app);
  color: var(--text-white);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

html:not(.auth-ready) .app {
  visibility: hidden;
}

body:not(.app-ready) .chat-card-robot,
body:not(.app-ready) .mission-widget__visual img {
  opacity: 0;
}

/* ─── Splash screen ─── */
@property --splash-hole {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  overflow: hidden;
  --splash-hole: 0%;
}

.splash__hands {
  position: absolute;
  inset: 0;
  z-index: 30;
}

.splash__hand {
  position: absolute;
  width: 50%;
  will-change: transform, opacity;
}

.splash__hand img {
  width: 100%;
  height: auto;
}

.splash__hand--robot {
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  transition: transform 0.95s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
}

.splash__hand--human {
  top: 0;
  right: 0;
  transform: translateX(100%);
  transition: transform 0.95s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
}

.splash.is-meet .splash__hand--robot {
  transform: translateX(-19%);
}

.splash.is-meet .splash__hand--human {
  transform: translateX(19%);
}

@media (max-width: 768px) {
  .splash__hands {
    top: 50%;
    max-height: 30%;
    transform: translate(0%, -50%);
  }
  .splash.is-debug-frozen.is-touch .splash__ring {
    transform: scale(3);
  }

  .splash.is-touch .splash__ring {
    animation-name: splash-ring-pulse-mobile;
  }

  .splash__hand {
    width: 60%;
  }

  .splash.is-meet .splash__hand--robot {
    transform: translateX(-19%);
  }

  .splash.is-meet .splash__hand--human {
    transform: translateX(19%);
  }
}

.splash.is-reveal .splash__hand--robot {
  transform: translateX(-115%);
  opacity: 0;
}

.splash.is-reveal .splash__hand--human {
  transform: translateX(115%);
  opacity: 0;
}

.splash__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 45;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 0 0 0 rgba(0, 0, 0, 0.85),
    0 0 30px rgba(255, 255, 255, 0.15);
  opacity: 0;
  pointer-events: none;
  transform: scale(0);
}

.splash.is-touch .splash__ring {
  opacity: 1;
  animation: splash-ring-pulse 0.42s ease-out forwards;
}

.splash.is-reveal {
  --splash-hole: 150%;
  background: transparent;
  pointer-events: none;
  transition: --splash-hole 0.8s cubic-bezier(0.33, 1, 0.45, 1);
  -webkit-mask-image: radial-gradient(
    circle at 50% 50%,
    transparent var(--splash-hole),
    #000 var(--splash-hole)
  );
  mask-image: radial-gradient(
    circle at 50% 50%,
    transparent var(--splash-hole),
    #000 var(--splash-hole)
  );
}

.splash.is-reveal .splash__hand--robot,
.splash.is-reveal .splash__hand--human {
  transition-duration: 0.5s;
}

/* Debug freeze — add ?splash=touch (etc.) to URL */
.splash.is-debug-frozen,
.splash.is-debug-frozen * {
  animation: none !important;
  transition: none !important;
}

.splash.is-debug-frozen.is-touch .splash__ring {
  opacity: 1;
  transform: scale(8);
}

@keyframes splash-ring-pulse {
  0% {
    transform: scale(0);
    opacity: 1;
    box-shadow:
      0 0 0 0 rgba(255, 255, 255, 0.55),
      0 0 24px rgba(255, 255, 255, 0.35);
  }
  70% {
    transform: scale(8);
    opacity: 0.6;
  }
  100% {
    transform: scale(14);
    opacity: 0;
    box-shadow:
      0 0 0 0 rgba(255, 255, 255, 0),
      0 0 0 rgba(255, 255, 255, 0);
  }
}

@keyframes splash-ring-pulse-mobile {
  0% {
    transform: scale(0);
    opacity: 1;
    box-shadow:
      0 0 0 0 rgba(255, 255, 255, 0.55),
      0 0 24px rgba(255, 255, 255, 0.35);
  }
  70% {
    transform: scale(3.5);
    opacity: 0.6;
  }
  100% {
    transform: scale(5);
    opacity: 0;
    box-shadow:
      0 0 0 0 rgba(255, 255, 255, 0),
      0 0 0 rgba(255, 255, 255, 0);
  }
}

body.app-ready .chat-card-robot {
  animation: chat-robot-slide-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.app-ready .mission-widget__visual img {
  animation: mission-corgi-slide-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

img {
  display: block;
  max-width: 100%;
}

button,
select {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── App: 15% | 60% | 25% ─── */
.app {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) minmax(248px, 20%);
  height: 100vh;
  padding: 14px;
  gap: 14px;
  background: var(--bg-app);
}

.app.is-sidebar-ready {
  transition: grid-template-columns 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.app:not(.is-sidebar-ready) {
  transition: none !important;
}

/* ─── Left sidebar ─── */
.sidebar-left {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  width: 100%;
  padding: 0;
  overflow: hidden;
  contain: layout style;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  transition: gap 0.32s cubic-bezier(0.22, 1, 0.36, 1), margin-bottom 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 16px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border-radius: 12px;
  transition: padding 0.38s cubic-bezier(0.22, 1, 0.36, 1), gap 0.32s cubic-bezier(0.22, 1, 0.36, 1), background 0.15s ease;
}

.brand:hover {
  background: rgba(255, 255, 255, 0.06);
}

.brand:hover .brand-logo {
  transform: scale(1.04);
}

.sidebar-toggle {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    color 0.15s,
    width 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.15s;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sidebar-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand-text {
  overflow: hidden;
  max-width: 180px;
  opacity: 1;
  transition:
    opacity 0.22s ease,
    max-width 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand-text h1 {
  font-size: var(--fs-brand);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.brand-text span {
  display: block;
  font-size: var(--fs-brand-sub);
  font-weight: 600;
  color: #8e9aaf;
  margin-top: 3px;
}

.nav-menu {
  flex: 1;
  list-style: none;
  overflow-y: auto;
  min-height: 0;
  padding: 0 2px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE /旧版 Edge */
}

.nav-menu::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.nav-menu li {
  margin-bottom: 6px;
}

.nav-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 14px;
  outline: none;
  font-size: var(--fs-nav);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  transition:
    background 0.15s,
    box-shadow 0.15s,
    padding 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    gap 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-menu li:hover:not(.active) a {
  background: rgba(255, 255, 255, 0.06);
}

.nav-menu li.active a {
  background: var(--grad-nav-active);
  color: #fff;
  font-weight: 800;
  box-shadow:
    0 4px 18px rgba(99, 102, 241, 0.45),
    0 2px 8px rgba(232, 121, 249, 0.25);
}

.nav-icon-slot {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

.nav-label {
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  max-width: 180px;
  opacity: 1;
  transition:
    opacity 0.22s ease,
    max-width 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.chat-card {
  margin-top: auto;
  background: linear-gradient(165deg, #141b33 0%, #0c1022 100%);
  border-radius: 26px;
  padding: 22px 20px 20px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.45),
    0 0 20px rgba(99, 102, 241, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: padding 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.chat-card-inner {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 15px;
  overflow: hidden;
  max-height: 96px;
  opacity: 1;
  transition:
    opacity 0.22s ease,
    max-height 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    margin-bottom 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes chat-robot-slide-in {
  from {
    opacity: 0;
    transform: translateX(-56px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.chat-card-robot {
  width: 76px;
  height: 76px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.25));
}

@media (prefers-reduced-motion: reduce) {
  body:not(.app-ready) .chat-card-robot,
  body:not(.app-ready) .mission-widget__visual img {
    opacity: 1;
  }

  .chat-card-robot,
  .mission-widget__visual img,
  .splash {
    animation: none !important;
    transition: none !important;
  }
}

.chat-card-text {
  min-width: 0;
}

.chat-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.chat-card p {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.4;
}

.btn-chat {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border: none;
  text-decoration: none;
  border-radius: 18px;
  background: linear-gradient(180deg, #7c4dff 0%, #6e2cf2 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow:
    0 6px 20px rgba(110, 44, 242, 0.45),
    0 2px 4px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  max-height: 56px;
  opacity: 1;
  transition:
    filter 0.15s,
    transform 0.15s,
    opacity 0.22s ease,
    max-height 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-chat:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-chat:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

.btn-chat-icon {
  flex-shrink: 0;
  opacity: 0.95;
}

.btn-chat-compact {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  border: none;
  text-decoration: none;
  border-radius: 16px;
  background: linear-gradient(180deg, #7c4dff 0%, #6e2cf2 100%);
  color: #fff;
  box-shadow:
    0 6px 20px rgba(110, 44, 242, 0.45),
    0 2px 4px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition:
    filter 0.15s,
    transform 0.15s,
    opacity 0.24s ease,
    max-height 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-chat-compact:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-chat-compact:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

.btn-chat-compact__label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

/* ─── Sidebar collapsed (manual toggle) ─── */
.app.is-sidebar-collapsed {
  grid-template-columns: 72px minmax(0, 1fr) minmax(248px, 20%);
}

.app.is-sidebar-collapsed .sidebar-header {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  margin-bottom: 8px;
  padding-top: 4px;
}

.app.is-sidebar-collapsed .brand {
  flex: none;
  width: 100%;
  justify-content: center;
  padding: 0;
  gap: 0;
}

.app.is-sidebar-collapsed .brand-logo {
  width: 55px;
  height: 55px;
}

.app.is-sidebar-collapsed .sidebar-toggle {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  margin: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

.app.is-sidebar-collapsed .sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.app.is-sidebar-collapsed .sidebar-toggle svg {
  width: 18px;
  height: 18px;
}

.app.is-sidebar-collapsed .brand-text,
.app.is-sidebar-collapsed .nav-label {
  max-width: 0;
  opacity: 0;
  transition-delay: 0s;
}

.app.is-sidebar-collapsed .chat-card-inner,
.app.is-sidebar-collapsed .btn-chat {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
  transition-delay: 0s;
}

.app:not(.is-sidebar-collapsed) .brand-text,
.app:not(.is-sidebar-collapsed) .nav-label,
.app:not(.is-sidebar-collapsed) .chat-card-inner,
.app:not(.is-sidebar-collapsed) .btn-chat {
  transition-delay: 0.1s;
}

.app.is-sidebar-collapsed .nav-menu {
  padding: 0;
}

.app.is-sidebar-collapsed .nav-menu li {
  margin-bottom: 4px;
}

.app.is-sidebar-collapsed .nav-menu li a {
  justify-content: center;
  padding: 10px 6px;
  gap: 0;
  border-radius: 12px;
}

.app.is-sidebar-collapsed .nav-icon-slot {
  width: 32px;
  height: 32px;
}

.app.is-sidebar-collapsed .nav-icon {
  width: 32px;
  height: 32px;
}

.app.is-sidebar-collapsed .chat-card {
  margin-top: auto;
  padding: 0 6px 8px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.app.is-sidebar-collapsed .btn-chat-compact {
  width: 52px;
  height: 52px;
  max-height: 52px;
  margin: 0 auto;
  padding: 0;
  opacity: 1;
  border-radius: 14px;
  pointer-events: auto;
  transition-delay: 0.12s;
}

.app.is-sidebar-collapsed .btn-chat-compact__label {
  display: none;
}

.app.is-sidebar-collapsed .btn-chat-compact .btn-chat-icon {
  width: 24px;
  height: 24px;
}

.app:not(.is-sidebar-collapsed) .btn-chat-compact {
  transition-delay: 0s;
}

.app:not(.is-sidebar-ready),
.app:not(.is-sidebar-ready) .sidebar-left,
.app:not(.is-sidebar-ready) .sidebar-header,
.app:not(.is-sidebar-ready) .brand,
.app:not(.is-sidebar-ready) .brand-text,
.app:not(.is-sidebar-ready) .brand-logo,
.app:not(.is-sidebar-ready) .nav-label,
.app:not(.is-sidebar-ready) .nav-menu li a,
.app:not(.is-sidebar-ready) .chat-card,
.app:not(.is-sidebar-ready) .chat-card-inner,
.app:not(.is-sidebar-ready) .btn-chat,
.app:not(.is-sidebar-ready) .btn-chat-compact,
.app:not(.is-sidebar-ready) .sidebar-toggle,
.app:not(.is-sidebar-ready) .sidebar-toggle svg {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .app,
  .app.is-sidebar-ready,
  .sidebar-left,
  .sidebar-header,
  .brand,
  .brand-text,
  .brand-logo,
  .nav-label,
  .nav-menu li a,
  .chat-card,
  .chat-card-inner,
  .btn-chat,
  .btn-chat-compact,
  .sidebar-toggle,
  .sidebar-toggle svg {
    transition: none !important;
  }
}

/* ─── Center stage (main + footer) ─── */
.stage-center {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.main-scroll {
  flex: 1;
  min-height: 0;
  background: var(--bg-panel);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-card);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem;
}

.main-scroll--module {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.main-scroll--module > * {
  flex: 1;
  min-height: 0;
  min-width: 0;
}

.main-scroll::-webkit-scrollbar {
  width: 6px;
}

.main-scroll::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.35);
  border-radius: 6px;
}

/* ─── Hero banner：整幅实验室背景 + 左侧渐变文案区 ─── */
.hero-banner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 330px;
  margin-bottom: 20px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background-color: #c8daf5;
  background-image: url("../assets/hero-lab.webp");
  background-size: cover;
  background-position: center 0%;
  background-repeat: no-repeat;
}

/* 左侧浅蓝白渐变，保证文字可读 */
.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(236, 244, 255, 0.92) 28%,
    rgba(210, 228, 255, 0.55) 48%,
    rgba(180, 210, 255, 0.15) 62%,
    transparent 78%
  );
  pointer-events: none;
  z-index: 0;
  width: 70%;
}

.hero-copy {
  position: relative;
  z-index: 1;
  flex: 0 1 52%;
  max-width: 520px;
  padding: 28px 24px 28px 32px;
}

.hero-greeting {
  font-size: 25px;
  font-weight: 900;
  color: #060937;
  margin-bottom: 8px;
}

.hero-title {
  margin: 0 0 10px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-title-line {
  display: block;
  font-size: 40px;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  color: #1a2332;
}

.hero-title-gradient {
  display: block;
  font-size: 50px;
  font-weight: 600;
  font-family: "Fredoka", sans-serif;
  background: linear-gradient(90deg, #3a8dff 0%, #6b5cff 50%, #8a4fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 18px;
  font-weight: 800;
  color: #00002f;
  line-height: 1.45;
  margin-bottom: 15px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.52);
  border-radius: 16px;
  padding: 10px 16px 10px 12px;
  min-width: 108px;
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.stat-pill img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.stat-pill-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  line-height: 1.2;
}

.stat-pill .label {
  font-size: 12px;
  font-weight: 800;
  color: #1a2332;
}

.stat-pill .value {
  font-size: 16px;
  font-weight: 800;
  color: #1a2332;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.speech-bubble {
  position: absolute;
  z-index: 2;
  top: 9%;
  right: 16%;
}

.speech-bubble__card {
  position: relative;
  width: max-content;
  box-sizing: border-box;
  padding: 22px;
  background: rgba(255, 255, 255, 0.87);
  border-radius: 30px;
  text-align: center;
  filter: drop-shadow(0 12px 28px rgba(59, 76, 150, 0.2));
  transform: rotate(8deg);
}

/* 左下角三角箭头（伪元素） */
.speech-bubble__card::after {
  content: "";
  position: absolute;
  left: 36px;
  bottom: -12px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 12px 14px 0 0;
  border-color: rgba(255, 255, 255, 0.87) transparent transparent transparent;
}

.speech-line {
  margin: 0;
  padding: 0;
  font-size: 16px;
  text-align: left;
  font-weight: 800;
  color: #12183a; 
}

.speech-line + .speech-line {
  margin-top: 2px;
}

.speech-line--title { 
}

.speech-line--title strong {
  font-weight: 700;
  color: #12183a;
}

.speech-line--last {
  margin-top: 2px;
}

.speech-bubble-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 5px;
  vertical-align: -3px;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.speech-bubble__card.is-done .speech-bubble-icon {
  opacity: 1;
}

.speech-cursor {
  display: inline-block;
  width: 2px;
  height: 0.95em;
  margin-left: 1px;
  background: #12183a;
  vertical-align: -2px;
  animation: speech-cursor-blink 0.75s step-end infinite;
}

@keyframes speech-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ─── Sections ─── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-head h3 {
  font-size: 20px;
  font-weight: 600;
  color: #12183a;
  font-family: "Fredoka", sans-serif;
}

.section-head a {
  font-size: var(--fs-body);
  font-weight: 700;
  font-size: 15px;
  color: var(--blue-link);
}

.section-bg {
  background: var(--explore-section-bg);
  border-radius: 24px;
  padding: 22px 22px 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

/* ─── Explore & Learn ─── */
.explore-section {
  background: var(--explore-section-bg);
  border-radius: 24px;
  padding: 22px 22px 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.explore-section .section-head {
  margin-bottom: 15px;
}

.explore-section .section-head h3 { 
  font-size: 20px;
  font-weight: 600;
  color: #12183a;
  font-family: "Fredoka", sans-serif;
}

.explore-swiper {
  width: 100%;
  padding: 8px 4px 16px !important;
  overflow: hidden;
}

.explore-swiper .swiper-wrapper {
  align-items: stretch;
}

.explore-swiper .swiper-slide {
  height: auto;
  display: flex;
}

.explore-card {
  position: relative;
  border-radius: 24px;
  padding: 14px 12px 12px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 300px;
  min-height: 260px;
  overflow: hidden;
  border: 2px solid transparent;
  isolation: isolate;
  box-shadow: none!important;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.explore-card:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}

a.explore-card:hover {
  transform: translateY(-2px);
}

/* 面光叠层：顶亮→底暗，模拟凸面受光 */
.explore-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 19px;
  background: linear-gradient(
    175deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.05) 30%,
    transparent 55%,
    rgba(0, 0, 0, 0.06) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* 顶部 rim 高光细线 */
.explore-card::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 19px 19px 0 0;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  z-index: 2;
}

.explore-card h4 {
  position: relative;
  z-index: 3;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 0px;
  line-height: 1.2;
  width: 100%;
}

.card-icon-wrap {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 88px;
  margin-bottom: 0px; 
}

.explore-card .card-icon {
  width: 100%;
  height: auto;
  max-width: 200px;
  object-fit: contain;
  margin-top: -10px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.explore-card:hover .card-icon {
  transform: scale(1.08);
}

.explore-card p {
  position: relative;
  z-index: 3;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0.98;
  margin: -10px 0 12px;
  padding: 0 4px;
  max-width: 93%;
}

.explore-card .card-btn {
  position: relative;
  z-index: 3;
  min-width: 90%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px; 
  border-radius: var(--radius-pill);
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font); 
  background-color: rgba(0, 0, 0, 0.3);
  pointer-events: none;
  transition: filter 0.15s, transform 0.15s;
}

.explore-card:hover .card-btn {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.card-btn__text {
  flex: 1;
  display: block;
  padding: 10px;
  padding-left: 15px;
  text-align: left;
  white-space: nowrap;
}

.card-btn__icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  margin-right: 5px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  padding-bottom: 2px;
}

/* ── 蓝 ── */
.explore-card.blue {
  background:
    linear-gradient(175deg, #3d8ff5 0%, #1a6be9 55%, #1350cc 100%) padding-box,
    linear-gradient(160deg, #7eb8ff 0%, #3b82f6 40%, #1d4ed8 75%, #1338a8 100%) border-box;
  box-shadow:
    0 10px 28px rgba(26, 107, 233, 0.45),
    0 4px 8px rgba(0, 0, 0, 0.22),
    inset 0 1px 2px rgba(255, 255, 255, 0.18);
} 
.explore-card.blue .card-btn__icon { background-color: #2563eb; }

/* ── 紫 ── */
.explore-card.purple {
  background:
    linear-gradient(175deg, #6040cc 0%, #452db6 55%, #341fa0 100%) padding-box,
    linear-gradient(160deg, #a88fff 0%, #7c5fe8 40%, #5b21b6 75%, #3b169c 100%) border-box;
  box-shadow:
    0 10px 28px rgba(69, 45, 182, 0.45),
    0 4px 8px rgba(0, 0, 0, 0.22),
    inset 0 1px 2px rgba(255, 255, 255, 0.18);
} 
.explore-card.purple .card-btn__icon { background-color: #6d28d9; }

/* ── 粉红 ── */
.explore-card.pink {
  background:
    linear-gradient(175deg, #f05598 0%, #e13c82 55%, #c72b6e 100%) padding-box,
    linear-gradient(160deg, #ff8ec0 0%, #f05598 40%, #be185d 75%, #9c1050 100%) border-box;
  box-shadow:
    0 10px 28px rgba(225, 60, 130, 0.45),
    0 4px 8px rgba(0, 0, 0, 0.22),
    inset 0 1px 2px rgba(255, 255, 255, 0.18);
} 
.explore-card.pink .card-btn__icon { background-color: #db2777; }

/* ── 绿 ── */
.explore-card.green {
  background:
    linear-gradient(175deg, #36c472 0%, #27a460 55%, #1b8449 100%) padding-box,
    linear-gradient(160deg, #6ee7a0 0%, #34d474 40%, #15803d 75%, #0f6032 100%) border-box;
  box-shadow:
    0 10px 28px rgba(39, 164, 96, 0.45),
    0 4px 8px rgba(0, 0, 0, 0.22),
    inset 0 1px 2px rgba(255, 255, 255, 0.18);
} 
.explore-card.green .card-btn__icon { background-color: #16a34a; }

/* ── 橙 ── */
.explore-card.orange {
  background:
    linear-gradient(175deg, #f7aa45 0%, #f19327 55%, #d07810 100%) padding-box,
    linear-gradient(160deg, #ffc96a 0%, #f9a840 40%, #c2410c 75%, #9a3412 100%) border-box;
  box-shadow:
    0 10px 28px rgba(241, 147, 39, 0.45),
    0 4px 8px rgba(0, 0, 0, 0.22),
    inset 0 1px 2px rgba(255, 255, 255, 0.18);
} 
.explore-card.orange .card-btn__icon { background-color: #ea580c; }

/* ── 青绿 ── */
.explore-card.teal {
  background:
    linear-gradient(175deg, #14b0b4 0%, #0e9194 55%, #0a7072 100%) padding-box,
    linear-gradient(160deg, #5ee6e8 0%, #1ec8cb 40%, #0f766e 75%, #095c5a 100%) border-box;
  box-shadow:
    0 10px 28px rgba(14, 145, 148, 0.45),
    0 4px 8px rgba(0, 0, 0, 0.22),
    inset 0 1px 2px rgba(255, 255, 255, 0.18);
} 
.explore-card.teal .card-btn__icon { background-color: #0d9488; }

/* ─── Popular tools ─── */
.tools-row {
  display: flex;
  gap: 16px;
  overflow-x: auto; 
}

.tool-item {
  flex: 1;
  text-align: center;
}

.tool-item[data-platform-link] {
  cursor: pointer;
}

.tool-item .tool-circle {
  width: 60px;
  height: 60px; 
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px; 
  border-radius: 15px;
  cursor: pointer;
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.tool-item .tool-circle:hover {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.tool-item .tool-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-item span {
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.25;
  display: block;
  font-size: 15px;
}

/* ─── Project / world rows ─── */
.cards-row {
  display: grid;
  gap: 14px; 
}

.cards-row--6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.project-card {
  overflow: hidden; 
  cursor: pointer;
}

.project-card .thumb {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md); 
  overflow: hidden;
  background: #dde4ef;
}

.project-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card:hover .thumb img {
  transform: scale(1.08);
}

.project-card .title { 
  font-size: var(--fs-small);
  font-weight: 800;
  color: var(--text-dark);
  font-size: 15px;
  margin-top: 8px;
  font-family: "Fredoka", sans-serif;
  text-align: center;
}

.project-card.new-project {
  border: 2px dashed #b8c5d9;
  background: rgba(255, 255, 255, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  min-height: 0;
}

.project-card.new-project .plus {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8edff, #c7d4ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 400;
  color: var(--purple-brand);
  margin-bottom: 6px;
}

.project-card.new-project span {
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--text-dark-muted);
}

.world-row {
  display: grid;
  gap: 14px; 
}

.world-row--6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.world-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow-soft);
}

.world-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.world-card:hover img {
  transform: scale(1.08);
}

.world-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 10px;
  justify-content: center;
}

.world-card .overlay span {
  font-size: var(--fs-body);
  font-weight: 800;
  font-size: 15px;
  color: #fff;
}

/* ─── Footer nav (inside center stage) ─── */
.bottom-nav {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 16px;
  background: rgba(11, 14, 30, 0.94);
  backdrop-filter: blur(14px);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-footer);
  max-width: calc(100% - 32px);
  display: none!important;
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-footer);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
  min-width: 52px;
}

.bottom-nav a img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  opacity: 0.75;
  transition: opacity 0.15s, filter 0.15s;
}

.bottom-nav a.active {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.18);
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.35);
}

.bottom-nav a.active img {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.9));
}

/* ─── Right stage ─── */
.stage-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  gap: 12px;
}

.top-bar {
  flex-shrink: 0;
  display: flex;
  justify-content: stretch;
}

.top-bar-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  background: #fff;
  border-radius: var(--radius-pill);
  padding: 5px 6px 5px 12px;
  box-shadow: var(--shadow-soft);
}

.top-icon-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.top-icon-btn:hover {
  background: #f1f5f9;
}

.top-icon-btn svg {
  width: 18px;
  height: 18px;
}

.top-icon-btn.is-muted {
  color: #94a3b8;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 3px 10px 3px 4px;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s ease;
}

.profile-chip:hover {
  background: #f1f5f9;
}

.profile-chip.is-active {
  background: #eef2fc;
}

.profile-chip img,
.profile-chip-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.profile-chip-avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.profile-info strong {
  display: block;
  font-size: var(--fs-body);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  font-family: "Fredoka", sans-serif;
}

.level-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #000; 
  border-radius: var(--radius-pill);
  margin-top: 2px;
}

.profile-chip .chevron {
  color: #94a3b8;
}

.sidebar-right {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-right::-webkit-scrollbar {
  width: 4px;
}

.widget {
  border-radius: var(--radius-lg);
  padding: 16px;
  flex-shrink: 0;
}

.widget--dark {
  background: var(--bg-card-dark);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}

.widget--light {
  background: var(--bg-card-light);
  box-shadow: var(--shadow-soft);
  color: var(--text-dark);
}

.widget h4 {
  font-size: var(--fs-card-title);
  font-weight: 800;
  margin-bottom: 12px;
}

.widget--light h4 {
  color: var(--text-dark);
}

/* Mission */
.mission-widget {
  position: relative;
  padding: 18px 18px 16px;
  border-radius: 22px;
  background: linear-gradient(145deg, #141d42 0%, #0f1635 100%);
  border: 1.5px solid rgba(123, 97, 255, 0.45);
  box-shadow: 0 0 20px rgba(123, 97, 255, 0.12);
  overflow: hidden;
}

.mission-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mission-widget__title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mission-widget__title h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}

.mission-widget__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mission-widget__icon img{
  width: 30px;
  height: 30px;
}

.mission-widget__close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: rgba(167, 139, 250, 0.85);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.mission-widget__content {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.mission-widget__left {
  flex: 1;
  min-width: 0;
  padding-bottom: 2px;
}

.mission-widget__desc {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.45;
  margin: 0 0 12px;
}

.mission-widget__progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.mission-widget .progress-bar {
  flex: 1;
  height: 10px;
  background: #2a1f5c;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.mission-widget .progress-bar .fill {
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, #84cc16 0%, #22c55e 55%, #16a34a 100%);
  border-radius: var(--radius-pill);
}

.mission-widget .progress-label {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.mission-widget__visual {
  position: relative;
  flex-shrink: 0;
  width: 117px;
  height: 117px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.mission-widget__visual::before {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 18px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.35) 0%, transparent 70%);
  border-radius: 50%;
}

@keyframes mission-corgi-slide-in {
  from {
    opacity: 0;
    transform: translateX(56px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mission-widget__visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
}

.mission-widget .btn-mission {
  display: inline-block;
  width: auto;
  padding: 10px 20px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffd54f 0%, #ffb800 100%);
  color: #0a1628;
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font);
  box-shadow: 0 4px 14px rgba(255, 184, 0, 0.35);
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
}

.mission-widget .btn-mission:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* Progress widget */
.progress-widget {
  padding: 18px 20px;
  border-radius: 24px;
  background: #f0f2ff;
  box-shadow: 0 4px 18px rgba(79, 70, 229, 0.08);
}

.progress-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.12);
}

.progress-widget__header h4 {
  margin: 0;
  font-size: 17px;
  font-family: "Fredoka", sans-serif;
  font-weight: 800;
  color: #1a2340;
}

.progress-widget__link {
  font-size: 13px;
  font-weight: 700;
  color: #5b5ef7;
  text-decoration: none;
}

.progress-widget__link:hover {
  color: #4338ca;
}

.progress-widget__body {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.progress-stats {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 14px;
}

.progress-stat {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.progress-stat__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.progress-stat__content {
  flex: 1;
  min-width: 0;
}

.progress-stat strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #2a3558;
  margin-bottom: 2px;
}

.progress-stat .stat-num {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #1a2340;
  line-height: 1.2;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.progress-stat .mini-bar {
  height: 7px;
  width: 100%;
  max-width: 120px;
  background: #d8dcf5;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-stat .mini-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #3b5bdb 0%, #22b8cf 100%);
  border-radius: var(--radius-pill);
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-widget__divider {
  flex-shrink: 0;
  width: 1px;
  background: rgba(99, 102, 241, 0.15);
  margin: 0 14px;
}

.progress-badge {
  flex-shrink: 0;
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-left: 4px;
}

.progress-badge img {
  width: 100px;
  height: auto;
  object-fit: contain;
  margin-bottom: 8px;
}

.progress-badge__text {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  font-family: "Fredoka", sans-serif;
  color: #2a3558;
  line-height: 1.45;
}

/* Daily rewards */
.rewards-widget {
  padding: 18px 20px;
  border-radius: 24px;
  background: #eef0fb;
  box-shadow: 0 4px 18px rgba(79, 70, 229, 0.08);
}

.rewards-widget__header {
  margin-bottom: 14px;
}

.rewards-widget__header h4 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
  font-family: "Fredoka", sans-serif;
  color: #1a2340;
}

.rewards-widget__subtitle {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #3d4668;
}

.rewards-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.reward-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px; 
  padding: 10px 4px 12px;
  border-radius: 14px;
  background: #e2e6f8;
  font-size: 11px;
  font-weight: 700;
  color: #1a2340;
}

.reward-day__label {
  line-height: 1.2;
  font-family: "Fredoka", sans-serif;
}

.reward-day__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.reward-day__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.reward-day__icon--check {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(180deg, #34d399 0%, #22c55e 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.35);
}

.reward-day.done {
  background: #e2e6f8;
  color: #1a2340;
}

.reward-day.current {
  background: linear-gradient(180deg, #7c5cff 0%, #6236ff 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(98, 54, 255, 0.35);
}

.reward-day.current .reward-day__label {
  color: #fff;
}

.reward-day.locked {
  background: #e2e6f8;
  color: #1a2340;
}

.reward-day.locked .reward-day__icon img {
  opacity: 0.95;
}

.rewards-timer {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #3d4668;
  font-family: "Fredoka", sans-serif;
  text-align: center;
}

.rewards-timer strong {
  color: #1a2340;
  font-weight: 800;
}

/* Leaderboard */
.leaderboard-widget {
  padding: 18px 20px;
  border-radius: 24px;
  background: #eef0fb;
  box-shadow: 0 4px 18px rgba(79, 70, 229, 0.08);
}

.leader-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.leader-head h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #1a2340;
}

.leader-select {
  appearance: none;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font);
  color: #3d4668;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%233d4668' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right center;
  border: none;
  border-radius: 0;
  padding: 0 18px 0 0;
  cursor: pointer;
}

.leader-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.leader-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #1a2340;
}

.leader-list li:last-child {
  margin-bottom: 0;
}

.leader-list li.highlight {
  background: #e4e0ff;
  border: none;
}

.leader-rank {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.leader-rank img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.leader-avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.leader-list .avatar-luna {
  filter: hue-rotate(25deg) saturate(1.1);
}

.leader-list .avatar-sam {
  filter: hue-rotate(-20deg) saturate(0.9);
}

.leader-name {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  color: #2a3558;
}

.leader-xp {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 14px;
  font-weight: 800;
  color: #1a2340;
}

.leader-list li.highlight .leader-name,
.leader-list li.highlight .leader-xp {
  color: #5b3fd9;
}

.btn-leaderboard {
  width: 100%;
  margin-top: 14px;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-pill);
  background: #ddd8ff;
  color: #5b3fd9;
  font-size: 14px;
  font-weight: 800;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, filter 0.15s;
}

.btn-leaderboard:hover {
  background: #d0caff;
  filter: brightness(1.02);
}

/* ─── Responsive ─── */
@media (max-width: 1440px) {
  .explore-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cards-row--6,
  .world-row--6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .app {
    grid-template-columns: 72px minmax(0, 1fr) minmax(220px, 28%);
  }

  html[data-shell="dashboard"] {
    --col-left: 72px;
  }

  .brand-text,
  .chat-card-inner,
  .btn-chat,
  .nav-label {
    display: none;
  }

  .btn-chat-compact {
    display: flex;
  }

  .chat-card {
    padding: 12px 10px;
  }

  .nav-menu li a {
    justify-content: center;
    padding: 12px;
    gap: 0;
  }

  .hero-banner {
    flex-direction: column;
    align-items: stretch;
    background-position: center center;
    min-height: 320px;
  }

  .hero-copy {
    flex: none;
    max-width: none;
    padding: 24px 20px 16px;
  }

  .speech-bubble {
    position: absolute;
    top: 9%;
    right: 16%;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
  }

  .speech-bubble__card {
    width: min(280px, 100%);
  }
}

@media (max-width: 1366px) {
  .app {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .app.is-sidebar-collapsed {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .stage-right {
    display: none;
  }

  html[data-shell="dashboard"] {
    --col-left: 72px;
  }
}

/* Icon-only left rail — iPad / narrow desktop only (not mobile drawer) */
@media (min-width: 1025px) and (max-width: 1366px) {
  .sidebar-left .sidebar-toggle {
    display: none;
  }

  .brand-text,
  .chat-card-inner,
  .btn-chat,
  .nav-label {
    display: none;
  }

  .btn-chat-compact {
    display: flex;
  }

  .sidebar-left .sidebar-header {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    margin-bottom: 8px;
    padding-top: 4px;
  }

  .sidebar-left .brand {
    flex: none;
    width: 100%;
    justify-content: center;
    padding: 0;
    gap: 0;
  }

  .sidebar-left .brand-logo {
    width: 55px;
    height: 55px;
  }

  .sidebar-left .nav-menu li a {
    justify-content: center;
    padding: 12px;
    gap: 0;
  }
}

@media (max-width: 1024px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }

  /* Sidebar + right panel: see responsive-shell.css (drawer + tab bar) */
  .sidebar-left {
    display: none;
  }

  .stage-right {
    display: none;
  }
}
