@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
        body { font-family: 'Plus Jakarta Sans', sans-serif; -webkit-tap-highlight-color: transparent; }
        
        .scroll-custom::-webkit-scrollbar { width: 5px; }
        .scroll-custom::-webkit-scrollbar-track { background: transparent; }
        .scroll-custom::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
        
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
        .animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }

        @keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-15px); } 100% { transform: translateY(0px); } }
        .animate-float { animation: float 3s ease-in-out infinite; }

        /* AI Content Strict Styling */
        .ai-content h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 1.5rem; color: #1e1b4b; border-left: 6px solid #4f46e5; padding-left: 1rem; line-height: 1.2; }
        .ai-content h2 { font-size: 1.35rem; font-weight: 700; margin-top: 2rem; margin-bottom: 1rem; color: #312e81; border-bottom: 2px solid #e2e8f0; padding-bottom: 0.3rem; }
        .ai-content h3 { font-size: 1.15rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.5rem; color: #4338ca; }
        .ai-content p { margin-bottom: 1.25rem; line-height: 1.8; color: #334155; text-align: justify; }
        .ai-content ul, .ai-content ol { margin-bottom: 1.5rem; padding-left: 1.5rem; list-style-type: disc; }
        .ai-content li { margin-bottom: 0.7rem; color: #475569; }
        .ai-content strong { color: #1e1b4b; font-weight: 700; }

        .modal-overlay { background: rgba(15, 23, 42, 0.75); backdrop-filter: blur(8px); }


html, body, #root {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
}

#root {
  min-height: 100svh;
}

.app-shell {
  min-height: 100svh;
}

.app-card {
  height: 100svh;
}

.setup-guide p {
  margin: 0;
}

.setup-hero {
  width: min(12rem, 42vw);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.setup-robot {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

@media (max-width: 640px) {
  .app-card {
    border-radius: 0;
    height: 100svh;
    max-height: 100svh;
    box-shadow: none;
  }

  .app-main {
    padding: 0.9rem 0.95rem 1rem;
  }

  .setup-screen {
    padding: 0.9rem 1rem 1rem;
    justify-content: center;
    gap: 0.7rem;
  }

  .setup-hero {
    margin-bottom: 0.25rem;
  }

  .setup-robot {
    width: 6.9rem !important;
    height: 6.9rem !important;
  }

  .setup-title {
    font-size: 2rem !important;
    line-height: 1.05 !important;
    margin-bottom: 0.35rem !important;
  }

  .setup-badge {
    font-size: 0.5rem !important;
    padding: 0.45rem 0.8rem !important;
    margin-bottom: 0.35rem !important;
  }

  .setup-admin-card {
    margin-bottom: 0.35rem !important;
    padding: 0.85rem !important;
    border-radius: 1.4rem !important;
  }

  .setup-guide {
    max-width: 20rem;
    gap: 0.35rem !important;
  }

  .setup-guide p {
    font-size: 0.68rem !important;
    line-height: 1.45 !important;
  }

  .setup-start-wrap {
    margin-top: 0.75rem !important;
    width: 100%;
  }

  .setup-start-btn {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    font-size: 0.64rem !important;
  }

  .chat-bubble {
    padding: 1rem !important;
    font-size: 0.82rem !important;
    line-height: 1.55 !important;
  }

  .chat-input {
    padding: 0.95rem !important;
    font-size: 0.9rem !important;
  }

  .chat-send-btn {
    min-width: 3rem !important;
    padding: 0.95rem !important;
  }
}

@media (max-height: 780px) and (max-width: 640px) {
  .setup-screen {
    gap: 0.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .setup-robot {
    width: 5.6rem !important;
    height: 5.6rem !important;
  }

  .setup-title {
    font-size: 1.75rem !important;
  }

  .setup-guide p {
    font-size: 0.64rem !important;
    line-height: 1.35 !important;
  }

  .setup-start-wrap {
    margin-top: 0.45rem !important;
  }
}


html.embed-mode,
html.embed-mode body {
  background: transparent !important;
}

.embed-mode #root {
  min-height: 100dvh;
  height: 100dvh;
}

.embed-mode .app-shell {
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}

.embed-mode .app-card {
  width: min(100%, 1120px);
  height: min(calc(100dvh - 24px), 820px);
  max-height: calc(100dvh - 24px);
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.embed-mode .app-main {
  padding: 0.85rem 0.9rem 0.9rem;
}

.embed-mode .setup-screen {
  padding: 0.85rem 0.9rem 0.9rem;
  gap: 0.55rem;
  justify-content: center;
}

.embed-mode .setup-hero {
  width: min(7rem, 28vw);
  aspect-ratio: 1 / 1;
  margin-bottom: 0.15rem !important;
  background: transparent !important;
  overflow: visible !important;
  padding: 0.15rem;
  box-sizing: border-box;
}

.embed-mode .setup-robot {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: transparent !important;
  filter: drop-shadow(0 10px 18px rgba(79,70,229,0.12));
  display: block !important;
  margin: 0 auto !important;
}

.setup-title {
  font-size: clamp(1.55rem, 4.2vw, 2.45rem) !important;
  line-height: 1.12 !important;
  letter-spacing: 0.005em !important;
  white-space: nowrap !important;
}

.embed-mode .setup-title {
  font-size: clamp(1.3rem, 3.5vw, 1.9rem) !important;
  line-height: 1.14 !important;
  margin-bottom: 0.3rem !important;
  white-space: nowrap !important;
}

.embed-mode .setup-badge {
  font-size: 0.5rem !important;
  padding: 0.42rem 0.8rem !important;
  margin-bottom: 0.28rem !important;
}

.embed-mode .setup-guide {
  gap: 0.3rem !important;
  max-width: 20rem;
}

.embed-mode .setup-guide p {
  font-size: 0.64rem !important;
  line-height: 1.38 !important;
}

.embed-mode .setup-start-wrap {
  margin-top: 0.5rem !important;
  width: 100%;
}

.embed-mode .setup-start-btn {
  padding-top: 0.95rem !important;
  padding-bottom: 0.95rem !important;
  font-size: 0.62rem !important;
}

@media (max-width: 768px) {
  .embed-mode .app-shell {
    padding: 0;
  }

  .embed-mode .app-card {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 640px) {
  .setup-title {
    font-size: clamp(1.7rem, 7.6vw, 2.25rem) !important;
    line-height: 1.12 !important;
    letter-spacing: 0.01em !important;
  }

  .embed-mode .setup-hero {
    width: min(6.1rem, 30vw);
  }
}

@media (max-height: 760px) {
  .embed-mode .setup-hero {
    width: min(5.4rem, 24vw);
  }

  .embed-mode .setup-title {
    font-size: clamp(1.4rem, 3.9vw, 2rem) !important;
  }

  .embed-mode .setup-guide p {
    font-size: 0.6rem !important;
    line-height: 1.32 !important;
  }
}
