/* ===== HERO ===== */
.hero {
  background: linear-gradient(155deg, #EBF4FF 0%, #F0FBF7 50%, #FFF1E8 100%);
  padding: 60px 28px 72px;
  position: relative; overflow: hidden;
}
.hero-blob1 {
  position: absolute; top: -80px; right: -60px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(91,155,213,.12), transparent 70%);
  pointer-events: none;
}
.hero-blob2 {
  position: absolute; bottom: -60px; left: 5%;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(82,196,154,.12), transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 48px;
}
.hero-text { flex: 1; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: white; border: 1.5px solid var(--sky-mid);
  border-radius: 20px; padding: 5px 14px 5px 8px;
  font-size: 12px; font-weight: 700; color: var(--sky);
  margin-bottom: 20px; box-shadow: var(--sh-sm);
}
.hero-pill-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--mint));
  display: flex; align-items: center; justify-content: center; font-size: 11px;
}
.hero-h1 {
  font-size: 34px; font-weight: 700; line-height: 1.35;
  margin-bottom: 16px; color: var(--text);
}
.hero-h1 .hl { color: var(--sky); }
.hero-h1 .hl2 { color: var(--mint); }
.hero-desc {
  font-size: 15px; color: var(--text-2); line-height: 1.85;
  margin-bottom: 28px; max-width: 550px;
}
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: white; border: 1.5px solid var(--border);
  border-radius: 20px; padding: 5px 12px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  box-shadow: var(--sh-sm);
}
.chip-icon { width: 16px; height: 16px; object-fit: contain; vertical-align: middle; flex-shrink: 0; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.btn-cta-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--sky), var(--mint));
  color: white; border: none; border-radius: 24px;
  padding: 15px 82px; font-size: 15px; font-weight: 800;
  cursor: pointer; transition: all .25s;
  box-shadow: 0 6px 20px rgba(91,155,213,.35);
  min-width: 220px; justify-content: center;
  margin-right:100px;
}
.btn-cta-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(91,155,213,.45); }
.btn-cta-soft {
  display: inline-flex; align-items: center; gap: 8px;
  background: white; color: var(--sky); border: 2px solid var(--sky-mid);
  border-radius: 24px; padding: 13px 26px; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all .25s; box-shadow: var(--sh-sm);
}
.btn-cta-soft:hover { background: var(--sky-lt); transform: translateY(-2px); }

.hero-visual { flex: 0 0 360px; }
.hero-card {
  background: white; border-radius: var(--r-lg);
  padding: 24px; box-shadow: var(--sh-md);
  border: 1.5px solid var(--border);
}
.hero-card-title {
  font-size: 13px; font-weight: 800; color: var(--text-2);
  margin-bottom: 16px; display: flex; align-items: center; gap: 6px;
}
/* ===== LEARN FLOW ===== */
@keyframes flowIn {
  from { opacity: 0; transform: translateX(-14px); }
  to   { opacity: 1; transform: translateX(0); }
}
.learn-flow { display: flex; flex-direction: column; padding: 4px 0 0; }
.flow-step {
  display: flex; align-items: flex-start; gap: 10px;
  animation: flowIn .45s ease both;
}
.flow-num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--mint));
  color: #fff; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(91,155,213,.3); margin-top: 1px;
}
.flow-num--goal {
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
  font-size: 15px; box-shadow: 0 2px 8px rgba(245,158,11,.3);
}
.flow-title { font-size: 12px; font-weight: 700; color: var(--text); line-height: 1.4; }
.flow-desc  { font-size: 11px; color: var(--text-2); line-height: 1.5; margin-top: 2px; }
.flow-line  {
  width: 2px; height: 10px; margin-left: 12px; border-radius: 1px;
  background: linear-gradient(to bottom, var(--sky), var(--mint)); opacity: .35;
}

/* ===== TAB BAR ===== */
.tabbar {
  background: white; border-bottom: 1.5px solid var(--border);
  position: sticky; top: 64px; z-index: 800;
  box-shadow: 0 2px 12px rgba(91,155,213,.06);
}
.tabbar-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; padding: 0 28px; gap: 0; overflow-x: auto;
}
.tab-item {
  display: flex; align-items: center; gap: 6px;
  padding: 14px 18px; background: none; border: none;
  font-size: 13px; font-weight: 700; color: var(--text-2);
  cursor: pointer; border-bottom: 3px solid transparent;
  transition: all .2s; white-space: nowrap; margin-bottom: -1.5px;
}
.tab-item:hover { color: var(--sky); }
.tab-item.active { color: var(--sky); border-bottom-color: var(--sky); }
.tab-badge {
  background: var(--sky-mid); color: var(--sky);
  border-radius: 10px; font-size: 10px; font-weight: 800;
  padding: 2px 7px; min-width: 20px; text-align: center;
}
.tab-badge.mint  { background: var(--mint-lt); color: var(--mint); }
.tab-badge.lav   { background: var(--lav-lt); color: var(--lavender); }
.tab-badge.peach { background: var(--peach-lt); color: var(--peach); }

/* ===== PAGES ===== */
.page { display: none; }
.page.active { display: block; }
.page-inner { max-width: 1200px; margin: 0 auto; padding: 36px 28px 80px; }

/* ===== SECTION HEADER ===== */
.sec-head { margin-bottom: 28px; }
.sec-title {
  font-size: 22px; font-weight: 900; color: var(--text);
  display: flex; align-items: center; gap: 10px; margin-bottom: 5px;
}
.sec-title-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.sec-desc { font-size: 13px; color: var(--text-2); }

/* ===== CATEGORY CARDS (top of catalog) ===== */
.cat-cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 36px;
}
.cat-card {
  background: white; border-radius: var(--r-md); padding: 20px 16px;
  border: 2px solid var(--border); cursor: pointer;
  transition: all .25s; text-align: center;
  box-shadow: var(--sh-sm);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--sh-hover); }
.cat-card.active-cat { border-width: 2.5px; }
.cat-card-icon {
  width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.cat-card-name { font-size: 13px; font-weight: 800; margin-bottom: 4px; }
.cat-card-count { font-size: 11px; color: var(--text-2); }

/* ===== VIDEO GRID ===== */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }

.vcard {
  background: white; border-radius: var(--r-md);
  border: 2px solid var(--border); overflow: hidden;
  transition: all .25s; cursor: pointer; position: relative;
}
.vcard:hover { transform: translateY(-5px); box-shadow: var(--sh-hover); border-color: var(--sky-mid); }
.vcard.is-selected { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(91,155,213,.15); }

.vcard-thumb {
  height: 156px; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.vcard-emoji { font-size: 44px; position: relative; z-index: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,.12)); }
.vcard-duration {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(0,0,0,.5); color: white;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 8px;
}
.vcard-watched-tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--mint); color: white;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 8px;
  display: none; align-items: center; gap: 4px;
}
.vcard.is-watched .vcard-watched-tag { display: flex; }
.vcard-sel-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--sky); color: white; border-radius: 50%;
  width: 28px; height: 28px; display: none;
  align-items: center; justify-content: center; font-size: 13px; font-weight: 900;
}
.vcard.is-selected .vcard-sel-badge { display: flex; }
.vcard-play-btn {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
}
.play-circle {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.9); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; transition: all .2s; box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.vcard:hover .play-circle { transform: scale(1.12); background: white; }

.vcard-body { padding: 14px 16px 16px; }
.vcard-cat-tag {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 8px; padding: 3px 9px;
  font-size: 11px; font-weight: 700; margin-bottom: 8px;
}
.vcard-title { font-size: 13px; font-weight: 800; line-height: 1.5; margin-bottom: 6px; }
.vcard-desc  { font-size: 11px; color: var(--text-2); line-height: 1.6; margin-bottom: 12px; }
.vcard-foot  { display: flex; align-items: center; justify-content: space-between; }
.vcard-time  { font-size: 11px; color: var(--text-2); display: flex; align-items: center; gap: 4px; }

.btn-sel {
  padding: 5px 13px; border-radius: 12px; font-size: 12px; font-weight: 700;
  cursor: pointer; border: 2px solid var(--sky-mid); color: var(--sky);
  background: var(--sky-lt); transition: all .2s;text-decoration: none;
}
.btn-sel:hover  { background: var(--sky); color: white; border-color: var(--sky); }
.btn-sel.is-sel { background: var(--sky); color: white; border-color: var(--sky); }
.btn-sel.is-sel:hover { background: #e85a7a; border-color: #e85a7a; }

/* ===== SELECTION BAR ===== */
.sel-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 850;
  background: white; border-top: 2px solid var(--border);
  padding: 12px 28px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
  box-shadow: 0 -4px 24px rgba(91,155,213,.12);
  transform: translateY(110%); transition: transform .35s cubic-bezier(.22,.61,.36,1);
}
.sel-bar.show { transform: translateY(0); }
.sel-bar-dots { display: flex; gap: 5px; }
.sel-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--border); transition: all .3s;
}
.sel-dot.on { background: var(--sky); transform: scale(1.25); }
.sel-bar-text { font-size: 14px; font-weight: 700; }
.sel-bar-text b { color: var(--sky); font-size: 20px; }
.btn-confirm {
  background: linear-gradient(135deg, var(--sky), var(--mint));
  color: white; border: none; border-radius: 22px; padding: 11px 24px;
  font-size: 14px; font-weight: 800; cursor: pointer; transition: all .25s;
  display: flex; align-items: center; gap: 7px;
  box-shadow: 0 5px 16px rgba(91,155,213,.35);
}
.btn-confirm:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(91,155,213,.4); }

/* ===== MY COURSE ===== */
.course-banner {
  background: linear-gradient(135deg, #EBF4FF, #E8FAF3);
  border: 2px solid var(--sky-mid); border-radius: var(--r-lg);
  padding: 28px 32px; margin-bottom: 28px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.course-ring-wrap { position: relative; width: 84px; height: 84px; flex-shrink: 0; }
.course-ring-wrap svg { transform: rotate(-90deg); }
.ring-bg   { fill:none; stroke: var(--border); stroke-width: 9; }
.ring-fill { fill:none; stroke: url(#ringGrad); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.ring-text {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ring-pct { font-size: 18px; font-weight: 900; color: var(--sky); }
.ring-lbl { font-size: 9px; color: var(--text-2); }
.course-banner-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.cbs { text-align: center; }
.cbs-num { font-size: 26px; font-weight: 900; color: var(--sky); }
.cbs-lbl { font-size: 11px; color: var(--text-2); }

.course-items { display: flex; flex-direction: column; gap: 10px; }
.course-item {
  background: white; border-radius: var(--r-sm); border: 1.5px solid var(--border);
  padding: 14px 18px; display: flex; align-items: center; gap: 14px;
  transition: all .2s; cursor: pointer;
}
.course-item:hover { box-shadow: var(--sh-sm); border-color: var(--sky-mid); }
.ci-num {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; border: 2.5px solid var(--border);
  background: var(--bg); color: var(--text-2);
}
.ci-num.done { background: var(--mint); border-color: var(--mint); color: white; }
.ci-num.cur  { background: var(--sky); border-color: var(--sky); color: white;
               animation: ciPulse 2s infinite; }
@keyframes ciPulse { 0%,100%{box-shadow:0 0 0 0 rgba(91,155,213,.4);} 50%{box-shadow:0 0 0 8px rgba(91,155,213,0);} }
.ci-info { flex: 1; }
.ci-title { font-size: 13px; font-weight: 800; margin-bottom: 3px; }
.ci-meta  { font-size: 11px; color: var(--text-2); display: flex; gap: 8px; flex-wrap: wrap; }
.chip-sm  {
  display: inline-block; border-radius: 6px; padding: 2px 8px;
  font-size: 10px; font-weight: 700;
}
.chip-done   { background: var(--mint-lt); color: var(--mint); }
.chip-active { background: var(--sky-lt); color: var(--sky); }
.chip-lock   { background: var(--bg); color: var(--text-3); }
.chip-tested { background: var(--lav-lt); color: var(--lavender); }

.btn-play {
  background: var(--sky-lt); color: var(--sky); border: 2px solid var(--sky-mid);
  border-radius: 12px; padding: 7px 14px; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all .2s; white-space: nowrap;
  display: flex; align-items: center; gap: 5px;
}
.btn-play:hover { background: var(--sky); color: white; border-color: var(--sky); }
.btn-quiz {
  background: var(--lav-lt); color: var(--lavender); border: 2px solid #C4B8EE;
  border-radius: 12px; padding: 7px 14px; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.btn-quiz:hover { background: var(--lavender); color: white; border-color: var(--lavender); }

/* ===== HISTORY ===== */
.hist-list { display: flex; flex-direction: column; gap: 10px; }
.hist-item {
  background: white; border-radius: var(--r-sm); border: 1.5px solid var(--border);
  padding: 14px 18px; display: flex; align-items: center; gap: 14px;
}
.hist-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.hist-info { flex: 1; }
.hist-title { font-size: 13px; font-weight: 800; margin-bottom: 3px; }
.hist-meta  { font-size: 11px; color: var(--text-2); display: flex; gap: 10px; flex-wrap: wrap; }
.hist-prog-wrap { margin-top: 6px; }
.prog-bar-bg { background: var(--bg); border-radius: 4px; height: 5px; }
.prog-bar-fill { height: 5px; border-radius: 4px; background: linear-gradient(90deg, var(--sky), var(--mint)); transition: width .6s; }
.hist-date { font-size: 11px; color: var(--text-3); white-space: nowrap; margin-left: auto; }

/* ===== TEST ===== */
.test-kpi {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin-bottom: 28px;
}
.test-kpi-card {
  background: white; border-radius: var(--r-md);
  border: 1.5px solid var(--border); padding: 20px;
  text-align: center; box-shadow: var(--sh-sm);
}
.tkc-icon { font-size: 28px; margin-bottom: 6px; }
.tkc-num  { font-size: 28px; font-weight: 900; color: var(--sky); }
.tkc-lbl  { font-size: 11px; color: var(--text-2); }

.test-list { display: flex; flex-direction: column; gap: 12px; }
.test-item {
  background: white; border-radius: var(--r-sm); border: 1.5px solid var(--border);
  padding: 18px; display: flex; align-items: center; gap: 16px;
}
.score-ring {
  width: 60px; height: 60px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 900; border: 4px solid;
}
.sr-hi  { border-color: var(--mint); color: var(--mint); background: var(--mint-lt); }
.sr-mid { border-color: var(--peach); color: var(--peach); background: var(--peach-lt); }
.sr-lo  { border-color: var(--rose); color: var(--rose); background: var(--rose-lt); }
.test-info { flex: 1; }
.test-ttl  { font-size: 13px; font-weight: 800; margin-bottom: 5px; }
.test-meta { font-size: 11px; color: var(--text-2); display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ans-bar { display: flex; height: 6px; border-radius: 4px; overflow: hidden; gap: 2px; }
.ans-ok  { background: var(--mint); border-radius: 4px; }
.ans-ng  { background: var(--rose); border-radius: 4px; }
.ans-sk  { background: var(--border); border-radius: 4px; }
.btn-retry {
  background: var(--lav-lt); color: var(--lavender); border: 2px solid #C4B8EE;
  border-radius: 12px; padding: 8px 14px; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.btn-retry:hover { background: var(--lavender); color: white; }

/* ===== DASHBOARD ===== */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.dash-card {
  background: white; border-radius: var(--r-md);
  border: 1.5px solid var(--border); overflow: hidden;
  box-shadow: var(--sh-sm);
}
.dash-card-head {
  padding: 16px 22px 10px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1.5px solid var(--bg);
}
.dash-card-title { font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 7px; }
.dash-card-body  { padding: 14px 22px 18px; }

.expiry-card {
  background: linear-gradient(135deg, var(--peach-lt), #FFF8F0);
  border: 1.5px solid #FFD9B8; border-radius: var(--r-md); padding: 16px 20px;
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
  box-shadow: var(--sh-sm);
}
.expiry-icon { font-size: 28px; }
.expiry-info { flex: 1; font-size: 13px; }
.expiry-big { font-size: 22px; font-weight: 900; color: var(--peach); }
.expiry-sub { font-size: 11px; color: var(--text-2); }

.recent-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--bg); }
.recent-item:last-child { border-bottom: none; }
.recent-thumb { width: 42px; height: 32px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.recent-ttl { font-size: 12px; font-weight: 700; margin-bottom: 1px; }
.recent-meta { font-size: 10px; color: var(--text-2); }
.recent-check { color: var(--mint); font-size: 14px; font-weight: 900; }

.announce-item { padding: 10px 0; border-bottom: 1px solid var(--bg); }
.announce-item:last-child { border-bottom: none; }
.atag { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: 10px; font-weight: 700; margin-bottom: 3px; }
.atag-new { background: #FFE8EC; color: var(--rose); }
.atag-info { background: var(--mint-lt); color: var(--mint); }
.atag-upd  { background: var(--sky-lt); color: var(--sky); }
.announce-text { font-size: 12px; font-weight: 700; }
.announce-date { font-size: 10px; color: var(--text-3); }

.quick-btns { display: flex; flex-direction: column; gap: 8px; }
.quick-btn {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); padding: 12px 14px;
  cursor: pointer; transition: all .2s; text-decoration: none; color: var(--text);
}
.quick-btn:hover { background: var(--sky-lt); border-color: var(--sky-mid); }
.qb-icon { font-size: 22px; width: 36px; text-align: center; }
.qb-name { font-size: 12px; font-weight: 800; }
.qb-sub  { font-size: 10px; color: var(--text-2); }

/* ===== VIDEO MODAL ===== */
.overlay {
  display: none; position: fixed; inset: 0; z-index: 1500;
  background: rgba(45,58,82,.45); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 20px;
}
.overlay.open { display: flex; }
.modal {
  background: white; border-radius: var(--r-lg);
  width: 100%; max-width: 880px; max-height: 90vh; overflow-y: auto;
  animation: fadeUp .3s ease;
}
@keyframes fadeUp { from{transform:translateY(24px) scale(.97);opacity:0;} to{transform:none;opacity:1;} }
.modal-head {
  padding: 18px 22px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1.5px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 800; }
.modal-close {
  width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--bg);
  font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.modal-close:hover { background: #FFE0E8; color: var(--rose); }
.modal-player {
  background: #1e2d42; aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
}
.modal-player video { width: 100%; height: 100%; object-fit: contain; }
.player-placeholder { text-align: center; color: rgba(255,255,255,.7); }
.player-placeholder .pi { font-size: 56px; margin-bottom: 10px; }
.player-placeholder p  { font-size: 13px; }
.modal-body { padding: 22px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.mg-label { font-size: 10px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.mg-value { font-size: 13px; font-weight: 700; }
.modal-actions { display: flex; gap: 10px; }
.btn-watch {
  flex: 1; background: linear-gradient(135deg, var(--sky), var(--mint));
  color: white; border: none; border-radius: 14px; padding: 13px;
  font-size: 14px; font-weight: 800; cursor: pointer; transition: all .25s;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  text-decoration: none;
}
.btn-watch:hover { transform: translateY(-2px); box-shadow: var(--sh-hover); }
.btn-msel {
  padding: 13px 20px; border-radius: 14px; font-size: 14px; font-weight: 700;
  cursor: pointer; border: 2px solid var(--sky-mid); color: var(--sky); background: var(--sky-lt);
  transition: all .2s;
}
.btn-msel:hover   { background: var(--sky); color: white; }
.btn-msel.sel-on  { background: #FFE0E8; border-color: var(--rose); color: var(--rose); }
.btn-msel.sel-on:hover { background: var(--rose); color: white; }

/* ===== QUIZ MODAL ===== */
.quiz-wrap { padding: 24px; }
.quiz-prog-txt { font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.quiz-bar-bg   { background: var(--bg); border-radius: 6px; height: 7px; margin-bottom: 20px; }
.quiz-bar-fill { height: 7px; border-radius: 6px; background: linear-gradient(90deg,var(--sky),var(--mint)); transition: width .4s; }
.quiz-q { font-size: 17px; font-weight: 900; line-height: 1.5; margin-bottom: 20px; }
.quiz-opts { display: flex; flex-direction: column; gap: 10px; }
.quiz-opt {
  padding: 14px 16px; border: 2px solid var(--border); border-radius: var(--r-sm);
  cursor: pointer; transition: all .2s; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}
.quiz-opt:hover { border-color: var(--sky-mid); background: var(--sky-lt); }
.quiz-opt.ok { border-color: var(--mint); background: var(--mint-lt); color: var(--mint); }
.quiz-opt.ng { border-color: var(--rose); background: var(--rose-lt); color: var(--rose); }
.quiz-opt.chosen { border-color: var(--sky); background: var(--sky-lt); }
.opt-letter {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; flex-shrink: 0; transition: all .2s;
}
.quiz-opt.ok .opt-letter { background: var(--mint); border-color: var(--mint); color: white; }
.quiz-opt.ng .opt-letter { background: var(--rose); border-color: var(--rose); color: white; }
.quiz-opt.chosen .opt-letter { background: var(--sky); border-color: var(--sky); color: white; }
.quiz-fb { margin-top: 14px; padding: 12px 16px; border-radius: var(--r-sm); font-size: 13px; display: none; }
.quiz-fb.show { display: block; }
.quiz-fb.ok { background: var(--mint-lt); color: var(--mint); }
.quiz-fb.ng { background: var(--rose-lt); color: var(--rose); }
.btn-nextq {
  display: none; width: 100%; margin-top: 18px;
  background: var(--sky); color: white; border: none; border-radius: var(--r-sm);
  padding: 13px; font-size: 14px; font-weight: 800; cursor: pointer; transition: all .2s;
}
.btn-nextq.show { display: block; }
.btn-nextq:hover { background: #4888C2; }
.quiz-result { text-align: center; padding: 16px 0; }
.qr-icon  { font-size: 52px; margin-bottom: 10px; }
.qr-score { font-size: 60px; font-weight: 900; color: var(--sky); }
.qr-msg   { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.qr-sub   { font-size: 13px; color: var(--text-2); margin-bottom: 24px; }
.qr-btns  { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-qr-main {
  background: linear-gradient(135deg,var(--sky),var(--mint)); color: white;
  border: none; border-radius: 16px; padding: 11px 22px;
  font-size: 13px; font-weight: 800; cursor: pointer; transition: all .2s;
}
.btn-qr-main:hover { transform: translateY(-1px); box-shadow: var(--sh-md); }
.btn-qr-soft {
  background: var(--bg); color: var(--text-2); border: 2px solid var(--border);
  border-radius: 16px; padding: 11px 22px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all .2s;
}
.btn-qr-soft:hover { background: var(--sky-lt); border-color: var(--sky-mid); color: var(--sky); }

/* ===== EMPTY STATE ===== */
.empty {
  text-align: center; padding: 56px 20px; color: var(--text-2);
  background: white; border-radius: var(--r-md); border: 2px dashed var(--border);
}
.empty-em { font-size: 48px; margin-bottom: 14px; }
.empty-h  { font-size: 17px; font-weight: 800; color: var(--text); margin-bottom: 7px; }
.empty-p  { font-size: 13px; }

/* ===== TOAST ===== */
.toast {
  position: fixed; top: 76px; right: 22px; z-index: 2000;
  background: white; border-radius: var(--r-sm);
  border-left: 4px solid var(--mint);
  padding: 12px 16px; display: flex; align-items: center; gap: 10px;
  box-shadow: var(--sh-lg); max-width: 310px;
  transform: translateX(120%); transition: transform .35s cubic-bezier(.22,.61,.36,1);
}
.toast.show { transform: none; }
.toast.warn  { border-left-color: var(--peach); }
.toast.error { border-left-color: var(--rose); }
.toast-icon  { font-size: 18px; }
.toast-txt   { font-size: 12px; font-weight: 700; flex: 1; }
.toast-x     { background: none; border: none; cursor: pointer; font-size: 14px; opacity: .5; padding: 2px 4px; }

/* ===== RESPONSIVE: カテゴリカード SP3列 ===== */
@media (max-width: 640px) {
  .cat-cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}

