/* Mobile-first design system */
:root {
  --toss-bg: #f2f4f6;
  --toss-surface: #ffffff;
  --toss-text: #191f28;
  --toss-text-secondary: #4e5968;
  --toss-text-tertiary: #8b95a1;
  --toss-border: #e5e8eb;
  --toss-blue: #7f70ff;
  --toss-blue-light: #f1edff;
  --toss-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  --toss-shadow-hover: 0 4px 14px rgba(15, 23, 42, 0.07);
  --toss-radius: 16px;
  --toss-radius-small: 12px;
  --max-width: 480px;

  /* Neutral aliases (remove 'toss' from templates gradually) */
  --ui-bg: var(--toss-bg);
  --ui-surface: var(--toss-surface);
  --ui-text: var(--toss-text);
  --ui-text-secondary: var(--toss-text-secondary);
  --ui-text-tertiary: var(--toss-text-tertiary);
  --ui-border: var(--toss-border);
  --ui-blue: var(--toss-blue);
  --ui-blue-light: var(--toss-blue-light);
  --ui-shadow: var(--toss-shadow);
  --ui-shadow-hover: var(--toss-shadow-hover);
  --ui-radius: var(--toss-radius);
  --ui-radius-small: var(--toss-radius-small);
  /* Controls */
  --control-height: 40px;
  --control-padding-y: 10px;
}

/* Dark mode variables removed per design spec */

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

html, body {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  overflow-y: auto;
  scrollbar-gutter: stable;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--toss-text);
  font-family: "Pretendard Variable", "Pretendard", "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", "Segoe UI", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* App Header - Toss Style */
.app-header {
  background: var(--toss-surface);
  border-bottom: 1px solid var(--toss-border);
}

.app-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-logo {
  cursor: pointer;
}

.app-logo-img { height: 28px; width: auto; display: block; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--toss-text-secondary);
  transition: background-color 0.2s;
}

.icon-btn:hover {
  background: var(--toss-bg);
}

/* Main Container */
.app-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 0 80px 0;
  min-height: calc(100vh - 60px);
  background: #ffffff;
}
.app-container.no-top-padding {
  padding-top: 0;
  padding-bottom: 0;
  min-height: 100vh;
}

.landing-hero,
.analysis-hero,
.classroom-hero {
  padding: 24px 20px 0 20px;
}

.analysis-hero,
.classroom-hero {
  padding-bottom: 8px;
}

.landing-hero-surface,
.analysis-hero-inner,
.classroom-hero-inner {
  border-radius: 24px;
  padding: 28px;
  background: linear-gradient(120deg, #eef4ff, #f0ecff, #e9f2ff, #f3edff, #eff4ff);
  background-size: 350% 350%;
  animation: landingGradientMove 14s ease-in-out infinite;
  box-shadow: 0 6px 20px rgba(124, 140, 255, 0.14);
  border: 1.5px solid rgba(15, 23, 42, 0.12);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}
.landing-hero-surface::after,
.analysis-hero-inner::after,
.classroom-hero-inner::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -150px;
  top: -110px;
  background: radial-gradient(circle, rgba(142, 134, 255, 0.45), transparent 70%);
  filter: blur(14px);
  opacity: 1;
  animation: landingGlowMove 9s ease-in-out infinite;
  pointer-events: none;
}
.landing-hero-surface > *,
.analysis-hero-inner > *,
.classroom-hero-inner > * {
  position: relative;
  z-index: 1;
}

/* Keep analysis/classroom hero tone neutral like index (no gradient cast) */
.analysis-hero-inner,
.classroom-hero-inner {
  background: #ffffff;
  background-size: auto;
  animation: none;
}

.analysis-hero-inner::after,
.classroom-hero-inner::after {
  display: none;
}

.hero-effect {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.hero-effect .hero-blob {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  opacity: 0.9;
  mix-blend-mode: screen;
}
.hero-effect .hero-blob-1 {
  left: -120px;
  top: -90px;
  background: radial-gradient(circle at 30% 30%, rgba(226, 214, 255, 0.95) 0%, rgba(226, 214, 255, 0.15) 55%, rgba(226, 214, 255, 0) 78%);
  animation: onboardingFloat1 16s ease-in-out infinite;
}
.hero-effect .hero-blob-2 {
  right: -160px;
  top: -60px;
  background: radial-gradient(circle at 40% 40%, rgba(210, 222, 255, 0.9) 0%, rgba(210, 222, 255, 0.2) 55%, rgba(210, 222, 255, 0) 80%);
  animation: onboardingFloat2 20s ease-in-out infinite;
}
.hero-effect .hero-blob-3 {
  left: -80px;
  bottom: -140px;
  background: radial-gradient(circle at 40% 40%, rgba(236, 228, 255, 0.85) 0%, rgba(236, 228, 255, 0.2) 55%, rgba(236, 228, 255, 0) 80%);
  animation: onboardingFloat3 18s ease-in-out infinite;
}
.hero-effect .hero-blob-4 {
  right: -60px;
  bottom: -120px;
  background: radial-gradient(circle at 40% 40%, rgba(224, 236, 255, 0.85) 0%, rgba(224, 236, 255, 0.2) 55%, rgba(224, 236, 255, 0) 78%);
  animation: onboardingFloat4 22s ease-in-out infinite;
}

.landing-hero-logo {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  margin-bottom: 8px;
}

.landing-hero-body {
  position: relative;
  z-index: 2;
  max-width: 560px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--toss-text-tertiary);
}

.hero-chip.role-chip {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.55);
  text-transform: none;
  letter-spacing: 0;
}

.landing-hero h1 {
  font-size: 28px;
  color: #0f172a;
  line-height: 1.3;
  margin: 0;
}

.classroom-hero h1,
.analysis-hero h1,
.landing-hero h1 {
  font-size: 28px;
  color: #0f172a;
  line-height: 1.3;
  margin: 0;
}

.hero-desc {
  font-size: 15px;
  color: var(--toss-text-secondary);
  line-height: 1.7;
  margin-bottom: 0;
}

@media (max-width: 960px) {
  .landing-hero-surface {
    padding: 32px 24px;
  }
}

@keyframes landingGradientMove {
  0% {
    background-position: 0% 50%;
  }
  30% {
    background-position: 100% 60%;
  }
  60% {
    background-position: 50% 10%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes landingGlowMove {
  0% {
    transform: translate(0, 0) scale(0.95);
    opacity: 0.5;
  }
  40% {
    transform: translate(-60px, 35px) scale(1.1);
    opacity: 1;
  }
  70% {
    transform: translate(45px, -25px) scale(0.9);
    opacity: 0.8;
  }
  100% {
    transform: translate(0, 0) scale(0.95);
    opacity: 0.5;
  }
}


.section {
  padding: 0 20px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--toss-text);
  letter-spacing: -0.3px;
}

.section-action {
  font-size: 14px;
  color: var(--toss-text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Card */
.toss-card, .ui-card {
  background: var(--toss-surface);
  border-radius: var(--toss-radius);
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.03);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid transparent;
}

.toss-card:hover, .ui-card:hover {
  transform: none;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
}

.toss-card:active, .ui-card:active {
  transform: none;
}

.card-static {
  cursor: default;
}

.student-hero-card {
  display: block;
  position: relative;
  overflow: hidden;
  background: linear-gradient(130deg, rgba(234, 225, 255, 0.9), rgba(220, 233, 255, 0.85), rgba(247, 236, 255, 0.95));
  background-size: 350% 350%;
  animation: studentHeroWave 12s ease-in-out infinite;
  border-radius: 26px;
  border: 1px solid transparent;
  box-shadow: 0 10px 30px rgba(124, 140, 255, 0.16);
  padding: 26px;
  color: #0f172a;
  margin-bottom: 18px;
  position: relative;
}
.student-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(124, 108, 255, 0.6), rgba(168, 218, 255, 0.5));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}
.student-hero-card::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -140px;
  top: -160px;
  background: radial-gradient(circle, rgba(210, 198, 255, 0.65), rgba(210, 198, 255, 0));
  filter: blur(20px);
  animation: studentHeroGlow 10s ease-in-out infinite;
}
.student-hero-card > * {
  position: relative;
  z-index: 1;
}
.student-hero-card .hero-chip {
  margin-bottom: 12px;
  display: inline-flex;
}

.student-hero-card .student-hero-name {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #050b1a;
  letter-spacing: -0.4px;
}

.student-hero-card .student-hero-meta {
  font-size: 14px;
  color: rgba(15, 23, 42, 0.7);
  margin: 0;
}

.hero-action-grid {
  display: grid;
  gap: 12px;
}

.hero-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(124, 108, 255, 0.18);
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.2px;
  box-shadow: 0 8px 18px rgba(124, 140, 255, 0.12);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hero-action-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 108, 255, 0.35);
  box-shadow: 0 12px 24px rgba(124, 140, 255, 0.18);
}

.hero-action-btn:active {
  transform: translateY(0);
}

.hero-action-btn.is-disabled {
  opacity: 0.55;
  box-shadow: none;
  pointer-events: none;
}

.hero-action-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 108, 255, 0.14);
  color: #3b4cca;
  font-size: 18px;
}

.hero-action-btn--call {
  border-color: rgba(90, 150, 255, 0.3);
}

.hero-action-btn--call .hero-action-icon {
  background: rgba(90, 150, 255, 0.16);
  color: #1f55d1;
}

.hero-action-btn--sms {
  border-color: rgba(168, 124, 255, 0.32);
}

.hero-action-btn--sms .hero-action-icon {
  background: rgba(168, 124, 255, 0.16);
  color: #6d3bd1;
}

.hero-action-btn--chat {
  border-color: rgba(255, 193, 7, 0.4);
}

.hero-action-btn--chat .hero-action-icon {
  background: rgba(255, 193, 7, 0.18);
  color: #b26a00;
}

.hero-card {
  position: relative;
  border-radius: 26px;
  padding: 22px;
  background: linear-gradient(130deg, #f7f3ff, #f1f6ff, #f9f4ff);
  background-size: 280% 280%;
  animation: landingGradientMove 16s ease-in-out infinite;
  border: 1px solid rgba(124, 108, 255, 0.18);
  box-shadow: 0 8px 24px rgba(124, 140, 255, 0.12);
  color: #0f172a;
  margin-bottom: 14px;
}
.hero-card > * {
  position: relative;
  z-index: 1;
}
.hero-card::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -80px;
  top: -90px;
  background: radial-gradient(circle, rgba(210, 198, 255, 0.45), transparent 70%);
  filter: blur(18px);
  animation: landingGlowMove 15s ease-in-out infinite;
}

.teacher-hero-card {
  background: linear-gradient(125deg, #eef4ff, #f2edff, #edf4ff);
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 6px 16px rgba(124, 140, 255, 0.12);
  padding: 24px;
  color: #0f172a;
}

.teacher-hero-card h1,
.teacher-hero-card h2,
.teacher-hero-card p {
  margin: 0;
}

@keyframes studentHeroWave {
  0% {
    background-position: 0% 40%;
  }
  50% {
    background-position: 80% 60%;
  }
  100% {
    background-position: 0% 40%;
  }
}

@keyframes studentHeroGlow {
  0% {
    transform: translate3d(0, 0, 0) scale(0.9);
    opacity: 0.6;
  }
  50% {
    transform: translate3d(-15px, 12px, 0) scale(1);
    opacity: 0.95;
  }
  100% {
    transform: translate3d(0, 0, 0) scale(0.9);
    opacity: 0.6;
  }
}

.classroom-shell .ui-card {
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  padding: 20px;
  margin-bottom: 16px;
}

.classroom-shell .ui-card .section-title {
  color: #0f172a;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(187, 153, 255, 0.08);
  border: 1px solid rgba(162, 117, 255, 0.4);
  color: #a275ff;
  flex-shrink: 0;
}

.card-info {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--toss-text);
  margin-bottom: 4px;
}

.analysis-hero {
  padding: 16px 20px 8px;
}

.ghost-back-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  padding: 0 20px;
}
.ghost-back-title {
  font-size: 24px;
  font-weight: 700;
  margin-left: 8px;
  color: #0f172a;
}

.account-detail-page {
  padding-top: 12px;
}

.account-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.account-detail-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
}

.account-detail-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.account-detail-section {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ui-border);
}

.account-detail-section:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.account-detail-section .section-title {
  margin-bottom: 12px;
}

.account-detail-note {
  font-size: 13px;
  color: var(--ui-text-tertiary);
  line-height: 1.6;
  margin-top: 10px;
}

.account-detail-danger {
  font-size: 14px;
  color: var(--ui-text-secondary);
  line-height: 1.7;
}

.account-inline-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.account-inline-actions .btn {
  width: auto;
}

.account-result-list {
  display: flex;
  flex-direction: column;
}

.account-search-result {
  padding: 16px 0;
  border-bottom: 1px solid var(--ui-border);
}

.account-search-result:first-child {
  border-top: 1px solid var(--ui-border);
}

.account-search-result-meta {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--ui-text-secondary);
}

.account-search-result-meta strong {
  color: var(--ui-text);
  font-weight: 600;
}

.onboarding-screen {
  min-height: calc(100vh - 80px);
  border-radius: 0;
  padding: 32px 20px 60px;
  background: #ffffff;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}
.onboarding-screen.onboarding-full {
  box-sizing: border-box;
  height: calc(100vh - 80px);
  min-height: 0;
}
.onboarding-screen.onboarding-full .onboarding-content {
  min-height: calc(100vh - 240px);
}
.onboarding-blob {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  opacity: 0.95;
  mix-blend-mode: normal;
}
.onboarding-blob.blob-1 {
  left: -240px;
  top: -60px;
  background: radial-gradient(circle at 30% 30%, rgba(198, 185, 255, 0.95) 0%, rgba(202, 210, 255, 0.35) 45%, rgba(198, 185, 255, 0) 70%);
  animation: onboardingFloat1 8s ease-in-out infinite;
}
.onboarding-blob.blob-2 {
  right: -180px;
  bottom: -220px;
  background: radial-gradient(circle at 40% 40%, rgba(190, 205, 255, 0.75) 0%, rgba(205, 212, 255, 0.35) 45%, rgba(190, 205, 255, 0) 72%);
  animation: onboardingFloat2 10s ease-in-out infinite;
}
.onboarding-blob.blob-3 {
  left: 10%;
  top: -80px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at 40% 40%, rgba(215, 205, 255, 0.6) 0%, rgba(215, 205, 255, 0.25) 50%, rgba(215, 205, 255, 0) 72%);
  animation: onboardingFloat3 12s ease-in-out infinite;
  opacity: 0.9;
}
.onboarding-blob.blob-4 {
  left: 58%;
  bottom: -140px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle at 40% 40%, rgba(205, 220, 255, 0.8) 0%, rgba(215, 226, 255, 0.3) 50%, rgba(205, 220, 255, 0) 75%);
  animation: onboardingFloat4 14s ease-in-out infinite;
  opacity: 0.85;
}
@keyframes onboardingFloat1 {
  0% { transform: translate(-22px, -12px) scale(0.92) rotate(-2deg) skewX(-1deg); }
  22% { transform: translate(30px, 14px) scale(1.08) rotate(1deg) skewY(1deg); }
  45% { transform: translate(-10px, 42px) scale(1.02) rotate(3deg) skewX(1deg); }
  70% { transform: translate(18px, -8px) scale(1.06) rotate(-1deg) skewY(-0.5deg); }
  100% { transform: translate(-22px, -12px) scale(0.92) rotate(-2deg) skewX(-1deg); }
}
@keyframes onboardingFloat2 {
  0% { transform: translate(10px, -20px) scale(0.94) rotate(2deg) skewY(1deg); }
  25% { transform: translate(-38px, 34px) scale(1.1) rotate(-1deg) skewX(-1deg); }
  52% { transform: translate(24px, -18px) scale(0.92) rotate(-3deg) skewY(-1deg); }
  78% { transform: translate(-16px, 28px) scale(1.05) rotate(1deg) skewX(0.5deg); }
  100% { transform: translate(10px, -20px) scale(0.94) rotate(2deg) skewY(1deg); }
}
@keyframes onboardingFloat3 {
  0% { transform: translate(-18px, 10px) scale(0.94) rotate(0deg) skewX(-0.5deg); }
  28% { transform: translate(30px, -34px) scale(1.07) rotate(2deg) skewY(1deg); }
  56% { transform: translate(-26px, 30px) scale(0.98) rotate(-1.5deg) skewX(0.5deg); }
  84% { transform: translate(18px, -18px) scale(1.06) rotate(1.5deg) skewY(-0.5deg); }
  100% { transform: translate(-18px, 10px) scale(0.94) rotate(0deg) skewX(-0.5deg); }
}
@keyframes onboardingFloat4 {
  0% { transform: translate(6px, -18px) scale(0.96) rotate(-1deg) skewY(0.5deg); }
  25% { transform: translate(-30px, 16px) scale(1.05) rotate(1deg) skewX(-0.5deg); }
  50% { transform: translate(18px, 28px) scale(1.02) rotate(-2deg) skewY(-0.5deg); }
  75% { transform: translate(-22px, -14px) scale(0.94) rotate(1.5deg) skewX(0.5deg); }
  100% { transform: translate(6px, -18px) scale(0.96) rotate(-1deg) skewY(0.5deg); }
}
.onboarding-glass {
  position: absolute;
  inset: 0;
  background: radial-gradient(1000px 500px at 50% 10%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
  z-index: 2;
}
.onboarding-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  min-height: calc(100vh - 160px);
}
.onboarding-headline {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 0 8px;
  margin: 0;
}
.onboarding-headline img {
  height: clamp(52px, 9vw, 96px);
  width: auto;
  display: block;
}
.onboarding-sub {
  margin: 0;
  color: rgba(74, 59, 131, 0.65);
  font-size: 13px;
  letter-spacing: 0.3px;
}
.onboarding-desc {
  margin: 0;
  color: rgba(74, 59, 131, 0.65);
  font-size: 14px;
  line-height: 1.4;
}
@media (prefers-reduced-motion: reduce) {
  .onboarding-blob,
  .onboarding-dot.active::after {
    animation: none !important;
  }
}

.btn-ghost {
  border: none;
  background: transparent;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
}

.btn-ghost i {
  font-size: 20px;
}

.analysis-hero h1 {
  font-size: 26px;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.4px;
  margin: 0;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1.2px;
  color: var(--toss-text-tertiary);
  margin-bottom: 6px;
}

.hero-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--toss-text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(124, 140, 255, 0.15);
}

.analysis-section {
  padding: 8px 20px 20px;
}

.history-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.history-modal-content {
  background: #fff;
  border-radius: 28px;
  width: min(780px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.history-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.history-modal-eyebrow {
  margin: 0;
  font-size: 13px;
  color: var(--toss-text-tertiary);
}

.history-modal-body {
  overflow-y: auto;
  padding-right: 6px;
}

.history-modal-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--toss-text-tertiary);
  margin-bottom: 8px;
}

.history-modal-divider {
  border: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  margin: 20px 0;
}

.hero-menu-section {
  padding-top: 24px;
}

.insight-card {
  position: relative;
  border-radius: 24px;
  padding: 24px;
  background: var(--toss-surface);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(124, 108, 255, 0.12);
}

.insight-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.insight-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.insight-actions .btn {
  white-space: nowrap;
}

.insight-card .badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #5a49cf;
  background: rgba(124, 108, 255, 0.15);
  padding: 2px 10px;
  border-radius: 999px;
}

.insight-title {
  font-size: 22px;
  margin: 4px 0 4px;
}

.insight-meta {
  font-size: 13px;
  color: var(--toss-text-tertiary);
}

.insight-body {
  font-size: 15px;
  color: var(--toss-text-secondary);
  line-height: 1.6;
  min-height: 120px;
}

.analysis-summary {
  background: linear-gradient(135deg, #f6f0ff, #fbfcff);
  border-radius: 20px;
  border: 1px solid rgba(124, 108, 255, 0.16);
  padding: 20px;
  color: #0f172a;
}

.analysis-summary h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.analysis-summary p {
  margin: 0 0 10px;
  color: rgba(15, 23, 42, 0.75);
}

.analysis-summary-list {
  margin: 0;
  padding-left: 18px;
  color: rgba(15, 23, 42, 0.75);
}

.analysis-summary-list li {
  margin-bottom: 6px;
}

.hero-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.hero-menu-card {
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 22px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.hero-menu-card:focus-visible {
  outline: 2px solid rgba(124, 108, 255, 0.4);
}

.hero-menu-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #ffffff;
  color: #7c6cff;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.hero-menu-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(124, 108, 255, 0.55), rgba(144, 202, 255, 0.4));
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-menu-meta {
  flex: 1;
  min-width: 0;
}

.hero-menu-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.hero-menu-desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--toss-text-tertiary);
}

.hero-menu-arrow {
  font-size: 24px;
  color: #94a3b8;
}

.nav-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-card-item {
  border: 1px solid rgba(124, 108, 255, 0.18);
  border-radius: 22px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.nav-card-item.nav-card-item-vertical {
  align-items: stretch;
  flex-direction: column;
  gap: 12px;
}

.nav-card-item:hover {
  background: #fff;
  border-color: rgba(124, 108, 255, 0.28);
}

.nav-card-item.nav-card-item-static {
  cursor: default;
}

.nav-card-item.nav-card-item-static:hover {
  border-color: rgba(124, 108, 255, 0.18);
}

.nav-card-item.is-active {
  box-shadow: 0 8px 24px rgba(124, 108, 255, 0.12);
  border-color: rgba(124, 108, 255, 0.36);
}

.nav-card-body {
  flex: 1;
  min-width: 0;
}

.nav-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.nav-card-desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--toss-text-tertiary);
}

.nav-card-meta {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--toss-text-tertiary);
}

.nav-card-arrow {
  font-size: 24px;
  color: #94a3b8;
  line-height: 1;
  flex: 0 0 auto;
}

.nav-card-media {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

.nav-card-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.nav-card-media-empty {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
}

.nav-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-actions-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

@media (min-width: 540px) {
  .hero-actions-row {
    flex-direction: row;
    justify-content: flex-end;
  }
  .hero-actions-row .btn {
    width: auto;
    min-width: 140px;
  }
}

.ai-card-header {
  align-items: flex-start;
}
.ai-header-meta {
  flex: 1;
  min-width: 0;
}
.ai-header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}
.ai-header-actions .btn {
  width: 100%;
  min-width: 0;
}
.btn-outline {
  position: relative;
  background: rgba(124, 108, 255, 0.05);
  border: none;
  color: #5a49cf;
  border-radius: 999px;
  padding: 10px 20px;
  box-shadow: inset 0 0 0 1px rgba(124, 108, 255, 0.4);
  overflow: hidden;
}
.btn-outline::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(124, 108, 255, 0.9), rgba(144, 202, 255, 0.6));
  -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.9;
}
.btn-outline:hover {
  background: rgba(124, 108, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(124, 108, 255, 0.55);
}
.btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.72;
}
.btn.is-loading::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-top-color: #ffffff;
  animation: btn-spin 0.8s linear infinite;
}
@keyframes btn-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.class-list-card {
  border-radius: 24px;
  padding: 20px;
  background: var(--toss-surface);
  box-shadow: var(--toss-shadow);
  border: 1px solid rgba(124, 108, 255, 0.12);
}

.class-list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 0;
}

.class-list-title {
  font-size: 20px;
  margin: 6px 0;
}

.class-list-meta {
  font-size: 13px;
  color: var(--toss-text-tertiary);
}

.analysis-class-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.class-list-item {
  border: 1px solid rgba(124, 108, 255, 0.18);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.class-list-item.active {
  border-color: rgba(124, 108, 255, 0.6);
  box-shadow: 0 6px 18px rgba(124, 108, 255, 0.2);
}

.class-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.class-item-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.class-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.class-item-meta {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--toss-text-tertiary);
}

.class-item-updated {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
}

@media (max-width: 640px) {
  .insight-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .ai-report-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .insight-actions {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    gap: 10px;
  }
  .insight-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .ai-header-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .ai-header-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

.placeholder,
.insight-body .placeholder,
.history-body .placeholder {
  color: var(--toss-text-tertiary);
  font-size: 14px;
  background: transparent;
  padding: 12px 0;
}

.empty-state-card {
  text-align: center;
  padding: 32px 12px 28px;
  color: var(--toss-text-secondary);
}

.empty-illustration {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fefefe, #f6f7fb);
  position: relative;
  box-shadow: inset 0 6px 14px rgba(0,0,0,0.03), 0 8px 20px rgba(144,155,255,0.18);
  overflow: hidden;
}

.empty-illustration .dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--toss-blue);
  position: absolute;
  top: 35%;
  left: 52%;
  transform: translate(-50%, -50%);
}

.empty-illustration .wave {
  position: absolute;
  width: 160%;
  height: 160%;
  border-radius: 40%;
  background: rgba(124, 108, 255, 0.08);
  animation: wave 4s ease-in-out infinite;
}

.wave-1 {
  top: 30%;
  left: -30%;
}

.wave-2 {
  top: -40%;
  left: -10%;
  animation-delay: 1s;
}

.empty-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--toss-text);
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 14px;
  color: var(--toss-text-tertiary);
}

@keyframes wave {
  0% { transform: rotate(0deg) translateY(0); opacity: 0.8; }
  50% { transform: rotate(5deg) translateY(10px); opacity: 0.5; }
  100% { transform: rotate(0deg) translateY(0); opacity: 0.8; }
}

.ai-output {
  font-size: 15px;
  color: var(--toss-text);
  word-break: keep-all;
}

.analysis-overlay {
  position: absolute;
  inset: 0;
  border-radius: var(--toss-radius);
  background: rgba(255, 255, 255, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 5;
}

.analysis-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--toss-text-secondary);
  font-size: 14px;
}

.ai-report-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ai-report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.ai-report-body {
  font-size: 15px;
  color: var(--toss-text-secondary);
  line-height: 1.6;
  min-height: 120px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.analysis-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--toss-border);
  border-top-color: var(--toss-blue);
  animation: spin 0.8s linear infinite;
}

.ai-sections {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ai-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ai-snapshot-card {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 18px;
  background: #f8fafc;
  padding: 12px 14px;
}

.ai-snapshot-label {
  font-size: 12px;
  color: var(--toss-text-tertiary);
  margin-bottom: 4px;
}

.ai-snapshot-value {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.ai-section {
  padding: 18px 0 0;
  margin-top: 18px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  border-right: none;
  border-bottom: none;
  border-left: none;
}

.ai-sections .ai-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.ai-section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--toss-text);
}

.ai-section-title i {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  background: #f1f5f9;
  color: #475569;
}

.ai-section-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-section-list li {
  font-size: 14px;
  color: #111;
  line-height: 1.65;
  padding-left: 0;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.06);
}

.ai-section-list li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.ai-section-positive .ai-section-list li,
.ai-section-warning .ai-section-list li {
  color: #111;
}

.ai-section-positive .ai-student-name,
.ai-section-warning .ai-student-name {
  color: #111;
}

.ai-section-positive .ai-em {
  color: #059669;
}

.ai-section-warning .ai-em {
  color: #dc2626;
}

.ai-class-card {
  border-radius: 24px;
  padding: 20px;
  margin-bottom: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.ai-class-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.ai-class-name {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
}

.ai-class-meta {
  font-size: 13px;
  color: var(--toss-text-tertiary);
  margin: 4px 0 0;
}

.ai-class-pill {
  font-size: 13px;
  font-weight: 600;
  color: #5a49cf;
  background: rgba(124, 108, 255, 0.18);
  padding: 6px 14px;
  border-radius: 999px;
}

.history-card {
  border-radius: 24px;
  padding: 20px;
  background: var(--toss-surface);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(124, 108, 255, 0.12);
  display: flex;
  flex-direction: column;
}

.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.history-title {
  font-size: 20px;
  margin: 6px 0;
}

.history-meta {
  font-size: 13px;
  color: var(--toss-text-tertiary);
}

.history-body {
  margin-top: 14px;
}

.history-item {
  padding: 12px 0;
  border-top: 1px solid var(--toss-border);
}

.history-item:first-child {
  border-top: none;
}

.history-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--toss-text-tertiary);
}

.history-date {
  letter-spacing: 0.2px;
}

.history-status {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f1f3f5;
  color: #6b7280;
}

.history-status.success {
  background: #ecfdf5;
  color: #059669;
}

.history-status.error {
  background: #fef2f2;
  color: #dc2626;
}

.history-counts {
  font-size: 13px;
  color: var(--toss-text-secondary);
  margin-top: 6px;
}

.history-snippet {
  font-size: 14px;
  color: var(--toss-text);
  margin-top: 6px;
  line-height: 1.4;
}

.history-list-body {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-list-section {
  padding-top: 0;
}

.history-detail-only .history-detail-card {
  margin-bottom: 20px;
}

@media (min-width: 901px) {
  .history-detail-only {
    padding-bottom: 16px;
  }
  .history-list-section {
    padding-top: 8px;
  }
}

.history-row {
  border: 1px solid var(--toss-border);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.85);
  width: 100%;
  text-align: left;
  display: block;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.history-row.active {
  border-color: rgba(124, 108, 255, 0.4);
  background: #fff;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.06);
}

.history-detail-card {
  min-height: 420px;
}

.history-detail-body {
  margin-top: 16px;
}

.ai-comment-positive {
  color: #047857;
}

.ai-comment-positive .ai-em {
  color: #059669;
}

.ai-comment-warning {
  color: #b45309;
}

.ai-comment-warning .ai-em {
  color: #dc2626;
}

.ai-comment-positive .ai-student-name,
.ai-comment-warning .ai-student-name {
  color: #111;
}

.ai-context-note {
  font-size: 12px;
  color: var(--toss-text-tertiary);
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-context-note span {
  background: rgba(255, 255, 255, 0.7);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--toss-border);
}

.ai-student-name {
  font-weight: 700;
  color: #111;
  margin-right: 4px;
}

.ai-em {
  font-weight: 700;
  color: var(--toss-blue);
}

.ai-section-positive .ai-section-title {
  color: #3f5a42;
}

.ai-section-positive {
  border-left: 3px solid rgba(92, 124, 96, 0.34);
  padding-left: 14px;
}

.ai-section-positive .ai-section-title i {
  background: #f3f6f2;
  color: #5c7c60;
}

.ai-section-warning .ai-section-title {
  color: #8b5e3c;
}

.ai-section-warning {
  border-left: 3px solid rgba(139, 94, 60, 0.34);
  padding-left: 14px;
}

.ai-section-warning .ai-section-title i {
  background: #faf5ef;
  color: #8b5e3c;
}

.ai-section-neutral .ai-section-title {
  color: #4b5563;
}

.ai-section-overview .ai-section-title {
  color: #4f6b8a;
}

.ai-section-overview {
  border-left: 3px solid rgba(79, 107, 138, 0.34);
  padding-left: 14px;
}

.ai-section-overview .ai-section-title i {
  background: #f2f5f8;
  color: #4f6b8a;
}

.ai-section-note {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.5);
  margin: 6px 0 0;
}
.ai-section-neutral {
  border-left: 3px solid rgba(107, 114, 128, 0.3);
  padding-left: 14px;
}

.ai-section-neutral .ai-section-title i {
  background: #f5f6f8;
  color: #6b7280;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.card-subtitle {
  font-size: 14px;
  color: var(--toss-text-tertiary);
}

.feature-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-tile {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  padding: 16px;
  box-shadow: var(--ui-shadow);
}
.gradient-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 10px;
}

.gradient-card .feature-icon {
  background: rgba(255, 255, 255, 0.9);
  color: var(--toss-blue);
}

.gradient-card .feature-title {
  color: #0f172a;
}

.feature-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ui-text);
  margin-bottom: 6px;
}
.feature-desc {
  font-size: 14px;
  color: var(--ui-text-secondary);
  line-height: 1.55;
}

.policy-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 520px) {
  .feature-grid {
    flex-direction: column;
  }
}

.card-amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--toss-text);
  margin-top: 8px;
  letter-spacing: -0.5px;
}

.card-label {
  font-size: 13px;
  color: var(--toss-text-secondary);
  margin-bottom: 4px;
}

/* Highlight Card */
.highlight-card {
  background: linear-gradient(125deg, #eef4ff, #f0ecff, #edf4ff);
  color: var(--toss-text);
  padding: 24px;
  border-radius: 24px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.highlight-title {
  font-size: 15px;
  color: var(--toss-text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.highlight-amount {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #111;
}

.highlight-desc {
  font-size: 14px;
  color: var(--toss-text-secondary);
}

/* Intro card on landing */
.intro-card {
  background: linear-gradient(125deg, #eef4ff, #f0ecff, #edf4ff);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--toss-shadow);
  color: var(--ui-text);
  padding: 26px;
  border-radius: 28px;
}
.intro-eyebrow {
  font-size: 13px;
  font-weight: 700;
  color: var(--toss-text-tertiary);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.intro-title {
  font-size: 26px;
  font-weight: 800;
  color: #111;
  margin-top: 6px;
  letter-spacing: -0.5px;
}
.intro-body {
  font-size: 15px;
  color: var(--toss-text-secondary);
  margin-top: 12px;
  line-height: 1.65;
}
.intro-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.intro-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: var(--toss-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.1px;
  box-shadow: 0 4px 12px rgba(124, 140, 255, 0.15);
}
.intro-meta .intro-pill { margin: 2px 0; }
.intro-points {
  margin-top: 16px;
}
.intro-point-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ui-text);
  margin-bottom: 4px;
}
.intro-point-desc {
  font-size: 14px;
  color: var(--ui-text-secondary);
  line-height: 1.6;
}

.feature-list {
  margin: 12px 0 0 0;
  padding-left: 18px;
  color: var(--ui-text-secondary);
  font-size: 13.5px;
  line-height: 1.55;
}
.feature-list li { margin-bottom: 6px; }

.mini-card {
  padding: 16px 18px;
}
.mini-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ui-border);
}
.mini-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.mini-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ui-text);
}
.mini-subtitle {
  font-size: 13px;
  color: var(--ui-text-secondary);
  line-height: 1.5;
}

/* Landing */

/* List Item */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--toss-border);
  cursor: pointer;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--toss-bg);
  flex-shrink: 0;
}

.list-item-content {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--toss-text);
  margin-bottom: 2px;
}

.list-item-subtitle {
  font-size: 13px;
  color: var(--toss-text-tertiary);
}

.list-item-action {
  color: var(--toss-text-tertiary);
  font-size: 14px;
}

.list-item:active,
.list-item:focus-within {
  background: transparent;
  transform: none;
}

/* Button Styles */
.btn {
  appearance: none;
  border: none;
  border-radius: var(--toss-radius-small);
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--toss-bg);
  border: 1px solid var(--toss-border);
  color: var(--toss-text);
}

.btn:not(.btn-primary):not(.btn-secondary):not(.btn-ghost):not(.btn-outline):hover {
  background: #eef2f7;
  border-color: #d9e1ea;
  color: var(--toss-text);
}

.btn:not(.btn-primary):not(.btn-secondary):not(.btn-ghost):not(.btn-outline):active {
  background: #e6ecf5;
  border-color: #cfd7e1;
  color: var(--toss-text);
}

.btn-primary {
  background: linear-gradient(120deg, #7c6cff, #b8a9ff);
  color: #fff;
  border: none;
  box-shadow: 0 12px 30px rgba(124, 108, 255, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(120deg, #6f60f2, #a999ff);
}

.btn-primary:active {
  background: linear-gradient(120deg, #5f50d9, #9586ff);
  box-shadow: 0 8px 20px rgba(124, 108, 255, 0.2);
}

.btn-ghost {
  background: transparent;
  color: #111;
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.08);
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--toss-text);
  border: 1px solid #e5e8eb;
}

.btn-secondary:hover {
  background: #e6ecf5;
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
  width: auto;
}

/* Input Styles */
.input-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.input-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--toss-text);
  margin-bottom: 8px;
}

.input {
  width: 100%;
  padding: var(--control-padding-y) 16px;
  border: 1px solid var(--toss-border);
  border-radius: var(--toss-radius-small);
  background: var(--toss-surface);
  color: var(--toss-text);
  font-size: 16px;
  line-height: 1.2;
  transition: all 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-clip: padding-box;
  overflow: hidden;
  height: var(--control-height);
}

/* Ensure consistent rounded corners on native controls (iOS/Safari/Chrome) */
input.input[type="text"],
input.input[type="email"],
input.input[type="password"],
input.input[type="tel"],
input.input[type="number"],
input.input[type="search"],
input.input[type="date"],
input.input[type="time"],
input.input[type="datetime-local"],
input.input[type="file"],
select.input,
textarea.input,
.textarea {
  border-radius: var(--toss-radius-small);
  appearance: none;
  -webkit-appearance: none;
  background-clip: padding-box;
  overflow: hidden;
}

/* Normalize select appearance to match input */
select.input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: var(--control-padding-y) 40px var(--control-padding-y) 16px; /* space for arrow */
  background-color: var(--toss-surface);
  border: 1px solid var(--toss-border);
  border-radius: var(--toss-radius-small);
  line-height: 1.2;
  height: var(--control-height);
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%238b95a1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

/* Toasts */
.toast-container {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(var(--max-width) - 32px);
  max-width: 520px;
  padding: 0 16px;
  pointer-events: none;
}
.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  background: var(--ui-surface);
  border-left: 4px solid var(--ui-blue);
  color: var(--ui-text);
  animation: toastIn .25s ease-out;
}
.toast-item .toast-icon { font-size: 18px; opacity: 0.9; }
.toast-item .toast-msg { font-size: 14px; font-weight: 600; }
.toast-item.success { border-left-color: #22c55e; background: #ecfdf5; color: #065f46; }
.toast-item.error { border-left-color: #ef4444; background: #fef2f2; color: #7f1d1d; }
.toast-item.warn { border-left-color: #f59e0b; background: #fffbeb; color: #78350f; }
.toast-item.info { border-left-color: var(--toss-blue); background: var(--toss-blue-light); color: #4736a6; }
.toast-item.hide { animation: toastOut .25s ease-in forwards; }

@keyframes toastIn { from { opacity:0; transform: translateY(6px);} to { opacity:1; transform: translateY(0);} }
@keyframes toastOut { from { opacity:1; transform: translateY(0);} to { opacity:0; transform: translateY(8px);} }

/* Slot chips for scheduling (readable, high-contrast) */
.slot-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  margin: 2px;
  border-radius: 999px;
  border: 1px solid var(--ui-border);
  background: #ffffff;
  color: var(--ui-text);
  font-size: 13px;
}
.slot-chip .slot-chip-time { font-weight: 700; letter-spacing: -0.2px; }
.slot-chip .slot-chip-meta { font-size: 12px; color: var(--ui-text-secondary); }
.slot-chip.ok {
  border-color: rgba(25, 135, 84, 0.35);
  background: #e9f7ef; /* light success */
  color: #0f5132;
}
.slot-chip.ok .slot-chip-meta { color: #0f5132; opacity: 0.85; }
.slot-chip.full {
  border-color: #dee2e6;
  background: #f1f3f5;
  color: #495057;
}

/* Ensure same focus style for select */
select.input:focus {
  outline: none;
  border-color: var(--toss-blue);
  box-shadow: 0 0 0 3px var(--toss-blue-light);
}

/* Fix: Bootstrap .input-group with label + input made left corners square.
   Restore left radius and remove negative margin when a label precedes input. */
.input-group > label + .input,
.input-group > label + .textarea,
.input-group > label + select.input,
.input-group > .input:first-child,
.input-group > .textarea:first-child,
.input-group > select.input:first-child {
  margin-left: 0 !important;
  border-top-left-radius: var(--toss-radius-small) !important;
  border-bottom-left-radius: var(--toss-radius-small) !important;
}

.input:focus {
  outline: none;
  border-color: var(--toss-blue);
  box-shadow: 0 0 0 3px var(--toss-blue-light);
}

.input::placeholder {
  color: var(--toss-text-tertiary);
}

.textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--toss-border);
  border-radius: var(--toss-radius-small);
  background: var(--toss-surface);
  color: var(--toss-text);
  font-size: 16px;
  min-height: 280px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  resize: vertical;
  font-family: inherit;
  transition: all 0.2s;
}

.textarea:focus {
  outline: none;
  border-color: var(--toss-blue);
  box-shadow: 0 0 0 3px var(--toss-blue-light);
}

/* Bottom Navigation - Toss Style */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--toss-surface);
  border-top: 1px solid var(--toss-border);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  cursor: pointer;
  text-decoration: none;
  color: var(--toss-text-tertiary);
  transition: color 0.2s;
}

.nav-item.active {
  color: var(--toss-text);
}

.nav-icon {
  font-size: 24px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-label {
  font-size: 11px;
  font-weight: 600;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(124, 108, 255, 0.15);
  color: #5a49cf;
}

/* AI loading modal */
.ai-loading-modal .modal-content {
  border-radius: 18px;
  border: 1px solid rgba(124, 108, 255, 0.2);
  background: linear-gradient(135deg, #f8f7ff 0%, #eef2ff 100%);
  box-shadow: 0 14px 30px rgba(88, 101, 242, 0.18);
}
.ai-loading-sheen {
  position: relative;
  overflow: hidden;
}
.ai-loading-sheen::after {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 55%);
  animation: aiSheen 2.4s ease-in-out infinite;
  pointer-events: none;
}
.ai-loading-body {
  text-align: center;
  padding: 26px;
  position: relative;
  z-index: 1;
}
.ai-loading-spinner {
  width: 40px;
  height: 40px;
}
.ai-loading-title {
  margin-top: 12px;
  font-weight: 600;
  color: #1f2937;
}
.ai-loading-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ui-text-tertiary);
}
.ai-loading-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 4px;
  border-radius: 50%;
  background: #7c6cff;
  animation: aiDotPulse 1.1s ease-in-out infinite;
}
.ai-loading-dots span:nth-child(2) {
  animation-delay: 0.15s;
}
.ai-loading-dots span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes aiSheen {
  0% { transform: translateY(-6%) rotate(0deg); opacity: 0.35; }
  50% { transform: translateY(4%) rotate(2deg); opacity: 0.65; }
  100% { transform: translateY(-6%) rotate(0deg); opacity: 0.35; }
}
@keyframes aiDotPulse {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-4px); opacity: 1; }
}

/* Viewer badges */
.badge-student {
  background: rgba(124, 108, 255, 0.15);
  color: #5a49cf;
}
.badge-parent {
  background: #f1f3f5;
  color: #6b7280;
}

.badge-new {
  background: #ff5757;
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  margin-left: 4px;
}

/* Divider */
.divider {
  height: 8px;
  background: #ffffff;
  margin: 0;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 48px;
  opacity: 0.3;
  margin-bottom: 16px;
}

.empty-text {
  font-size: 15px;
  color: var(--toss-text-tertiary);
  margin-bottom: 8px;
}

/* File upload (pretty) */
.file-upload {
  display: flex;
  align-items: center;
  gap: 10px;
}
.file-upload .file-name {
  font-size: 14px;
  color: var(--toss-text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }

/* Responsive */
@media (min-width: 481px) {
  .app-container {
    border-left: 1px solid var(--toss-border);
    border-right: 1px solid var(--toss-border);
  }
}

/* (removed grid-2 helpers; reverted to single column layout) */

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0; /* prevent initial flash before animation kicks in */
  transform: translateY(14px);
  animation: fadeIn 0.4s ease-out forwards;
}

/* Scores visibility enhancers */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 16px;
  background: rgba(124, 108, 255, 0.14);
  color: #5a49cf;
  box-shadow: inset 0 0 0 1px rgba(124, 108, 255, 0.2);
}
.score-badge.muted {
  background: #f1f3f5;
  color: #6b7280;
}
.score-badge.green {
  background: #e6ffed;
  color: #0a7a3b;
}

.policy-card {
  font-size: 14px;
  line-height: 1.6;
  color: var(--toss-text-secondary);
}
.policy-card .list-item-subtitle {
  font-size: 14px;
  color: var(--toss-text-secondary);
}
.policy-card ul,
.policy-card ol {
  margin: 0;
  padding-left: 18px;
  color: var(--toss-text-secondary);
}
.policy-card li {
  margin-bottom: 4px;
}

.progress-line {
  position: relative;
  width: 100%;
  height: 8px;
  background: var(--toss-border);
  border-radius: 9999px;
  overflow: hidden;
}
.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(120deg, #7c6cff, #b8a9ff);
  box-shadow: 0 4px 16px rgba(124, 108, 255, 0.25);
}
.hero-logo-img {
  height: 48px;
  width: auto;
  display: block;
}
