/* ITK Learn — design tokens & components. White surfaces, dark navy text, the logo's pink as accent. */
:root {
  /* brand */
  --navy: #0b1533;          /* dark navy: text, brand surfaces */
  --navy-2: #13214f;
  --navy-3: #1c2d66;
  --pink: #ff2bd6;          /* logo dot — decoration only */
  --pink-ink: #c4009f;      /* pink text/links on white (WCAG AA) */
  --pink-btn: #d600b8;      /* white text on this passes WCAG AA */
  --pink-btn-hover: #e60fc6;
  --pink-soft: #fde7f8;
  /* light surfaces */
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --surface-3: #eef0f7;
  --line: #e6e8f2;
  --line-strong: #d3d8e8;
  --text: #0b1533;
  --text-2: #4a557d;
  --text-3: #7c86ab;
  --ink: var(--text); --ink-2: var(--text-2); --ink-3: var(--text-3); --edge: var(--line); --mist: var(--bg); --paper: var(--surface);
  /* status */
  --green: #0b8a55;
  --green-soft: #e6f7ef;
  --amber: #9a6200;
  --amber-soft: #fff4dc;
  --red: #c8233f;
  --red-soft: #fdecef;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 12px 32px rgba(11, 21, 51, 0.08);
  --shadow-lg: 0 24px 50px rgba(11, 21, 51, 0.12);
  --font: 'Inter', 'Noto Sans Myanmar', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Montserrat', 'Noto Sans Myanmar', 'Inter', system-ui, sans-serif;
  --wrap: 1160px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.65; color: var(--text);
  background: var(--bg);
  min-height: 100vh; display: flex; flex-direction: column;
}
:lang(my) body, body:lang(my) { line-height: 1.85; }
a { color: var(--pink-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.3; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding: 28px 0 56px; }
.muted { color: var(--text-2); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; color: var(--text-3); }
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.logo-on-dark { display: none; }
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { flex: none; }
.brand img { height: 38px; width: auto; max-width: none; }
.balance-chip, .trophy-chip { flex: none; white-space: nowrap; }
.nav { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.nav a { color: var(--text-2); padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: .95rem; white-space: nowrap; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--surface-3); text-decoration: none; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; background: var(--pink-btn); }
.nav a.btn-primary:hover { background: var(--pink-btn-hover); }
.balance-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--pink-soft); color: var(--text); font-weight: 600; font-size: .9rem; border: 1px solid #f7b6ea; }
.balance-chip:hover { text-decoration: none; background: #fbd3f2; }
.balance-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-strong); color: var(--text); border-radius: 10px; padding: 8px 12px; font: inherit; cursor: pointer; }
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; border-radius: 10px; }
  .site-header .wrap { gap: 10px; }
  .balance-chip { margin-left: auto; }
  .balance-chip + .menu-toggle { margin-left: 0; }
}

.prefs { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.prefs form { margin: 0; }
.pill-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.pill-switch a, .pill-switch button { padding: 4px 12px; color: var(--text-2); font-size: .85rem; background: none; border: 0; font: inherit; font-size: .85rem; cursor: pointer; }
.pill-switch .on { background: var(--navy); color: #fff; }

/* ---------- footer ---------- */
.site-footer { background: #060c22; color: #aeb6da; padding: 52px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 32px; }
.footer-grid h4 { color: #fff; font-size: .95rem; margin: 0 0 12px; font-family: var(--font); }
.footer-grid nav a { display: block; color: #aeb6da; padding: 3px 0; }
.footer-grid nav a:hover { color: #fff; }
.footer-brand img { height: 40px; width: auto; margin-bottom: 12px; }
.footer-brand p, .footer-grid .prose { color: #aeb6da; font-size: .92rem; }
.site-footer .pill-switch { border-color: rgba(160, 180, 255, .3); }
.site-footer .pill-switch a, .site-footer .pill-switch button { color: #aeb6da; }
.site-footer .pill-switch .on { background: var(--navy-3); color: #fff; }
.site-footer .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .3); }
.site-footer .btn-ghost:hover { background: var(--navy-2); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 36px; padding: 18px 16px 24px; border-top: 1px solid rgba(160, 180, 255, .14); font-size: .85rem; }

@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--pink-btn); color: #fff; box-shadow: 0 8px 20px rgba(214, 0, 184, .22); }
.btn-primary:hover { background: var(--pink-btn-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { background: transparent; color: var(--red); border-color: #f2b3be; }
.btn-danger:hover { background: var(--red-soft); }
.btn-success { background: #0f9a62; color: #fff; }
.btn-success:hover { background: #0b8a55; }
.btn-sm { min-height: 34px; padding: 6px 14px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--text); }
.field { margin-bottom: 16px; }
.field .hint { font-weight: 400; font-size: .82rem; color: var(--text-3); margin-top: 4px; }
input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--pink-btn); box-shadow: 0 0 0 3px var(--pink-soft); }
input[type=file] { font: inherit; color: var(--text-2); width: 100%; padding: 10px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--pink-btn); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
:focus-visible { outline: 2px solid var(--pink-btn); outline-offset: 2px; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 1px 2px rgba(11, 21, 51, .04); }
.card-tight { padding: 16px; }
.narrow { max-width: 460px; margin: 0 auto; }
.medium { max-width: 720px; margin: 0 auto; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid; font-weight: 500; }
.alert-success { background: var(--green-soft); border-color: #b9e8d2; color: #0b6b43; }
.alert-error { background: var(--red-soft); border-color: #f6c3cd; color: #a3122e; }
.alert-info { background: #eef1fd; border-color: #cfd7f7; color: #24357a; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge-pending { background: var(--amber-soft); color: var(--amber); border-color: #f5dca5; }
.badge-approved, .badge-active, .badge-published, .badge-assigned, .badge-done { background: var(--green-soft); color: var(--green); border-color: #b9e8d2; }
.badge-rejected, .badge-error, .badge-failed, .badge-revoked, .badge-suspended, .badge-expired { background: var(--red-soft); color: var(--red); border-color: #f6c3cd; }
.badge-draft, .badge-ignored, .badge-archived, .badge-queued { background: var(--surface-3); color: var(--text-2); border-color: var(--line-strong); }
.badge-review, .badge-running { background: var(--pink-soft); color: var(--pink-ink); border-color: #f7b6ea; }
.badge-owned { background: var(--green-soft); color: var(--green); }
.empty { text-align: center; padding: 48px 16px; color: var(--text-2); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* ---------- course cards ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.course-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: transform .15s, border-color .15s, box-shadow .15s; }
.course-card:hover { text-decoration: none; transform: translateY(-3px); border-color: #f7b6ea; box-shadow: var(--shadow-lg); }
.thumb { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--navy-3), var(--navy)); position: relative; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .placeholder { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: #fff; padding: 16px; text-align: center; }
.thumb .placeholder::after { content: ''; position: absolute; width: 14px; height: 14px; right: 16px; bottom: 14px; border-radius: 50%; background: var(--pink); }
.thumb .badge { position: absolute; top: 10px; left: 10px; }
.course-card .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-card h3 { margin: 0; font-size: 1.05rem; }
.course-card .desc { color: var(--text-2); font-size: .92rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-card .foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.price-points { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--text); }
.price-points small { font-size: .75rem; color: var(--text-3); font-weight: 600; }
.price-money { font-size: .82rem; color: var(--text-3); }

/* ---------- course details ---------- */
.course-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
.course-hero .thumb { border-radius: var(--radius); }
@media (max-width: 860px) { .course-hero { grid-template-columns: 1fr; } }
.buy-box { position: sticky; top: 84px; }
.buy-box .big { font-family: var(--font-head); font-size: 2rem; font-weight: 800; line-height: 1.1; }
.lesson-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lesson-list li + li { border-top: 1px solid var(--line); }
.lesson-list a, .lesson-list .item { display: flex; gap: 12px; align-items: center; padding: 12px 16px; color: var(--text); }
.lesson-list a:hover { background: var(--surface-2); text-decoration: none; }
.lesson-list .current { background: var(--pink-soft); box-shadow: inset 3px 0 0 var(--pink-btn); }
.lesson-list .idx { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; background: var(--surface-3); color: var(--text-2); }
.lesson-list .done .idx { background: var(--green-soft); color: var(--green); }
.lesson-list .title { flex: 1; min-width: 0; }
.lesson-list .meta { font-size: .8rem; color: var(--text-3); white-space: nowrap; }
.prose { color: var(--text-2); white-space: pre-line; }

/* ---------- dialog ---------- */
dialog { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 24px; width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(11, 21, 51, .45); backdrop-filter: blur(3px); }

/* ---------- player ---------- */
.player-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .player-layout { grid-template-columns: 1fr; } }
.video-frame { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; box-shadow: var(--shadow-lg); }
.video-frame video { width: 100%; height: 100%; display: block; background: #000; }
.video-frame .overlay { position: absolute; inset: 0; display: grid; place-items: center; color: #c9d0ee; text-align: center; padding: 16px; pointer-events: none; }
.player-side { max-height: calc(100vh - 110px); overflow: auto; position: sticky; top: 84px; }
@media (max-width: 960px) { .player-side { position: static; max-height: none; } }
.progress-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--pink-btn), var(--pink)); border-radius: 99px; }

/* ---------- learning list ---------- */
.learn-item { display: grid; grid-template-columns: 200px 1fr auto; gap: 18px; align-items: center; }
.learn-item .thumb { border-radius: var(--radius-sm); }
@media (max-width: 680px) { .learn-item { grid-template-columns: 1fr; } }

/* ---------- wallet ---------- */
.wallet-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 43, 214, .4), transparent 50%), linear-gradient(135deg, var(--navy-3), var(--navy) 65%); border: 0; color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.wallet-hero .tiny, .wallet-hero .muted, .wallet-hero .small { color: rgba(255, 255, 255, .78); }
.wallet-hero .amount { font-family: var(--font-head); font-size: clamp(2.2rem, 7vw, 3.2rem); font-weight: 800; line-height: 1; }
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.option { position: relative; }
.option input { position: absolute; opacity: 0; inset: 0; }
.option .box { display: block; padding: 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; height: 100%; font-weight: 500; }
.option input:checked + .box { border-color: var(--pink-btn); box-shadow: 0 0 0 3px var(--pink-soft); background: #fff7fd; }
.option input:focus-visible + .box { outline: 2px solid var(--pink); }
.pay-details { border-left: 3px solid var(--pink-btn); padding: 12px 16px; background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.copy-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.copy-row code { font-size: 1.05rem; font-weight: 700; color: var(--text); background: var(--surface-3); padding: 4px 10px; border-radius: 6px; letter-spacing: .02em; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--text-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plus { color: var(--green); font-weight: 700; }
.minus { color: var(--red); font-weight: 700; }
/* Stacked rows on phones */
@media (max-width: 640px) {
  table.responsive thead { display: none; }
  table.responsive tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  table.responsive td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
  table.responsive td::before { content: attr(data-label); color: var(--text-3); font-size: .8rem; text-align: left; }
}

.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--surface); }
.faq details + details { margin-top: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; color: var(--text-2); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 8px 0 18px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }

/* utilities (no inline styles: CSP forbids them) */
.mt-0 { margin-top: 0 !important; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; }
.mb-0 { margin-bottom: 0 !important; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
progress.bar { appearance: none; -webkit-appearance: none; width: 100%; height: 8px; border: 0; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
progress.bar::-webkit-progress-bar { background: var(--surface-3); border-radius: 99px; }
progress.bar::-webkit-progress-value { background: linear-gradient(90deg, var(--pink-btn), var(--pink)); border-radius: 99px; }
progress.bar::-moz-progress-bar { background: linear-gradient(90deg, var(--pink-btn), var(--pink)); border-radius: 99px; }
/* Burmese snippets inside English pages (e.g. the language switch) use the Myanmar font directly. */
[lang=my] { font-family: 'Noto Sans Myanmar', 'Myanmar Sangam MN', 'Padauk', sans-serif; }

/* ---------- class portal ---------- */
.class-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.class-nav a { padding: 7px 14px; border-radius: 999px; color: var(--text-2); font-weight: 600; font-size: .92rem; }
.class-nav a:hover { background: var(--surface-3); text-decoration: none; color: var(--text); }
.class-nav a.on { background: var(--navy); color: #fff; }
.class-hero { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: center; margin-bottom: 24px; }
.class-hero .h-eyebrow { margin-bottom: 10px; }
.class-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cstat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.cstat .label { font-size: .78rem; color: var(--text-3); font-weight: 600; }
.cstat strong { font-family: var(--font-head); font-size: 1.5rem; line-height: 1.2; }
.class-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .class-hero, .class-grid { grid-template-columns: 1fr; } }
.module-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.module-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.module-card.is-locked { background: var(--surface-2); }
.module-card h3 { margin: 0; font-size: 1rem; }
.mc-head { display: flex; gap: 12px; align-items: flex-start; }
.mc-num { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--pink-soft); color: var(--pink-ink); font-weight: 800; font-family: var(--font-head); font-size: .85rem; }
.is-locked .mc-num { background: var(--surface-3); color: var(--text-3); }
.mc-policy { color: var(--text-3); }
.countdown { display: flex; flex-direction: column; gap: 4px; }
.cd-clock { font-size: .86rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cd-clock b { color: var(--navy); font-size: 1rem; }
.countdown.is-expired .cd-clock { text-decoration: line-through; opacity: .6; }
.req-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .92rem; }
.req-list li::before { content: '○ '; color: var(--text-3); }
.req-list li.ok::before { content: '✓ '; color: var(--green); font-weight: 700; }
.hw-counts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.hw-counts div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; }
.hw-counts strong { font-family: var(--font-head); font-size: 1.3rem; }
.feedback-item { padding: 10px 0; border-top: 1px solid var(--line); }
.feedback-item:first-of-type { border-top: 0; }
.session-item + .session-item { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.session-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.hw-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--text); }
.hw-row:hover { text-decoration: none; box-shadow: var(--shadow); }
table.board tr.me td { background: #fff7fd; }
.pos { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 50%; font-weight: 700; background: var(--surface-3); }
.pos-1 { background: #ffe9a8; } .pos-2 { background: #e6e9f2; } .pos-3 { background: #f6d6c3; }
.avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .75rem; font-weight: 700; margin-right: 6px; vertical-align: middle; }
.module-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.locked-frame { background: linear-gradient(135deg, var(--navy-3), var(--navy)); }
.locked-frame .overlay { color: #fff; font-weight: 600; }
.side-module { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin: 4px 2px 8px; }
.locked-item { opacity: .55; }
.attach-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.check-list .ok strong { color: var(--green); } .check-list .bad strong { color: var(--red); }
.small-value { font-size: 1.05rem !important; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.w-auto { width: auto !important; min-width: 0; flex: 1 1 160px; }
.count-pill { background: var(--pink-btn); color: #fff; font-weight: 700; font-size: .8rem; border-radius: 99px; padding: 1px 9px; }
.small.ok { color: var(--green); } .small.err { color: var(--red); }

/* ---------- Zoom Class feature (full width, horizontal, compact) ---------- */
.zoom-feature { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 28px; align-items: center;
  width: 100%; padding: 28px 32px; border-radius: 22px; color: #fff;
  background: radial-gradient(70% 140% at 100% 0%, rgba(255, 43, 214, .38), transparent 60%), linear-gradient(120deg, var(--navy-3), var(--navy) 70%); box-shadow: var(--shadow-lg); }
.zoom-feature + .zoom-feature { margin-top: 16px; }
.zf-badge { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 43, 214, .18); color: #ff9bea; font-weight: 700; font-size: .82rem; }
.zf-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); }
.zoom-feature .zf-title { color: #fff; margin: 10px 0 6px; font-size: clamp(1.4rem, 3vw, 2rem); }
.zf-desc { color: rgba(255, 255, 255, .8); margin: 0 0 14px; max-width: 46em; }
.zf-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 0; }
.zf-meta dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: rgba(255, 255, 255, .6); font-weight: 700; }
.zf-meta dd { margin: 2px 0 0; font-weight: 600; }
.zf-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; background: rgba(255, 255, 255, .14); }
.zf-in_progress, .zf-enrollment_open { background: rgba(61, 220, 151, .2); color: #8ff0c4; }
.zf-upcoming { background: rgba(255, 192, 77, .2); color: #ffd98a; }
.zf-ended, .zf-cancelled { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .75); }
.zf-action { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, .14); }
.zf-note { margin: 0; color: rgba(255, 255, 255, .8); font-size: .9rem; }
.zf-login { color: #ff9bea; font-size: .88rem; }
.btn-ghost-light { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .4); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .1); }
@media (max-width: 760px) {
  .zoom-feature { grid-template-columns: 1fr; padding: 22px 18px; gap: 18px; }
  .zf-action { padding-left: 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 16px; }
  .zf-action .btn { width: 100%; }
}
.class-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 20px; margin: 0; }
.class-info dt { font-size: .75rem; color: var(--text-3); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.class-info dd { margin: 2px 0 0; font-weight: 600; }
.policy-label { display: inline-block; font-size: .76rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.policy-label.lifetime { background: var(--green-soft); color: var(--green); }
.policy-label.timed { background: var(--amber-soft); color: var(--amber); }
.policy-label.locked { background: var(--surface-3); color: var(--text-3); }
.policy-label.expired { background: var(--red-soft); color: var(--red); }

/* ---------- Creator Guide dashboard (redesign) ---------- */
.cg-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
main .cg-name { font-size: clamp(1.25rem, 2.6vw, 1.6rem); margin: 0; line-height: 1.3; }
.cg-sub { margin: 2px 0 0; color: var(--text-2); font-size: .92rem; }
.cg-countdown { --cg-navy: #0b0b45; position: relative; overflow: hidden; color: #fff; border-radius: 20px; padding: 20px 24px 18px; margin-bottom: 18px;
  background: radial-gradient(60% 140% at 100% 0%, rgba(255, 43, 214, .28), transparent 60%), var(--cg-navy); border: 1px solid rgba(255, 43, 214, .25); box-shadow: var(--shadow-lg); }
.cg-cd-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
main .cg-cd-title { font-family: var(--font); font-size: .82rem; font-weight: 800; letter-spacing: .12em; color: #ff8ae6; margin: 0; }
html[lang=my] main .cg-cd-title { letter-spacing: 0; font-size: .95rem; }
.cg-units { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cg-unit { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; padding: 10px 8px 8px; text-align: center; }
.cg-unit b { display: block; font-family: 'Montserrat', var(--font); font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.cg-unit span { font-size: .78rem; color: rgba(255, 255, 255, .7); text-transform: uppercase; letter-spacing: .06em; }
.cg-cd-foot { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-top: 12px; font-size: .88rem; color: rgba(255, 255, 255, .82); }
.cg-progress { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .12); margin-top: 8px; overflow: hidden; }
.cg-progress span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--pink-btn), var(--pink)); }
.cg-urgent-note { font-size: .82rem; font-weight: 700; color: #ffd98a; }
.cg-countdown.is-urgent { border-color: rgba(255, 43, 214, .75); }
.cg-countdown.is-urgent .cg-unit b { color: #ffb3ef; }
.cg-countdown.is-expired .cg-unit b { color: rgba(255, 255, 255, .45); }
.cg-countdown.is-expired .cg-cd-title { color: #ff9fb0; }
.cg-expired-hint { margin: 10px 0 0; font-size: .9rem; color: rgba(255, 255, 255, .85); }
.cg-countdown-empty { padding: 18px 22px; }
.cg-countdown-empty p { color: rgba(255, 255, 255, .8); }
.cg-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
.cg-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.cg-stat .label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.cg-stat strong { font-family: 'Montserrat', var(--font); font-size: 1.3rem; line-height: 1.25; word-break: break-word; }
.cg-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.cg-block-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
main .cg-block-head h2 { font-size: 1.15rem; margin: 0; }
.cg-modules { list-style: none; margin: 0; padding: 0; }
.cg-module { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--line); }
.cg-module:first-child { border-top: 0; }
.cg-mnum { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: var(--pink-soft); color: var(--pink-ink); }
.cg-mbody { display: flex; flex-direction: column; min-width: 0; }
.cg-mdesc { font-size: .84rem; color: var(--text-3); }
.cg-mmeta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.cg-mgo { min-width: 96px; }
.cg-mgo-off { text-align: center; color: var(--text-3); }
.cg-module.is-locked .cg-mnum { background: var(--surface-3); color: var(--text-3); }
.cg-module.is-locked .cg-mbody strong { color: var(--text-2); }
.is-disabled { pointer-events: none; opacity: .45; }
.cg-secondary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.cg-line { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .9rem; margin: 0; }
.cg-feedback { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.cg-req { display: grid; gap: 4px; font-size: .9rem; margin-bottom: 10px; }
.cg-board { list-style: none; margin: 0; padding: 0; }
.cg-board li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.cg-board li:first-child { border-top: 0; }
.cg-board li.me { background: #fff7fd; }
.cg-bname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-session { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .cg-countdown { padding: 16px 14px 14px; }
  .cg-units { gap: 8px; }
  .cg-unit { padding: 8px 4px 6px; border-radius: 12px; }
  .cg-unit span { font-size: .68rem; letter-spacing: .02em; }
  .cg-secondary { grid-template-columns: 1fr; }
  .cg-module { grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; }
  .cg-mmeta { grid-column: 2; align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; gap: 6px 10px; }
  .cg-mgo { grid-column: 2; justify-self: start; min-height: 40px; }
  .cg-mgo-off { display: none; }
}
@media (max-width: 360px) { .cg-units { grid-template-columns: repeat(2, 1fr); } .cg-summary { grid-template-columns: 1fr; } }

/* ---------- video course tools ---------- */
.course-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin-bottom: 16px; }
.ct-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-weight: 600; font-size: .9rem; }
.ct-btn:hover { text-decoration: none; border-color: var(--pink-btn); color: var(--pink-ink); }
.ct-btn svg { width: 18px; height: 18px; flex: none; }
.ct-telegram { background: #229ed9; border-color: #229ed9; color: #fff; }
.ct-telegram:hover { background: #1a8bc0; color: #fff; border-color: #1a8bc0; }
.ct-cert { display: flex; flex-direction: column; justify-content: center; padding: 6px 14px; border-radius: 12px; border: 1px dashed var(--line-strong); color: var(--text); margin-left: auto; line-height: 1.3; }
.ct-cert:hover { text-decoration: none; border-color: var(--pink-btn); }
.ct-cert.is-ready { border: 1px solid #b9e8d2; background: var(--green-soft); }
.ct-cert.is-ready strong { color: var(--green); }
.buy-box .course-tools { flex-direction: column; margin: 0; }
.buy-box .ct-cert { margin-left: 0; }
.file-list { list-style: none; margin: 0; padding: 0; }
.file-list li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.file-list li:first-child { border-top: 0; }
@media (max-width: 640px) { .ct-btn { flex: 1 1 calc(50% - 8px); justify-content: center; } .ct-cert { margin-left: 0; flex: 1 1 100%; } }

/* ---------- avatars, instructors, community ---------- */
.avatar-img { border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; background: var(--navy-3); color: #fff; font-weight: 700; }
.av-sm { width: 24px; height: 24px; font-size: .62rem; } .av-md { width: 40px; height: 40px; font-size: .85rem; }
.av-lg { width: 64px; height: 64px; font-size: 1.2rem; } .av-xl { width: 96px; height: 96px; font-size: 1.6rem; }
.ins-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ins-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 600; color: var(--text); }
.ins-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.ins-card { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.ins-card h3 { margin: 0 0 2px; font-size: 1.05rem; }
.ins-headline { color: var(--pink-ink); font-weight: 600; font-size: .88rem; margin: 0 0 6px; }
.zoom-feature .ins-chip { color: #fff; } .zoom-feature .ins-chips .tiny { color: rgba(255, 255, 255, .7); }
.zoom-feature .ins-chips { margin-top: 12px; }
.trophy { color: #c98a00; font-weight: 800; }
.comm-list { list-style: none; margin: 0; padding: 0; }
.comm-row { display: grid; grid-template-columns: 44px auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 6px; border-top: 1px solid var(--line); color: var(--text); }
.comm-row:hover { text-decoration: none; background: var(--surface-2); }
.comm-list li:first-child .comm-row { border-top: 0; }
.comm-row.me { background: #fff7fd; }
.comm-name { display: flex; flex-direction: column; min-width: 0; }
.comm-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comm-score { text-align: right; font-size: 1.05rem; }
.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.profile-head > .stack { flex: 1 1 200px; min-width: 0; }
.profile-head input[type=file] { max-width: 100%; }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }

/* ---------- Trophy rewards ---------- */
.trophy-chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 11px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 700; font-size: .9rem; }
.trophy-chip:hover { text-decoration: none; background: var(--navy-3); }
@media (max-width: 860px) { .balance-chip + .trophy-chip + .menu-toggle { margin-left: 0; } }
/* Compact header: used when the menu links don't fit on one line (long Burmese labels,
   instructor/admin links) — same layout as on phones, switched on by app.js. */
.site-header.nav-compact .menu-toggle { display: inline-flex; }
.site-header.nav-compact .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; box-shadow: var(--shadow); }
.site-header.nav-compact .nav.open { display: flex; }
.site-header.nav-compact .nav a { padding: 12px; border-radius: 10px; }
.site-header.nav-compact .wrap { gap: 10px; }
.site-header.nav-compact .balance-chip { margin-left: auto; }
.site-header.nav-compact .balance-chip + .menu-toggle, .site-header.nav-compact .balance-chip + .trophy-chip + .menu-toggle { margin-left: 0; }
html[lang="my"] .nav > a { padding: 8px 9px; font-size: .92rem; }
.site-header .wrap { gap: 12px; }
.nav { gap: 2px; }
.trophy-tag { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; background: var(--pink-soft); color: var(--pink-ink); border: 1px solid #f7c4ee; font-size: .74rem; font-weight: 700; line-height: 1.5; white-space: nowrap; vertical-align: middle; font-family: var(--font); }
.marks-tag { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; background: #eef0fb; color: var(--navy-2); border: 1px solid #d5daf3; font-size: .74rem; font-weight: 700; line-height: 1.5; white-space: nowrap; vertical-align: middle; font-family: var(--font); }
.marks-tag.is-earned { background: var(--surface-3); color: var(--text-3); border-color: var(--line); }
.reward-tags { display: inline-flex; gap: 4px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.trophy-tag.is-earned { background: var(--surface-3); color: var(--text-3); border-color: var(--line); }
.lesson-list .meta { display: inline-flex; align-items: center; gap: 8px; }
.lesson-list a .trophy-tag, .lesson-list .item > .trophy-tag { flex: none; }
@media (max-width: 520px) { .trophy-tag .tt-word, .marks-tag .tt-word { display: none; } }
.player-side .tt-word { display: none; }
.player-side .reward-tags { flex-direction: column; align-items: flex-end; }

#reward-root { position: fixed; inset: 0; z-index: 1000; pointer-events: none; display: grid; place-items: start center; padding: 96px 16px 16px; }
.reward-pop { pointer-events: auto; position: relative; width: min(380px, 100%); text-align: center; padding: 26px 24px 22px; border-radius: 20px;
  background: radial-gradient(circle at 50% 0, #1d2a6b 0, var(--navy) 70%); color: #fff; box-shadow: 0 24px 60px rgba(11, 11, 69, .35), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  opacity: 0; transform: translateY(-12px) scale(.92); transition: opacity .25s ease, transform .3s cubic-bezier(.2, .9, .3, 1.3); }
.reward-pop.in { opacity: 1; transform: none; }
.reward-pop.out { opacity: 0; transform: translateY(-8px) scale(.96); transition-duration: .2s; }
.reward-close { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.reward-close:hover, .reward-close:focus-visible { background: rgba(255, 255, 255, .22); }
.reward-icon { position: relative; width: 84px; height: 84px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 184, 46, .28), rgba(245, 184, 46, 0) 70%); }
.reward-icon svg { width: 60px; height: 60px; animation: reward-bounce .9s cubic-bezier(.3, 1.6, .5, 1) both; }
.reward-icon i { position: absolute; width: 8px; height: 8px; border-radius: 2px; background: var(--pink); opacity: 0; animation: reward-spark 1.1s ease-out .15s both; }
.reward-icon i:nth-child(2) { left: 6px; top: 18px; --dx: -16px; --dy: -14px; }
.reward-icon i:nth-child(3) { right: 4px; top: 14px; --dx: 16px; --dy: -16px; background: #f5b82e; }
.reward-icon i:nth-child(4) { left: 0; bottom: 18px; --dx: -18px; --dy: 8px; background: #fff; }
.reward-icon i:nth-child(5) { right: 0; bottom: 22px; --dx: 18px; --dy: 6px; }
.reward-icon i:nth-child(6) { left: 38px; top: -4px; --dx: 0; --dy: -18px; background: #f5b82e; }
.reward-icon i:nth-child(7) { left: 40px; bottom: -2px; --dx: 4px; --dy: 16px; background: #fff; }
.reward-title { color: #fff; font-size: 1.25rem; margin: 0 0 4px; }
.reward-msg { margin: 0 0 10px; color: #d7dbf0; font-size: .95rem; }
.reward-pills { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 4px 0 12px; }
.reward-pills p { margin: 0; }
.reward-marks { display: inline-block; padding: 7px 16px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .28); color: #fff; font-weight: 800; font-size: 1rem; }
.reward-amount { display: inline-block; margin: 4px 0 10px; padding: 8px 16px; border-radius: 999px; background: var(--pink-btn); color: #fff; font-weight: 800; font-size: 1.05rem; box-shadow: 0 6px 18px rgba(214, 0, 184, .35); }
.reward-sub { margin: 0; color: #b9bfdc; font-size: .85rem; }
.reward-certificate .reward-amount { background: linear-gradient(90deg, #d600b8, #f5b82e); }
@keyframes reward-bounce { 0% { transform: scale(.3) rotate(-12deg); } 60% { transform: scale(1.12) rotate(4deg); } 100% { transform: none; } }
@keyframes reward-spark { 0% { opacity: 0; transform: translate(0, 0) scale(.4) rotate(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1) rotate(160deg); } }
@media (prefers-reduced-motion: reduce) {
  .reward-pop, .reward-pop.in, .reward-pop.out { transition: opacity .15s linear; transform: none; }
  .reward-icon svg, .reward-icon i { animation: none; }
}

/* ---------- Instructor Portal ---------- */
.cg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.btn-xs { min-height: 28px; padding: 3px 9px; font-size: .8rem; }
form.inline { display: inline-flex; gap: 4px; margin: 0; vertical-align: middle; }
.profile-head > .btn { margin-left: auto; }
.file-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ins-links { display: flex; gap: 12px; flex-wrap: wrap; }
.objectives { margin-bottom: 8px; }
@media (max-width: 640px) {
  .profile-head > .btn { margin-left: 0; width: 100%; }
  .lesson-list .item .meta { flex-wrap: wrap; justify-content: flex-end; }
}

/* ---------- Points icon ---------- */
.pt-ico { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
.pt-ico.pt-lg { width: 1.4em; height: 1.4em; vertical-align: -0.25em; }
.balance-chip .pt-ico { width: 18px; height: 18px; }
.d-block { display: block; }

/* ---------- Classic upload buttons ---------- */
.file-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.file-btn { position: relative; border-radius: 8px; border: 1px solid var(--navy); color: var(--navy); background: var(--surface); font-weight: 600; cursor: pointer; }
.file-btn:hover { background: var(--navy); color: #fff; }
.file-btn:focus-within { outline: 2px solid var(--pink); outline-offset: 2px; }
.file-btn .file-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; border: 0; }
.file-name { font-size: .88rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; min-width: 0; flex: 1 1 140px; }
.file-pick.has-file .file-name { color: var(--text); font-weight: 600; }
.file-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* ---------- Top-up: payment methods with logos and QR ---------- */
.pay-methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.pay-method .box { display: flex; align-items: center; gap: 12px; }
.pay-logo { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid var(--line); flex: none; padding: 3px; }
.pay-logo-text { display: grid; place-items: center; font-weight: 800; color: var(--navy); background: var(--surface-3); }
.pay-details { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px 24px; align-items: start; }
.pay-qr { margin: 0; text-align: center; }
.pay-qr img { width: 220px; height: 220px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.pay-qr figcaption { font-size: .85rem; font-weight: 600; color: var(--text-2); margin-top: 6px; }
.pay-info { margin: 0; display: grid; gap: 12px; }
.pay-info dt { font-size: .78rem; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pay-info dd { margin: 2px 0 0; }
.pay-amount dd { font-family: 'Montserrat', var(--font); font-size: 1.6rem; font-weight: 800; color: var(--pink-ink); }
.pay-note { grid-column: 1 / -1; margin: 0; }
.pay-details:not(:has(.pay-qr)) { grid-template-columns: 1fr; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--text-2); font-size: .92rem; }
@media (max-width: 560px) {
  .pay-details { grid-template-columns: 1fr; }
  .pay-qr img { width: 200px; height: 200px; }
}

/* ---------- Community: my rank (raised row with an arrow tab) ---------- */
.comm-list li#my-rank { position: relative; z-index: 1; margin: 8px -12px; }
.comm-row.me { position: relative; padding: 16px 14px 16px 30px; grid-template-columns: 52px auto minmax(0, 1fr) auto; background: var(--surface); border-top-color: transparent;
  border-radius: 12px; box-shadow: 0 12px 30px rgba(11, 21, 51, .18), 0 0 0 1px rgba(214, 0, 184, .25); }
.comm-row.me:hover { background: var(--surface); }
.comm-row.me::before { content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%); width: 22px; height: 48px;
  background: linear-gradient(180deg, var(--pink-btn), #a3008c); clip-path: polygon(0 0, 45% 0, 100% 50%, 45% 100%, 0 100%); }
.comm-row.me .pos { min-width: 0; height: auto; background: none; border-radius: 0; color: var(--pink-ink); font-family: 'Montserrat', var(--font); font-size: 2rem; font-weight: 800; line-height: 1; }
.comm-row.me .comm-name strong { font-size: 1.15rem; }
.comm-row.me .comm-score { font-size: 1.3rem; font-weight: 800; color: var(--navy); }
.comm-list li#my-rank + li .comm-row { border-top-color: transparent; }
.you-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--navy); color: #fff; font-size: .72rem; font-weight: 700; vertical-align: middle; }
#my-rank { scroll-margin-top: 90px; }
@media (max-width: 560px) {
  .comm-list li#my-rank { margin: 8px -8px; }
  .comm-row.me { padding-left: 24px; grid-template-columns: 40px auto minmax(0, 1fr) auto; }
  .comm-row.me .pos { font-size: 1.6rem; }
}

/* ---------- Profile dropdown in the header ---------- */
.profile-menu { position: relative; flex: none; }
.profile-btn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 3px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--text-2); font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; white-space: nowrap; }
.profile-btn:hover, .profile-btn.active, .profile-menu.open .profile-btn { color: var(--text); background: var(--surface-3); }
.profile-btn .avatar-img { width: 28px; height: 28px; font-size: .7rem; }
.profile-btn .caret { font-size: .75rem; transition: transform .15s; }
.profile-menu.open .caret { transform: rotate(180deg); }
.profile-list { display: none; position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 6px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); z-index: 30; }
.profile-menu.open .profile-list { display: flex; flex-direction: column; }
.nav .profile-list a, .profile-logout { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 500; font-size: .95rem; text-align: left; }
.profile-list form { margin: 0; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.profile-logout { width: 100%; background: none; border: 0; font: inherit; cursor: pointer; color: var(--red); }
.profile-logout:hover, .nav .profile-list a:hover { background: var(--surface-3); text-decoration: none; }
/* Phones: the menu is a list, so the profile items are simply shown in it. */
@media (max-width: 860px) {
  .profile-btn { display: none; }
  .profile-list { display: flex; flex-direction: column; position: static; box-shadow: none; border: 0; padding: 0; min-width: 0; border-top: 1px solid var(--line); border-radius: 0; margin-top: 6px; padding-top: 6px; }
}
.site-header.nav-compact .profile-btn { display: none; }
.site-header.nav-compact .profile-list { display: flex; flex-direction: column; position: static; box-shadow: none; border: 0; padding: 6px 0 0; min-width: 0; border-top: 1px solid var(--line); border-radius: 0; margin-top: 6px; }
