:root {
  color: #1f2933;
  background: #f9f6fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  font-family: "Chalkboard SE", "Comic Sans MS", "Marker Felt", "Bradley Hand", system-ui,
    -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.35) 1px, transparent 0) 0 0 / 18px 18px,
    linear-gradient(135deg, #fff5fb 0%, #f4f1ff 48%, #fffdf7 100%);
}

body::after {
  content: '';
  position: fixed;
  right: 24px;
  bottom: 20px;
  width: min(420px, 36vw);
  height: min(420px, 36vw);
  background: url("assets/vivi-buddy.png") no-repeat right bottom / contain;
  opacity: 0.08;
  filter: blur(0.2px) saturate(1.05);
  pointer-events: none;
  z-index: 0;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 40px;
  position: relative;
  z-index: 1;
  font-family: "Chalkboard SE", "Comic Sans MS", "Marker Felt", "Bradley Hand", system-ui,
    -apple-system, "Segoe UI", sans-serif;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.subtitle {
  margin-top: 6px;
  color: #52606d;
}

.progress-bar {
  margin: 24px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.bar {
  flex: 1;
  height: 8px;
  background: #dbe2ea;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff9a9e, #fad0c4);
  width: 0;
}

.main {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 24px;
}

.card {
  background: white;
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  border: 1px solid #f0e6f6;
}

.stack > * + * {
  margin-top: 16px;
}

button {
  font: inherit;
}

.view-home .progress-bar,
.view-home .side,
.view-home .footer {
  display: none;
}

.view-home .main {
  grid-template-columns: 1fr;
}

.home-stack {
  align-items: center;
  text-align: center;
}

.primary {
  background: #ff80ab;
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
}

.primary.jumbo {
  font-size: 1.05rem;
  padding: 16px 28px;
  box-shadow: 0 10px 20px rgba(255, 128, 171, 0.3);
}

.secondary {
  background: #fff0f7;
  color: #b4236d;
  border: 1px solid #f3b2cf;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.subtle {
  color: #7c8694;
}

.task-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: #ffd3e6;
  border: 2px solid #f3b2cf;
  color: #7c1d42;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.question {
  font-size: 1.05rem;
  font-weight: 600;
  color: #2f3b45;
  margin: 6px 0 4px;
}

.example {
  font-size: 0.92rem;
  color: #6b7280;
  margin: 0 0 6px;
}

.cue {
  background: #ffecc7;
  color: #8a4f00;
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 600;
}

.choices {
  display: grid;
  gap: 10px;
}

.audio-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.audio-btn {
  background: #f8f4ff;
  color: #4b5563;
  border: 1px solid #e1d4f5;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

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

.audio-note {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #9aa5b1;
}

.choice {
  text-align: left;
  padding: 12px 14px;
  padding-right: 64px;
  border-radius: 10px;
  border: 1px solid #dbe2ea;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.choice.selected {
  border-color: #ff80ab;
  background: #fff0f7;
}

.choice.chosen {
  border-color: #ff80ab;
  box-shadow: 0 0 0 2px rgba(255, 128, 171, 0.22);
}

.choice.correct {
  border: 2px solid #2f855a;
  background: #e9f9ef;
  font-weight: 600;
}

.choice.wrong {
  border: 2px solid #d64545;
  background: #ffeaea;
  animation: shake 0.3s ease-in-out;
}

.choice.correct::after,
.choice.wrong::after {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
}

.choice.correct::after {
  content: '✅';
}

.choice.wrong::after {
  content: '❌';
}

.choice-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #4b5563;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.choice-tag.correct {
  color: #1f7a46;
  background: #dff4e7;
  border-color: #9ddbb6;
}

.choice-tag.wrong {
  color: #b91c1c;
  background: #ffe1e1;
  border-color: #f2aaaa;
}

.result-banner {
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-banner.correct {
  background: #eafaf1;
  border: 1px solid #b7e4c7;
  color: #17643c;
}

.result-banner.wrong {
  background: #fff1f0;
  border: 1px solid #f5b7b1;
  color: #8a1c1c;
}

.result-tip {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.result-tip.wrong {
  color: #8a1c1c;
}

.feedback {
  padding: 12px;
  border-radius: 10px;
}

.feedback.correct {
  background: #eafaf1;
  border: 1px solid #b7e4c7;
}

.feedback.wrong {
  background: #fff4f4;
  border: 1px solid #f5b7b1;
}

.explain-line {
  font-size: 0.9rem;
  color: #5f6b7a;
}

.hint {
  font-size: 0.9rem;
  color: #52606d;
}

.summary-intro {
  font-weight: 600;
  color: #364152;
}

.plan-panel {
  padding: 16px;
  border-radius: 12px;
  background: #fff8fb;
  border: 1px solid #f0e6f6;
}

.review-words {
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed #f3b2cf;
  background: #fff7fb;
}

.review-label {
  font-weight: 700;
  color: #7c1d42;
  margin-bottom: 8px;
}

.review-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffe1ee;
  border: 1px solid #f3b2cf;
  color: #7c1d42;
  font-weight: 600;
  font-size: 0.85rem;
}

.summary-block {
  padding: 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #f0e6f6;
}

.summary-block h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: #2f3b45;
}

.mistake-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.mistake-card {
  padding: 12px;
  border-radius: 10px;
  background: #fff5f5;
  border: 1px solid #f5b7b1;
}

.mistake-title {
  font-weight: 700;
  margin-bottom: 6px;
  color: #8a1c1c;
}

.mistake-row {
  font-size: 0.9rem;
  color: #5f6b7a;
}

.mistake-row span {
  font-weight: 600;
  color: #2f3b45;
}

.footer {
  margin-top: 24px;
  color: #52606d;
  font-size: 0.9rem;
}

.side-card {
  background: white;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid #f0e6f6;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}

.side-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #2f3b45;
}

.calendar-month {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 10px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.calendar-nav {
  border: 1px solid #f0e6f6;
  background: #fff7fb;
  color: #7c1d42;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  font-size: 1rem;
  cursor: pointer;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.calendar-weekday {
  text-align: center;
  color: #9aa5b1;
  font-weight: 600;
}

.calendar-day {
  text-align: center;
  padding: 6px 0;
  border-radius: 8px;
  border: 1px solid #f0e6f6;
  color: #4b5563;
}

.calendar-day.today {
  border-color: #ffb0cb;
  color: #b4236d;
  font-weight: 600;
}

.calendar-day.checked {
  background: #ffedf5;
  border-color: #ffb0cb;
  color: #b4236d;
  font-weight: 600;
}

.calendar-count {
  font-size: 0.9rem;
  color: #364152;
  font-weight: 600;
}

.calendar-streak {
  margin-top: 4px;
  font-size: 0.85rem;
  color: #7c1d42;
  font-weight: 600;
}

.calendar-stats {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #6b7280;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-3px);
  }
  40% {
    transform: translateX(3px);
  }
  60% {
    transform: translateX(-2px);
  }
  80% {
    transform: translateX(2px);
  }
  100% {
    transform: translateX(0);
  }
}

@media (max-width: 900px) {
  .main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  body::after {
    width: min(240px, 55vw);
    height: min(240px, 55vw);
    opacity: 0.08;
    right: 12px;
    bottom: 12px;
  }
}
.header h1 {
  font-family: "Chalkboard SE", "Comic Sans MS", "Marker Felt", "Bradley Hand", system-ui,
    -apple-system, "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: 0.4px;
}
