@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --vp: #6C5CE7; --vp-l: #EDE9FF; --vp-d: #3C3489;
  --cv: #3B82F6; --vt: #22C55E; --er: #EF4444;
  --bg1: #FFFFFF; --bg2: #F8F7FF; --bg3: #F1F0F9;
  --t1: #1A1A2E; --t2: #64748B; --t3: #94A3B8;
  --bd: #E2E0F0; --bd2: #F0EFF9;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg1: #1A1A2E; --bg2: #16213E; --bg3: #0F0F23;
    --t1: #F0EFFF; --t2: #94A3B8; --t3: #64748B;
    --bd: #2A2A4A; --bd2: #1E1E38;
  }
}

html, body { height: 100%; font-family: 'DM Sans', sans-serif; background: var(--bg3); color: var(--t1); -webkit-font-smoothing: antialiased; }

/* ── APP ── */
#app { min-height: 100vh; background: var(--bg3); }
@media (min-width: 768px) {
  body { background: #E8E6F8; }
  #app { max-width: 1200px; margin: 0 auto; box-shadow: 0 0 60px rgba(108,92,231,.12); }
}

/* ── SCREENS ── */
.screen { display: none; flex-direction: column; min-height: 100vh; }
.screen.active { display: flex; }

/* ── TOAST ── */
#toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: #1A1A2E; color: #fff; padding: 10px 18px; border-radius: 20px; font-size: 13px; font-weight: 500; opacity: 0; transition: opacity .3s; z-index: 999; white-space: nowrap; pointer-events: none; }
#toast.show { opacity: 1; }

/* ── BUTTONS ── */
.btn-p { width: 100%; padding: .875rem; background: var(--vp); color: #fff; border: none; border-radius: var(--r-md); font-size: 14px; font-weight: 500; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: background .15s, transform .1s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-p:hover { background: var(--vp-d); }
.btn-p:active { transform: scale(.98); }
.btn-p:disabled { background: var(--bg2); color: var(--t3); cursor: not-allowed; transform: none; }
.btn-p i { font-size: 16px; line-height: 1; flex-shrink: 0; }
.btn-danger { width: 100%; padding: .75rem; background: none; border: 0.5px solid #FECACA; border-radius: var(--r-md); color: var(--er); font-size: 13px; font-weight: 500; cursor: pointer; font-family: 'DM Sans', sans-serif; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s; }
.btn-danger i { font-size: 16px; line-height: 1; }
.btn-danger:hover { background: #FEF2F2; }
.btn-secondary { width: 100%; padding: .75rem; background: var(--bg2); color: var(--t1); border: 0.5px solid var(--bd); border-radius: var(--r-md); font-size: 13px; font-weight: 500; cursor: pointer; font-family: 'DM Sans', sans-serif; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s, border-color .15s, color .15s; }
.btn-secondary i { font-size: 16px; line-height: 1; }
.btn-secondary:hover { background: var(--vp-l); border-color: var(--vp); color: var(--vp); }

/* ── LOADING ── */
.loading-screen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 2rem; }
.spin { width: 44px; height: 44px; border: 2.5px solid var(--vp-l); border-top-color: var(--vp); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-txt { font-size: 14px; font-weight: 500; }
.loading-sub { font-size: 12px; color: var(--t2); text-align: center; }

/* ── LOGIN ── */
.login-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1.5rem; }
.login-logo { font-family: 'DM Serif Display', serif; font-size: 3rem; letter-spacing: -1.5px; margin-bottom: .25rem; text-align: center; }
.login-logo em { font-style: italic; color: var(--vp); }
.login-tag { font-size: 12px; color: var(--t2); font-weight: 300; letter-spacing: .06em; margin-bottom: 2.5rem; text-align: center; }
.login-card { background: var(--bg1); border: 0.5px solid var(--bd); border-radius: var(--r-lg); padding: 1.5rem; width: 100%; max-width: 400px; margin-bottom: 1rem; }
.login-title { font-size: 15px; font-weight: 500; margin-bottom: .3rem; }
.login-sub { font-size: 12px; color: var(--t2); margin-bottom: 1.25rem; line-height: 1.6; }
.field-label { font-size: 11px; font-weight: 500; color: var(--t2); letter-spacing: .03em; margin-bottom: .4rem; display: block; }
.field-input { width: 100%; border: 0.5px solid var(--bd); border-radius: var(--r-sm); padding: .75rem .9rem; font-size: 14px; font-family: 'DM Sans', sans-serif; color: var(--t1); background: var(--bg1); outline: none; margin-bottom: 1rem; transition: border-color .15s; }
.field-input:focus { border-color: var(--vp); }
.field-input::placeholder { color: var(--t3); }
.login-err { font-size: 12px; color: var(--er); background: #FEE2E2; border-radius: 8px; padding: .6rem .85rem; margin-bottom: .9rem; display: none; gap: 6px; align-items: flex-start; line-height: 1.5; }
.login-info { display: flex; gap: 7px; align-items: flex-start; font-size: 11px; color: var(--t2); line-height: 1.6; background: var(--bg2); border-radius: 10px; padding: .75rem .9rem; max-width: 400px; width: 100%; }

/* ── ONBOARDING ── */
.ob-head { padding: 2rem 1.5rem 1rem; text-align: center; }
.ob-logo { font-family: 'DM Serif Display', serif; font-size: 2.1rem; letter-spacing: -1px; }
.ob-logo em { font-style: italic; color: var(--vp); }
.ob-tagline { font-size: 12px; color: var(--t2); font-weight: 300; letter-spacing: .05em; margin-top: 2px; }
.ob-body { padding: 0 1.4rem; flex: 1; }
.ob-q { font-size: 16px; font-weight: 500; margin-bottom: .3rem; line-height: 1.4; }
.ob-hint { font-size: 12px; color: var(--t2); margin-bottom: 1.1rem; }
.ob-opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 1.1rem; }
.ob-opt { background: var(--bg1); border: 0.5px solid var(--bd); border-radius: var(--r-md); padding: .85rem 1rem; cursor: pointer; display: flex; align-items: center; gap: 10px; font-size: 14px; transition: border-color .15s, background .15s; }
.ob-opt.sel { border-color: var(--vp); background: var(--vp-l); color: var(--vp); }
.ob-opt .ico { width: 32px; height: 32px; border-radius: 8px; background: var(--bg2); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.ob-opt.sel .ico { background: #CECBF6; }
.ob-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 1.1rem; }
.ob-pill { background: var(--bg1); border: 0.5px solid var(--bd); border-radius: var(--r-md); padding: .75rem 1rem; cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.ob-pill .pv { font-size: 18px; font-weight: 500; display: block; }
.ob-pill .pl { font-size: 11px; color: var(--t2); }
.ob-pill.sel { border-color: var(--vp); background: var(--vp-l); }
.ob-foot { padding: 1rem 1.4rem; }
.dots { display: flex; gap: 5px; justify-content: center; margin-bottom: 1rem; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--bd); transition: width .2s, background .2s; }
.dot.on { width: 15px; border-radius: 3px; background: var(--vp); }

/* ── DESKTOP LAYOUT ── */
@media (min-width: 768px) {
  #login, #checking, #ob1, #ob2, #ob3 { align-items: center; }
  .desk-shell { display: flex; flex-direction: column; flex: 1; }
  .desk-topbar { height: 54px; background: var(--bg1); border-bottom: 0.5px solid var(--bd); display: flex; align-items: center; padding: 0 1.5rem; gap: 1.5rem; flex-shrink: 0; }
  .desk-logo { font-family: 'DM Serif Display', serif; font-size: 1.45rem; letter-spacing: -.5px; color: var(--t1); }
  .desk-logo em { font-style: italic; color: var(--vp); }
  .desk-nav { display: flex; gap: 4px; flex: 1; }
  .desk-nav-item { font-size: 13px; font-weight: 500; padding: 6px 14px; border-radius: 8px; cursor: pointer; color: var(--t2); border: none; background: none; font-family: 'DM Sans', sans-serif; transition: background .15s, color .15s; display: flex; align-items: center; gap: 6px; }
  .desk-nav-item i { font-size: 16px; line-height: 1; }
  .desk-nav-item:hover { background: var(--bg2); }
  .desk-nav-item.on { background: var(--vp-l); color: var(--vp); }
  .desk-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
  .desk-streak { display: flex; align-items: center; gap: 5px; background: #FAEEDA; color: #633806; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 20px; }
  .desk-streak i { font-size: 14px; }
  .desk-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--vp-l); display: flex; align-items: center; justify-content: center; font-family: 'DM Serif Display', serif; font-size: 14px; color: var(--vp); cursor: pointer; border: 0.5px solid var(--bd); }
  .desk-main { display: flex; flex: 1; overflow: hidden; }
  .desk-sidebar { width: 220px; flex-shrink: 0; background: var(--bg1); border-right: 0.5px solid var(--bd); display: flex; flex-direction: column; padding: 1rem 0; overflow-y: auto; }
  .desk-sec { font-size: 10px; font-weight: 600; letter-spacing: .06em; color: var(--t3); padding: 0 1rem; margin-bottom: .4rem; margin-top: .85rem; }
  .desk-sec:first-child { margin-top: 0; }
  .desk-s-item { display: flex; align-items: center; gap: 8px; padding: 7px 1rem; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--t2); border: none; background: none; font-family: 'DM Sans', sans-serif; width: 100%; text-align: left; transition: background .12s, color .12s; }
  .desk-s-item:hover { background: var(--bg2); }
  .desk-s-item.on { background: var(--vp-l); color: var(--vp); border-right: 2px solid var(--vp); }
  .desk-s-item i { font-size: 16px; flex-shrink: 0; }
  .desk-s-badge { margin-left: auto; font-size: 10px; font-weight: 500; background: var(--vp); color: #fff; padding: 1px 7px; border-radius: 20px; }
  .desk-s-prog { padding: 0 1rem; margin-top: .4rem; }
  .desk-s-prog-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--t2); margin-bottom: 3px; }
  .desk-s-prog-bar { height: 4px; background: var(--bg2); border-radius: 2px; overflow: hidden; }
  .desk-s-prog-fill { height: 100%; background: var(--vp); border-radius: 2px; transition: width .6s; }
  .desk-content { flex: 1; overflow-y: auto; padding: 1.5rem; }
  .desk-home-grid { display: grid; grid-template-columns: 1fr 320px; gap: 1.25rem; align-items: start; }
  .desk-trail-card { background: var(--bg1); border: 0.5px solid var(--bd); border-radius: var(--r-xl); overflow: hidden; }
  .desk-trail-head { padding: .85rem 1.1rem; border-bottom: 0.5px solid var(--bd); display: flex; align-items: center; justify-content: space-between; }
  .desk-trail-head-title { font-size: 13px; font-weight: 500; }
  .desk-trail-head-pct { font-size: 12px; color: var(--vp); font-weight: 500; }
  .desk-trail-prog { height: 3px; background: var(--bg2); }
  .desk-trail-prog-fill { height: 100%; background: var(--vp); transition: width .6s; }
  .desk-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 1.25rem; }
  .desk-trilha-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .desk-prof-grid { display: grid; grid-template-columns: 280px 1fr; gap: 1.25rem; align-items: start; }
  .mob-header { display: none; }
  .mob-only-trail { display: none; }
  .bnav { display: none !important; }
}

/* ── MOBILE ── */
@media (max-width: 767px) {
  .desk-shell { display: flex; flex-direction: column; flex: 1; }
  .desk-topbar { display: none !important; }
  .desk-sidebar { display: none !important; }
  .desk-main { display: flex; flex: 1; }
  .desk-content { flex: 1; overflow-y: auto; padding: 0; }
  .desk-home-grid { display: block; }
  .desk-prof-grid { display: block; }
  .desk-trilha-grid { display: block; }
  .desk-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 1rem; padding: 1rem 1.1rem 0; }
  .desk-trail-card { display: none !important; }
  .mob-header { display: block; }
  .mob-only-trail { display: block; padding: 0 1.1rem 1rem; }
  #view-home .sec-title { padding: 0 1.1rem; }
  #view-home .trail { padding: 0 1.1rem; }
  #view-trilha .sec-title { padding: 1rem 1.1rem 0; }
  #view-trilha .atelie-section { padding: 0 1.1rem; margin-bottom: 1.25rem; }
  #view-perfil .desk-prof-grid { padding: 1rem 1.1rem; }
}

/* ── MOBILE HEADER ── */
.h-head { padding: 1.4rem 1.4rem .85rem; background: var(--bg1); border-bottom: 0.5px solid var(--bd); }
.h-greet { font-size: 12px; color: var(--t2); }
.h-title { font-family: 'DM Serif Display', serif; font-size: 1.3rem; }
.streak { display: inline-flex; align-items: center; gap: 5px; background: #FAEEDA; color: #633806; font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 20px; margin-top: 7px; }
.streak i { font-size: 13px; }
.h-body { flex: 1; overflow-y: auto; padding: 1rem 1.1rem; }

/* ── EXERCISE CARD ── */
.ex-card { background: var(--bg1); border: 0.5px solid var(--bd); border-radius: var(--r-lg); margin-bottom: 1rem; overflow: hidden; }
.ex-top { padding: .9rem 1rem .75rem; }
.ex-badge { font-size: 10px; font-weight: 600; letter-spacing: .06em; color: var(--vp); background: var(--vp-l); padding: 2px 9px; border-radius: 20px; display: inline-block; margin-bottom: .55rem; }
.ex-name { font-size: 15px; font-weight: 500; margin-bottom: .35rem; line-height: 1.3; }
.ex-desc { font-size: 12px; color: var(--t2); line-height: 1.65; margin-bottom: .65rem; }
.ex-meta { display: flex; gap: .8rem; flex-wrap: wrap; }
.meta { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--t2); }
.meta i { font-size: 13px; line-height: 1; }

/* ── ILLUSTRATION ── */
.illus-block { border-top: 0.5px solid var(--bd); }
.illus-header { display: flex; align-items: center; justify-content: space-between; padding: .5rem .9rem; background: var(--bg2); border-bottom: 0.5px solid var(--bd); }
.illus-label { font-size: 10px; font-weight: 600; letter-spacing: .05em; color: var(--t2); display: flex; align-items: center; gap: 5px; }
.illus-label i { font-size: 13px; color: var(--vp); }
.step-pills { display: flex; gap: 4px; overflow-x: auto; }
.step-pills::-webkit-scrollbar { display: none; }
.sp { border: none; background: var(--bg1); border-radius: 20px; font-size: 10px; font-weight: 500; padding: 3px 8px; cursor: pointer; color: var(--t2); font-family: 'DM Sans', sans-serif; white-space: nowrap; transition: background .15s, color .15s; }
.sp.on { background: var(--vp); color: #fff; }
.illus-svg { width: 100%; display: block; background: #FAFAF8; }
.illus-legend { display: flex; gap: .5rem; flex-wrap: wrap; padding: .4rem .9rem; border-top: 0.5px solid var(--bd); }
.leg { display: flex; align-items: center; gap: 3px; font-size: 9.5px; color: var(--t2); }
.leg-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.illus-note { padding: .5rem .9rem; font-size: 11px; color: var(--t2); line-height: 1.55; border-top: 0.5px solid var(--bd); display: flex; gap: 6px; align-items: flex-start; }
.illus-note i { font-size: 13px; color: var(--vp); flex-shrink: 0; margin-top: 1px; }
.ex-bottom { padding: .75rem 1rem; display: flex; flex-direction: column; gap: .6rem; }

/* ── TRAIL ── */
.sec-title { font-size: 11px; font-weight: 600; color: var(--t2); letter-spacing: .04em; margin-bottom: .6rem; }
.trail { display: flex; flex-direction: column; gap: 6px; margin-bottom: 1rem; }
.ti { background: var(--bg1); border: 0.5px solid var(--bd); border-radius: var(--r-md); padding: .7rem .85rem; display: flex; align-items: center; gap: 9px; min-width: 0; overflow: hidden; transition: background .12s; }
.ti.locked { opacity: .4; cursor: default; }
.ti.done { border-color: #9FE1CB; background: #E1F5EE; cursor: pointer; }
.ti.done:hover { background: #d4f0e4; }
.ti.cur { border-color: #CECBF6; background: var(--vp-l); }
.tnum { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 500; background: var(--bg2); color: var(--t2); flex-shrink: 0; }
.ti.done .tnum { background: #1D9E75; color: #fff; }
.ti.cur .tnum { background: var(--vp); color: #fff; }
.tinfo { flex: 1; min-width: 0; overflow: hidden; }
.tname { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; font-family: system-ui, sans-serif; }
.ti.locked .tname { color: var(--t3); }
.tsub { font-size: 11px; color: var(--t2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; font-family: system-ui, sans-serif; }

/* ── UPLOAD ── */
.up-head { padding: 1.1rem 1.2rem .8rem; background: var(--bg1); border-bottom: 0.5px solid var(--bd); display: flex; align-items: center; gap: 9px; }
.back { width: 30px; height: 30px; border: 0.5px solid var(--bd); border-radius: 8px; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--t1); }
.back i { font-size: 16px; line-height: 1; }
.up-title { font-size: 15px; font-weight: 500; }
.up-body { flex: 1; padding: 1.2rem; max-width: 520px; }
.drop-zone { border: 1.5px dashed var(--bd); border-radius: var(--r-lg); padding: 2.2rem 1rem; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; margin-bottom: 1rem; }
.drop-zone:hover { border-color: var(--vp); background: #EEEDFE18; }
.drop-zone.has-img { padding: 0; border-style: solid; overflow: hidden; }
.drop-zone img { width: 100%; height: 200px; object-fit: cover; display: block; border-radius: 14px; }
.dz-icon i { font-size: 28px; color: var(--t3); margin-bottom: .55rem; display: block; }
.dz-txt { font-size: 13px; color: var(--t2); margin-bottom: .2rem; }
.dz-sub { font-size: 11px; color: var(--t3); }
.up-note { background: var(--bg2); border-radius: 10px; padding: .7rem .85rem; font-size: 11px; color: var(--t2); line-height: 1.6; margin-bottom: 1rem; display: flex; gap: 6px; align-items: flex-start; }
.up-note i { font-size: 13px; color: var(--vp); flex-shrink: 0; margin-top: 1px; }
input[type=file] { display: none; }

/* ── RESULT ── */
.res-body { flex: 1; padding: 1.2rem; display: flex; flex-direction: column; align-items: center; max-width: 520px; margin: 0 auto; width: 100%; }
.res-ico { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 1.2rem auto .9rem; }
.res-ico.ok { background: #E1F5EE; color: #1D9E75; }
.res-ico i { font-size: 28px; }
.res-title { font-family: 'DM Serif Display', serif; font-size: 1.4rem; text-align: center; margin-bottom: .35rem; }
.res-fb { background: var(--bg1); border: 0.5px solid var(--bd); border-radius: var(--r-md); padding: .9rem 1rem; font-size: 12.5px; color: var(--t2); line-height: 1.7; margin: .85rem 0 1.1rem; width: 100%; }
.res-fb strong { color: var(--t1); font-weight: 500; }
.res-next { font-size: 12px; color: var(--t2); text-align: center; margin-bottom: .85rem; }
.res-next strong { color: var(--t1); }

/* ── STATS ── */
.stat-card { background: var(--bg1); border: 0.5px solid var(--bd); border-radius: var(--r-md); padding: .75rem .7rem; text-align: center; }
.stat-val { font-size: 22px; font-weight: 500; display: block; }
.stat-lbl { font-size: 10px; color: var(--t2); margin-top: 2px; }

/* ── PROFILE ── */
.prof-head { padding: 1.4rem 1.4rem .9rem; background: var(--bg1); border-bottom: 0.5px solid var(--bd); }
.prof-head-title { font-family: 'DM Serif Display', serif; font-size: 1.3rem; }
.prof-body { flex: 1; overflow-y: auto; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .85rem; }
.avatar-row { display: flex; align-items: center; gap: 1rem; background: var(--bg1); border: 0.5px solid var(--bd); border-radius: var(--r-lg); padding: 1rem 1.1rem; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--vp-l); display: flex; align-items: center; justify-content: center; font-family: 'DM Serif Display', serif; font-size: 1.4rem; color: var(--vp); flex-shrink: 0; }
.avatar-name { font-size: 15px; font-weight: 500; }
.avatar-email { font-size: 12px; color: var(--t2); margin-top: 1px; }
.avatar-plan { display: inline-flex; align-items: center; gap: 4px; background: #FAEEDA; color: #633806; font-size: 10px; font-weight: 500; padding: 2px 8px; border-radius: 20px; margin-top: 5px; }
.avatar-plan i { font-size: 11px; }
.prog-card { background: var(--bg1); border: 0.5px solid var(--bd); border-radius: var(--r-lg); padding: 1rem 1.1rem; }
.prog-title { font-size: 11px; font-weight: 600; color: var(--t2); letter-spacing: .03em; margin-bottom: .75rem; }
.prog-item { margin-bottom: .7rem; }
.prog-item:last-child { margin-bottom: 0; }
.prog-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: .35rem; }
.prog-name { font-size: 13px; font-weight: 500; cursor: pointer; transition: color .15s; }
.prog-name:hover { color: var(--vp); }
.prog-name.active-mod { color: var(--vp); }
.prog-pct { font-size: 12px; color: var(--t2); }
.prog-bar { height: 5px; background: var(--bg2); border-radius: 3px; overflow: hidden; }
.prog-fill { height: 100%; border-radius: 3px; background: var(--vp); transition: width .6s ease; }
.plan-card { background: var(--bg1); border: 0.5px solid var(--bd); border-radius: var(--r-lg); overflow: hidden; }
.plan-top { padding: .9rem 1.1rem; border-bottom: 0.5px solid var(--bd); }
.plan-row { display: flex; justify-content: space-between; align-items: center; }
.plan-name-txt { font-size: 14px; font-weight: 500; }
.plan-badge { font-size: 10px; font-weight: 600; background: var(--vp-l); color: var(--vp); padding: 3px 9px; border-radius: 20px; }
.plan-detail { font-size: 11px; color: var(--t2); margin-top: 4px; }
.plan-item { display: flex; align-items: center; gap: .75rem; padding: .55rem 1.1rem; cursor: pointer; transition: background .12s; border-top: 0.5px solid var(--bd); }
.plan-item:first-child { border-top: none; }
.plan-item:hover { background: var(--bg2); }
.plan-item-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--bg2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.plan-item-icon i { font-size: 15px; color: var(--vp); }
.plan-item-label { font-size: 13px; flex: 1; }
.plan-item-sub { font-size: 11px; color: var(--t2); }
.plan-item-chevron { color: var(--t3); font-size: 13px; }

/* ── MODULE SWITCHER ── */
.mod-switch-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 1rem; }
.mod-switch-btn { background: var(--bg1); border: 0.5px solid var(--bd); border-radius: var(--r-md); padding: .7rem .5rem; cursor: pointer; text-align: center; transition: border-color .15s, background .15s; font-family: 'DM Sans', sans-serif; }
.mod-switch-btn:hover { border-color: var(--vp); background: var(--vp-l); }
.mod-switch-btn.active { border-color: var(--vp); background: var(--vp-l); }
.mod-switch-icon { font-size: 1.4rem; display: block; margin-bottom: .25rem; }
.mod-switch-name { font-size: 11px; font-weight: 500; color: var(--t1); }
.mod-switch-btn.active .mod-switch-name { color: var(--vp); }
.mod-switch-prog { font-size: 10px; color: var(--t2); margin-top: 2px; }

/* ── ATELIÊ ── */
.atelie-section { margin-bottom: 1.5rem; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
.badge-card { background: var(--bg1); border: 0.5px solid var(--bd); border-radius: var(--r-md); padding: .85rem .7rem; text-align: center; transition: border-color .15s; }
.badge-card.locked { opacity: .35; filter: grayscale(1); }
.badge-card.earned { border-color: var(--vp); background: var(--vp-l); }
.badge-icon { font-size: 1.8rem; display: block; margin-bottom: .4rem; }
.badge-name { font-size: 10px; font-weight: 600; color: var(--t1); line-height: 1.3; }
.badge-card.earned .badge-name { color: var(--vp); }
.badge-desc { font-size: 9px; color: var(--t2); margin-top: 2px; line-height: 1.4; }
.challenge-card { background: var(--bg1); border: 0.5px solid var(--bd); border-radius: var(--r-lg); overflow: hidden; }
.challenge-top { background: linear-gradient(135deg, #6C5CE7, #a29bfe); padding: 1.1rem 1.25rem; color: #fff; }
.challenge-tag { font-size: 10px; font-weight: 600; letter-spacing: .06em; opacity: .85; margin-bottom: .35rem; display: flex; align-items: center; gap: 5px; }
.challenge-tag i { font-size: 13px; }
.challenge-name { font-size: 16px; font-weight: 500; margin-bottom: .3rem; line-height: 1.3; }
.challenge-desc { font-size: 12px; opacity: .88; line-height: 1.6; }
.challenge-bottom { padding: .85rem 1.25rem; display: flex; align-items: center; justify-content: space-between; }
.challenge-meta { font-size: 12px; color: var(--t2); display: flex; align-items: center; gap: 6px; }
.challenge-meta i { font-size: 14px; }
.challenge-xp { font-size: 12px; font-weight: 600; color: var(--vp); background: var(--vp-l); padding: 3px 10px; border-radius: 20px; }

/* ── MODAL ── */
.ex-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.ex-modal { background: var(--bg1); border-radius: var(--r-xl); border: 0.5px solid var(--bd); width: 100%; max-width: 580px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; }
.ex-modal-head { padding: 1rem 1.25rem; border-bottom: 0.5px solid var(--bd); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.ex-modal-title { font-size: 15px; font-weight: 500; }
.ex-modal-close { width: 30px; height: 30px; border-radius: 8px; border: 0.5px solid var(--bd); background: none; cursor: pointer; display: grid; place-items: center; color: var(--t2); padding: 0; }
.ex-modal-close i { font-size: 15px; display: block; line-height: 1; }
.ex-modal-body { padding: 1.25rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; }
.ex-modal-label { font-size: 11px; font-weight: 600; letter-spacing: .05em; color: var(--t2); margin-bottom: .5rem; }
.ex-modal-note { font-size: 11.5px; color: var(--t2); line-height: 1.6; background: var(--bg2); border-radius: 10px; padding: .75rem .9rem; display: flex; gap: 7px; align-items: flex-start; }
.ex-modal-note i { font-size: 14px; color: var(--vp); flex-shrink: 0; margin-top: 1px; }
.ex-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ex-img-card { background: var(--bg2); border-radius: var(--r-md); overflow: hidden; border: 0.5px solid var(--bd); }
.ex-img-card svg { width: 100%; display: block; }
.ex-img-caption { font-size: 10px; color: var(--t2); text-align: center; padding: .4rem .5rem; border-top: 0.5px solid var(--bd); }

/* ── BOTTOM NAV (mobile only) ── */
.bnav { display: flex; border-top: 0.5px solid var(--bd); background: var(--bg1); padding-bottom: env(safe-area-inset-bottom); }
.nit { flex: 1; padding: .75rem .5rem; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--t3); font-size: 9px; font-weight: 500; border: none; background: none; font-family: 'DM Sans', sans-serif; transition: color .15s; }
.nit.on { color: var(--vp); }
.nit i { font-size: 18px; line-height: 1; }
