/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #FFFAF1;
  --bg-secondary: #F6F3EF;
  --bg-card: #ffffff;
  --bg-card-hover: #FFF5E9;
  --text-primary: #444444;
  --text-secondary: #7A7A7A;
  --text-muted: #9D9D9D;
  --accent: #D45B41;
  --accent-hover: #C04E36;
  --accent-sub: #E48F52;
  --accent-blue: #5B8DB8;
  --accent-blue-hover: #4A7DA6;
  --decorative: #F7E4D4;
  --border: #E8E2DA;
  --success: #5A9E6F;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(180, 140, 100, .10);
  --shadow-hover: 0 8px 32px rgba(180, 140, 100, .18);
  --max-width: 960px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Zen Kaku Gothic New', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--decorative); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-sub); }

/* ===== Utility ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }

/* ===== Header ===== */
.site-header {
  background: rgba(255, 250, 241, 0.92);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.site-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo span { color: var(--accent); }

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-sub);
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: all .2s;
}
.btn-logout:hover { border-color: var(--accent-sub); color: var(--accent); }

/* ===== Wave Separator ===== */
.wave-separator {
  width: 100%;
  height: 40px;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}
.wave-separator::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: var(--bg-secondary);
  clip-path: ellipse(55% 60% at 50% 100%);
}

/* ===== Paw Print Decorations ===== */
.paw-decoration::before {
  content: '\1F43E';
  position: absolute;
  font-size: 60px;
  opacity: 0.06;
  pointer-events: none;
  top: -10px;
  right: 20px;
  transform: rotate(-15deg);
}
.paw-decoration::after {
  content: '\1F43E';
  position: absolute;
  font-size: 40px;
  opacity: 0.04;
  pointer-events: none;
  bottom: 10px;
  left: 30px;
  transform: rotate(20deg);
}

/* ===== Login Page ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--decorative) 50%, var(--bg-primary) 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '\1F43E  \1F43E  \1F43E  \1F43E  \1F43E';
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  opacity: 0.08;
  letter-spacing: 40px;
  white-space: nowrap;
  pointer-events: none;
}

.login-hero h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.login-hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.login-hero p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #06c755;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 40px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all .3s;
  box-shadow: 0 4px 20px rgba(6, 199, 85, .25);
}

.btn-line:hover {
  background: #05b04a;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(6, 199, 85, .35);
}

.btn-line svg { width: 24px; height: 24px; }

.login-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
  max-width: 640px;
}

.login-feature {
  text-align: center;
  background: var(--bg-card);
  padding: 24px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-feature-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.login-feature h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.login-feature p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* ===== Dashboard ===== */
.dashboard { padding: 32px 0 80px; }

.dashboard-greeting {
  margin-bottom: 32px;
  position: relative;
}

.dashboard-greeting h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.dashboard-greeting p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

/* Overall progress */
.overall-progress {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.overall-progress::after {
  content: '\1F43E';
  position: absolute;
  font-size: 80px;
  opacity: 0.04;
  bottom: -10px;
  right: -5px;
  transform: rotate(-20deg);
  pointer-events: none;
}

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

.overall-progress-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.overall-progress-header .progress-percent {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: var(--decorative);
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-sub));
  border-radius: 5px;
  transition: width .5s ease;
}

.progress-stats {
  display: flex;
  gap: 24px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Section cards */
.section-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  box-shadow: var(--shadow);
}

.section-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.section-header {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  cursor: pointer;
  gap: 16px;
  user-select: none;
}

.section-icon { font-size: 28px; flex-shrink: 0; }

.section-info { flex: 1; }

.section-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--text-primary);
}

.section-info p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.section-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.section-progress .progress-bar { width: 120px; height: 5px; }

.section-chevron {
  font-size: 20px;
  color: var(--text-muted);
  transition: transform .3s;
  flex-shrink: 0;
}

.section-card.open .section-chevron { transform: rotate(180deg); }

.lesson-list {
  border-top: 1px solid var(--border);
  padding: 8px 0;
  background: var(--bg-secondary);
}

.lesson-item {
  display: flex;
  align-items: center;
  padding: 12px 24px 12px 68px;
  gap: 12px;
  cursor: pointer;
  transition: background .2s;
  text-decoration: none;
  color: var(--text-primary);
}

.lesson-item:hover { background: var(--bg-card-hover); text-decoration: none; }

.lesson-check {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all .2s;
  background: var(--bg-card);
}

.lesson-check.completed {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.lesson-title {
  font-size: 14px;
  flex: 1;
}

.lesson-title.completed { color: var(--text-muted); text-decoration: line-through; }

.lesson-arrow {
  color: var(--text-muted);
  font-size: 16px;
}

/* ===== Lesson Page ===== */
.lesson-page { padding: 24px 0 80px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--text-muted); }

.lesson-title-area {
  margin-bottom: 24px;
}

.lesson-title-area h1 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
}

/* Video player */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Video container (standalone) */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111;
  margin: 20px 0;
  box-shadow: var(--shadow);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ===== Lesson Content ===== */
.lesson-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 24px;
  line-height: 1.9;
  font-size: 16px;
  color: var(--text-primary);
  overflow-wrap: break-word;
  box-shadow: var(--shadow);
}

/* --- UTAGE inline style overrides --- */
.lesson-content *:not(iframe):not(img):not(a) {
  color: inherit !important;
  font-family: inherit !important;
  background-color: transparent !important;
  font-size: inherit !important;
  letter-spacing: normal !important;
}
.lesson-content a { color: var(--accent) !important; }
.lesson-content [style*="table-layout"] { display: block !important; width: auto !important; table-layout: auto !important; }

/* --- UTAGE wrapper elements --- */
.lesson-content .fn-section,
.lesson-content .section-wrap,
.lesson-content .fn-row,
.lesson-content .fn-col,
.lesson-content .el-wrap,
.lesson-content .fn-el-text,
.lesson-content .fn-el-head,
.lesson-content .fn-el-spacer,
.lesson-content .fn-selectable,
.lesson-content #body,
.lesson-content .main {
  display: block !important;
  width: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  table-layout: auto !important;
}
.lesson-content .fn-section { margin-bottom: 24px !important; }
.lesson-content .fn-el-head { margin-bottom: 8px !important; }
.lesson-content .spacer { display: none !important; }

/* --- Headings --- */
.lesson-content h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary) !important;
  margin: 32px 0 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--accent);
}
.lesson-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary) !important;
  margin: 28px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--decorative);
}
.lesson-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent) !important;
  margin: 24px 0 12px;
}
.lesson-content h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary) !important;
  margin: 20px 0 10px;
}
.lesson-content h5, .lesson-content h6 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary) !important;
  margin: 16px 0 8px;
}
/* UTAGE heading elements */
.lesson-content .fn-el-head p {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  margin: 24px 0 12px;
  line-height: 1.4;
}
.lesson-content .fn-el-head span {
  font-size: inherit !important;
}
/* Orange square markers from UTAGE */
.lesson-content .fn-el-head span[style*="color:#ffa07a"],
.lesson-content .fn-el-head span[style*="color: rgb(255, 160, 122)"] {
  color: var(--accent) !important;
}
/* Cleaned UTAGE headings */
.lesson-content .lesson-heading {
  margin: 28px 0 12px;
}
.lesson-content .lesson-heading p {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  line-height: 1.4;
  margin-bottom: 8px;
}

/* --- Paragraphs & Text --- */
.lesson-content p {
  margin-bottom: 16px;
  line-height: 1.9;
}
.lesson-content p:last-child { margin-bottom: 0; }
.lesson-content strong, .lesson-content b {
  font-weight: 700 !important;
  color: var(--text-primary) !important;
}
.lesson-content em, .lesson-content i:not(.fa):not([class*="icon"]) {
  font-style: italic;
  color: var(--text-secondary) !important;
}

/* --- Links --- */
.lesson-content a {
  color: var(--accent) !important;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
  word-break: break-all;
}
.lesson-content a:hover { text-decoration: underline; opacity: 0.85; }

/* --- Images --- */
.lesson-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 20px auto;
  display: block;
  box-shadow: 0 4px 16px rgba(180, 140, 100, 0.15);
  background: transparent !important;
}
.lesson-content figure {
  margin: 24px 0;
  text-align: center;
}
.lesson-content figure.image {
  max-width: 100%;
}
.lesson-content figure img {
  max-width: 100%;
}
.lesson-content figcaption {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
  text-align: center;
}

/* --- Video embeds (inline in content HTML) --- */
.lesson-content iframe[src*="youtube"],
.lesson-content iframe[src*="youtu.be"] {
  width: 100% !important;
  aspect-ratio: 16/9;
  height: auto !important;
  border: none !important;
  border-radius: 12px;
  margin: 20px 0;
  display: block;
}
.lesson-content .video-responsive {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  margin: 20px 0;
  background: #111;
}
.lesson-content .video-responsive iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  border-radius: 12px;
  margin: 0;
}
.lesson-content figure.media { margin: 24px 0; }
.lesson-content figure.media > div {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
}
.lesson-content figure.media iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  margin: 0;
}

/* --- Code blocks --- */
.lesson-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.6;
}
.lesson-content code {
  font-family: 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', monospace;
  font-size: 14px;
}
.lesson-content p code {
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--accent) !important;
}

/* --- Lists --- */
.lesson-content ul, .lesson-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.lesson-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}
.lesson-content ul li::marker { color: var(--accent-sub); }
.lesson-content ol li::marker { color: var(--accent-sub); font-weight: 600; }

/* --- Blockquote --- */
.lesson-content blockquote {
  border-left: 4px solid var(--accent-sub);
  background: rgba(228, 143, 82, 0.08);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--text-secondary) !important;
}
.lesson-content blockquote p { margin-bottom: 8px; }
.lesson-content blockquote p:last-child { margin-bottom: 0; }

/* --- Horizontal rule --- */
.lesson-content hr {
  border: none;
  border-top: 2px dashed var(--decorative);
  margin: 28px 0;
}

/* --- Table --- */
.lesson-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.lesson-content th, .lesson-content td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}
.lesson-content th {
  background: var(--decorative);
  font-weight: 600;
  color: var(--text-primary) !important;
}
.lesson-content td { color: var(--text-primary) !important; }

/* --- Info/Tip/Warn boxes --- */
.lesson-content .info-box,
.info-box {
  background: rgba(91, 141, 184, 0.08);
  border: 1px solid rgba(91, 141, 184, 0.25);
  border-left: 4px solid var(--accent-blue);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 20px 0;
  color: var(--text-primary);
}
.info-box::before {
  content: '\2139\FE0F ';
}

.lesson-content .tip-box,
.tip-box {
  background: rgba(90, 158, 111, 0.08);
  border: 1px solid rgba(90, 158, 111, 0.25);
  border-left: 4px solid var(--success);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 20px 0;
  color: var(--text-primary);
}
.tip-box::before {
  content: '\1F4A1 ';
}

.lesson-content .warn-box,
.warn-box {
  background: rgba(212, 91, 65, 0.08);
  border: 1px solid rgba(212, 91, 65, 0.25);
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 20px 0;
  color: var(--text-primary);
}
.warn-box::before {
  content: '\26A0\FE0F ';
}

/* STEP intro */
.step-intro {
  background: linear-gradient(135deg, rgba(212, 91, 65, 0.08), rgba(228, 143, 82, 0.08));
  border: 1px solid rgba(212, 91, 65, 0.2);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.step-intro::after {
  content: '\1F43E';
  position: absolute;
  font-size: 60px;
  opacity: 0.05;
  bottom: -8px;
  right: 10px;
  transform: rotate(-15deg);
  pointer-events: none;
}
.step-intro h2 {
  margin-top: 0;
  font-size: 1.5em;
  color: var(--text-primary);
}
.step-lessons-count {
  color: var(--text-muted);
  font-size: 0.9em;
  margin-bottom: 0;
}

/* Time badges (lesson page) */
.lesson-time-badge {
  display: inline-block;
  background: rgba(228, 143, 82, 0.12);
  color: var(--accent-sub);
  border: 1px solid rgba(228, 143, 82, 0.3);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.85em;
  font-weight: 500;
  margin-top: 8px;
}

/* Time (dashboard section) */
.section-time {
  color: var(--accent-sub);
  font-size: 0.85em;
  margin-left: 12px;
}

/* Time (dashboard lesson list) */
.lesson-time {
  color: var(--text-muted);
  font-size: 0.8em;
  margin-left: auto;
  margin-right: 8px;
  white-space: nowrap;
}

/* Guide box */
.lesson-guide {
  margin-bottom: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 20px;
}
.lesson-guide p:last-child {
  margin-bottom: 0;
}

/* Complete button */
.lesson-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-complete {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 12px rgba(212, 91, 65, 0.2);
}

.btn-complete:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(212, 91, 65, 0.3);
}

.btn-complete.completed {
  background: var(--success);
  cursor: default;
  box-shadow: 0 4px 12px rgba(90, 158, 111, 0.2);
}
.btn-complete.completed:hover {
  transform: none;
}

/* Lesson nav */
.lesson-nav {
  display: flex;
  gap: 12px;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 50px;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(180, 140, 100, 0.06);
}

.btn-nav:hover { border-color: var(--accent-sub); color: var(--accent); text-decoration: none; }
.btn-nav:disabled, .btn-nav.disabled { opacity: .4; pointer-events: none; }

/* ===== Admin Page ===== */
.admin-page { padding: 32px 0 80px; }

.admin-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.admin-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.admin-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-card th, .admin-card td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}

.admin-card th {
  background: var(--decorative);
  font-weight: 600;
}

.admin-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.btn-admin {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-admin:hover { background: var(--accent-hover); }

.btn-admin-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-admin-secondary:hover { background: rgba(212, 91, 65, 0.06); }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .site-logo { font-size: 14px; white-space: nowrap; }
  .site-logo span { display: none; }
  .user-info { gap: 6px; font-size: 11px; }
  .user-avatar { width: 24px; height: 24px; }
  .btn-logout { padding: 4px 8px; font-size: 10px; }
  .header-inner { padding: 0 12px; }

  .login-hero h1 { font-size: 26px; }
  .login-features { grid-template-columns: 1fr; gap: 16px; }

  .dashboard-greeting h2 { font-size: 20px; }

  .section-header { padding: 16px; }
  .section-icon { font-size: 22px; }
  .section-info h3 { font-size: 14px; }
  .lesson-item { padding-left: 48px; }
  .section-progress .progress-bar { width: 80px; }

  .lesson-content { padding: 20px; font-size: 15px; }
  .lesson-content h1 { font-size: 22px; }
  .lesson-content h2 { font-size: 19px; }
  .lesson-content h3 { font-size: 17px; }
  .lesson-content .fn-el-head p { font-size: 17px !important; }
  .lesson-content pre { font-size: 13px; padding: 12px 14px; margin-left: -8px; margin-right: -8px; border-radius: 6px; }
  .lesson-content img { border-radius: 8px; margin: 14px auto; }
  .lesson-content iframe[src*="youtube"] { border-radius: 8px; margin: 14px 0; }

  .lesson-actions { flex-direction: column; align-items: stretch; }
  .lesson-nav { justify-content: space-between; }
  .btn-nav { font-size: 12px; padding: 8px 12px; }

  .step-intro { padding: 18px; }
  .overall-progress { padding: 18px; }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp .5s ease forwards;
}

.section-card {
  animation: fadeInUp .4s ease forwards;
  opacity: 0;
}
.section-card:nth-child(1) { animation-delay: .0s; }
.section-card:nth-child(2) { animation-delay: .1s; }
.section-card:nth-child(3) { animation-delay: .2s; }
.section-card:nth-child(4) { animation-delay: .3s; }
.section-card:nth-child(5) { animation-delay: .4s; }

@keyframes pawBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.paw-bounce {
  animation: pawBounce .6s ease;
}

/* Soft pulse for progress completion */
@keyframes softPulse {
  0% { box-shadow: 0 0 0 0 rgba(90, 158, 111, 0.3); }
  70% { box-shadow: 0 0 0 8px rgba(90, 158, 111, 0); }
  100% { box-shadow: 0 0 0 0 rgba(90, 158, 111, 0); }
}

.lesson-check.completed {
  animation: softPulse .6s ease;
}
