* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --bg-primary: #0a1628;
  --bg-secondary: #0d1f3c;
  --bg-tertiary: #050a1c;
  --bg-card: #1a3a6b;
  --text-primary: #f0f4ff;
  --text-secondary: #8899bb;
  --text-tertiary: #5a6580;
  --accent-gold: #e8a020;
  --accent-gold-light: #f4c044;
  --accent-red: #c0392b;
  --accent-blue: #4a90c2;
  --accent-blue-light: #6ba3d0;
  --accent-green: #27ae60;
  --accent-green-light: #2ecc71;
  --border-soft: rgba(255,255,255,0.08);
  --border-medium: rgba(255,255,255,0.15);
}

html, body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Noto Sans KR', -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-primary);
  min-height: 100vh;
  min-height: 100dvh;
}

.screen { display: none; min-height: 100vh; min-height: 100dvh; }
.screen.active { display: block; }

/* ========== HERO HEADER ========== */
.hero-header {
  position: relative;
  height: 160px;
  background: linear-gradient(180deg, #4a90c2 0%, #6ba3d0 100%);
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; }

.cloud {
  position: absolute;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
}
.cloud-1 { width: 200px; height: 80px; top: 20px; right: -40px; }
.cloud-2 { width: 160px; height: 60px; top: 80px; left: -30px; }
.cloud-3 { width: 120px; height: 50px; bottom: 0; right: 20px; }

.hero-heli {
  position: absolute;
  width: 200px;
  height: 100px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);
  z-index: 1;
}

.hero-top {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 2;
}

.brand {
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.brand-name {
  color: #fff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 3px;
  line-height: 1;
}
.brand-sub {
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  margin-top: 4px;
}

.menu-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.menu-btn span {
  display: block;
  width: 16px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

.callsign {
  position: absolute;
  bottom: 10px;
  right: 14px;
  color: rgba(255,255,255,0.75);
  font-size: 10px;
  letter-spacing: 1px;
  z-index: 2;
}

/* ========== INTRO BLOCK ========== */
.intro-block {
  background: var(--bg-primary);
  padding: 22px 18px 24px;
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-red);
  color: #fff;
  padding: 7px 13px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 16px;
}
.icon-warn { font-size: 13px; }

.hero-title {
  font-size: 21px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 12px;
}
.accent { color: var(--accent-gold); }

.hero-sub {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 18px;
}

.hero-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.feat {
  background: rgba(232,160,32,0.1);
  border: 0.5px solid rgba(232,160,32,0.3);
  border-radius: 8px;
  padding: 10px 6px;
  text-align: center;
}
.feat-icon { color: var(--accent-gold); font-size: 18px; margin-bottom: 4px; }
.feat-text { color: var(--text-primary); font-size: 10px; line-height: 1.3; }

/* ========== SELECT BLOCK ========== */
.select-block {
  background: var(--bg-secondary);
  padding: 22px 18px;
}

.select-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}
.select-sub {
  color: var(--text-secondary);
  font-size: 11px;
  margin-bottom: 18px;
}

.group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  margin-top: 4px;
}
.bar { width: 3px; height: 14px; border-radius: 2px; }
.bar-amber { background: var(--accent-gold); }
.bar-blue { background: var(--accent-blue); }
.bar-red { background: var(--accent-red); }
.label-text { font-size: 12px; font-weight: 500; letter-spacing: 1px; }
.label-text.amber { color: var(--accent-gold); }
.label-text.blue { color: var(--accent-blue); }
.label-hint { color: var(--text-tertiary); font-size: 10px; margin-left: auto; }

.role-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.role-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.role-card:active { transform: scale(0.98); }

.role-new {
  background: rgba(192,57,43,0.15);
  border: 0.5px solid rgba(192,57,43,0.5);
}
.role-exp, .role-doc {
  background: rgba(136,153,187,0.08);
  border: 0.5px solid rgba(136,153,187,0.25);
}
.role-air {
  background: rgba(74,144,194,0.12);
  border: 0.5px solid rgba(74,144,194,0.4);
}

.role-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.icon-amber { background: rgba(232,160,32,0.2); }
.icon-gray { background: rgba(136,153,187,0.15); }
.icon-blue { background: rgba(74,144,194,0.2); }

.role-info { flex: 1; min-width: 0; }
.role-name {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.role-desc {
  color: var(--text-secondary);
  font-size: 10px;
  margin-top: 2px;
}

.badge {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 500;
}
.badge-new { background: var(--accent-red); color: #fff; }
.badge-exp { background: rgba(136,153,187,0.3); color: #aab; }

.role-arrow {
  color: var(--text-secondary);
  font-size: 22px;
  font-weight: 300;
}

/* ========== LEGAL BLOCK ========== */
.legal-block {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  padding: 20px 18px 28px;
  border-top: 2px solid var(--accent-gold);
}

.legal-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}
.legal-icon { color: var(--accent-gold); font-size: 16px; }
.legal-title {
  color: var(--accent-gold);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
}

.legal-card {
  background: rgba(232,160,32,0.08);
  border: 0.5px solid rgba(232,160,32,0.3);
  border-radius: 8px;
  padding: 14px;
}
.legal-doc {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 6px;
}
.legal-doc-sub {
  color: var(--text-secondary);
  font-size: 10px;
  text-align: center;
  margin-bottom: 12px;
}
.legal-items { display: flex; flex-direction: column; gap: 5px; }
.legal-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(232,160,32,0.1);
  border-radius: 4px;
}
.legal-code {
  color: var(--accent-gold);
  font-size: 10px;
  font-weight: 500;
  min-width: 30px;
}
.legal-name { color: var(--text-primary); font-size: 10px; }

/* ========== SUB HEADER ========== */
.sub-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-primary);
  border-bottom: 2px solid var(--accent-gold);
  position: sticky;
  top: 0;
  z-index: 10;
}
.back-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}
.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  width: 32px;
  height: 32px;
}
.sub-title-block { flex: 1; min-width: 0; }
.sub-title-block.centered { text-align: center; }
.sub-title {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
}
.sub-subtitle {
  color: var(--text-secondary);
  font-size: 10px;
  margin-top: 2px;
}
.header-spacer { width: 32px; }

/* ========== NAME INPUT ========== */
.name-input-block {
  padding: 32px 24px;
  text-align: center;
}
.name-icon-big {
  font-size: 56px;
  margin-bottom: 20px;
}
.name-greeting {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 8px;
}
.name-help {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 32px;
}
.name-form {
  text-align: left;
  margin-bottom: 24px;
}
.name-label {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 8px;
}
.name-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-primary);
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  margin-bottom: 12px;
}
.name-input:focus { border-color: var(--accent-gold); }
.name-submit {
  width: 100%;
  background: var(--accent-gold);
  color: var(--bg-primary);
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.name-info {
  display: flex;
  gap: 8px;
  background: rgba(74,144,194,0.08);
  border: 0.5px solid rgba(74,144,194,0.3);
  border-radius: 8px;
  padding: 12px;
  text-align: left;
}
.info-icon {
  color: var(--accent-blue-light);
  font-size: 14px;
  flex-shrink: 0;
}
.info-text {
  color: var(--text-primary);
  font-size: 11px;
  line-height: 1.6;
}

/* ========== TRACK SCREEN ========== */
.track-greeting-block {
  padding: 20px 18px;
}
.greeting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.greeting-icon {
  width: 48px;
  height: 48px;
  background: rgba(232,160,32,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.greeting-text { flex: 1; min-width: 0; }
.greeting-name {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
}
.greeting-sub {
  color: var(--text-secondary);
  font-size: 11px;
  margin-top: 2px;
}

.progress-card {
  background: rgba(232,160,32,0.08);
  border: 0.5px solid rgba(232,160,32,0.3);
  border-radius: 8px;
  padding: 14px;
}
.progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.progress-label {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
}
.progress-value {
  color: var(--accent-gold);
  font-size: 18px;
  font-weight: 500;
}
.progress-bar {
  background: rgba(255,255,255,0.08);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.progress-fill {
  background: var(--accent-gold);
  height: 100%;
  transition: width 0.3s ease;
}
.progress-note {
  color: var(--text-secondary);
  font-size: 10px;
}

.track-block {
  background: var(--bg-secondary);
  padding: 20px 18px;
}

.track-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.track-card {
  background: rgba(232,160,32,0.08);
  border: 0.5px solid rgba(232,160,32,0.35);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.track-card:active { transform: scale(0.99); }

.track-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.track-icon {
  width: 40px;
  height: 40px;
  background: rgba(232,160,32,0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.track-info { flex: 1; min-width: 0; }
.track-name {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.track-code {
  background: rgba(232,160,32,0.2);
  color: var(--accent-gold);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 3px;
}
.track-desc {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.4;
}

.track-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 10px;
}
.meta-left { display: flex; gap: 10px; }
.meta-item { color: var(--text-secondary); }
.meta-count {
  color: var(--accent-gold);
  font-weight: 500;
}

.track-bar {
  background: rgba(255,255,255,0.08);
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}
.track-fill { background: var(--accent-gold); height: 100%; }

.track-btn {
  width: 100%;
  background: var(--accent-gold);
  color: var(--bg-primary);
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

/* 보수교육 카드 */
.refresh-card {
  background: rgba(232,160,32,0.08);
  border: 0.5px solid rgba(232,160,32,0.35);
  border-radius: 12px;
  padding: 16px;
}
.refresh-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.refresh-icon {
  width: 40px;
  height: 40px;
  background: rgba(232,160,32,0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.refresh-info { flex: 1; }
.refresh-name { color: var(--text-primary); font-size: 14px; font-weight: 500; }
.refresh-desc { color: var(--text-secondary); font-size: 11px; margin-top: 2px; }
.refresh-btn {
  width: 100%;
  background: rgba(232,160,32,0.15);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

/* AMRM 블록 */
.amrm-block {
  background: var(--bg-primary);
  padding: 20px 18px;
  border-top: 1px solid rgba(232,160,32,0.3);
}
.amrm-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.amrm-info-icon {
  color: var(--accent-gold);
  font-size: 18px;
}
.amrm-header-text {
  color: var(--accent-gold);
  font-size: 13px;
  font-weight: 500;
}

.amrm-card {
  background: var(--bg-primary);
  border: 1px solid rgba(232,160,32,0.5);
  border-radius: 12px;
  padding: 16px;
}
.amrm-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.amrm-icon-box {
  width: 42px;
  height: 42px;
  background: rgba(74,144,194,0.25);
  border: 1px solid rgba(74,144,194,0.5);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.amrm-text-info { flex: 1; }
.amrm-name {
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.amrm-code {
  background: rgba(74,144,194,0.3);
  color: var(--accent-blue-light);
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 3px;
}
.amrm-desc {
  color: #c5d0e0;
  font-size: 11px;
  line-height: 1.5;
}

.amrm-info-box {
  background: var(--bg-tertiary);
  border: 1px solid rgba(232,160,32,0.2);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}
.amrm-info-row {
  display: flex;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 0.5px solid rgba(255,255,255,0.08);
  margin-bottom: 8px;
  font-size: 11px;
}
.amrm-info-row:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.amrm-info-label { color: var(--text-secondary); min-width: 75px; }
.amrm-info-value { color: #fff; font-weight: 500; }
.amrm-info-value.gold { color: var(--accent-gold); }
.amrm-info-value.green { color: var(--accent-green-light); }

.amrm-message {
  background: rgba(74,144,194,0.12);
  border-left: 3px solid var(--accent-blue);
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 14px;
}
.amrm-message-text {
  color: #fff;
  font-size: 12px;
  line-height: 1.6;
}
.amrm-message-time {
  color: var(--accent-blue-light);
  font-size: 10px;
  margin-top: 6px;
}

.amrm-btn {
  width: 100%;
  background: var(--accent-gold);
  color: var(--bg-primary);
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.amrm-btn-note {
  text-align: center;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 10px;
}

.amrm-card.completed {
  border-color: var(--accent-green);
  background: rgba(39,174,96,0.05);
}

/* ========== FOOTER ========== */
.footer-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-top: 0.5px solid rgba(232,160,32,0.2);
}
.footer-heart { color: var(--accent-gold); font-size: 12px; }
.footer-text {
  color: var(--text-secondary);
  font-size: 10px;
}

/* ========== COURSE SCREEN ========== */
.course-hero {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-card) 100%);
  padding: 28px 18px;
  position: relative;
}
.course-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(232,160,32,0.15);
  border: 0.5px solid rgba(232,160,32,0.4);
  color: var(--accent-gold);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.course-greeting {
  color: #fff;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 10px;
}
.course-sub {
  color: #c5d0e0;
  font-size: 12px;
  line-height: 1.6;
}

.course-progress-card {
  margin: 18px;
  background: rgba(232,160,32,0.08);
  border: 0.5px solid rgba(232,160,32,0.3);
  border-radius: 10px;
  padding: 14px;
}
.cpc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.cpc-label { color: var(--text-primary); font-size: 13px; font-weight: 500; }
.cpc-sub { color: var(--text-secondary); font-size: 10px; margin-top: 2px; }
.cpc-value { color: var(--accent-gold); font-size: 22px; font-weight: 500; }
.cpc-bar {
  background: rgba(255,255,255,0.08);
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
}
.cpc-fill { background: var(--accent-gold); height: 100%; transition: width 0.3s ease; }

.lesson-list-block { padding: 8px 18px 18px; }

.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lesson-item {
  background: rgba(255,255,255,0.04);
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.lesson-item.active {
  background: rgba(232,160,32,0.12);
  border: 1px solid var(--accent-gold);
  box-shadow: 0 0 12px rgba(232,160,32,0.15);
  cursor: pointer;
}
.lesson-item.done {
  background: rgba(39,174,96,0.08);
  border-color: rgba(39,174,96,0.3);
}
.lesson-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-secondary);
}
.lesson-item.active .lesson-num {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: var(--bg-primary);
}
.lesson-item.done .lesson-num {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #fff;
}
.lesson-info { flex: 1; min-width: 0; }
.lesson-name { color: var(--text-primary); font-size: 13px; font-weight: 500; }
.lesson-item.active .lesson-name { color: #fff; }
.lesson-detail { color: var(--text-secondary); font-size: 10px; margin-top: 2px; }
.lesson-item.active .lesson-detail { color: #c5d0e0; }
.lesson-status {
  color: var(--text-tertiary);
  font-size: 16px;
  flex-shrink: 0;
}
.lesson-item.active .lesson-status { color: var(--accent-gold); font-size: 20px; }
.lesson-item.done .lesson-status { color: var(--accent-green); }

.big-start-btn {
  display: block;
  width: calc(100% - 36px);
  margin: 0 18px;
  background: var(--accent-gold);
  color: var(--bg-primary);
  border: none;
  padding: 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

/* ========== LESSON SCREEN ========== */
.lesson-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 10;
}
.lesson-title-block { flex: 1; min-width: 0; }
.lesson-course-name {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
}
.lesson-position {
  color: var(--text-secondary);
  font-size: 10px;
  margin-top: 2px;
}

.lesson-progress-bar {
  height: 3px;
  background: rgba(255,255,255,0.08);
  margin: 0 16px 8px;
  border-radius: 2px;
  overflow: hidden;
}
.lesson-pbar {
  height: 100%;
  background: var(--accent-gold);
  width: 0%;
  transition: width 0.3s ease;
}

.lesson-content {
  padding: 16px 18px 24px;
  min-height: 400px;
}

.slide-position-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}
.slide-tag {
  background: rgba(232,160,32,0.2);
  color: var(--accent-gold);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
}
.slide-subject {
  color: var(--text-secondary);
  font-size: 10px;
}

.slide-title {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 8px;
}
.slide-subtitle {
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 18px;
}

.info-box {
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 16px;
}
.info-box.gold {
  background: rgba(232,160,32,0.08);
  border-left: 3px solid var(--accent-gold);
}
.info-box.blue {
  background: rgba(74,144,194,0.1);
  border-left: 3px solid var(--accent-blue);
}
.info-box-title {
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.info-box.gold .info-box-title { color: var(--accent-gold); }
.info-box.blue .info-box-title { color: var(--accent-blue-light); }
.info-box-text {
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.7;
}

.alphabet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.alpha-card {
  background: rgba(255,255,255,0.04);
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 12px;
}
.alpha-letter {
  color: var(--accent-gold);
  font-size: 14px;
  font-weight: 500;
}
.alpha-pron {
  color: var(--text-secondary);
  font-size: 9px;
}

.alphabet-more {
  text-align: center;
  color: var(--text-secondary);
  font-size: 10px;
  margin-bottom: 16px;
}

.callout-mono {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.8;
}

.lesson-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-top: 0.5px solid rgba(255,255,255,0.05);
}
.lesson-prev, .lesson-next {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  border: 0.5px solid rgba(255,255,255,0.15);
  padding: 13px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  flex: 1;
}
.lesson-next {
  background: var(--accent-gold);
  color: var(--bg-primary);
  border: none;
  font-weight: 500;
  flex: 2;
}
.lesson-pos {
  color: var(--text-secondary);
  font-size: 11px;
  min-width: 40px;
  text-align: center;
}

/* ========== QUIZ ========== */
.quiz-progress-bar {
  display: flex;
  gap: 3px;
  padding: 0 16px;
  margin-bottom: 8px;
}
#quiz-pbar { display: flex; gap: 3px; flex: 1; }
.quiz-pdot {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}
.quiz-pdot.active { background: var(--accent-gold); }

.quiz-content {
  padding: 20px 18px;
  min-height: 400px;
}

.quiz-q-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.quiz-q-num {
  background: rgba(232,160,32,0.2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  font-size: 16px;
}
.quiz-q-text {
  color: var(--accent-gold);
  font-size: 11px;
  font-weight: 500;
}
.quiz-q-sub {
  color: var(--text-secondary);
  font-size: 10px;
  margin-top: 1px;
}

.quiz-question-card {
  background: rgba(255,255,255,0.04);
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}
.quiz-question-text {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 10px;
}
.quiz-tags {
  display: flex;
  gap: 6px;
  align-items: center;
}
.quiz-tag {
  background: rgba(232,160,32,0.15);
  color: var(--accent-gold);
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 3px;
  font-weight: 500;
}
.quiz-tag-sub {
  color: var(--text-secondary);
  font-size: 10px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.quiz-option {
  background: rgba(255,255,255,0.04);
  border: 0.5px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.quiz-option:active { transform: scale(0.99); }
.quiz-option.selected {
  background: rgba(232,160,32,0.12);
  border: 1.5px solid var(--accent-gold);
}
.quiz-option-mark {
  width: 24px;
  height: 24px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.quiz-option.selected .quiz-option-mark {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: var(--bg-primary);
}
.quiz-option-text { color: var(--text-primary); font-size: 13px; }
.quiz-option.selected .quiz-option-text { font-weight: 500; }

.quiz-footer {
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-top: 0.5px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  gap: 8px;
}
.quiz-status {
  flex: 1;
  color: var(--text-secondary);
  font-size: 11px;
  text-align: center;
}
.quiz-submit {
  flex: 2;
  background: var(--accent-gold);
  color: var(--bg-primary);
  border: none;
  padding: 13px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.quiz-submit:disabled {
  background: rgba(255,255,255,0.1);
  color: var(--text-tertiary);
  cursor: not-allowed;
}

/* ========== RESULT ========== */
.result-block {
  padding: 24px 18px;
  min-height: 100vh;
}
.result-icon-box {
  text-align: center;
  margin-bottom: 24px;
}
.result-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  margin: 0 auto 14px;
}
.result-icon.success {
  background: rgba(39,174,96,0.15);
  border: 3px solid var(--accent-green);
  color: var(--accent-green);
}
.result-icon.fail {
  background: rgba(192,57,43,0.15);
  border: 3px solid var(--accent-red);
  color: var(--accent-red);
}
.result-title {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 6px;
}
.result-title.success { color: var(--accent-green-light); }
.result-title.fail { color: var(--accent-red); }
.result-sub {
  color: var(--text-secondary);
  font-size: 13px;
}

.result-score-card {
  background: rgba(232,160,32,0.08);
  border: 0.5px solid rgba(232,160,32,0.3);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
}
.result-score {
  color: var(--accent-gold);
  font-size: 36px;
  font-weight: 500;
  line-height: 1;
}
.result-score-label {
  color: var(--text-secondary);
  font-size: 11px;
  margin-top: 6px;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.result-btn-primary {
  background: var(--accent-gold);
  color: var(--bg-primary);
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.result-btn-secondary {
  background: rgba(255,255,255,0.05);
  border: 0.5px solid rgba(255,255,255,0.15);
  color: var(--text-primary);
  padding: 14px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

/* ========== COMPLETE ========== */
.complete-block {
  padding: 30px 18px;
  text-align: center;
  background: var(--bg-primary);
}
.complete-check {
  width: 84px;
  height: 84px;
  background: rgba(39,174,96,0.15);
  border: 3px solid var(--accent-green);
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  font-size: 48px;
}
.complete-title {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 6px;
}
.complete-sub {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 20px;
}
.complete-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.stat-card {
  background: rgba(232,160,32,0.08);
  border: 0.5px solid rgba(232,160,32,0.3);
  border-radius: 8px;
  padding: 14px;
}
.stat-label {
  color: var(--text-secondary);
  font-size: 11px;
  margin-bottom: 6px;
}
.stat-value {
  color: var(--accent-gold);
  font-size: 22px;
  font-weight: 500;
}

.register-block {
  background: var(--bg-secondary);
  padding: 24px 18px;
}
.register-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}
.register-sub {
  color: var(--text-secondary);
  font-size: 11px;
  margin-bottom: 18px;
}
.register-form { margin-bottom: 16px; }
.form-label {
  display: block;
  color: var(--text-secondary);
  font-size: 11px;
  margin-bottom: 6px;
  margin-top: 12px;
}
.form-label:first-child { margin-top: 0; }
.form-display {
  padding: 14px 16px;
  background: rgba(255,255,255,0.05);
  border: 0.5px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
}
.form-display.amber {
  background: rgba(232,160,32,0.1);
  border-color: rgba(232,160,32,0.4);
  color: var(--accent-gold);
}

.register-info {
  display: flex;
  gap: 8px;
  background: rgba(74,144,194,0.08);
  border: 0.5px solid rgba(74,144,194,0.3);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 18px;
}

.register-submit {
  width: 100%;
  background: var(--accent-green);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.legal-footer {
  padding: 16px;
  text-align: center;
  background: var(--bg-primary);
  border-top: 0.5px solid rgba(232,160,32,0.2);
  color: var(--text-secondary);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ========== DONE ========== */
.done-block {
  padding: 60px 24px;
  text-align: center;
}
.done-check {
  font-size: 72px;
  margin-bottom: 20px;
}
.done-title {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--accent-green-light);
}
.done-sub {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 36px;
}
.done-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.done-btn-primary {
  background: var(--accent-gold);
  color: var(--bg-primary);
  border: none;
  padding: 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.done-btn-secondary {
  background: rgba(255,255,255,0.05);
  border: 0.5px solid rgba(255,255,255,0.15);
  color: var(--text-primary);
  padding: 16px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

/* ========== ADMIN ========== */
.admin-login-block {
  padding: 60px 24px;
  text-align: center;
}
.admin-icon { font-size: 56px; margin-bottom: 20px; }
.admin-title {
  color: var(--accent-red);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 2px;
  margin-bottom: 24px;
}
.admin-pw {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-primary);
  padding: 16px;
  border-radius: 8px;
  font-size: 18px;
  text-align: center;
  letter-spacing: 8px;
  margin-bottom: 16px;
  font-family: inherit;
}
.admin-login-btn {
  width: 100%;
  background: var(--accent-red);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.admin-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--accent-red) 0%, #8b0000 100%);
}
.admin-header .back-btn,
.admin-header .sub-title,
.admin-header .sub-subtitle { color: #fff; }

.admin-main-card {
  margin: 16px;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 0.5px solid rgba(232,160,32,0.3);
  border-radius: 12px;
  padding: 16px;
}
.amc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.amc-label { color: var(--text-secondary); font-size: 10px; letter-spacing: 1px; }
.amc-sub { color: var(--text-primary); font-size: 12px; margin-top: 2px; }
.amc-value-block { text-align: right; }
.amc-value {
  color: var(--accent-gold);
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
}
.amc-value span { font-size: 16px; }
.amc-count { color: var(--text-secondary); font-size: 10px; margin-top: 2px; }
.amc-bar {
  background: rgba(255,255,255,0.08);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.amc-fill {
  background: linear-gradient(90deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
  height: 100%;
}
.amc-stats { display: flex; justify-content: space-between; font-size: 10px; }
.stat-ok { color: var(--accent-green-light); }
.stat-no { color: #ff6b5b; }

.admin-alert-card {
  margin: 0 16px 16px;
  background: linear-gradient(135deg, var(--accent-red) 0%, #8b0000 100%);
  border-radius: 12px;
  padding: 14px;
}
.aac-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.aac-bell { color: #fff; font-size: 18px; }
.aac-title { color: #fff; font-size: 14px; font-weight: 500; flex: 1; }
.aac-tag {
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}
.aac-list { display: flex; flex-direction: column; gap: 6px; }
.aac-item {
  background: rgba(0,0,0,0.2);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.aac-icon { font-size: 14px; }
.aac-name { color: #fff; font-size: 12px; font-weight: 500; flex: 1; }
.aac-role {
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 3px;
}

.admin-actions {
  margin: 0 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.admin-action-btn {
  background: rgba(232,160,32,0.12);
  border: 0.5px solid rgba(232,160,32,0.4);
  color: var(--text-primary);
  padding: 16px 8px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}
.aab-icon { color: var(--accent-gold); font-size: 24px; }
.aab-text { font-size: 11px; }
