/* RaghasAstro Learn — brand palette mirrors the mobile app (theme/colors.ts) */
:root {
  --maroon: #540b16;
  --maroon-2: #8b1a2a;
  --maroon-3: #3a0710;
  --blush: #fcd0d1;
  --cream: #fcecdd;
  --bg: #fbf3ee;
  --card: #ffffff;
  --gold: #d9a441;
  --gold-soft: #f6e3bb;
  --text: #2a1418;
  --text-2: #6b5458;
  --text-3: #9c8a8d;
  --border: #f0dcd6;
  --success: #1f8a4c;
  --success-bg: #e5f5ec;
  --danger: #b4232f;
  --danger-bg: #fbe7e8;
  --shadow-sm: 0 1px 2px rgba(84, 11, 22, .06), 0 2px 8px rgba(84, 11, 22, .05);
  --shadow-md: 0 8px 30px rgba(84, 11, 22, .10);
  --shadow-lg: 0 24px 60px rgba(58, 7, 16, .18);
  --radius: 18px;
  --display: "Marcellus", Georgia, serif;
  --sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button { font: inherit; cursor: pointer; }
input { font: inherit; }
a { color: inherit; }
svg.ic { width: 1em; height: 1em; fill: currentColor; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 0; border-radius: 12px; padding: .85rem 1.4rem;
  font-weight: 600; font-size: .95rem; letter-spacing: .01em; text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, opacity .2s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--maroon-2), var(--maroon));
  color: #fff; box-shadow: 0 6px 18px rgba(84, 11, 22, .28);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 26px rgba(84, 11, 22, .36); }
.btn-ghost { background: transparent; color: var(--maroon); padding: .6rem .9rem; }
.btn-ghost:hover { background: rgba(84, 11, 22, .06); }
.btn-outline { background: #fff; color: var(--maroon); border: 1.5px solid var(--border); }
.btn-outline:hover:not(:disabled) { border-color: var(--maroon); }
.btn-block { width: 100%; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Login ───────────────────────────────────────── */
.login { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.login-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(217,164,65,.20), transparent 60%),
    radial-gradient(800px 500px at 90% 90%, rgba(252,208,209,.12), transparent 60%),
    linear-gradient(160deg, var(--maroon-2) 0%, var(--maroon) 45%, var(--maroon-3) 100%);
  color: #fff; padding: 3.5rem; display: flex; flex-direction: column; justify-content: space-between;
}
.login-hero .brand { display: flex; align-items: center; gap: .8rem; position: relative; z-index: 1; }
.login-hero .brand img { width: 52px; height: 52px; border-radius: 14px; background: #fff; padding: 4px; }
.login-hero .brand span { font-family: var(--display); font-size: 1.4rem; letter-spacing: .02em; }
.login-hero h1 {
  font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 3.6vw, 3.4rem);
  line-height: 1.12; margin: 0 0 1rem; position: relative; z-index: 1;
}
.login-hero h1 em { font-style: normal; color: var(--gold); }
.login-hero p { color: rgba(255,255,255,.78); max-width: 30rem; line-height: 1.7; margin: 0; position: relative; z-index: 1; }
.hero-points { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .8rem; position: relative; z-index: 1; }
.hero-points li { display: flex; align-items: center; gap: .7rem; color: rgba(255,255,255,.88); font-size: .95rem; }
.hero-points svg { color: var(--gold); width: 18px; height: 18px; }
.zodiac {
  position: absolute; right: -180px; bottom: -180px; width: 560px; height: 560px;
  opacity: .14; animation: slowspin 140s linear infinite; pointer-events: none;
}
@keyframes slowspin { to { transform: rotate(360deg); } }
.stars i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff;
  opacity: .5; animation: twinkle 4s ease-in-out infinite;
}
@keyframes twinkle { 0%,100% { opacity: .15; } 50% { opacity: .8; } }
.login-foot { font-size: .8rem; color: rgba(255,255,255,.55); position: relative; z-index: 1; }

.login-panel { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; background: var(--bg); }
.login-card { width: 100%; max-width: 420px; }
.login-card .mobile-brand { display: none; }
.login-card h2 { font-family: var(--display); font-weight: 400; font-size: 2rem; margin: 0 0 .35rem; color: var(--maroon); }
.login-card .sub { color: var(--text-2); margin: 0 0 1.8rem; line-height: 1.6; font-size: .95rem; }

.seg {
  display: grid; grid-template-columns: 1fr 1fr; background: #f3e6e1; border-radius: 14px; padding: 4px; margin-bottom: 1.4rem;
}
.seg button {
  border: 0; background: transparent; padding: .65rem; border-radius: 10px; color: var(--text-2);
  font-weight: 500; display: flex; align-items: center; justify-content: center; gap: .45rem; transition: all .2s;
}
.seg button[aria-selected="true"] { background: #fff; color: var(--maroon); box-shadow: var(--shadow-sm); font-weight: 600; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-2); margin-bottom: .45rem; }
.input-wrap {
  display: flex; align-items: center; background: #fff; border: 1.5px solid var(--border); border-radius: 12px;
  transition: border-color .2s, box-shadow .2s; overflow: hidden;
}
.input-wrap:focus-within { border-color: var(--maroon); box-shadow: 0 0 0 4px rgba(84,11,22,.08); }
.input-wrap .prefix { padding: 0 .2rem 0 1rem; color: var(--text-2); font-weight: 500; }
.input-wrap input { flex: 1; border: 0; outline: 0; background: transparent; padding: .9rem 1rem; font-size: 1rem; color: var(--text); min-width: 0; }
.otp-input input { text-align: center; letter-spacing: .8em; font-size: 1.5rem; font-weight: 600; padding-left: 1.6em; }
.hint { font-size: .85rem; color: var(--text-2); margin: -.2rem 0 1.2rem; line-height: 1.55; }
.hint b { color: var(--text); }
.error {
  background: var(--danger-bg); color: var(--danger); border-radius: 10px; padding: .7rem .9rem;
  font-size: .87rem; margin-bottom: 1rem; line-height: 1.5;
}
.row-between { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; font-size: .88rem; }
.link-btn { border: 0; background: none; color: var(--maroon); font-weight: 600; padding: 0; }
.link-btn:disabled { color: var(--text-3); cursor: default; font-weight: 500; }
.legal { margin-top: 2rem; font-size: .78rem; color: var(--text-3); text-align: center; line-height: 1.6; }
.legal a { color: var(--text-2); }

/* ── App shell ───────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.4) blur(12px);
  background: rgba(251, 243, 238, .82); border-bottom: 1px solid var(--border);
}
.topbar-in { max-width: 1240px; margin: 0 auto; padding: .7rem 1.5rem; display: flex; align-items: center; gap: 1rem; }
.logo-link { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.logo-link img { width: 40px; height: 40px; }
.logo-link span { font-family: var(--display); font-size: 1.15rem; color: var(--maroon); }
.logo-link small { display: block; font-family: var(--sans); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); }
.spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: .6rem; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-soft), var(--blush)); color: var(--maroon); font-weight: 700; font-size: .9rem;
}
.user-chip .who { line-height: 1.2; }
.user-chip .who b { display: block; font-size: .88rem; }
.user-chip .who span { font-size: .75rem; color: var(--text-3); }

.page { max-width: 1240px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

/* ── My courses ──────────────────────────────────── */
.welcome {
  position: relative; overflow: hidden; border-radius: 24px; padding: 2.4rem 2.4rem;
  background:
    radial-gradient(600px 300px at 85% 0%, rgba(217,164,65,.25), transparent 60%),
    linear-gradient(135deg, var(--maroon-2), var(--maroon) 55%, var(--maroon-3));
  color: #fff; box-shadow: var(--shadow-lg); margin-bottom: 2.4rem;
}
.welcome .eyebrow { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.welcome h1 { font-family: var(--display); font-weight: 400; font-size: clamp(1.7rem, 3vw, 2.4rem); margin: .4rem 0 .5rem; }
.welcome p { margin: 0; color: rgba(255,255,255,.75); max-width: 36rem; line-height: 1.6; }
.stats { display: flex; gap: 1rem; margin-top: 1.6rem; flex-wrap: wrap; position: relative; z-index: 1; }
.stat {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); border-radius: 14px;
  padding: .8rem 1.2rem; min-width: 130px; backdrop-filter: blur(6px);
}
.stat b { display: block; font-size: 1.5rem; font-weight: 600; }
.stat span { font-size: .78rem; color: rgba(255,255,255,.7); }
.welcome .zodiac { right: -140px; top: -160px; bottom: auto; width: 440px; height: 440px; opacity: .12; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.2rem; gap: 1rem; }
.section-head h2 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; margin: 0; color: var(--maroon); }
.section-head span { color: var(--text-3); font-size: .88rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.4rem; }
.course-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease; text-align: left; padding: 0; color: inherit;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.course-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--blush), var(--cream)); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.course-card:hover .thumb img { transform: scale(1.04); }
.thumb .fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--maroon); opacity: .35; }
.thumb .fallback svg { width: 64px; height: 64px; }
.thumb .play {
  position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%;
  background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--maroon);
  box-shadow: 0 8px 20px rgba(0,0,0,.25); opacity: 0; transform: scale(.85); transition: all .25s ease;
}
.thumb .play svg { width: 26px; height: 26px; margin-left: 3px; }
.course-card:hover .thumb .play { opacity: 1; transform: scale(1); }
.thumb.locked::after { content: ""; position: absolute; inset: 0; background: rgba(42, 20, 24, .45); }
.badge {
  position: absolute; top: .8rem; left: .8rem; z-index: 2; font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: .32rem .65rem; border-radius: 999px; display: inline-flex; align-items: center; gap: .3rem;
}
.badge.ok { background: var(--success-bg); color: var(--success); }
.badge.off { background: var(--danger-bg); color: var(--danger); }
.badge.off svg { width: 12px; height: 12px; }
.course-body { padding: 1.1rem 1.2rem 1.25rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.course-body h3 { margin: 0; font-size: 1.05rem; font-weight: 600; line-height: 1.4; }
.course-body p { margin: 0; color: var(--text-2); font-size: .87rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: .5rem .9rem; font-size: .8rem; color: var(--text-2); }
.meta span { display: inline-flex; align-items: center; gap: .3rem; }
.meta svg { width: 14px; height: 14px; color: var(--maroon-2); }
.progress { height: 6px; background: #f3e6e1; border-radius: 99px; overflow: hidden; margin-top: .3rem; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--maroon-2)); border-radius: 99px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: .8rem; border-top: 1px dashed var(--border); font-size: .8rem; color: var(--text-3); }
.card-foot b { color: var(--maroon); font-weight: 600; display: inline-flex; align-items: center; gap: .3rem; }
.card-foot b svg { width: 14px; height: 14px; }

.empty {
  text-align: center; padding: 4rem 1.5rem; background: #fff; border: 1px dashed var(--border); border-radius: 24px;
}
.empty .orb {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 1.2rem; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-soft), var(--blush)); color: var(--maroon);
}
.empty .orb svg { width: 38px; height: 38px; }
.empty h3 { font-family: var(--display); font-weight: 400; font-size: 1.5rem; margin: 0 0 .5rem; color: var(--maroon); }
.empty p { color: var(--text-2); max-width: 30rem; margin: 0 auto; line-height: 1.65; }

.skeleton { background: linear-gradient(90deg, #f3e6e1 25%, #faf1ed 50%, #f3e6e1 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-card { border-radius: var(--radius); background: #fff; border: 1px solid var(--border); overflow: hidden; }
.sk-card .skeleton.t { aspect-ratio: 16/9; border-radius: 0; }
.sk-card .b { padding: 1.1rem 1.2rem; display: grid; gap: .6rem; }
.sk-line { height: 12px; }

/* ── Player ──────────────────────────────────────── */
.crumbs { display: flex; align-items: center; gap: .4rem; margin-bottom: 1.2rem; }
.player-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.8rem; align-items: start; }
.player-layout.solo { grid-template-columns: minmax(0, 900px); justify-content: center; }
.stage { background: #120306; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 16 / 9; position: relative; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage .lockscreen {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem; color: #fff;
  background: radial-gradient(500px 300px at 50% 0%, rgba(217,164,65,.22), transparent 70%), linear-gradient(160deg, var(--maroon), var(--maroon-3));
}
.lockscreen .orb { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); margin-bottom: 1rem; }
.lockscreen .orb svg { width: 32px; height: 32px; color: var(--gold); }
.lockscreen h3 { font-family: var(--display); font-weight: 400; font-size: 1.5rem; margin: 0 0 .5rem; }
.lockscreen p { margin: 0 0 1.2rem; color: rgba(255,255,255,.75); max-width: 28rem; line-height: 1.6; font-size: .92rem; }
.lockscreen .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.stage:has(.app-only) { aspect-ratio: auto; }
.stage .lockscreen.app-only { position: relative; inset: auto; min-height: 320px; }
.store-btns { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }

/* Viewer watermark: drifts over the video, never blocks clicks. */
.stage .wm {
  position: absolute; z-index: 2; pointer-events: none; user-select: none;
  color: rgba(255,255,255,.38); font-weight: 600; font-size: clamp(.8rem, 1.6vw, 1.05rem);
  letter-spacing: .06em; text-shadow: 0 1px 2px rgba(0,0,0,.55); white-space: nowrap;
  transition: left 1.2s ease, top 1.2s ease;
}
.stage:fullscreen { border-radius: 0; aspect-ratio: auto; width: 100%; height: 100%; }
.stage:-webkit-full-screen { border-radius: 0; aspect-ratio: auto; width: 100%; height: 100%; }

.now { margin-top: 1.4rem; }
.now .eyebrow { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--maroon-2); font-weight: 600; }
.now h1 { font-family: var(--display); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2rem); margin: .3rem 0 .6rem; line-height: 1.25; }
.now-bar { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; }
.nav-btns { display: flex; gap: .6rem; }
.nav-btns .btn { padding: .6rem 1rem; font-size: .85rem; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; margin-bottom: 1rem; }
.panel h4 { margin: 0 0 .6rem; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--maroon-2); }
.panel .prose { color: var(--text-2); line-height: 1.75; font-size: .93rem; white-space: pre-line; }
.panel.gold { background: linear-gradient(135deg, #fffaf0, #fff); border-color: var(--gold-soft); }

.lessons { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; position: sticky; top: 84px; max-height: calc(100vh - 110px); display: flex; flex-direction: column; }
.lessons-head { padding: 1.1rem 1.2rem; border-bottom: 1px solid var(--border); }
.lessons-head h3 { margin: 0 0 .2rem; font-size: 1rem; }
.lessons-head span { font-size: .8rem; color: var(--text-3); }
.lessons-head .progress { margin-top: .7rem; }
.lessons ol { list-style: none; margin: 0; padding: .4rem; overflow-y: auto; }
.lesson {
  width: 100%; display: flex; gap: .8rem; align-items: flex-start; text-align: left; border: 0; background: transparent;
  padding: .75rem .8rem; border-radius: 12px; color: var(--text); transition: background .15s;
}
.lesson:hover:not(:disabled) { background: #fbf3ee; }
.lesson:disabled { cursor: default; }
.lesson.active { background: linear-gradient(135deg, rgba(84,11,22,.08), rgba(217,164,65,.10)); }
.lesson .num {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: .78rem; font-weight: 600;
  background: #f3e6e1; color: var(--text-2);
}
.lesson.active .num { background: var(--maroon); color: #fff; }
.lesson.done .num { background: var(--success-bg); color: var(--success); }
.lesson .num svg { width: 15px; height: 15px; }
.lesson .lt { font-size: .88rem; font-weight: 500; line-height: 1.4; }
.lesson .ld { font-size: .75rem; color: var(--text-3); margin-top: .15rem; display: flex; gap: .3rem; align-items: center; }
.lesson .ld svg { width: 12px; height: 12px; }

#toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 140%); z-index: 50;
  background: var(--text); color: #fff; padding: .8rem 1.2rem; border-radius: 12px; font-size: .9rem;
  box-shadow: var(--shadow-lg); transition: transform .3s ease, opacity .3s ease, visibility .3s;
  max-width: calc(100% - 2rem); opacity: 0; visibility: hidden;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

.fade-in { animation: fadein .35s ease both; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 980px) {
  .player-layout { grid-template-columns: 1fr; }
  .lessons { position: static; max-height: none; }
}
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-card .mobile-brand { display: flex; align-items: center; gap: .6rem; margin-bottom: 2rem; }
  .login-card .mobile-brand img { width: 56px; height: 56px; }
}
@media (max-width: 600px) {
  .topbar-in { padding: .6rem 1rem; }
  .page { padding: 1.2rem 1rem 3rem; }
  .user-chip .who { display: none; }
  .welcome { padding: 1.7rem 1.4rem; border-radius: 20px; }
  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
  .stat { min-width: 0; padding: .7rem .8rem; }
  .stat b { font-size: 1.25rem; }
  .stat span { font-size: .7rem; }
  .now-bar .nav-btns { width: 100%; }
  .now-bar .nav-btns .btn { flex: 1; }
  .stage { border-radius: 14px; margin: 0 -1rem; border-radius: 0; }
  .logo-link small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Subscription ────────────────────────────────── */
.sub-section { margin-top: 3rem; }
.sub-layout { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.sub-card {
  background: linear-gradient(160deg, #fff, #fffaf3); border: 1px solid var(--gold-soft); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm);
}
.sub-card .eyebrow { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--maroon-2); font-weight: 600; }
.sub-card h3 { font-family: var(--display); font-weight: 400; font-size: 1.45rem; margin: .3rem 0 .2rem; color: var(--maroon); }
.sub-card.none { background: #fff; border-color: var(--border); }
.sub-card.none p { color: var(--text-2); line-height: 1.65; font-size: .9rem; margin: .4rem 0 0; }
.sub-top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.sub-course { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--text-2); margin-top: .25rem; }
.sub-course svg { width: 13px; height: 13px; color: var(--maroon-2); }
.sub-days { margin: 1.1rem 0 .5rem; color: var(--text-2); font-size: .9rem; }
.sub-days b { font-size: 1.8rem; color: var(--text); font-weight: 600; margin-right: .2rem; }
.sub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; margin: 1.2rem 0 0; }
.sub-grid dt { font-size: .72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }
.sub-grid dd { margin: .15rem 0 0; font-weight: 600; font-size: .9rem; }
.sub-note { margin: 1.1rem 0 0; padding: .7rem .9rem; border-radius: 10px; background: #fff4e0; color: #8a5a00; font-size: .84rem; line-height: 1.5; }
.pill { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .3rem .65rem; border-radius: 999px; white-space: nowrap; display: inline-block; }
.pill.ok { background: var(--success-bg); color: var(--success); }
.pill.off { background: var(--danger-bg); color: var(--danger); }
.pill.warn { background: #fff1dc; color: #9a6200; }
.sub-history { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.3rem; box-shadow: var(--shadow-sm); }
.sub-history h4 { margin: 0 0 .8rem; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--maroon-2); }
.history { width: 100%; border-collapse: collapse; font-size: .87rem; }
.history th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 600; padding: 0 .6rem .6rem; border-bottom: 1px solid var(--border); }
.history td { padding: .8rem .6rem; border-bottom: 1px dashed var(--border); vertical-align: top; }
.history tr:last-child td { border-bottom: 0; }
.muted { color: var(--text-3); font-size: .9rem; margin: 0; }
@media (max-width: 900px) {
  .sub-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .history thead { display: none; }
  .history, .history tbody, .history tr, .history td { display: block; width: 100%; }
  .history tr { padding: .8rem 0; border-bottom: 1px dashed var(--border); }
  .history tr:last-child { border-bottom: 0; }
  .history td { border: 0; padding: .2rem 0; display: flex; justify-content: space-between; gap: 1rem; }
  .history td::before { content: attr(data-label); color: var(--text-3); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
}
@media (max-width: 600px) {
  .history td[data-label="Plan"] { display: block; }
  .history td[data-label="Plan"]::before { display: block; margin-bottom: .2rem; }
}
