body {
  font-family: var(--font);
  background: #ffffff;
  color: var(--text);
  min-height: 100dvh;
}

.viewport {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
}

/* 데스크탑: iPhone 17 베젤 */
.viewport .phone {
  outline: 3px solid #2c2c2e;
  outline-offset: -1px;
}

.viewport-label {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-3);
}

.noscript-msg {
  text-align: center;
  padding: 2rem;
  color: var(--text);
}

.phone {
  width: var(--phone-w);
  height: var(--phone-h);
  max-width: 100%;
  background: var(--bg-cream);
  border-radius: 47px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
}

/* iPhone 17 상단 — 배경 투명, 콘텐츠가 비침 */
.iphone-top-bar {
  flex-shrink: 0;
  width: 100%;
  height: var(--top-bar-h);
  min-height: var(--top-bar-h);
  background: transparent;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  pointer-events: none;
}

.iphone-top-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 28px;
  position: relative;
  color: var(--text);
  pointer-events: auto;
}

.iphone-top-bar__time {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  min-width: 54px;
  font-variant-numeric: tabular-nums;
}

.iphone-top-bar__icons {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 72px;
  justify-content: flex-end;
}

.iphone-top-bar__icons svg {
  display: block;
}

/* Dynamic Island — 검정 바 위에 위치 */
.dynamic-island {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 126px;
  height: 37px;
  background: #000000;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.dynamic-island__cam {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a3a4a, #0a0a0c);
}

.screen-wrap {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: calc(var(--top-bar-h) + 4px) var(--pad-x) 16px;
  background: #ffffff;
}

.screen-wrap::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.screen-wrap.has-nav {
  padding-bottom: calc(var(--nav-h) + var(--wave-h) + 20px);
}

.screen {
  animation: fadeIn 0.35s var(--ease);
}

.screen-home {
  padding-top: 30px;
  width: 100%;
  box-sizing: border-box;
}

.screen-home .greet,
.screen-home .stat-grid,
.screen-home .feedback-preview-card,
.screen-home .mode-list,
.screen-home .mode-item,
.screen-home .card,
.screen-home .section-label {
  width: 100%;
  box-sizing: border-box;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Loading — Tiko 스타일 레이아웃 */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: min(680px, calc(100vh - var(--top-bar-h) - 80px));
  text-align: center;
  padding: 24px 28px 48px;
  background: #ffffff;
}

.loading-hero {
  width: min(240px, 72vw);
  margin-bottom: 6px;
  animation: heroFloat 2.4s ease-in-out infinite;
}

.loading-hero img {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: screen;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.loading-brand {
  margin: 0 0 28px;
  line-height: 0;
}

.loading-title-img {
  display: block;
  width: 130px;
  max-width: 42vw;
  height: auto;
  margin: 0 auto;
}

.loading-msg {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  margin: 0 0 28px;
  line-height: 1.45;
}

.bubble-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 3px 0 0;
}

.bubble-loader span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  animation: bounce 0.9s ease-in-out infinite;
}

.bubble-loader span:nth-child(1) { background: #ff6b9d; }
.bubble-loader span:nth-child(2) { background: #ff9f43; animation-delay: 0.15s; }
.bubble-loader span:nth-child(3) { background: #5cdbb5; animation-delay: 0.3s; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-10px); opacity: 1; }
}

/* Header */
.greet {
  margin-bottom: 22px;
  padding: 0 2px 0 10px;
}

.greet h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.greet p {
  font-size: 15px;
  color: var(--text-2);
  margin-top: 6px;
  line-height: 1.45;
}

.greet-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mini-robot {
  width: 48px;
  height: 48px;
  background: var(--lavender-soft);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.card-tint {
  border: 2px solid transparent;
}

.card-tint--pink { background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--pink-soft), var(--lavender-soft)) border-box; }
.card-tint--mint { background: var(--mint-soft); }
.card-tint--sky { background: var(--sky-soft); }
.card-tint--lemon { background: var(--lemon-soft); }
.card-tint--lavender { background: var(--lavender-soft); }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.card-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.card-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.card-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.45;
  margin-top: 6px;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--pink-soft);
  color: var(--pink);
}

.badge--mint { background: var(--mint-soft); color: #2a9d74; }

/* 오늘의 발음 피드백 카드 (홈) */
.feedback-preview-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 22px 20px 28px;
  margin-bottom: 16px;
  border-radius: var(--radius-xl);
  border: 1.5px solid transparent;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #ffb3d0 0%, #e8b4ff 55%, #c4b5fd 100%) border-box;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s ease;
  overflow: visible;
}

.feedback-preview-card:active {
  transform: scale(0.98);
}

.feedback-preview-card__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.feedback-score-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: #ffe8f0;
  color: #ff6b9d;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
}

.feedback-preview-label,
.feedback-preview-desc {
  font-size: 12px;
  font-weight: 600;
  color: #888888;
  line-height: 1.5;
  display: block;
}

.feedback-preview-label {
  margin-bottom: 12px;
}

.feedback-preview-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  display: block;
}

.feedback-preview-desc {
  margin-top: -2px;
  margin-bottom: 0;
  white-space: pre-line;
}

.feedback-preview-card__img {
  flex-shrink: 0;
  width: 104px;
  height: 104px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  mix-blend-mode: lighten;
}

.feedback-preview-card__arrow {
  position: absolute;
  right: 18px;
  bottom: 14px;
  color: #888888;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  line-height: 0;
}

/* Stat grid — daily check-in */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat-chip {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 14px 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-chip .ico {
  font-size: 22px;
  display: block;
  margin-bottom: 6px;
}

.stat-chip strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
}

.stat-chip span {
  font-size: 10px;
  color: var(--text-3);
  font-weight: 600;
}

/* Mode cards */
.mode-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.mode-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  width: 100%;
  transition: transform 0.15s ease;
}

.mode-item:active { transform: scale(0.98); }

.mode-item--featured {
  background: var(--gradient-cta);
  color: #fff;
}

.mode-item--featured .mode-sub { color: rgba(255,255,255,0.85); }

.mode-ico {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.mode-ico--pink { background: var(--pink-soft); }
.mode-ico--mint { background: var(--mint-soft); }
.mode-ico--sky { background: var(--sky-soft); }
.mode-ico--lemon { background: var(--lemon-soft); }

.mode-item--featured .mode-ico {
  background: rgba(255,255,255,0.25);
}

.mode-name {
  font-size: 17px;
  font-weight: 800;
}

.mode-sub {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 2px;
}

.mode-time {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
}

.mode-item--featured .mode-time { color: rgba(255,255,255,0.8); }

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 800;
  transition: transform 0.15s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--gradient-cta);
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 107, 157, 0.35);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 2px solid #eee;
}

.btn-ghost {
  color: var(--pink);
  font-weight: 700;
  padding: 12px;
  width: auto;
}

.section-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-3);
  margin: 22px 0 14px;
  padding: 0 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Progress */
.progress-track {
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-cta);
  border-radius: 4px;
  transition: width 0.5s var(--ease);
}

/* Quiz */
.quiz-card {
  padding: 24px;
  margin-bottom: 16px;
}

.quiz-card .badge {
  display: inline-block;
  margin-bottom: 18px;
}

.quiz-card .quiz-q {
  margin-top: 0;
  margin-bottom: 0;
}

.quiz-q {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0;
}

/* 집중 복습 문제 카드 */
.review-item-card .badge {
  display: inline-block;
  margin-bottom: 18px;
}

.review-item-card .card-title {
  margin-top: 0;
}

.review-item-card .review-target {
  margin-top: 18px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.4;
}

/* Shadowing — 따라해보기 / 듣는 중 */
.shadow-listen-panel {
  text-align: center;
  padding: 28px 20px 24px;
  margin-bottom: 12px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--mint-soft), #fff);
  box-shadow: var(--shadow-sm);
  animation: shadowPanelIn 0.35s var(--ease);
}

@keyframes shadowPanelIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.shadow-listen-ring {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(42, 157, 116, 0.18);
}

.shadow-listen-ring::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(92, 219, 181, 0.45);
  opacity: 0;
}

.shadow-listen-panel.is-active .shadow-listen-ring::before {
  animation: shadowPulse 1.6s ease-out infinite;
}

@keyframes shadowPulse {
  0% { transform: scale(0.92); opacity: 0.7; }
  100% { transform: scale(1.18); opacity: 0; }
}

.shadow-listen-mic {
  font-size: 32px;
  line-height: 1;
}

.shadow-listen-panel.is-active .shadow-listen-body .shadow-listen-mic {
  animation: shadowMicBob 0.8s ease-in-out infinite;
}

@keyframes shadowMicBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.shadow-listen-waves {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 40px;
  margin-bottom: 10px;
}

.shadow-listen-waves span {
  width: 4px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #5cdbb5, #2a9d74);
  transform-origin: center bottom;
}

.shadow-listen-panel.is-active .shadow-listen-body .shadow-listen-waves span {
  animation: shadowWave 0.85s ease-in-out infinite;
}

.shadow-listen-waves span:nth-child(1) { animation-delay: 0s; }
.shadow-listen-waves span:nth-child(2) { animation-delay: 0.12s; }
.shadow-listen-waves span:nth-child(3) { animation-delay: 0.24s; }
.shadow-listen-waves span:nth-child(4) { animation-delay: 0.12s; }
.shadow-listen-waves span:nth-child(5) { animation-delay: 0s; }

@keyframes shadowWave {
  0%, 100% { height: 10px; opacity: 0.45; }
  50% { height: 32px; opacity: 1; }
}

.shadow-listen-label {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #2a9d74;
  letter-spacing: -0.01em;
}

.shadow-listen-loading {
  padding: 8px 0 4px;
}

.shadow-retry-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  margin-bottom: 10px;
}

.shadow-retry-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #5cdbb5;
  animation: shadowRetryDot 0.9s ease-in-out infinite;
}

.shadow-retry-dots span:nth-child(2) { animation-delay: 0.15s; }
.shadow-retry-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes shadowRetryDot {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(-8px); opacity: 1; }
}

.shadow-listen-panel.is-loading .shadow-listen-loading .shadow-listen-label {
  color: var(--text-2);
  animation: none;
}

.shadow-listen-panel.is-active .shadow-listen-body .shadow-listen-label {
  animation: shadowLabelPulse 1.4s ease-in-out infinite;
}

@keyframes shadowLabelPulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .shadow-listen-panel,
  .shadow-listen-panel.is-active .shadow-listen-ring::before,
  .shadow-listen-panel.is-active .shadow-listen-body .shadow-listen-mic,
  .shadow-listen-panel.is-active .shadow-listen-body .shadow-listen-waves span,
  .shadow-listen-panel.is-active .shadow-listen-body .shadow-listen-label,
  .shadow-retry-dots span {
    animation: none !important;
  }
}

.opt-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.opt-card.opt-btn {
  width: 100%;
  text-align: left;
  padding: 18px;
  margin-bottom: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  border: 2px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.opt-card.opt-btn:active {
  transform: scale(0.98);
}

.opt-card.opt-btn.ok {
  border-color: var(--mint);
  background: var(--mint-soft);
}

.opt-card.opt-btn.no {
  border-color: var(--orange);
  background: var(--orange-soft);
}

/* Report chart */
.week-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 72px;
  margin: 16px 0;
}

.week-bar {
  flex: 1;
  background: var(--lavender-soft);
  border-radius: 8px 8px 4px 4px;
  min-height: 8px;
}

.week-bar.on {
  background: var(--gradient-cta);
}

.week-labels {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--text-3);
  font-weight: 700;
}

.week-labels span {
  flex: 1;
  text-align: center;
  min-width: 0;
}

/* 성장 리포트 — 진입·차트 애니메이션 */
.screen-report .report-head {
  position: relative;
}

.screen-report .report-head-spark {
  font-size: 22px;
  animation: reportSpark 2.2s ease-in-out infinite;
}

@keyframes reportSpark {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.85; }
  50% { transform: scale(1.15) rotate(12deg); opacity: 1; }
}

.screen-report .report-insight {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.screen-report .report-insight .card-desc {
  font-size: 12px;
  line-height: 1.5;
  margin-top: 0;
  text-align: center;
}

.screen-report .report-insight::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 60%
  );
  transform: translateX(-120%);
  animation: reportShine 2.8s ease-in-out 0.6s 2;
  pointer-events: none;
}

@keyframes reportShine {
  to { transform: translateX(120%); }
}

.screen-report .report-enter {
  opacity: 0;
  transform: translateY(14px);
  animation: reportEnter 0.55s var(--ease) forwards;
  animation-delay: calc(0.08s * var(--enter-i, 0));
}

@keyframes reportEnter {
  to { opacity: 1; transform: none; }
}

.screen-report .report-ico-flame {
  display: inline-block;
  animation: reportFlame 1.4s ease-in-out infinite;
}

.screen-report .report-ico-bounce {
  display: inline-block;
  animation: reportIconBounce 1.8s ease-in-out infinite;
}

.screen-report .report-ico-pop {
  display: inline-block;
  animation: reportIconPop 2s ease-in-out infinite;
}

@keyframes reportFlame {
  0%, 100% { transform: scale(1) translateY(0); }
  40% { transform: scale(1.12) translateY(-2px); }
  70% { transform: scale(0.96) translateY(1px); }
}

@keyframes reportIconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes reportIconPop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.screen-report .report-progress-fill {
  width: 0;
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.screen-report .report-week-chart .week-bar {
  height: var(--bar-h, 12%);
  transform-origin: bottom center;
  transform: scaleY(0);
  animation: reportBarGrow 0.65s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
  animation-delay: calc(0.45s + 0.07s * var(--bar-i, 0));
}

.screen-report .report-week-chart .week-bar.report-bar-pending {
  animation: none;
  transform: scaleY(0);
}

@keyframes reportBarGrow {
  to { transform: scaleY(1); }
}

.screen-report .report-donut-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 8px;
}

.screen-report .report-donut {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

.screen-report .report-donut svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.screen-report .report-donut-bg {
  stroke: #f0f0f0;
}

.screen-report .report-donut-fill {
  stroke: url(#reportDonutGrad);
  stroke-linecap: round;
  stroke-dashoffset: 100;
  animation: reportDonutFill 1.15s cubic-bezier(0.22, 1, 0.36, 1) 0.55s forwards;
}

.screen-report .report-donut::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 157, 0.12), transparent 70%);
  animation: reportDonutGlow 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes reportDonutFill {
  to { stroke-dashoffset: var(--donut-offset, 35); }
}

@keyframes reportDonutGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.screen-report .report-donut-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.screen-report .report-donut-hint {
  flex: 1;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .screen-report .report-enter,
  .screen-report .report-head-spark,
  .screen-report .report-insight::after,
  .screen-report .report-ico-flame,
  .screen-report .report-ico-bounce,
  .screen-report .report-ico-pop,
  .screen-report .report-week-chart .week-bar,
  .screen-report .report-donut-fill,
  .screen-report .report-donut::before {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .screen-report .report-week-chart .week-bar {
    transform: scaleY(1);
  }

  .screen-report .report-donut-fill {
    stroke-dashoffset: var(--donut-offset, 35);
  }
}

/* Settings */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 15px;
}

.toggle {
  width: 50px;
  height: 30px;
  background: #e5e5ea;
  border-radius: 15px;
  position: relative;
  transition: background 0.2s;
}

.toggle.on { background: var(--mint); }

.toggle::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.toggle.on::after { transform: translateX(20px); }

.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.5;
}

.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.back-btn {
  font-size: 15px;
  font-weight: 700;
  color: var(--pink);
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  flex: 1;
}

.result-hero {
  text-align: center;
  padding: 32px 16px;
}

.result-hero .emoji { font-size: 56px; margin-bottom: 12px; }

/* 학습 완료 축하 */
.screen-celebrate {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: min(520px, calc(100vh - var(--top-bar-h) - var(--nav-h) - 80px));
  overflow: hidden;
}

.screen-celebrate .celebrate-glow {
  position: absolute;
  left: 50%;
  top: 28%;
  width: 280px;
  height: 280px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 157, 0.22), rgba(196, 181, 253, 0.08) 55%, transparent 70%);
  animation: celebrateGlow 2.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes celebrateGlow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.75; }
  50% { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
}

.screen-celebrate .celebrate-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.confetti-piece {
  position: absolute;
  top: -12px;
  left: var(--left, 50%);
  border-radius: 999px;
  opacity: 0;
  animation: confettiFall var(--dur, 2.4s) cubic-bezier(0.25, 0.8, 0.35, 1) var(--delay, 0s) forwards;
}

.confetti-piece--square {
  border-radius: 2px;
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift, 0), 105vh, 0) rotate(var(--spin, 360deg)) scale(0.85);
  }
}

.screen-celebrate .celebrate-hero {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px 24px;
}

.screen-celebrate .celebrate-kicker {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--pink-soft), var(--lavender-soft));
  color: var(--pink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  animation: celebrateKicker 0.6s cubic-bezier(0.34, 1.4, 0.64, 1) 0.1s both;
}

@keyframes celebrateKicker {
  from { opacity: 0; transform: scale(0.6) translateY(8px); }
  to { opacity: 1; transform: none; }
}

.screen-celebrate .celebrate-emoji {
  font-size: 72px;
  line-height: 1;
  margin-bottom: 16px;
  animation: celebratePop 0.75s cubic-bezier(0.34, 1.5, 0.64, 1) 0.2s both;
  filter: drop-shadow(0 8px 20px rgba(255, 107, 157, 0.25));
}

@keyframes celebratePop {
  0% { opacity: 0; transform: scale(0.2) rotate(-12deg); }
  70% { transform: scale(1.15) rotate(6deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.screen-celebrate .celebrate-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
  animation: celebrateSlideUp 0.55s var(--ease) 0.35s both;
}

.screen-celebrate .celebrate-sub {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  line-height: 1.5;
  max-width: 280px;
  animation: celebrateSlideUp 0.55s var(--ease) 0.45s both;
}

@keyframes celebrateSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.screen-celebrate .celebrate-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  animation: celebrateSlideUp 0.55s var(--ease) 0.55s both;
}

.screen-celebrate .celebrate-chip {
  font-size: 12px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  border: 1.5px solid rgba(255, 107, 157, 0.2);
}

.screen-celebrate .celebrate-btn {
  position: relative;
  z-index: 3;
  margin-top: auto;
  animation: celebrateSlideUp 0.5s var(--ease) 0.65s both;
}

@media (prefers-reduced-motion: reduce) {
  .screen-celebrate .celebrate-glow,
  .screen-celebrate .celebrate-kicker,
  .screen-celebrate .celebrate-emoji,
  .screen-celebrate .celebrate-title,
  .screen-celebrate .celebrate-sub,
  .screen-celebrate .celebrate-chips,
  .screen-celebrate .celebrate-btn,
  .confetti-piece {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.tag {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--orange-soft);
  color: #e67e22;
}

.feedback-item {
  padding: 14px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-md);
  margin-top: 10px;
}

.feedback-item strong { display: block; font-size: 14px; margin-bottom: 4px; }

.feedback-pron-hint {
  margin: -4px 0 12px;
  padding: 0 2px;
  font-size: 13px;
  line-height: 1.5;
}

/* 맨 아래 파형 — 배경 투명(흰색 제거) */
.iphone-bottom-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--wave-h);
  z-index: 18;
  pointer-events: none;
  background: transparent;
  overflow: hidden;
}

.iphone-bottom-wave img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  display: block;
  mix-blend-mode: multiply;
}

/* Bottom nav — 둥근 흰색 필(pill) */
.bottom-nav {
  position: absolute;
  bottom: calc(var(--wave-h) + 10px);
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: #ffffff;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
  z-index: 12;
}

.bottom-nav[hidden] { display: none; }

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #a3a3a8;
  padding: 6px 4px;
  min-width: 0;
  border-radius: 16px;
}

.nav-btn.active {
  color: var(--nav-purple);
}

.nav-icon {
  width: 36px;
  height: 30px;
  border-radius: 12px;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
}

.nav-btn.active .nav-icon {
  background-color: var(--nav-purple-soft);
}

.nav-icon--home {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a3a3a8'%3E%3Cpath d='M12 3l9 8v10h-6v-6H9v6H3V11z'/%3E%3C/svg%3E");
}

.nav-btn.active .nav-icon--home {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238b5cf6'%3E%3Cpath d='M12 3l9 8v10h-6v-6H9v6H3V11z'/%3E%3C/svg%3E");
}

.nav-icon--feedback {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a3a3a8'%3E%3Cpath d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E");
}

.nav-btn.active .nav-icon--feedback {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238b5cf6'%3E%3Cpath d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E");
}

.nav-icon--learn {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a3a3a8'%3E%3Cpath d='M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z'/%3E%3C/svg%3E");
}

.nav-btn.active .nav-icon--learn {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238b5cf6'%3E%3Cpath d='M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z'/%3E%3C/svg%3E");
}

.nav-icon--report {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a3a3a8'%3E%3Cpath d='M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 8h14v-2H7v2zm0-4h14v-2H7v2zm0-6v2h14V7H7z'/%3E%3C/svg%3E");
}

.nav-btn.active .nav-icon--report {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238b5cf6'%3E%3Cpath d='M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 8h14v-2H7v2zm0-4h14v-2H7v2zm0-6v2h14V7H7z'/%3E%3C/svg%3E");
}

.nav-icon--my {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a3a3a8'%3E%3Cpath d='M12 12c2.7 0 5-2.3 5-5s-2.3-5-5-5-5 2.3-5 5 2.3 5 5 5zm0 2c-3.3 0-10 1.7-10 5v3h20v-3c0-3.3-6.7-5-10-5z'/%3E%3C/svg%3E");
}

.nav-btn.active .nav-icon--my {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238b5cf6'%3E%3Cpath d='M12 12c2.7 0 5-2.3 5-5s-2.3-5-5-5-5 2.3-5 5 2.3 5 5 5zm0 2c-3.3 0-10 1.7-10 5v3h20v-3c0-3.3-6.7-5-10-5z'/%3E%3C/svg%3E");
}

.toast {
  position: absolute;
  bottom: calc(var(--nav-h) + var(--wave-h) + 24px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  z-index: 20;
  opacity: 0;
  transition: all 0.3s var(--ease);
  pointer-events: none;
  max-width: 280px;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast[hidden] { display: block; }

.form-field { margin-bottom: 16px; }

.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 8px;
}

.form-field input,
.form-field select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #eee;
  border-radius: var(--radius-md);
  font-size: 16px;
  background: var(--surface);
}

@media (max-width: 430px) {
  .viewport { padding: 0; }
  .phone {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
  .viewport-label { display: none; }
}
