:root {
  --primary: #c92a2a;
  --primary-hover: #a61e1e;
  --primary-light: #ffe3e3;
  --success: #2b8a3e;
  --success-light: #ebfbee;
  --danger: #e03131;
  --danger-light: #fff5f5;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-600: #868e96;
  --gray-700: #495057;
  --gray-900: #212529;
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 20px 30px -10px rgba(0, 0, 0, 0.08);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  color: var(--gray-900);
  height: 100vh;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px;
  overflow: hidden; /* Stop body from scrolling into white space */
}

.app-container {
  width: 100%;
  max-width: 820px;
  height: fit-content;
  max-height: calc(100vh - 48px);
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--gray-200);
  overflow-y: auto; /* Scroll ONLY inside the app container if needed */
  display: flex;
  flex-direction: column;
}

/* 헤더 */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-200);
  background: #ffffff;
  flex-wrap: wrap;
  gap: 12px;
}

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

/* 언어 전환 스위처 탭 */
.lang-switcher {
  display: inline-flex;
  background: var(--gray-100);
  padding: 3px;
  border-radius: 24px;
  border: 1px solid var(--gray-300);
}

.lang-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  border: none;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-tab:hover {
  color: var(--gray-900);
}

.lang-tab.active {
  background: #ffffff;
  color: var(--gray-900);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* UI 언어 전환 스위처 (중국어 / 한국어 / 영어) */
.ui-lang-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--gray-100);
  padding: 3px;
  border-radius: 20px;
  border: 1px solid var(--gray-300);
  gap: 2px;
}

.ui-lang-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 16px;
  border: none;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ui-lang-tab:hover {
  color: var(--gray-900);
  background: rgba(0, 0, 0, 0.04);
}

.ui-lang-tab.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  font-weight: 700;
}

.title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* IELTS 전용 테마 액센트 */
body.theme-ielts {
  --primary: #1864ab;
  --primary-hover: #114b82;
  --primary-light: #e7f5ff;
}

.logo-badge.ielts {
  background: #1864ab;
}

.history-lang-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
}

.history-lang-badge.hsk {
  background: #ffe3e3;
  color: #c92a2a;
}

.history-lang-badge.ielts {
  background: #e7f5ff;
  color: #1864ab;
}

.logo-badge {
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.app-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.header-action-btn {
  background: var(--gray-100);
  color: var(--gray-900);
  border: 1px solid var(--gray-300);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.header-action-btn:hover {
  background: var(--gray-200);
  border-color: var(--gray-700);
}

/* TTS 토글 스위치 */
.tts-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
}

.tts-toggle input {
  display: none;
}

.toggle-slider {
  width: 36px;
  height: 20px;
  background: var(--gray-300);
  border-radius: 20px;
  position: relative;
  transition: 0.25s ease;
}

.toggle-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.tts-toggle input:checked + .toggle-slider {
  background: var(--primary);
}

.tts-toggle input:checked + .toggle-slider::after {
  transform: translateX(16px);
}

.speed-select {
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--gray-300);
  background: var(--gray-50);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  outline: none;
}

/* 뷰 섹션 */
.view-section {
  display: none;
  padding: 32px 28px;
}

.view-section.active {
  display: block;
}

/* 설정 뷰 */
.intro-card {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe3e3 100%);
  border: 1px solid #ffc9c9;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 28px;
}

.intro-card h2 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 6px;
}

.intro-card p {
  font-size: 0.92rem;
  color: var(--gray-700);
  line-height: 1.5;
}

/* 스마트 반복 학습 (SRS) 진도 카드 */
.srs-status-card {
  background: #ffffff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

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

.srs-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.srs-icon {
  font-size: 1.4rem;
}

.srs-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gray-900);
}

.srs-subtitle {
  font-size: 0.78rem;
  color: var(--gray-600);
  margin-top: 2px;
}

.srs-reset-btn {
  font-size: 0.8rem;
  color: var(--gray-600);
  flex-shrink: 0;
  padding: 2px 6px;
}

.srs-reset-btn:hover {
  color: var(--danger);
}

.srs-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.srs-stat-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
}

.srs-stat-box.green {
  background: #f4fbf6;
  border-color: #b2f2bb;
}
.srs-stat-box.green .srs-stat-num { color: #2b8a3e; }

.srs-stat-box.red {
  background: #fff5f5;
  border-color: #ffc9c9;
}
.srs-stat-box.red .srs-stat-num { color: #e03131; }

.srs-stat-box.gray .srs-stat-num { color: var(--gray-700); }

.srs-stat-num {
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 2px;
}

.srs-stat-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--gray-700);
}

.header-tags-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.srs-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
}

.srs-badge.review {
  background: #fff5f5;
  color: #e03131;
  border: 1px solid #ffa8a8;
  animation: pulse-border 1.5s infinite alternate;
}

@keyframes pulse-border {
  from { box-shadow: 0 0 0 0 rgba(224, 49, 49, 0.4); }
  to { box-shadow: 0 0 0 4px rgba(224, 49, 49, 0); }
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 14px;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.mode-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}

.mode-card:hover {
  border-color: #ffa8a8;
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.mode-card.active {
  border-color: var(--primary);
  background: #fffafa;
  box-shadow: 0 0 0 3px rgba(201, 42, 42, 0.12);
}

.mode-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.mode-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.mode-desc {
  font-size: 0.8rem;
  color: var(--gray-700);
  line-height: 1.35;
}

.count-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.count-btn {
  flex: 1;
  min-width: 100px;
  padding: 12px 14px;
  border: 1px solid var(--gray-300);
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s;
}

.count-btn:hover {
  background: #fff;
  border-color: var(--gray-700);
}

.count-btn.active {
  background: var(--gray-900);
  color: #fff;
  border-color: var(--gray-900);
}

/* 난이도 선택기 */
.difficulty-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.diff-btn {
  background: #fff;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.diff-btn:hover {
  border-color: var(--gray-600);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.diff-btn.active {
  border-color: var(--gray-900);
  background: #fdfdfd;
  box-shadow: 0 0 0 3px rgba(33, 37, 41, 0.12);
}

.diff-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.diff-badge {
  font-size: 0.88rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}

.diff-badge.green { background: #ebfbee; color: #2b8a3e; }
.diff-badge.yellow { background: #fff9db; color: #f59f00; }
.diff-badge.red { background: #fff5f5; color: #e03131; }

.diff-timer-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  letter-spacing: -0.2px;
}

.diff-desc {
  font-size: 0.76rem;
  color: var(--gray-600);
  line-height: 1.35;
}

.diff-status-tag {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
}

.diff-status-tag.green { background: #ebfbee; color: #2b8a3e; }
.diff-status-tag.yellow { background: #fff9db; color: #f59f00; }
.diff-status-tag.red { background: #fff5f5; color: #e03131; }

.result-top-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.result-diff-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.92rem;
  font-weight: 700;
}

.result-diff-badge.green { background: #ebfbee; color: #2b8a3e; }
.result-diff-badge.yellow { background: #fff9db; color: #f59f00; }
.result-diff-badge.red { background: #fff5f5; color: #e03131; }

.action-wrap {
  text-align: center;
}

.primary-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 36px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(201, 42, 42, 0.3);
}

.primary-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(201, 42, 42, 0.4);
}

.secondary-btn {
  background: var(--gray-100);
  color: var(--gray-900);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.secondary-btn:hover {
  background: var(--gray-200);
}

/* 퀴즈 뷰 */
.quiz-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.status-left, .status-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tag {
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.progress-indicator {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-700);
}

.score-badge {
  font-size: 0.9rem;
  color: var(--gray-700);
  background: var(--gray-100);
  padding: 4px 12px;
  border-radius: 20px;
}

/* 문제 제한 시간 카운트다운 타이머 배지 */
.timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.88rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--gray-800);
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  padding: 4px 10px;
  border-radius: 20px;
  transition: all 0.25s ease;
  user-select: none;
}

.timer-badge .timer-icon {
  font-size: 0.95rem;
}

.timer-badge.warning {
  background: #fff9db;
  color: #d97706;
  border-color: #fcc419;
}

.timer-badge.danger {
  background: #fff5f5;
  color: #e03131;
  border-color: #ff8787;
  animation: timer-pulse 1s infinite alternate;
}

.timer-badge.timeout {
  background: #fff3bf;
  color: #c92a2a;
  border-color: #f59f00;
  box-shadow: 0 0 0 2px rgba(245, 159, 0, 0.25);
}

.timer-badge.paused {
  opacity: 0.75;
}

@keyframes timer-pulse {
  from { transform: scale(1); box-shadow: 0 0 0 0 rgba(224, 49, 49, 0.4); }
  to { transform: scale(1.04); box-shadow: 0 0 0 4px rgba(224, 49, 49, 0); }
}

.text-btn {
  background: none;
  border: none;
  color: var(--gray-700);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 6px;
}

.text-btn:hover {
  color: var(--danger);
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff8787 0%, var(--primary) 100%);
  transition: width 0.3s ease;
}

/* 타이머 카운트다운 진행 바 */
.timer-bar-bg {
  width: 100%;
  height: 5px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
}

.timer-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #51cf66 0%, #2b8a3e 100%);
  transition: width 0.95s linear, background 0.3s ease;
}

.timer-bar-fill.warning {
  background: linear-gradient(90deg, #ffd43b 0%, #f59f00 100%);
}

.timer-bar-fill.danger {
  background: linear-gradient(90deg, #ff8787 0%, #e03131 100%);
}

.timer-bar-fill.timeout {
  background: #c92a2a;
}

/* 제한 시간 초과 시 자동 노출되는 스마트 힌트 박스 */
.timer-hint-box {
  background: #fff9db;
  border: 1px solid #fcc419;
  border-left: 4px solid #f59f00;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  animation: hint-fade-in 0.35s ease;
  box-shadow: 0 4px 12px rgba(245, 159, 0, 0.12);
}

.timer-hint-box.hidden {
  display: none !important;
}

@keyframes hint-fade-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.timer-hint-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  border-bottom: 1px dashed rgba(245, 159, 0, 0.35);
  padding-bottom: 8px;
}

.timer-hint-badge {
  font-size: 0.86rem;
  font-weight: 800;
  color: #b45309;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.timer-hint-limit-info {
  font-size: 0.78rem;
  font-weight: 600;
  color: #92400e;
}

.timer-hint-content {
  font-size: 0.9rem;
  color: #495057;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timer-hint-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.timer-hint-label {
  font-weight: 700;
  color: #b45309;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.timer-hint-val {
  color: var(--gray-900);
  word-break: break-word;
}

/* 퀴즈 카드 */
.quiz-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--card-shadow);
}

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

.question-category {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  background: #fff0f0;
  padding: 3px 8px;
  border-radius: 4px;
}

.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid #ffa8a8;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.audio-btn.mini {
  padding: 4px 10px;
  font-size: 0.78rem;
  background: #f1f3f5;
  color: var(--gray-700);
  border-color: var(--gray-300);
}

.audio-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: scale(1.04);
}

.audio-btn.mini:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.audio-btn.playing {
  animation: pulse-ring 1s infinite alternate;
}

@keyframes pulse-ring {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(201, 42, 42, 0.4); }
  100% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(201, 42, 42, 0); }
}

.question-body {
  text-align: center;
  padding: 18px 12px 24px;
  border-bottom: 1px dashed var(--gray-200);
  margin-bottom: 22px;
}

.chinese-text {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.4;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.pinyin-text {
  font-size: 1.15rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 12px;
}

.pinyin-text:empty {
  display: none;
}

.sub-prompt {
  font-size: 0.98rem;
  color: var(--gray-700);
  line-height: 1.5;
  white-space: pre-line;
}

/* 보기 그리드 */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--gray-900);
  cursor: pointer;
  transition: all 0.15s ease;
}

.option-btn:hover:not(:disabled) {
  background: #ffffff;
  border-color: var(--primary);
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.opt-idx {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-200);
  color: var(--gray-700);
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* 정답/오답 스타일 */
.option-btn.correct {
  background: var(--success-light) !important;
  border-color: var(--success) !important;
  color: var(--success) !important;
  font-weight: 700;
}

.option-btn.correct .opt-idx {
  background: var(--success);
  color: #fff;
}

.option-btn.wrong {
  background: var(--danger-light) !important;
  border-color: var(--danger) !important;
  color: var(--danger) !important;
  animation: shake 0.4s ease;
}

.option-btn.wrong .opt-idx {
  background: var(--danger);
  color: #fff;
}

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

/* 해설 박스 */
.explanation-box {
  margin-top: 24px;
  background: #f8f9fa;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.explanation-box.hidden {
  display: none;
}

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

.feedback-banner {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.feedback-banner.correct {
  color: var(--success);
}

.feedback-banner.wrong {
  color: var(--danger);
}

.explanation-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--gray-700);
  margin-bottom: 16px;
}

.exp-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.exp-label {
  font-weight: 700;
  color: var(--gray-900);
  flex-shrink: 0;
}

.exp-val {
  color: var(--gray-900);
}

.voice-select {
  max-width: 175px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* 듣기 모드 전용 플레이어 */
.listening-player-box {
  background: linear-gradient(135deg, #f8f9fa 0%, #edf2f7 100%);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 24px;
}

.listening-player-box.hidden {
  display: none !important;
}

.audio-waves-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  height: 38px;
  margin-bottom: 14px;
}

.audio-wave {
  width: 5px;
  height: 12px;
  background: var(--primary);
  border-radius: 4px;
  animation: wave-bounce 1.2s infinite ease-in-out;
}

.audio-waves-wrap.paused .audio-wave {
  animation-play-state: paused;
  opacity: 0.4;
}

.audio-waves-wrap.stopped .audio-wave {
  animation: none;
  height: 6px;
  opacity: 0.25;
}

.audio-wave:nth-child(1) { animation-delay: 0.0s; height: 16px; }
.audio-wave:nth-child(2) { animation-delay: 0.2s; height: 32px; }
.audio-wave:nth-child(3) { animation-delay: 0.4s; height: 24px; }
.audio-wave:nth-child(4) { animation-delay: 0.6s; height: 36px; }
.audio-wave:nth-child(5) { animation-delay: 0.8s; height: 18px; }

@keyframes wave-bounce {
  0%, 100% { transform: scaleY(0.4); opacity: 0.6; }
  50% { transform: scaleY(1.1); opacity: 1; }
}

.listening-instruction {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
  min-height: 28px;
  transition: color 0.2s;
}

.listening-subtext {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-bottom: 18px;
}

.listening-controls-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.player-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 0.92rem;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s;
}

.player-ctrl-btn:hover {
  transform: translateY(-1px);
}

/* 듣기 원문 녹취록 카드 */
.transcript-card {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-left: 4px solid #1971c2;
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 18px;
}

.transcript-card.hidden {
  display: none !important;
}

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

.transcript-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1971c2;
}

.dialogue-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.dialogue-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--gray-900);
}

.speaker-tag {
  font-size: 0.8rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}

.speaker-tag.man {
  background: #e7f5ff;
  color: #1971c2;
}

.speaker-tag.woman {
  background: #fff0f6;
  color: #d6336c;
}

.dialogue-text {
  font-weight: 600;
}

.transcript-question {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8f9fa;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
}

.question-badge {
  color: var(--primary);
  font-weight: 800;
  flex-shrink: 0;
}

.transcript-translation {
  font-size: 0.88rem;
  color: var(--gray-700);
  line-height: 1.6;
  white-space: pre-line;
  border-top: 1px dashed var(--gray-200);
  padding-top: 10px;
}

.example-card.hidden {
  display: none !important;
}

.question-body.hidden,
.options-grid.hidden,
.dictation-box.hidden,
.dictation-hint-box.hidden,
.dictation-diff-card.hidden {
  display: none !important;
}

/* 딕테이션(말하기/따라말하기) 전용 UI 스타일 */
.dictation-box {
  background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 18px;
}

.dictation-diff-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.dictation-diff-bar-label {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--gray-800);
}

.dictation-diff-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.dictation-diff-chip {
  border: 1.5px solid var(--gray-300);
  background: var(--gray-50);
  color: var(--gray-700);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.dictation-diff-chip:hover {
  border-color: var(--gray-400);
  transform: translateY(-1px);
}

.dictation-diff-chip[data-dict-diff="하"].active {
  background: #ebfbee;
  border-color: #2b8a3e;
  color: #2b8a3e;
  box-shadow: 0 2px 6px rgba(43, 138, 62, 0.15);
}

.dictation-diff-chip[data-dict-diff="중"].active {
  background: #fff9db;
  border-color: #f08c00;
  color: #e67700;
  box-shadow: 0 2px 6px rgba(240, 140, 0, 0.15);
}

.dictation-diff-chip[data-dict-diff="상"].active {
  background: #fff5f5;
  border-color: #e03131;
  color: #c92a2a;
  box-shadow: 0 2px 6px rgba(224, 49, 49, 0.15);
}

.dictation-audio-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.dictation-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 0.9rem;
  border-radius: 24px;
}

.dictation-prompt-card {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
  text-align: center;
}

.dictation-meaning-line {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.5;
}

.dictation-guide-line {
  margin-top: 8px;
  display: inline-block;
  padding: 5px 12px;
  border-radius: 8px;
  background: #f1f3f5;
  color: #343a40;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dictation-hint-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--gray-300);
}

.dictation-hint-sentence {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
  line-height: 1.45;
}

.dictation-hint-sub {
  font-size: 0.92rem;
  color: var(--gray-700);
  font-weight: 500;
}

.dictation-mic-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.dictation-mic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 999px;
  border: 2px solid var(--primary);
  background: #ffffff;
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.dictation-mic-btn:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
}

.dictation-mic-btn.recording {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
  animation: pulse-ring 1s infinite alternate;
}

.dictation-mic-status {
  font-size: 0.86rem;
  color: var(--gray-700);
  font-weight: 600;
  text-align: center;
}

.dictation-mic-status.recording {
  color: var(--danger);
  font-weight: 800;
}

.dictation-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dictation-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--gray-900);
  background: #ffffff;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

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

.dictation-action-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.dictation-sub-btn {
  padding: 10px 20px;
  font-size: 0.92rem;
  flex: 1;
  min-width: 160px;
}

.dictation-diff-card {
  margin-top: 18px;
  background: #ffffff;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  animation: fadeIn 0.25s ease;
}

.dictation-diff-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-200);
}

.dictation-diff-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gray-900);
}

.dictation-accuracy-badge {
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
}

.dictation-accuracy-badge.pass {
  background: var(--success-light);
  color: var(--success);
}

.dictation-accuracy-badge.fail {
  background: var(--danger-light);
  color: var(--danger);
}

.dictation-diff-row {
  margin-bottom: 12px;
}

.dictation-diff-row:last-child {
  margin-bottom: 0;
}

.dictation-diff-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.dictation-diff-content {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 1.15rem;
  line-height: 1.75;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.diff-token {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 700;
}

.diff-token.match {
  background: #ebfbee;
  color: #2b8a3e;
  border: 1px solid #b2f2bb;
}

.diff-token.missing {
  background: #fff5f5;
  color: #e03131;
  border: 1px solid #ffc9c9;
  text-decoration: underline wavy #e03131;
}

.diff-token.wrong {
  background: #fff0f6;
  color: #c2255c;
  border: 1px solid #fcc2d7;
  text-decoration: line-through;
}

.dictation-diff-summary {
  background: #f8f9fa;
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--gray-900);
  line-height: 1.6;
}

.diff-issue-item {
  margin-bottom: 4px;
  font-weight: 600;
}

.diff-issue-item:last-child {
  margin-bottom: 0;
}

/* 상세 예문 카드 */
.example-card {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 18px;
}

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

.example-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

.example-cn {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.5;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.example-kr {
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.4;
}

.next-btn {
  width: 100%;
}

/* 결과 화면 */
.result-card {
  text-align: center;
  padding: 36px 20px;
}

.result-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.result-badge.pass {
  background: var(--success-light);
  color: var(--success);
}

.result-badge.fail {
  background: var(--danger-light);
  color: var(--danger);
}

.result-card h2 {
  font-size: 1.6rem;
  margin-bottom: 24px;
  color: var(--gray-900);
}

.result-score-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.score-circle {
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary);
}

.score-total {
  font-size: 1.6rem;
  color: var(--gray-700);
  font-weight: 600;
}

.score-percentage {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-700);
}

.result-message {
  font-size: 1.05rem;
  color: var(--gray-700);
  margin-bottom: 32px;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* 4. 학습 기록(History) 모달 팝업 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
  padding: 16px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: #ffffff;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-200);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-icon {
  font-size: 1.4rem;
}

.modal-header h3 {
  font-size: 1.2rem;
  color: var(--gray-900);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--gray-600);
  cursor: pointer;
  padding: 0 4px;
}

.modal-close-btn:hover {
  color: var(--gray-900);
}

/* 통계 대시보드 */
.history-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px 24px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.stat-box {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
}

.stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 2px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--gray-700);
  font-weight: 600;
}

.history-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-700);
}

.danger-text-btn {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.danger-text-btn:hover {
  color: var(--primary-hover);
}

.history-list {
  padding: 8px 24px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.history-item:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.history-item-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-mode-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-mode-tag {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-900);
}

.history-diff-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
}

.history-diff-badge.green { background: #ebfbee; color: #2b8a3e; }
.history-diff-badge.yellow { background: #fff9db; color: #f59f00; }
.history-diff-badge.red { background: #fff5f5; color: #e03131; }

.history-date {
  font-size: 0.76rem;
  color: var(--gray-600);
}

.history-item-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-score {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gray-900);
}

.history-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
}

.history-status-badge.pass {
  background: var(--success-light);
  color: var(--success);
}

.history-status-badge.fail {
  background: var(--danger-light);
  color: var(--danger);
}

.empty-history {
  text-align: center;
  padding: 36px 16px;
  color: var(--gray-600);
  font-size: 0.95rem;
}

/* 푸터 */
.app-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  font-size: 0.8rem;
  color: var(--gray-700);
}



/* Auth UI Styles */
.auth-wrapper {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.auth-card {
  background: white;
  width: 100%;
  max-width: 400px;
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  text-align: center;
}

.auth-header h2 {
  margin-bottom: 8px;
  color: var(--gray-900);
}

.auth-header p {
  color: var(--gray-600);
  margin-bottom: 30px;
  font-size: 0.95rem;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: all 0.2s;
}

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

.action-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.w-100 {
  width: 100%;
  padding: 14px;
  font-size: 1.05rem;
}

.auth-switch {
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.auth-switch span {
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}
.auth-switch span:hover {
  text-decoration: underline;
}

/* User Greeting */
.user-greeting {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
  margin-right: 4px;
}

/* Responsive Fluid Layout for Mobile Devices */
@media (max-width: 600px) {
  body {
    padding: 0;
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
  }

  .app-container {
    height: 100dvh;
    max-height: 100dvh;
    width: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
  }

  .app-header {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
  }

  .header-left {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 8px;
  }

  .lang-switcher {
    width: 100%;
    display: flex;
  }

  .lang-tab {
    flex: 1 1 50%;
    justify-content: center;
    padding: 8px 0;
    font-size: 0.9rem;
  }

  .title-wrap {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
    gap: 8px;
  }

  #app-title {
    font-size: clamp(1rem, 4vw, 1.25rem);
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px dashed var(--gray-200);
    padding-top: 10px;
    margin-top: 4px;
    box-sizing: border-box;
  }

  .ui-lang-switcher {
    width: 100%;
    margin-bottom: 4px;
    display: flex;
  }

  .ui-lang-tab {
    flex: 1;
    justify-content: center;
  }

  .user-greeting {
    font-size: clamp(0.75rem, 3vw, 0.9rem);
    margin: 0;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 40vw;
  }

  .header-action-btn {
    padding: 6px 10px;
    font-size: clamp(0.75rem, 3vw, 0.85rem);
  }

  .difficulty-selector {
    grid-template-columns: 1fr;
  }

  .view-section {
    padding: 18px 14px;
    flex: 1;
    overflow-y: auto;
  }

  .chinese-text {
    font-size: clamp(1.4rem, 6vw, 2rem);
  }

  .pinyin-text {
    font-size: clamp(0.9rem, 4vw, 1.15rem);
  }

  .auth-card {
    width: 90%;
    max-width: none;
    padding: 32px 24px;
  }

  .result-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .action-btn {
    width: 100%;
    padding: 14px 0;
  }
}

/* ========================================================
   장문 독해(Reading Comprehension) 모드 전용 스타일
   ======================================================== */
.reading-box.hidden {
  display: none !important;
}

.reading-box {
  background: #ffffff;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.reading-diff-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 8px 14px;
  margin-bottom: 14px;
}

.reading-diff-bar-label {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--gray-800);
}

.reading-diff-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.reading-diff-chip {
  border: 1.5px solid var(--gray-300);
  background: #ffffff;
  color: var(--gray-700);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.reading-diff-chip:hover {
  border-color: var(--gray-400);
  transform: translateY(-1px);
}

.reading-diff-chip[data-read-diff="하"].active {
  background: #ebfbee;
  border-color: #2b8a3e;
  color: #2b8a3e;
  box-shadow: 0 2px 6px rgba(43, 138, 62, 0.15);
}

.reading-diff-chip[data-read-diff="중"].active {
  background: #fff9db;
  border-color: #f08c00;
  color: #e67700;
  box-shadow: 0 2px 6px rgba(240, 140, 0, 0.15);
}

.reading-diff-chip[data-read-diff="상"].active {
  background: #fff5f5;
  border-color: #e03131;
  color: #c92a2a;
  box-shadow: 0 2px 6px rgba(224, 49, 49, 0.15);
}

.reading-passage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1.5px solid var(--gray-200);
}

.reading-meta-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.reading-title-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gray-900);
}

.reading-line-badge {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.reading-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reading-ctrl-btn {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.reading-passage-body {
  background: #fbfcfe;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: 14px 16px;
  max-height: 440px;
  overflow-y: auto;
  line-height: 1.85;
  margin-bottom: 16px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.02);
}

.reading-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 3px 6px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.reading-line:hover {
  background: rgba(0, 0, 0, 0.025);
}

.reading-line.highlighted {
  background: #fff3bf;
  border-left: 3px solid #f59f00;
  font-weight: 600;
}

.reading-line-num {
  font-family: -apple-system, BlinkMacSystemFont, "SF Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray-400);
  width: 24px;
  text-align: right;
  user-select: none;
  flex-shrink: 0;
}

.hide-line-numbers .reading-line-num {
  display: none !important;
}

.reading-line-text {
  font-size: 0.98rem;
  color: var(--gray-900);
  letter-spacing: 0.25px;
  word-break: break-word;
}

.reading-key-highlight {
  background: #ffe066;
  color: #111;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.reading-question-box {
  background: #f1f3f5;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.reading-question-prompt {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.reading-question-text {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gray-900);
}

/* ==========================================================================
   Mobile Responsive Rules (<= 480px) & Defensive UI Alignment
   ========================================================================== */
@media (max-width: 480px) {
  .app-container {
    padding: 12px 10px;
    border-radius: 12px;
  }

  .srs-status-card {
    padding: 12px 10px;
  }

  .srs-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .srs-reset-btn {
    align-self: flex-end;
  }

  /* SRS 카운터 모바일 텍스트 클리핑 방지 및 3분할 유지 */
  .srs-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .srs-stat-box {
    padding: 8px 4px;
    min-width: 0;
  }

  .srs-stat-num {
    font-size: 1.15rem;
    margin-bottom: 2px;
  }

  .srs-stat-label {
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
  }

  /* 시작 버튼 하단 정렬 및 탭 타겟 최적화 */
  .action-wrap {
    margin-top: 18px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    width: 100%;
  }

  #start-btn {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.05rem;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-sm);
  }
}

/* ==========================================
   New HSK 3.0 (3등 9급) 급수 선택 네비게이션 바
   ========================================== */
.hsk-level-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 24px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.hsk-tier-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #ffffff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.hsk-tier-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--gray-600);
  padding-right: 6px;
  border-right: 1px solid var(--gray-200);
  white-space: nowrap;
}

.hsk-level-chips {
  display: inline-flex;
  gap: 4px;
}

.hsk-level-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 16px;
  border: 1px solid var(--gray-300);
  background: #ffffff;
  color: var(--gray-700);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.hsk-level-tab:hover {
  background: var(--gray-100);
  color: var(--gray-900);
  border-color: var(--gray-600);
}

.hsk-level-tab.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(201, 42, 42, 0.3);
  transform: translateY(-1px);
}

/* 모드 카드 카운트 배지 */
.mode-count-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  background: var(--gray-100);
  color: var(--primary);
  border: 1px solid var(--primary-light);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
  transition: all 0.2s ease;
}

.mode-card.active .mode-count-badge {
  background: var(--primary-light);
  color: var(--primary-hover);
  border-color: var(--primary);
}

/* ==========================================
   공부 모드 (Study & Flashcard Mode) 스타일링
   ========================================== */

/* 상단 대분류 모드 전환 네비게이션 */
.main-mode-nav {
  display: flex;
  gap: 12px;
  padding: 14px 28px 0;
  background: #ffffff;
  border-bottom: 2px solid var(--gray-200);
}

.main-mode-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--gray-600);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: -2px;
}

.main-mode-tab:hover {
  color: var(--primary);
  background: rgba(201, 42, 42, 0.04);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.main-mode-tab.active {
  color: var(--primary);
  border-bottom: 3px solid var(--primary);
  background: rgba(201, 42, 42, 0.06);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.main-mode-tab .nav-icon {
  font-size: 1.25rem;
}

/* 공부 모드 헤더 및 카테고리 탭 */
.study-header-card {
  background: #ffffff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.study-category-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.study-cat-btn {
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.study-cat-btn:hover {
  background: #ffffff;
  border-color: var(--primary);
  color: var(--primary);
}

.study-cat-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(201, 42, 42, 0.25);
}

.study-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--gray-200);
}

.study-diff-filters {
  display: flex;
  gap: 6px;
}

.study-diff-filter {
  padding: 6px 14px;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s;
}

.study-diff-filter:hover {
  background: var(--gray-200);
}

.study-diff-filter.active {
  background: var(--gray-900);
  color: #ffffff;
  border-color: var(--gray-900);
}

.study-meta-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.study-counter-badge {
  padding: 6px 12px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

.study-tool-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s;
}

.study-tool-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-700);
}

.study-tool-btn.active {
  background: #e6fcf5;
  border-color: var(--success);
  color: var(--success);
}

/* 3D 플립 플래시카드 씬 (Card Scene & 3D Flip) */
.flashcard-scene {
  perspective: 1200px;
  width: 100%;
  max-width: 680px;
  margin: 0 auto 24px;
  min-height: 380px;
}

.flashcard {
  width: 100%;
  min-height: 380px;
  position: relative;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  cursor: pointer;
}

.flashcard.flipped {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

/* 카드 앞면 스타일 */
.flashcard-front {
  background: linear-gradient(145deg, #ffffff 0%, #fffbf8 100%);
  border: 2px solid #ffd8a8;
}

.flashcard-front:hover {
  border-color: #f76707;
}

.card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.card-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--gray-100);
  color: var(--gray-700);
}

.card-badge.tag {
  background: #e7f5ff;
  color: #1971c2;
}

.card-badge.back-badge {
  background: #e6fcf5;
  color: var(--success);
}

.card-audio-btn {
  background: #ffffff;
  border: 1px solid var(--gray-300);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.card-audio-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: scale(1.08);
}

.card-main-content {
  text-align: center;
  margin: auto 0;
  padding: 20px 0;
}

.card-primary-text {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.card-secondary-text {
  font-size: 1.35rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 14px;
}

.card-pos-badge {
  display: inline-block;
  padding: 4px 12px;
  background: #fff3bf;
  color: #d9480f;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 700;
}

.card-flip-prompt {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--gray-200);
}

.card-flip-prompt.back {
  border-top-color: rgba(255, 255, 255, 0.2);
  color: #ced4da;
}

/* 카드 뒷면 스타일 */
.flashcard-back {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border: 2px solid #334155;
  transform: rotateY(180deg);
}

.flashcard-back .card-audio-btn {
  background: #334155;
  border-color: #475569;
  color: #ffffff;
}

.flashcard-back .card-audio-btn:hover {
  background: var(--primary);
}

.card-back-content {
  margin: auto 0;
  padding: 16px 0;
  width: 100%;
}

.card-meanings-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.meaning-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid #64748b;
}

.meaning-item.primary {
  border-left-color: #38d9a9;
  background: rgba(56, 217, 169, 0.12);
}

.meaning-item .lang-flag {
  font-size: 1.1rem;
}

.meaning-item .meaning-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.4;
}

.card-example-box {
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.example-original {
  font-size: 1.05rem;
  color: #fcd34d;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.45;
}

.example-translation {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.card-grammar-box {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  border-left: 3px solid #f59f00;
}

.grammar-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fcc419;
  margin-bottom: 6px;
}

.grammar-explanation {
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.45;
}

/* 하단 플래시카드 네비게이션 컨트롤 */
.flashcard-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 680px;
  margin: 0 auto 28px;
}

.card-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: #ffffff;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-800);
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.card-nav-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-700);
}

.card-nav-btn.primary {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(201, 42, 42, 0.25);
}

.card-nav-btn.primary:hover {
  background: #b02525;
}

.card-nav-btn.flip-toggle-btn {
  background: #f8f9fa;
  border-color: #adb5bd;
}

/* 바로 퀴즈 풀기 브릿지 배너 */
.study-quiz-bridge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #e7f5ff 0%, #d0ebff 100%);
  border: 1.5px solid #a5d8ff;
  border-radius: var(--radius-md);
  padding: 18px 24px;
  max-width: 680px;
  margin: 0 auto;
}

.bridge-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bridge-icon {
  font-size: 2rem;
}

.bridge-title {
  font-size: 1rem;
  font-weight: 800;
  color: #1864ab;
  margin-bottom: 4px;
}

.bridge-desc {
  font-size: 0.85rem;
  color: #1971c2;
  line-height: 1.4;
}

.bridge-btn {
  white-space: nowrap;
  padding: 12px 18px;
  background: #1971c2;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(25, 113, 194, 0.25);
}

.bridge-btn:hover {
  background: #1864ab;
  transform: translateY(-1px);
}

/* ==========================================================================
   문제·해설 JSON 분리 업데이트 모달 스타일 (#json-modal)
   ========================================================================== */
.json-modal-content {
  max-width: 680px;
}

.json-guide-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.86rem;
  color: var(--gray-700);
}

.json-guide-title {
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
}

.json-guide-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.5;
}

.json-guide-list li {
  margin-bottom: 4px;
}

.json-guide-list code {
  background: var(--gray-200);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.82rem;
}

.json-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.json-reload-btn {
  padding: 8px 14px;
  font-size: 0.88rem;
}

.json-import-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.json-import-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.json-select-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--gray-700);
}

.json-file-label {
  cursor: pointer;
  margin-left: auto;
}

.json-textarea {
  width: 100%;
  min-height: 140px;
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--gray-900);
  background: #ffffff;
  resize: vertical;
}

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

.json-bottom-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.json-modal-status {
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 20px;
  color: var(--success);
}

.json-modal-status.error {
  color: var(--danger);
}

/* 모바일 반응형 대응 (<= 480px) */
@media (max-width: 480px) {
  .hsk-level-bar {
    padding: 8px 12px;
    gap: 8px;
    justify-content: flex-start;
  }
  .hsk-tier-group {
    padding: 3px 6px;
    gap: 4px;
  }
  .hsk-tier-label {
    font-size: 0.72rem;
    padding-right: 4px;
  }
  .hsk-level-tab {
    padding: 3px 8px;
    font-size: 0.78rem;
  }
  .main-mode-nav {
    padding: 10px 14px 0;
    gap: 6px;
  }
  .main-mode-tab {
    padding: 10px 8px;
    font-size: 0.88rem;
  }
  .study-category-nav {
    flex-direction: column;
    gap: 8px;
  }
  .study-cat-btn {
    min-width: 100%;
    padding: 10px 14px;
    font-size: 0.9rem;
  }
  .study-filter-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .flashcard-scene,
  .flashcard {
    min-height: 420px;
  }
  .card-primary-text {
    font-size: 2.2rem;
  }
  .card-secondary-text {
    font-size: 1.15rem;
  }
  .flashcard-controls {
    flex-wrap: wrap;
    gap: 8px;
  }
  .card-nav-btn {
    min-width: calc(50% - 4px);
    font-size: 0.88rem;
    padding: 10px 12px;
  }
  .card-nav-btn.flip-toggle-btn {
    order: 3;
    min-width: 100%;
  }
  .study-quiz-bridge {
    flex-direction: column;
    text-align: center;
    padding: 16px;
  }
  .bridge-info {
    flex-direction: column;
    gap: 8px;
  }
  .bridge-btn {
    width: 100%;
  }
}

