:root {
  --accent: #1F5FAE;
  --tint: #1F5FAE1A;
  --ink: #17181C;
  --muted: #5B5F66;
  --line: #E4E4DF;
  --line2: #EEEEEA;
  --field: #CFCFC8;
  --bg: #F6F6F3;
  --card: #FFFFFF;
  --good: #2F6B3A;
  --warn: #A3401C;
  --ai: #5E3A9B;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 15px; line-height: 1.4; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); }
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: 18px 20px 12px; }
.top.dark { background: var(--ink); color: #fff; }
.top.dark .sub { color: #C9CBD1; }
.logo { width: 44px; height: 44px; border-radius: 14px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.logo.big { width: 80px; height: 80px; border-radius: 24px; font-size: 30px; }
.title { font-weight: 700; font-size: 16px; }
.sub { font-size: 13px; color: var(--muted); }
.grow { flex: 1; min-width: 0; }
main { flex: 1; padding: 8px 20px 100px; display: flex; flex-direction: column; gap: 14px; }
h1 { font-size: 22px; margin: 4px 0 0; }
h2 { font-size: 15px; margin: 6px 0 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.card.tint { background: var(--tint); border-color: transparent; }
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line2); min-height: 52px; }
.row:last-child { border-bottom: 0; }
.dim { opacity: .55; }
.btn { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--field); background: #fff; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.icon { width: 40px; padding: 0; min-height: 40px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { border-color: transparent; background: transparent; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { min-height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--field); background: #fff; font-size: 13px; font-weight: 500; cursor: pointer; }
.pill.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.search { display: flex; gap: 8px; }
input[type=text], input[type=email], input[type=url], input:not([type]), select { height: 46px; border-radius: 12px; border: 1px solid var(--field); padding: 0 14px; background: #FAFAF8; width: 100%; min-width: 0; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.code { font-size: 20px; font-weight: 700; letter-spacing: 2px; }
.tag { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--line2); border-radius: 6px; padding: 3px 7px; text-transform: uppercase; flex: none; }
.ai { color: var(--ai); background: #EFE9F8; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.stat b { display: block; font-size: 24px; }
.sw { width: 46px; height: 28px; border-radius: 14px; border: 0; background: #B9BBB3; position: relative; cursor: pointer; flex: none; padding: 0; }
.sw::after { content: ''; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 10px; background: #fff; transition: left .15s; }
.sw[aria-pressed=true] { background: var(--accent); }
.sw[aria-pressed=true]::after { left: 22px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.swatch { width: 44px; height: 44px; border-radius: 22px; border: 0; cursor: pointer; }
.swatch[aria-pressed=true] { outline: 2px solid var(--ink); outline-offset: 3px; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: center; padding: 4px 2px calc(10px + env(safe-area-inset-bottom)); z-index: 5; }
.tabs .in { display: flex; width: 100%; max-width: 560px; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; padding: 6px 0; min-height: 50px; font-size: 11px; font-weight: 500; color: var(--muted); cursor: pointer; text-decoration: none; }
.tab.on { color: var(--accent); font-weight: 600; }
.tab svg { width: 22px; height: 22px; }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }
/* 💬 the small message ("Saved"…) shows at the TOP of the screen (owner, 17 Nov 2026: the bottom is far away on a big screen) */
.toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 12px); bottom: auto; background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 14px; display: flex; gap: 12px; align-items: center; z-index: 1000; max-width: 92vw; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast { pointer-events: none; }
.toast button { pointer-events: auto; background: none; border: 0; color: #9EC1F2; font-weight: 700; cursor: pointer; min-height: 36px; }
.modal-bg { position: fixed; inset: 0; background: rgba(23,24,28,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 45; }
.modal { background: #fff; width: 100%; max-width: 560px; border-radius: 20px 20px 0 0; padding: 20px; display: flex; flex-direction: column; gap: 14px; max-height: 90vh; overflow: auto; }
@media (min-width: 600px) { .modal-bg { align-items: center; } .modal { border-radius: 20px; } }
.chapter { border-top: 1px solid var(--line2); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.player { position: fixed; inset: 0; background: #000; z-index: 40; display: flex; flex-direction: column; }
.player iframe { flex: 1; border: 0; width: 100%; }
.player .bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: #fff; }
.player .bar button { color: #fff; border-color: #555; background: transparent; }
.center { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px; }
.foot { text-align: center; font-size: 12px; color: var(--muted); padding: 16px; }
.err { color: var(--warn); font-size: 13px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: #fff; }
.btn, .pill { white-space: nowrap; }
.tools { display: flex; justify-content: flex-end; align-items: center; gap: 2px; flex-wrap: wrap; }
.tools .btn.icon { width: 38px; min-height: 38px; }
.item { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-bottom: 1px solid var(--line2); }
.item:last-of-type { border-bottom: 0; }
.item .t { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.row.wrap { flex-wrap: wrap; }
.row.wrap .grow { flex-basis: 160px; }

/* ---- step 2: viewer, lessons, editor ---- */
body.noscroll { overflow: hidden; }
.viewer { position: fixed; inset: 0; background: var(--bg); z-index: 40; display: flex; flex-direction: column; }
.vbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.vtitle { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vframe { flex: 1; width: 100%; border: 0; background: #000; min-height: 0; }
.vframe.video { flex: none; aspect-ratio: 16 / 9; max-height: 70vh; }
.vfoot { display: flex; align-items: center; gap: 10px; padding: 12px 14px; flex-wrap: wrap; }
.vhold { aspect-ratio: 16 / 9; background: #23262D; border-radius: 14px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.vhold .vframe.video { width: 100%; height: 100%; max-height: none; }
.lesson { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.lesson .track { flex: 1; min-height: 0; }
.lesson.swipe .track { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lesson.swipe .track::-webkit-scrollbar { display: none; }
.lesson.swipe .slide { flex: 0 0 100%; scroll-snap-align: start; overflow-y: auto; }
.lesson.scroll .track { overflow-y: auto; padding: 8px 0 40px; }
.lesson.scroll .slide { padding: 6px 16px; }
.lesson.scroll .slide .sin { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.sin { max-width: 680px; margin: 0 auto; padding: 24px 20px; display: flex; flex-direction: column; gap: 14px; }
.lesson.swipe .sin { min-height: 100%; justify-content: center; box-sizing: border-box; }
.slabel { font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .5px; }
.semoji { font-size: 56px; text-align: center; }
.stitle { font-size: 24px; margin: 0; text-align: center; }
.shook { font-size: 18px; text-align: center; color: var(--muted); margin: 0; }
.spoints { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 17px; line-height: 1.45; }
.sterms { margin: 0; display: grid; grid-template-columns: 1fr; gap: 4px; }
.sterms dt { font-weight: 700; margin-top: 8px; }
.sterms dd { margin: 0; color: #3A3D44; }
.slide.pic img { width: 100%; max-height: 52vh; object-fit: contain; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.scap { margin: 0; }
.tiny { font-size: 11px; }
.slide.fact .sstat { font-size: 44px; font-weight: 800; color: var(--accent); }
.slide.warn .slabel { color: var(--warn); }
.sq { font-size: 17px; font-weight: 600; margin: 0; line-height: 1.45; }
.qopts { display: flex; flex-direction: column; gap: 8px; }
.qopt { min-height: 48px; border-radius: 12px; border: 1px solid var(--field); background: #fff; text-align: left; padding: 10px 14px; font-size: 15px; cursor: pointer; }
.qopt.right { background: #EDF5EE; border-color: #9CC3A3; }
.qopt.wrong { background: #FBEFEA; border-color: #E3B4A3; }
.qopt:disabled { cursor: default; color: var(--ink); }
.swhy, .sans { background: #F2F6EF; border-radius: 10px; padding: 10px 12px; margin: 0; white-space: pre-line; }
.slide.end .sin { align-items: center; text-align: center; }
.snav { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 8px 0 calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
.snav .btn.icon { font-size: 24px; width: 48px; }
.scount { font-weight: 600; min-width: 64px; text-align: center; }
.modal.wide { max-width: 720px; }
.modal textarea { border-radius: 12px; border: 1px solid var(--field); padding: 10px 12px; background: #FAFAF8; width: 100%; font: inherit; resize: vertical; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 10px; }
.mbtns { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; bottom: -20px; background: #fff; padding: 10px 0; }
.bar { height: 6px; border-radius: 3px; background: var(--line2); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); }
.done-mark { color: var(--good); font-weight: 700; flex: none; }
.lp-out { display: flex; flex-direction: column; gap: 10px; }
.cont { display: flex; align-items: center; gap: 12px; }
.cont .semoji { font-size: 32px; }
.install { display: flex; gap: 10px; align-items: center; }
.update { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 60; max-width: calc(100vw - 20px); box-shadow: 0 6px 24px rgba(0,0,0,.3); background: var(--ink); color: #fff; border-radius: 12px; padding: 8px 12px; display: flex; gap: 10px; align-items: center; }
body.l1-bottomtabs .update { bottom: calc(var(--botnh, 64px) + 12px); }
.update button { background: #fff; color: var(--ink); border: 0; border-radius: 8px; min-height: 34px; padding: 0 12px; font-weight: 700; cursor: pointer; }

/* Google's page translator: hide its banner and pop-ups */
.goog-te-banner-frame, .skiptranslate > iframe, #goog-gt-tt, .goog-te-balloon-frame, .VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf { display: none !important; }
body { top: 0 !important; }
.snav[hidden] { display: none; }
input[type=number], input[type=date], input[type=datetime-local], input[type=search], input[type=tel], textarea { height: auto; min-height: 46px; border-radius: 12px; border: 1px solid var(--field); padding: 0 14px; background: #FAFAF8; width: 100%; font: inherit; box-sizing: border-box; }
textarea { padding: 10px 14px; }

/* ---- step 3: tests */
.stack { display: flex; flex-direction: column; gap: 12px; }
.row2.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 520px) { .row2.even { grid-template-columns: 1fr; } }
.tag.ok { background: #E3F0E5; color: #2F6B3A; }
.tag.no { background: #F8E3DB; color: #9A3B1B; }
.clip2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tstage { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 24px; }
.viewer.test .sin { justify-content: flex-start; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 18px; padding: 4px 10px; border-radius: 10px; background: var(--line2); }
.timer.low { background: #F8E3DB; color: #9A3B1B; }
.qopt { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); }
.qopt.on { background: var(--tint); border-color: var(--accent); border-width: 2px; }
.qopt.ro { flex-direction: column; gap: 4px; cursor: default; }
.qletter { font-weight: 700; min-width: 20px; }
.natin { font-size: 20px; min-height: 52px; border-radius: 12px; border: 1px solid var(--field); padding: 0 14px; max-width: 260px; }
.qfig { margin: 0; }
.qfig img { max-width: 100%; max-height: 50vh; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.qstm { margin: 0; padding-left: 4px; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.qstm .tag { margin-left: 8px; }
.qexp { display: flex; flex-direction: column; gap: 10px; }
.qsteps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.warnc { background: #FBEFEA; }
.okc { background: #EDF5EE; }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.qcell { min-height: 44px; border-radius: 10px; border: 1px solid var(--field); background: #fff; font-weight: 600; cursor: pointer; }
.qcell.done { background: var(--accent); border-color: var(--accent); color: #fff; }
.qcell.now { outline: 3px solid var(--ink); outline-offset: 1px; }
.bigscore { font-size: 44px; font-weight: 800; color: var(--accent); }
.row.me { background: var(--tint); font-weight: 600; }
.rq summary { cursor: pointer; display: flex; gap: 8px; align-items: center; min-height: 40px; }
.rq[open] summary .clip2 { display: none; }
.tablewrap { overflow-x: auto; }
.tbl { border-collapse: collapse; width: 100%; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.tbl th { font-size: 12px; color: var(--muted); }
.minibar { width: 64px; height: 6px; border-radius: 3px; background: var(--line2); overflow: hidden; flex: none; }
.minibar i { display: block; height: 100%; background: var(--accent); }

/* ---- step 3 part 2: feed, posts, notes */
.streakc .bigflame { font-size: 40px; }
.week { display: flex; gap: 6px; }
.wd { flex: 1; height: 10px; border-radius: 5px; background: var(--line2); }
.wd.on { background: #F08A24; }
.wd.today { outline: 2px solid var(--ink); outline-offset: 1px; }
.fest { flex-direction: row; align-items: center; gap: 14px; background: linear-gradient(135deg, #FFF4DC, #FBE7F0); border-color: transparent; }
.festemoji { font-size: 44px; }
.notice { border-left: 4px solid var(--accent); }
.pre { white-space: pre-line; }
.cardtext { font-size: 17px; line-height: 1.5; }
.cardword { font-size: 24px; font-weight: 800; color: var(--accent); }
.vthumb { position: relative; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; aspect-ratio: 16 / 9; width: 100%; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vthumb .play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 28px; display: flex; align-items: center; justify-content: center; }
.vthumb .vframe.video { width: 100%; height: 100%; max-height: none; }
.newsc { flex-direction: row; gap: 12px; align-items: flex-start; text-decoration: none; color: inherit; }
.newsc img { width: 84px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
.switchrow { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; }
.switchrow input { width: 22px; height: 22px; flex: none; margin-top: 2px; }

/* ---- Feed: full-screen swipe cards (Biotechnology Today style) */
body:has(.reels) { overflow: hidden; }
.reels { position: fixed; top: 0; left: 0; right: 0; bottom: 64px; z-index: 4; background: #0b0f0d; display: flex; justify-content: center; }
.rframe { position: relative; width: min(100%, 480px); height: 100%; overflow: hidden; }
.rdeck { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior-y: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rdeck::-webkit-scrollbar { display: none; }
.reels .slide { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; flex-direction: column; background: #fff; color: var(--ink); overflow: hidden; position: relative; }
.reels .sv { position: relative; flex: 0 0 36%; background: linear-gradient(140deg, var(--sc), color-mix(in srgb, var(--sc) 35%, #000)); overflow: hidden; }
.reels .sv.noimg { flex-basis: 30%; }
.reels .sv.thin { flex-basis: 16%; }
.reels .svbg { position: absolute; inset: 0; display: grid; place-items: center; font-size: 72px; padding-top: 24px; }
.reels .svbg span { filter: drop-shadow(0 10px 24px rgba(0,0,0,.35)); }
.reels .svbg i { position: absolute; font-style: normal; font-size: 30px; opacity: .2; }
.reels .sv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reels .sv:after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.45), transparent 35%, transparent 70%, rgba(0,0,0,.25)); pointer-events: none; }
.reels .kb { position: absolute; left: 14px; bottom: 12px; z-index: 1; background: rgba(255,255,255,.95); color: #17201b; font-weight: 700; font-size: 12.5px; border-radius: 999px; padding: 4px 11px; }
.reels .sc { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 20px; min-height: 0; overflow-y: auto; }
.reels .sc h2 { margin: 0; font-size: 24px; line-height: 1.35; letter-spacing: -.2px; }
.reels .sbig { font-size: 40px; font-weight: 800; color: var(--sc); line-height: 1.1; }
.reels .hook { margin: 0; color: var(--muted); font-size: 16.5px; line-height: 1.6; }
.reels .hook.strong { color: var(--ink); font-size: 18px; }
.reels .slide .qopt { border-color: color-mix(in srgb, var(--sc) 30%, #ddd); }
.reels .slide .qopt.right { background: #EDF5EE; border-color: #2b8a3e; }
.reels .slide .qopt.wrong { background: #FBEFEA; border-color: #c92a2a; }
.reels .ract { margin-top: auto; display: flex; gap: 9px; }
.reels .rmain { flex: 1; border: 0; background: var(--sc); color: #fff; font-weight: 700; font-size: 15px; border-radius: 14px; padding: 13px 12px; cursor: pointer; text-align: center; text-decoration: none; }
.rtop { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; pointer-events: none; }
.streak, .rcount { background: rgba(0,0,0,.45); color: #fff; border-radius: 999px; padding: 6px 11px; font-size: 13px; font-weight: 700; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.swipehint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.6); color: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; animation: bob 1.4s ease-in-out infinite; pointer-events: none; }
@keyframes bob { 50% { transform: translate(-50%, -6px); } }
.reels .otd p { margin: 0 0 10px; font-size: 15.5px; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .swipehint { animation: none; } }

/* Feed card colours by kind */
.k-festival { --sc: #d6336c; }
.k-notice { --sc: #1c64c4; }
.k-fact { --sc: #1f7a55; }
.k-quiz { --sc: #5f3dc4; }
.k-word { --sc: #d9480f; }
.k-video { --sc: #c92a2a; }
.k-quote { --sc: #0b7285; }
.k-otd { --sc: #8d5524; }
.k-news { --sc: #1864ab; }
.k-done { --sc: #2b8a3e; }
.reels .k-fact .sc h2, .reels .k-quote .sc h2 { font-size: 26px; line-height: 1.4; font-weight: 700; }

/* ---- Lessons: Biotechnology Today look (a chapter = one vertical swipe, a colour per lesson) */
.viewer.dark { background: #0b0f0d; }
.vbar.over { position: absolute; top: 0; left: 0; right: 0; z-index: 6; background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent); border: 0; color: #fff; padding: calc(10px + env(safe-area-inset-top)) 12px 18px; }
.vbar.over .sub { color: rgba(255,255,255,.8); }
.vbar.over .btn { background: rgba(0,0,0,.4); color: #fff; border-color: rgba(255,255,255,.3); }
.lframe { position: relative; flex: 1; min-height: 0; width: min(100%, 520px); margin: 0 auto; }
.ldeck { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior-y: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ldeck::-webkit-scrollbar { display: none; }
.lslide { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; position: relative; display: flex; align-items: center; justify-content: center; padding: 88px 22px 56px; box-sizing: border-box; text-align: center; overflow: hidden; color: #fff; background: linear-gradient(160deg, var(--c1), var(--c2)); }
.lbox { width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lbox::-webkit-scrollbar { display: none; }
.lbox > * { flex-shrink: 0; }   /* a long slide scrolls inside; quiz answers and boxes are never squashed (owner, 15 Nov 2026) */
.lslide .big { font-size: 76px; line-height: 1.05; margin: 4px 0 6px; filter: drop-shadow(0 10px 24px rgba(0,0,0,.35)); }
.lslide .kick { font-size: 12.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; opacity: .85; }
.lslide h1 { margin: 4px 0 0; font-size: 30px; line-height: 1.2; letter-spacing: -.4px; }
.lslide h2 { margin: 6px 0 4px; font-size: 22px; line-height: 1.35; }
.lslide .lead { margin: 8px 0 0; font-size: 18px; line-height: 1.55; opacity: .95; }
.lslide .stat { font-size: 58px; font-weight: 900; line-height: 1; letter-spacing: -1.5px; margin: 6px 0 8px; text-shadow: 0 8px 24px rgba(0,0,0,.25); }
.lslide .bul { list-style: none; padding: 0; margin: 10px 0 0; width: 100%; text-align: left; display: grid; gap: 9px; }
.lslide .bul li { background: rgba(255,255,255,.16); border-radius: 16px; padding: 12px 14px 12px 38px; position: relative; font-size: 16px; line-height: 1.5; }
.lslide .bul li:before { content: "✦"; position: absolute; left: 14px; top: 12px; font-weight: 800; }
.lslide .box { width: 100%; background: rgba(255,255,255,.16); border-radius: 16px; padding: 13px 15px; text-align: left; font-size: 16.5px; line-height: 1.55; margin-top: 8px; white-space: pre-line; }
.lslide .panel { background: #fff; color: #17201b; border-radius: 22px; padding: 12px; width: 100%; box-shadow: 0 14px 40px rgba(0,0,0,.25); margin-top: 6px; }
.lslide .panel img { width: 100%; max-height: 46vh; object-fit: contain; border-radius: 14px; display: block; }
.lslide .pcap { margin: 8px 4px 0; font-size: 15px; text-align: left; }
.lslide .pcred { margin: 4px 4px 0; font-size: 11px; color: #6b7280; text-align: left; }
.lslide .vpanel { aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 0; overflow: hidden; background: #000; }
.lslide .vpanel .vframe.video { width: 100%; height: 100%; max-height: none; }
.lslide .term { width: 100%; text-align: left; border: 0; background: rgba(255,255,255,.16); color: #fff; border-radius: 16px; padding: 13px 15px; cursor: pointer; font: inherit; font-size: 15.5px; margin-top: 8px; }
.lslide .term b { display: block; font-size: 16.5px; }
.lslide .term .mean { display: none; margin-top: 6px; line-height: 1.5; }
.lslide .term.open .mean { display: block; }
.lslide .term .hint { display: block; font-size: 12px; opacity: .75; margin-top: 3px; }
.lslide .term.open .hint { display: none; }
.lslide .qopt { display: block; width: 100%; text-align: left; border: 0; border-radius: 16px; padding: 14px 16px; margin: 9px 0 0; font-size: 16.5px; font-weight: 500; background: rgba(255,255,255,.95); color: #17201b; cursor: pointer; min-height: 0; }
.lslide .qopt.right { background: #d3f9d8; box-shadow: inset 0 0 0 3px #2b8a3e; }
.lslide .qopt.wrong { background: #ffe3e3; box-shadow: inset 0 0 0 3px #c92a2a; }
.lslide .why { margin-top: 12px; font-size: 16px; line-height: 1.55; background: rgba(0,0,0,.3); border-radius: 14px; padding: 11px 13px; text-align: left; width: 100%; }
.lslide .btnw { border: 0; background: #fff; color: #17201b; font: inherit; font-weight: 700; font-size: 15px; border-radius: 14px; padding: 12px 18px; cursor: pointer; margin-top: 10px; text-decoration: none; display: inline-block; }
.lslide .btnw.ghost { background: rgba(255,255,255,.16); color: #fff; }
.lslide .links { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.lpill { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 12px; z-index: 7; background: rgba(0,0,0,.45); color: #fff; border-radius: 999px; padding: 6px 11px; font-size: 13px; font-weight: 700; pointer-events: none; }
.lprog { position: absolute; left: 12px; right: 12px; top: calc(70px + env(safe-area-inset-top)); height: 3px; border-radius: 2px; background: rgba(255,255,255,.28); overflow: hidden; z-index: 6; pointer-events: none; }
.lprog i { display: block; height: 100%; width: 0; background: #fff; border-radius: 2px; transition: width .3s ease; }
.lhint { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-size: 13px; opacity: .9; pointer-events: none; }
.lhint b { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(-6px); } }
.lslide .lbox > * { opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s cubic-bezier(.2,.8,.2,1); }
.lslide.in .lbox > * { opacity: 1; transform: none; }
.lslide.in .lbox > *:nth-child(2) { transition-delay: .06s; }
.lslide.in .lbox > *:nth-child(3) { transition-delay: .12s; }
.lslide.in .lbox > *:nth-child(n+4) { transition-delay: .18s; }
.vbar.over ~ .lframe .lpill { top: calc(64px + env(safe-area-inset-top)); }
@media (prefers-reduced-motion: reduce) { .lslide .lbox > * { opacity: 1; transform: none; transition: none; } .lhint b { animation: none; } }
.lslide .stat { background: none; border: 0; box-shadow: none; padding: 0; color: #fff; min-width: 0; }

.chip { align-self: flex-start; border: 1px solid var(--line); background: var(--tint); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13.5px; cursor: pointer; text-align: left; }
.chip:disabled { cursor: default; opacity: .8; }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
h3 { margin: 10px 0 2px; font-size: 15px; }

/* Look and words (Studio) */
.lk-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.lk-grid { display: grid; gap: 16px; }
.lk-side { display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 900px) {
  main:has(.lk) { max-width: 1060px; }
  .lk-grid { grid-template-columns: 1fr 340px; align-items: start; }
  .lk-side { position: sticky; top: 76px; }
}
.lk-phone { width: 100%; max-width: 320px; margin: 0 auto; border: 8px solid #17181C; border-radius: 30px; background: var(--bg); overflow: hidden; display: flex; flex-direction: column; min-height: 460px; box-shadow: 0 8px 30px #0002; font-size: 13px; }
.lk-top { display: flex; align-items: center; gap: 8px; padding: 12px; color: #fff; }
.lk-top .logo { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; border: 2px solid #fff6; }
.lk-name { font-weight: 700; font-size: 14px; }
.lk-top .lk-sub { color: #fffc; }
.lk-body { flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.lk-h1 { font-size: 18px; font-weight: 700; }
.lk-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 3px; }
.lk-banner { border-left: 4px solid var(--accent); }
.lk-sub { color: var(--muted); font-size: 12px; }
.lk-btn { align-self: flex-start; margin-top: 4px; background: var(--accent); color: #fff; border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.lk-tabs { display: flex; border-top: 1px solid var(--line); background: #fff; }
.lk-tabs span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 10px; color: var(--muted); overflow: hidden; }
.lk-foot { text-align: center; font-size: 10px; color: var(--muted); padding: 4px; background: #fff; }
.lk-group { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.lk-group summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.lk-group[open] { display: flex; flex-direction: column; gap: 10px; }
.lk-save { position: fixed; left: 0; right: 0; bottom: calc(66px + env(safe-area-inset-bottom)); display: none; gap: 8px; align-items: center; padding: 10px 16px; background: #17181C; color: #fff; z-index: 6; }
.lk-save.on { display: flex; }
.lk-save .btn:not(.primary) { background: transparent; color: #fff; border-color: #fff6; }
.card.banner { border-left: 5px solid var(--accent); }

/* Feed, step C: contents bar, buttons, NEW mark, badges, news chips, scroll mode, colours of the new kinds */
.rtop .rbtn { pointer-events: auto; border: 0; background: rgba(0,0,0,.45); color: #fff; border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.rtop .rbtn[aria-pressed="true"] { background: #fff; color: #17201b; }
.rbar { position: absolute; top: calc(48px + env(safe-area-inset-top)); left: 0; right: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; padding: 2px 12px 6px; scrollbar-width: none; }
.rbar::-webkit-scrollbar { display: none; }
.rbar .rj { flex: 0 0 auto; border: 0; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.4); font-size: 17px; cursor: pointer; display: grid; place-items: center; }
.rbar .rj.on { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.reels .kb .newdot { margin-left: 6px; background: #e03131; color: #fff; border-radius: 999px; padding: 1px 6px; font-size: 10.5px; }
.reels .rmain.alt { background: color-mix(in srgb, var(--sc) 12%, #fff); color: var(--sc); }
.badges { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.bdg { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; font-size: 13px; opacity: .55; }
.bdg.got { opacity: 1; border-color: #2b8a3e; background: #EDF5EE; }
.bdg .be { font-size: 22px; }
.nchips { display: flex; flex-wrap: wrap; gap: 6px; }
.nchip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.nchip.on { background: var(--sc); color: #fff; border-color: var(--sc); }
/* Scroll mode: cards one under the other, no snapping */
.reels.list .rdeck { scroll-snap-type: none; padding: calc(96px + env(safe-area-inset-top)) 10px 20px; display: flex; flex-direction: column; gap: 12px; }
.reels.list .slide { height: auto; min-height: 0; border-radius: 18px; scroll-snap-align: none; }
.reels.list .sv, .reels.list .sv.noimg { flex-basis: auto; height: 110px; }
.reels.list .sv.thin { height: 54px; }
.reels.list .sc { overflow: visible; }
.reels.list .swipehint { display: none; }
.k-examq { --sc: #b8860b; }
.k-myth { --sc: #e8590c; }
.k-scientist { --sc: #364fc7; }
.k-book { --sc: #5c940d; }
.k-message { --sc: #c2255c; }
.k-day { --sc: #0c8599; }
.k-history { --sc: #8d5524; }
.k-missed { --sc: #495057; }
.reels .k-message .sc h2 { font-size: 26px; line-height: 1.4; }

/* Studio Feed: cards at a glance, calendar */
.kchips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.kchips .nchip { flex: 0 0 auto; }
.kchips .nchip.on, .nchips .nchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.reels .nchip.on { background: var(--sc); border-color: var(--sc); }
.fgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.fcard { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--sc, var(--accent)); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.fcard.dim { opacity: .55; }
.fchead { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fck { font-weight: 700; font-size: 13px; color: var(--sc, var(--accent)); }
.fctext { font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.fcard .btn.icon { width: 34px; height: 34px; min-height: 34px; }
.cal { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.calday { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 5px; }
.calday.today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--tint); }
.calhead { font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.calcard { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; border-left: 3px solid var(--sc, var(--line)); padding-left: 6px; }
.k-notice { --sc: #1c64c4; }
.reels .sbar { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.reels .sbtn { border: 1px solid var(--line); background: #fff; color: #333; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.reels .sbtn:disabled { color: #2b8a3e; border-color: #2b8a3e; }
.reels.list .sbar { margin-top: 6px; }
.card.late { border-color: #e8590c; }

/* Lesson deck: contents, scroll mode */
.ltools { position: absolute; bottom: calc(12px + env(safe-area-inset-bottom)); right: 12px; z-index: 7; display: flex; gap: 6px; }
.lbtn { border: 0; background: rgba(0,0,0,.45); color: #fff; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lbtn[aria-pressed="true"] { background: #fff; color: #17201b; }
.lsheet { position: absolute; inset: 0; z-index: 9; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; }
.lsheet-in { background: #fff; color: #17201b; width: 100%; max-height: 75%; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.lsheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.lsheet-head .lbtn { background: #eee; color: #333; }
.lrow { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px; font: inherit; text-align: left; cursor: pointer; min-height: 44px; }
.lrow.on { border-color: var(--accent); background: var(--tint); }
.lno { width: 28px; height: 28px; border-radius: 50%; background: #f1f3f5; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: 0 0 auto; }
.lflow .ldeck { scroll-snap-type: none; }
.lflow .lslide { height: auto; min-height: 0; padding: 28px 20px; scroll-snap-align: none; }
.lflow .lslide:first-child { padding-top: 90px; }
.lflow .lslide:last-child { padding-bottom: 80px; }
.lflow .lhint { display: none; }
.lflow .lslide .lbox > * { opacity: 1; transform: none; transition: none; }
.lflow .lbox { max-height: none; overflow: visible; }
.viewer:has(.lflow) .vbar.over { background: rgba(18,18,32,.94); }
.reels a.sbtn { text-decoration: none; display: inline-flex; align-items: center; }
.reels .sbar { flex-wrap: wrap; }
/* Studio extras */
.ntable { display: grid; gap: 2px; }
.nrow { display: grid; grid-template-columns: 1fr 70px 60px 60px; gap: 6px; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.nrow span:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.nhead { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 84px; padding-top: 6px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; color: var(--muted); }
.bar i { display: block; width: 100%; max-width: 22px; background: var(--accent); border-radius: 4px 4px 0 0; }
.pv-phone { width: 100%; max-width: 380px; margin: 0 auto 12px; border: 10px solid #17181C; border-radius: 34px; overflow: hidden; height: max(440px, min(760px, calc(100dvh - 330px))); box-shadow: 0 8px 30px #0002; }
.pv-frame { width: 100%; height: 100%; border: 0; display: block; }
.row.dim, .card.dim { opacity: .6; }

/* AI */
.ai-sheet { gap: 10px; }
.ai-note { background: #FFF4E6; border: 1px solid #FFD8A8; color: #7a4b00; border-radius: 12px; padding: 8px 12px; font-size: 13.5px; }
.ai-out { display: flex; flex-direction: column; gap: 8px; }
.ai-out .thinking { color: var(--muted); font-weight: 600; }
.ai-text { line-height: 1.6; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.tag.warn { background: #FFF4E6; color: #a35a00; }
.infog { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.ig-head { display: flex; gap: 10px; align-items: center; padding: 14px; background: var(--accent); color: #fff; font-size: 18px; }
.ig-emoji { font-size: 26px; }
.ig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; }
.ig-box { border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
.ig0 { background: #E7F5FF; } .ig1 { background: #EBFBEE; } .ig2 { background: #FFF4E6; } .ig3 { background: #F3F0FF; } .ig4 { background: #FFF0F6; } .ig5 { background: #E6FCF5; }
.ig-take { padding: 10px 14px 14px; font-weight: 600; }
.aiask { display: flex; gap: 8px; } .aiask input { flex: 1; min-width: 0; }
main.wide { max-width: 1100px; }
.ai-group { display: flex; flex-direction: column; gap: 4px; }
.ai-opts { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.ai-opts select { padding: 4px 8px; min-height: 34px; }
.ai-md h4 { margin: 10px 0 4px; font-size: 15px; }
.ai-md p { margin: 4px 0; }
.ai-md ul { margin: 4px 0; padding-left: 20px; }
.chat { border-radius: 14px; padding: 8px 12px; max-width: 92%; }
.chat.me { align-self: flex-end; background: var(--tint); }
.chat.ai { align-self: flex-start; background: #fff; border: 1px solid var(--line); }
.ai-out .chat + .chat { margin-top: 2px; }
.flash { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fl { min-height: 96px; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 10px; font: inherit; cursor: pointer; text-align: center; }
.fl .f2 { display: none; color: #333; }
.fl.on { background: var(--tint); }
.fl.on .f1 { display: none; }
.fl.on .f2 { display: block; }
.fl .f1 { font-weight: 700; }
.wf { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.wf li span { display: block; color: #444; }
.ig-sub { font-size: 13px; opacity: .9; font-weight: 400; }
.ig-nums { display: flex; gap: 8px; padding: 10px 10px 0; }
.ig-nums div { flex: 1; background: var(--tint); border-radius: 12px; padding: 8px; text-align: center; display: flex; flex-direction: column; }
.ig-nums b { font-size: 22px; color: var(--accent); }
.ig-cmp { width: calc(100% - 20px); margin: 0 10px 8px; border-collapse: collapse; font-size: 13px; }
.ig-cmp th, .ig-cmp td { border: 1px solid var(--line); padding: 5px; text-align: left; }
.ai-exhelp { margin-top: 6px; }
.lslide .panel.diag svg { width: 100%; height: auto; display: block; }
.ppics { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin-top: 6px; }
.ppics img { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; display: block; background: #eee; }
.k-today { --sc: #0b7285; }
.card.fest { flex-direction: row; align-items: center; gap: 12px; background: linear-gradient(120deg, #FFF4E6, #FFF9DB); border-color: #FFD8A8; }
.fest-e { font-size: 40px; animation: festy 1.6s ease-in-out infinite; }
@keyframes festy { 0%, 100% { transform: scale(1); filter: brightness(1); } 50% { transform: scale(1.12); filter: brightness(1.25); } }
@media (prefers-reduced-motion: reduce) { .fest-e { animation: none; } }
.card.mpost { margin: 6px 0; }
.row2.ph { display: grid; grid-template-columns: 1fr 1fr minmax(90px, auto) auto; gap: 6px; }
@media (max-width: 520px) { .row2.ph { grid-template-columns: 1fr 1fr; } }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 18px; color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; min-height: 96px; justify-content: flex-end; box-shadow: 0 6px 18px #0001; }
.tile .te { font-size: 30px; }
.tile.t1 { background: linear-gradient(135deg, #1864ab, #0b3d75); } .tile.t2 { background: linear-gradient(135deg, #2b8a3e, #14521f); }
.tile.t3 { background: linear-gradient(135deg, #e8590c, #7a2e05); } .tile.t4 { background: linear-gradient(135deg, #7048e8, #3b2290); }
.lk-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; } .lk-tiles span { background: var(--accent); border-radius: 8px; padding: 8px; text-align: center; font-size: 16px; }

/* ===== Student frame like Biotechnology Today: one dark bar at the top ===== */
.bfnav { position: fixed; top: 0; left: 0; right: 0; z-index: 30; padding: calc(6px + env(safe-area-inset-top)) 8px 7px; font: 600 13px/1.2 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-user-select: none; user-select: none; }
.bfnav.t-dark { background: linear-gradient(180deg, rgba(8,22,17,.97), rgba(10,18,15,.93)); color: #fff; border-bottom: 1px solid rgba(120,220,170,.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.bfn-in { width: 100%; max-width: 720px; margin: 0 auto; display: grid; gap: 6px; }
.bfn-r1, .bfn-r2 { display: flex; align-items: center; gap: 5px; min-width: 0; }
.bfn-r2 { position: relative; }
.bfn-ic { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 18px; text-decoration: none; border: 0; cursor: pointer; padding: 0; color: inherit; background: rgba(255,255,255,.09); }
.bfn-ic.on { background: #fff; color: #11221a; }
.bfn-ic.off { opacity: .4; filter: grayscale(1); }
.bfn-tabs { flex: 1; min-width: 0; display: grid; gap: 4px; }
.bfn-tab { border-radius: 13px; padding: 4px 0 3px; text-align: center; text-decoration: none; font-size: 11px; font-weight: 700; color: inherit; line-height: 1.15; white-space: nowrap; overflow: hidden; background: rgba(255,255,255,.09); }
.bfn-tab b { display: block; font-size: 17px; line-height: 1.2; }
.bfn-tab.on { background: #fff; color: #11221a; }
.bfn-chip { flex: none; border: 0; border-radius: 999px; padding: 9px 12px; font-weight: 700; font-size: 12.5px; line-height: 1; font-family: inherit; cursor: pointer; white-space: nowrap; color: inherit; text-decoration: none; background: rgba(255,255,255,.09); }
.bfn-chip.on { background: #fff; color: #11221a; }
.bfn-seg { flex: none; display: flex; border-radius: 999px; overflow: hidden; margin-left: auto; background: rgba(255,255,255,.09); }
.bfn-seg button { border: 0; background: none; color: inherit; font-weight: 800; font-size: 12.5px; line-height: 1; font-family: inherit; padding: 9px 11px; cursor: pointer; white-space: nowrap; }
.bfn-seg button.on { background: #fff; color: #11221a; }
.bfn-mwrap { position: relative; flex: none; }
.bfn-menu { position: absolute; left: 0; top: calc(100% + 4px); z-index: 40; width: min(280px, calc(100vw - 16px)); border-radius: 16px; padding: 6px; display: grid; gap: 2px; box-shadow: 0 14px 40px rgba(0,0,0,.35); max-height: 65vh; overflow-y: auto; background: #15211b; color: #fff; border: 1px solid rgba(255,255,255,.12); }
.bfn-menu[hidden] { display: none; }
.bfn-menu .bfn-mt { font-size: 12px; opacity: .75; padding: 6px 10px 4px; }
.bfn-menu button { border: 0; background: none; color: inherit; text-align: left; font-weight: 600; font-size: 15px; line-height: 1.25; font-family: inherit; padding: 10px 12px; border-radius: 11px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.bfn-menu button:hover, .bfn-menu button.on { background: rgba(255,255,255,.1); }
.bfn-find { position: fixed; left: 0; right: 0; top: var(--navh, 56px); z-index: 45; background: rgba(10,20,16,.55); height: calc(100vh - var(--navh, 56px)); }
.bfn-fbox { background: #fff; color: #14201a; max-width: 640px; margin: 0 auto; border-radius: 0 0 18px 18px; padding: 10px 12px 12px; box-shadow: 0 12px 30px rgba(0,0,0,.35); max-height: calc(100vh - var(--navh, 56px) - 40px); display: flex; flex-direction: column; }
.bfn-frow { display: flex; gap: 8px; align-items: center; }
.bfn-frow input { flex: 1; font: inherit; font-size: 16px; padding: 11px 14px; border-radius: 12px; border: 1.5px solid #cfd8d3; }
.bfn-frow button { border: 0; background: #eef2ef; border-radius: 999px; width: 40px; height: 40px; font-size: 17px; cursor: pointer; }
.bfn-fres { overflow: auto; margin-top: 8px; }
.bfn-fres button { display: block; width: 100%; text-align: left; font: inherit; background: transparent; border: 0; border-bottom: 1px solid #edf1ee; padding: 10px 6px; cursor: pointer; color: inherit; }
.bfn-fres b { display: block; font-size: 15px; }
.bfn-fres small { display: block; color: #5b6b62; font-size: 13px; }
.bfn-fres mark { background: #ffe58a; color: inherit; border-radius: 3px; }
.bfn-fnote { color: #5b6b62; font-size: 13px; padding: 10px 6px; }
main.st-main { padding-top: calc(var(--navh, 64px) + 10px); padding-bottom: 40px; }
.st-hello { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.reels { top: var(--navh, 64px); bottom: 0; }
/* Study: one unit = one deck */
main.study-main { padding: var(--navh, 64px) 0 0; gap: 0; max-width: none; }
.study { display: flex; flex-direction: column; height: calc(100dvh - var(--navh, 64px)); background: #0b1220; }
.st-head { padding: 8px 10px 6px; display: grid; gap: 6px; background: linear-gradient(180deg, #1f3b6e, #19325c); color: #fff; }
.st-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.st-row.st-small { justify-content: space-between; }
.st-unit { flex: 1; min-width: 0; }
.st-unit .bfn-chip { width: 100%; overflow: hidden; text-overflow: ellipsis; text-align: left; background: rgba(0,0,0,.25); padding: 11px 14px; font-size: 14px; }
.st-head .bfn-chip { background: rgba(0,0,0,.25); }
.st-chip { flex: none; border: 0; border-radius: 999px; padding: 10px 14px; background: rgba(0,0,0,.25); color: #fff; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
/* 📰 All · Easy read · Research: an outlined chip, so it never looks like a chosen stream */
.st-chip.kind-chip { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.6); color: #fff; margin-left: 4px; }
.st-chip.on { background: #fff; color: #11221a; }
.st-pill { background: rgba(0,0,0,.25); border-radius: 999px; padding: 8px 12px; font-weight: 700; font-size: 13px; }
.st-prog { height: 4px; border-radius: 4px; background: rgba(255,255,255,.2); overflow: hidden; }
.st-prog i { display: block; height: 100%; width: 0; background: #fff; transition: width .2s; }
.st-others { display: flex; gap: 6px; overflow-x: auto; padding: 6px 10px; background: #0f1a30; }
.lframe.inline { flex: 1; width: 100%; max-width: 640px; }
.lframe.inline .lpill, .lframe.inline .lprog, .lframe.inline .ltools { display: none; }
.lframe.inline .lslide { padding: 26px 20px 40px; }
.lslide .sbar { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 14px; }
.lslide .aibar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.lslide .aibar .btnw { margin-top: 0; padding: 11px 16px; font-size: 14px; }
.lslide .aibar .btnw.ico { padding: 11px 13px; }
.lslide .aibar .btnw.allico { font-size: 13px; font-weight: 800; padding: 11px 10px; }
.lslide .sbar > .btnw.ghost { border: 1.5px solid rgba(255,255,255,.35); }
/* AI: a dark sheet from the bottom, like Biotechnology Today */
.aisheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.35); display: flex; align-items: flex-end; justify-content: center; }
.aisheet { width: 100%; max-width: 720px; max-height: 82vh; overflow-y: auto; background: #16201b; color: #e8efe9; border-radius: 22px 22px 0 0; padding: 14px 14px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; box-shadow: 0 -10px 30px rgba(0,0,0,.4); animation: aiup .22s ease; }
@keyframes aiup { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.aihead { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.aiclose { border: 0; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; font: inherit; font-weight: 700; font-size: 14px; padding: 9px 14px; cursor: pointer; }
.aitabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.aitabs::-webkit-scrollbar { display: none; }
.aitab { flex: 0 0 auto; border: 0; border-radius: 999px; padding: 9px 14px; background: rgba(255,255,255,.1); color: #e8efe9; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.aitab.on { background: #fff; color: #17201b; }
.aiopts { display: flex; gap: 8px; flex-wrap: wrap; }
.aiopts select { background: rgba(255,255,255,.08); color: #e8efe9; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 13px; min-height: 34px; }
.aiopts select[hidden] { display: none; }
.aiopts option { color: #17201b; }
.aiform { display: flex; gap: 8px; }
.aiform[hidden] { display: none; }
.aiin { flex: 1; min-width: 0; border: 0; background: rgba(255,255,255,.95); color: #17201b; border-radius: 14px; padding: 12px 13px; font-size: 15px; }
.ainote { text-align: center; color: #b9c8bf; font-size: 14px; }
.ainote.small { font-size: 12px; opacity: .8; }
.aistart { align-self: center; border: 0; border-radius: 26px; background: #2f8a4a; color: #fff; padding: 12px 34px; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 6px 18px rgba(47,138,74,.35); }
.aistart b { font-size: 20px; }
.aistart span { font-size: 14px; opacity: .95; }
.aistart.small { padding: 10px 18px; border-radius: 14px; }
.aistart[hidden] { display: none; }
.aistop { align-self: center; border: 0; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; padding: 8px 16px; font: inherit; font-weight: 700; cursor: pointer; }
.aibody { display: grid; gap: 10px; }
.aibody .ai-text, .aibody .aitxt, .aibody .card { background: rgba(255,255,255,.06); color: #e8efe9; border-color: rgba(255,255,255,.1); }
.aibody .ai-md h4 { color: #7bd9a8; }
.aibody .sub { color: #b9c8bf; }
.aibody a { color: #7bd9a8; }
.aibody .qopt { background: rgba(255,255,255,.95); color: #17201b; }
.aibody .fl { background: rgba(255,255,255,.08); color: #e8efe9; border-color: rgba(255,255,255,.15); }
.aibody .fl .f2 { color: #e8efe9; }
.aibody .btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); }
.aibody .chat.me { background: rgba(123,217,168,.18); }
.aibody .chat.ai { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }
.aibody .thinking { color: #b9c8bf; text-align: center; }
.aisave { align-self: flex-start; border: 1px solid #7bd9a8; background: none; color: #7bd9a8; border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.ai-left { text-align: center; font-size: 12.5px; color: #b9c8bf; }
.aibody .infog { color: #17201b; }

/* Studio: a wider page on a computer (phones unchanged) */
@media (min-width: 900px) { .app:has(nav[aria-label="Studio"]) { max-width: 920px; } .app:has(nav[aria-label="Studio"]) main:has(.lk) { max-width: none; } }
.lk-trow { flex-wrap: wrap; } .lk-trow input { flex: 1 1 110px; min-width: 110px !important; }
/* Look preview: the student top bar */
.lk-bar { display: flex; gap: 3px; align-items: center; background: #14171a; color: #fff; padding: 6px 5px; font-size: 10px; overflow: hidden; }
.lk-bar span { background: #ffffff1a; border-radius: 7px; padding: 4px 5px; white-space: nowrap; flex: none; }
.lk-bar .lk-bt { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.lk-bar .on { background: #fff; color: #14171a; }
/* 📸 picture upload field */
.picw { display: flex; flex-direction: column; gap: 8px; }
.picw-list { display: flex; flex-wrap: wrap; gap: 8px; }
.picw-list:empty { display: none; }
.picw-t { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #f1f3f1; }
.picw-t img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picw-x { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: #000a; color: #fff; font-size: 13px; cursor: pointer; }
.picw-up { cursor: pointer; position: relative; }
.picw-up input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.picr-list { display: flex; flex-direction: column; gap: 10px; }
.picr-list:empty { display: none; }
.picr { display: grid; grid-template-columns: 84px 1fr auto; gap: 8px; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.picr-img { width: 84px; height: 84px; border-radius: 8px; overflow: hidden; background: #f1f3f1; }
.picr-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picr-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.picr-f input { min-width: 0; font-size: 14px; padding: 7px 9px; }
.picr-b { display: flex; flex-direction: column; gap: 5px; }
@media (max-width: 420px) { .picr { grid-template-columns: 64px 1fr; } .picr-img { width: 64px; height: 64px; } .picr-b { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; } }
.rights { font-size: 12.5px; opacity: .78; line-height: 1.45; margin: 8px 0 0; text-align: left; }
.rights .rep { background: none; border: 1px solid currentColor; color: inherit; border-radius: 999px; padding: 2px 9px; font: inherit; font-weight: 700; cursor: pointer; margin-left: 4px; }
.zoomable { cursor: zoom-in; }
.zoom-bg { position: fixed; inset: 0; z-index: 2147483000; background: rgba(0,0,0,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; overflow: auto; touch-action: pinch-zoom; }
.zoom-bg img { max-width: 100%; max-height: 82vh; object-fit: contain; background: #fff; border-radius: 8px; }
.zoom-cap { color: #fff; margin-top: 10px; max-width: 640px; text-align: center; font-size: 15px; }
.zoom-x { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff2; color: #fff; font-size: 20px; cursor: pointer; }
.vnote { margin: 8px 0 0; }
.vcred { font-size: 13px; opacity: .85; margin: 6px 0 0; }
.vlinks { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.ppost { display: flex; flex-direction: column; gap: 4px; }
.ppics figure { margin: 0; display: flex; flex-direction: column; gap: 3px; }
.ppics figcaption { font-size: 13px; line-height: 1.35; }
.ppics figcaption .pcred { font-size: 12px; opacity: .8; margin: 0; }
/* 📡 Find more online */
.fm-list { display: flex; flex-direction: column; gap: 8px; }
.fm-go { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: #ffffff12; border: 1px solid #ffffff26; color: inherit; text-decoration: none; text-align: left; font: inherit; cursor: pointer; width: 100%; }
.fm-go b { display: block; font-size: 15.5px; }
.fm-go small { display: block; opacity: .75; font-size: 12.5px; margin-top: 1px; }
.fm-e { font-size: 24px; width: 38px; text-align: center; flex: none; }
.fm-btn { margin-top: 8px; }
.fm-paste { margin-top: 10px; border: 1px solid #ffffff26; border-radius: 14px; padding: 10px 12px; }
.fm-paste summary { cursor: pointer; font-weight: 700; min-height: 32px; }
.fm-paste[open] { display: flex; flex-direction: column; gap: 8px; }
.fm-paste textarea, .fm-paste select { width: 100%; background: #fff; color: #10201a; border-radius: 10px; }
/* 🧬 Animated welcome on Home (like Biotechnology Today's landing) */
main.st-main:has(> .land) { padding: 0; max-width: none; }
.land { position: relative; overflow: hidden; color: #eaf6f1; min-height: calc(100dvh - var(--navh, 64px)); margin-top: var(--navh, 64px);
  background-color: #071a1c;
  background-image: radial-gradient(90% 60% at 15% 0%, color-mix(in srgb, var(--lc) 55%, transparent), transparent 60%), radial-gradient(80% 60% at 100% 100%, rgba(120,80,230,.42), transparent 60%), linear-gradient(170deg, #06171a, #0b2427); }
.l-lattice { position: absolute; inset: 0; pointer-events: none; opacity: .10;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16zM28 64v33' fill='none' stroke='%23bff5e0' stroke-width='1'/%3E%3C/svg%3E"); }
.l-mol { position: absolute; pointer-events: none; opacity: .35; animation: l-drift 18s ease-in-out infinite; }
.l-mol svg { display: block; }
@keyframes l-drift { 50% { transform: translate(10px, -22px) rotate(18deg); } }
.l-main { position: relative; min-height: calc(100dvh - var(--navh, 64px)); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px calc(28px + env(safe-area-inset-bottom)); text-align: center; max-width: 560px; margin: 0 auto; }
.l-helix { height: 64px; width: min(320px, 86vw); position: relative; margin: 0 auto 6px; }
.l-col { position: absolute; left: 50%; top: 50%; width: 64px; height: min(320px, 86vw); transform: translate(-50%, -50%) rotate(90deg); display: flex; flex-direction: column; justify-content: space-between; perspective: 500px; }
.l-rung { display: block; height: 2px; position: relative; margin: 0 4px; background: linear-gradient(90deg, var(--d1, #4fe0a6), rgba(255,255,255,.35), var(--d2, #a88bff)); border-radius: 2px; animation: l-spin 3.6s linear infinite; transform-style: preserve-3d; }
.l-rung::before, .l-rung::after { content: ""; position: absolute; top: -4px; width: 10px; height: 10px; border-radius: 50%; }
.l-rung::before { left: -5px; background: var(--d1, #4fe0a6); box-shadow: 0 0 10px var(--d1, #4fe0a6); }
.l-rung::after { right: -5px; background: var(--d2, #a88bff); box-shadow: 0 0 10px var(--d2, #a88bff); }
@keyframes l-spin { to { transform: rotateY(360deg); } }
.l-kick { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: #9fe8c9; font-weight: 700; margin: 6px 0 2px; }
.l-h1 { position: relative; font-size: clamp(34px, 9.5vw, 52px); line-height: 1.04; margin: 4px 0 6px; letter-spacing: -.02em; font-weight: 850; color: #fff; }
.l-n2 { display: block; background: linear-gradient(90deg, #4fe0a6, #7fe7ff 50%, #a88bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.l-mark { font-size: .5em; vertical-align: super; margin-left: 4px; }
.l-tag { font-size: 16px; opacity: .88; margin: 0 auto 26px; max-width: 330px; line-height: 1.5; }
.l-start { position: relative; width: 148px; height: 148px; border-radius: 50%; border: 0; cursor: pointer; color: #071a1c; font-size: 20px; font-weight: 850;
  background: radial-gradient(circle at 35% 30%, #fff, #c9f7e4 55%, #8fe9c6); box-shadow: 0 16px 44px rgba(0,0,0,.4), inset 0 -6px 18px rgba(31,122,85,.25);
  animation: l-pulse 2.4s ease-out infinite; display: grid; place-items: center; margin: 4px 0 8px; }
.l-start::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1.5px dashed rgba(159,232,201,.5); animation: l-turn 16s linear infinite; }
.l-fb0, .l-fb1 { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.l-fb0 b { font-size: 36px; line-height: 1; }
.l-fb1 { max-width: 122px; text-align: center; font-size: 15px; line-height: 1.15; font-weight: 850; }
.l-fb1 .l-fest { font-size: 34px; line-height: 1.1; }
.l-fest-on .l-fb1 { animation: l-wish var(--fsec, 5s) infinite both ease-in-out; }
.l-fest-on .l-fb0 { animation: l-startw var(--fsec, 5s) infinite both ease-in-out; }
.l-fest-on.l-once .l-fb1 { animation: l-wish1 var(--fsec, 5s) 1 forwards ease-in-out; }
.l-fest-on.l-once .l-fb0 { animation: l-start1 var(--fsec, 5s) 1 forwards ease-in-out; }
@keyframes l-wish1 { 0%, 40% { opacity: 1; transform: scale(1); } 50%, 100% { opacity: 0; transform: scale(.86); } }
@keyframes l-start1 { 0%, 40% { opacity: 0; transform: scale(.86); } 50%, 100% { opacity: 1; transform: scale(1); } }
@keyframes l-wish { 0%, 40% { opacity: 1; transform: scale(1); } 50%, 90% { opacity: 0; transform: scale(.86); } 100% { opacity: 1; transform: scale(1); } }
@keyframes l-startw { 0%, 40% { opacity: 0; transform: scale(.86); } 50%, 90% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.86); } }
@keyframes l-pulse { 0% { box-shadow: 0 0 0 0 rgba(79,224,166,.45), 0 16px 44px rgba(0,0,0,.4); } 80%, 100% { box-shadow: 0 0 0 30px rgba(79,224,166,0), 0 16px 44px rgba(0,0,0,.4); } }
@keyframes l-turn { to { transform: rotate(360deg); } }
.l-start:focus-visible, .l-go:focus-visible, .l-back:focus-visible { outline: 3px solid #ffd76a; outline-offset: 3px; }
.l-fest { display: inline-block; }
.l-fest.a-flicker { animation: l-flick 1.6s ease-in-out infinite; } .l-fest.a-float { animation: l-float 3s ease-in-out infinite; } .l-fest.a-sparkle { animation: l-spark 2.2s ease-in-out infinite; }
@keyframes l-flick { 0%, 100% { opacity: 1; transform: scale(1); } 45% { opacity: .75; transform: scale(.94); } 60% { opacity: 1; transform: scale(1.06); } }
@keyframes l-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes l-spark { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(12deg) scale(1.15); } }
.l-strip { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 auto 10px; max-width: 520px; padding: 7px 14px; border-radius: 999px; background: rgba(255,224,102,.16); border: 1px solid rgba(255,224,102,.45); color: #fff3c4; font: 600 14px/1.35 system-ui, sans-serif; }
.l-choose { display: none; width: 100%; max-width: 440px; gap: 11px; flex-direction: column; text-align: left; }
.land.open .l-start { display: none; }
.land.open .l-tag { margin-bottom: 10px; font-size: 14px; }
.land.open .l-choose { display: flex; animation: l-up .35s ease; }
.land.open .l-helix { height: 44px; }
@keyframes l-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.l-acct { display: flex; align-items: center; gap: 9px; font-size: 15px; padding: 10px 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(159,232,201,.35); border-radius: 18px; }
.l-acct a { color: #9fe8c9; font-weight: 800; font-size: 14px; text-decoration: none; white-space: nowrap; }
.l-dot { width: 11px; height: 11px; border-radius: 50%; background: #2fd36b; box-shadow: 0 0 10px #2fd36b; flex: none; }
.l-go { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; text-decoration: none; color: #10201a; background: rgba(255,255,255,.96); box-shadow: 0 10px 28px rgba(0,0,0,.25); transition: transform .15s; }
.l-go:active { transform: scale(.98); }
.l-go .l-e { font-size: 28px; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; background: #e3f2ea; }
.l-go b { display: block; font-size: 17.5px; font-weight: 800; }
.l-go small { display: block; font-size: 13px; color: #53635a; margin-top: 2px; font-weight: 500; }
.l-go .l-t { flex: 1; min-width: 0; }
.l-go::after { content: "›"; font-size: 26px; color: #9aaba1; }
.l-go.g-study .l-e { background: #ece6ff; }
.l-go.g-act { background: #fff4db; } .l-go.g-act .l-e { background: #ffe3a8; }
.l-n { font-weight: 800; background: #e8590c; color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 12px; margin-left: 6px; vertical-align: 2px; }
.l-go.g-notes { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.28); box-shadow: none; } .l-go.g-notes .l-e { background: rgba(255,255,255,.14); } .l-go.g-notes small { color: #cfe3d9; }
.l-go.cont { background: linear-gradient(135deg, #9fe8c9, #7dd3fc); }
.l-rest { display: flex; flex-direction: column; gap: 10px; color: var(--ink, #10201a); }
.l-rest:empty { display: none; }
.l-back { background: none; border: 0; color: #fff; opacity: .8; font-size: 14px; cursor: pointer; margin-top: 2px; padding: 8px; align-self: center; }
.l-org { margin-top: 26px; font-size: 12.5px; opacity: .72; max-width: 360px; line-height: 1.5; }
.l-org a { color: #cfe3d9; }
@media (prefers-reduced-motion: reduce) { .l-rung, .l-mol, .l-start, .l-start::before, .l-fest, .l-fb0, .l-fb1 { animation: none !important; } .l-fb1 { display: none; } }
.lk-hero { background: radial-gradient(90% 60% at 15% 0%, color-mix(in srgb, var(--lc) 55%, transparent), transparent 60%), linear-gradient(170deg, #06171a, #0b2427); color: #fff; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.lk-dna { font-size: 22px; } .lk-hname { font-weight: 800; font-size: 15px; text-align: center; }
.lk-hstart { width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #c9f7e4 55%, #8fe9c6); color: #071a1c; display: grid; place-items: center; font-weight: 800; font-size: 14px; line-height: 1; }
.lk-hstart small { font-size: 9px; }
.vbars { display: flex; align-items: flex-end; gap: 4px; height: 110px; padding: 4px 0; }
.vday { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.vday i { display: block; width: 100%; min-height: 2px; background: var(--accent); border-radius: 4px 4px 0 0; }
.vday span { font-size: 10px; color: var(--muted); }
.l-hello { margin: -14px 0 18px; font-size: 15px; font-weight: 700; color: #cfe3d9; }
.land.open .l-hello { margin: 0 0 8px; }
.aisheet > * { flex-shrink: 0; }
/* 📚 coloured course cards with a % ring */
.ccard-wrap { padding: 0; overflow: hidden; gap: 0; }
.ccard-wrap[open] > :not(summary) { margin: 10px 14px; }
.ccard-wrap[open] { padding-bottom: 6px; }
.ccard { display: flex; align-items: center; gap: 14px; padding: 16px; color: #fff; cursor: pointer; list-style: none; border-radius: 16px; }
.ccard::-webkit-details-marker { display: none; }
.ccard b { display: block; font-size: 19px; line-height: 1.2; }
.ccard small { display: block; opacity: .9; margin-top: 3px; font-size: 13.5px; }
.ce { width: 58px; height: 58px; border-radius: 16px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 32px; flex: none; }
.cring { position: relative; width: 54px; height: 54px; flex: none; display: grid; place-items: center; }
.cring svg { position: absolute; inset: 0; }
.cring b { font-size: 12px; position: relative; }
.cchev { font-size: 14px; opacity: .8; transition: transform .2s; }
.ccard-wrap[open] .cchev { transform: rotate(180deg); }
.endbox { display: flex; flex-direction: column; gap: 10px; align-items: center; width: 100%; }
.endbox .btnw { width: 100%; max-width: 420px; }
/* the page is never wider than the phone screen (nothing can push it sideways) */
html, body { overflow-x: clip; max-width: 100%; }
/* landing like BT: full screen, no top bar */
main.st-main:has(> .land.nobar) { padding: 0; }
.land.nobar { margin-top: 0; min-height: 100dvh; }
.land.nobar .l-main { min-height: 100dvh; }
.l-hello { margin: -14px 0 18px; font-size: 13.5px; font-weight: 700; color: #ffd76a; }
.l-cont { align-self: center; margin: 0 auto 2px; padding: 9px 16px; border-radius: 999px; background: rgba(0,0,0,.3); border: 1px solid rgba(159,232,201,.35); color: #fff; font: 700 14px system-ui, sans-serif; cursor: pointer; }
.l-org .rep2 { background: none; border: 0; color: #cfe3d9; text-decoration: underline; font: inherit; cursor: pointer; padding: 0; }
.tlink { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; flex-direction: row; }
.tlink .te { font-size: 26px; }
.tlink b { display: block; font-size: 16.5px; }
.tlink small { display: block; color: var(--muted); font-size: 14px; }
/* row 2 always fits the phone: chips shrink, Swipe | Scroll stays on the right */
.bfn-r2 { flex-wrap: nowrap; }
.bfn-r2 > .bfn-mwrap, .bfn-r2 > .bfn-chip { min-width: 0; flex: 0 1 auto; }
.bfn-r2 .bfn-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bfn-r2 > .bfn-seg { flex: none; margin-left: auto; }
/* easier to read: small grey lines are bigger and darker (at least as clear as BT) */
:root { --muted: #474C53; }
.sub { font-size: 14px; }
.bfn-tab { font-size: 12px; }
.st-tmenu { width: min(360px, calc(100vw - 16px)); max-height: 70vh; overflow-y: auto; }
.st-tmenu button span { display: flex; flex-direction: column; }
.st-tsub { font-size: 12.5px; font-weight: 600; opacity: .75; }
.st-tl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.bfn-r2 .bfn-chip { padding: 9px 9px; }
.bfn-r2 .bfn-seg button { padding: 9px 8px; }
.bfn-r2 { gap: 4px; }
/* 🧬 landing choices */
.land.th-ocean, .lk-hero.th-ocean { background-image: radial-gradient(90% 60% at 15% 0%, rgba(36,138,214,.6), transparent 60%), radial-gradient(80% 60% at 100% 100%, rgba(32,201,201,.35), transparent 60%), linear-gradient(170deg, #061424, #0b2236); }
.land.th-purple, .lk-hero.th-purple { background-image: radial-gradient(90% 60% at 15% 0%, rgba(150,90,255,.55), transparent 60%), radial-gradient(80% 60% at 100% 100%, rgba(240,90,200,.35), transparent 60%), linear-gradient(170deg, #12081f, #22113a); }
.land.th-sunset, .lk-hero.th-sunset { background-image: radial-gradient(90% 60% at 15% 0%, rgba(255,140,60,.55), transparent 60%), radial-gradient(80% 60% at 100% 100%, rgba(230,60,110,.4), transparent 60%), linear-gradient(170deg, #1f0d0a, #351521); }
.land.th-night, .lk-hero.th-night { background-image: radial-gradient(70% 50% at 50% 0%, rgba(90,110,200,.35), transparent 60%), linear-gradient(170deg, #05060d, #10142a); }
.land.l-custom, .lk-hero.l-custom { background-image: radial-gradient(90% 60% at 15% 0%, color-mix(in srgb, var(--lc) 45%, transparent), transparent 60%), linear-gradient(170deg, var(--lt), var(--lb)); }
.bfnav.t-dark.l-bar { background: var(--lbar); }
.land.th-light, .lk-hero.th-light { color: #10201a; background-image: radial-gradient(90% 60% at 15% 0%, color-mix(in srgb, var(--lc) 30%, transparent), transparent 60%), linear-gradient(170deg, #f4fbf7, #e7f1ec); }
.land.th-light .l-h1, .land.th-light .l-kick { color: #10201a; }
.land.th-light .l-tag, .land.th-light .l-org, .land.th-light .l-org a, .land.th-light .l-back, .land.th-light .l-hello { color: #2d3b34; }
.land.th-light .l-acct, .land.th-light .l-cont { color: #10201a; background: #fff; }
.land.th-light .l-go.g-notes { background: #fff; color: #10201a; border-color: #d9e3dd; } .land.th-light .l-go.g-notes small { color: #53635a; }
.land.l-pic, .lk-hero.l-pic { background-image: linear-gradient(rgba(4,14,16,.62), rgba(4,14,16,.82)), var(--lbg); background-size: cover; background-position: center; }
.land.l-pic .l-lattice { display: none; }
.l-atom { position: relative; width: 120px; height: 120px; margin: 0 auto 6px; }
.l-atom .nuc { position: absolute; inset: 48px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #7fe7ff); box-shadow: 0 0 18px #7fe7ff; }
.l-atom .orb { position: absolute; inset: 6px 0; border: 2px solid rgba(159,232,201,.6); border-radius: 50%; animation: l-turn 6s linear infinite; }
.l-atom .orb::after { content: ""; position: absolute; top: -5px; left: 50%; width: 9px; height: 9px; border-radius: 50%; background: #4fe0a6; box-shadow: 0 0 10px #4fe0a6; }
.l-atom .o2 { transform: rotate(60deg); animation-duration: 8s; } .l-atom .o3 { transform: rotate(-60deg); animation-duration: 10s; }
.l-atom .o2, .l-atom .o3 { animation-name: l-turn2; }
@keyframes l-turn2 { from { rotate: 0deg; } to { rotate: 360deg; } }
.l-float { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.l-float i { position: absolute; bottom: -40px; font-style: normal; opacity: .55; animation: l-rise 16s linear infinite; }
.l-bubbles i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(159,232,201,.55); }
.l-stars i { color: #fff7c2; animation-name: l-twinkle; bottom: auto; top: calc(var(--t, 0) * 1%); }
.l-stars i:nth-child(odd) { top: 12%; } .l-stars i:nth-child(3n) { top: 30%; } .l-stars i:nth-child(4n) { top: 62%; } .l-stars i:nth-child(5n) { top: 84%; }
@keyframes l-rise { from { transform: translateY(0) rotate(0); } to { transform: translateY(-115dvh) rotate(160deg); } }
@keyframes l-twinkle { 0%, 100% { opacity: .2; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.2); } }
.l-count { display: inline-block; margin: -6px auto 14px; padding: 7px 14px; border-radius: 999px; background: rgba(255,215,106,.16); border: 1px solid rgba(255,215,106,.5); color: #ffe9a8; font-weight: 800; font-size: 14.5px; }
.l-thought { font-size: 14.5px; font-style: italic; opacity: .9; max-width: 340px; margin: -4px auto 18px; line-height: 1.45; }
.land.open .l-count, .land.open .l-thought { display: none; }
.l-streak { display: block; font-size: 12.5px; color: #ffd76a; font-weight: 700; margin-top: 1px; }
.l-go.g-link { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.28); box-shadow: none; } .l-go.g-link .l-e { background: rgba(255,255,255,.14); } .l-go.g-link small { color: #cfe3d9; }
@media (prefers-reduced-motion: reduce) { .l-atom .orb, .l-float i { animation: none !important; } }

.lk-hero.th-light .lk-hname { color: #10201a; }
.lk-lrow .lk-le { font-size: 22px; width: 30px; text-align: center; }
.lk-lrow { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; }
.lk-lrow input { width: 100%; box-sizing: border-box; }
/* AI answer: Save · Share · Download, and 🌐 read it in your language (like BT) */
.ansbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ansbar:empty { display: none; }
.btlang { border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 10px 12px; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.btlang[hidden] { display: none; }
.btlang .bl-h { font-weight: 700; font-size: 14px; }
.btlang .bl-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btlang .bl-row button { font: inherit; font-weight: 700; font-size: 14px; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.4); background: transparent; color: inherit; cursor: pointer; }
.btlang .bl-row button.on { background: #e9ecef; color: #10201a; border-color: #e9ecef; }
.btlang .bl-ai { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; opacity: .95; padding-top: 6px; border-top: 1px dashed rgba(255,255,255,.2); }
.btlang .bl-ai select { font: inherit; font-size: 14px; padding: 6px 10px; border-radius: 10px; width: auto; flex: 1; min-width: 140px; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btlang .bl-ai select option { color: #10201a; }
.aikey ol { margin: 6px 0; padding-left: 20px; line-height: 1.6; }
/* The one button row on Feed cards and Today posts (light cards) */
.reels .sbar, .tpost-bar .sbar { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.reels .sbar .aibar, .tpost-bar .aibar { display: flex; flex-wrap: wrap; gap: 6px; }
.reels .btnw, .tpost-bar .btnw { border: 1px solid var(--line); background: #fff; color: #17201b; border-radius: 999px; padding: 7px 12px; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.reels .btnw:not(.ghost), .tpost-bar .btnw:not(.ghost) { background: var(--accent); border-color: var(--accent); color: #fff; }
.reels .btnw.ico, .tpost-bar .btnw.ico { padding: 7px 10px; }
.tpost-bar { margin-top: 4px; }
.ai-exhelp .exh-panel { margin-top: 10px; padding: 12px; border-radius: 14px; background: #16201b; color: #e8efe9; display: flex; flex-direction: column; gap: 8px; }
.ai-exhelp .exh-panel[hidden] { display: none; }
.ai-exhelp .exh-h { font-weight: 800; }
/* 📥 Pocket friend */
.pocket textarea { min-height: 120px; }
.pk-pic img { max-width: 100%; max-height: 260px; border-radius: 12px; display: block; margin-bottom: 6px; }
.pk-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.selbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 60; display: flex; gap: 4px; background: #16201b; color: #fff; padding: 6px; border-radius: 999px; box-shadow: 0 6px 22px rgba(0,0,0,.3); }
.selbar[hidden] { display: none; }
.selbar button { border: 0; background: transparent; color: #fff; font: inherit; font-size: 14px; font-weight: 700; padding: 8px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.selbar button:hover { background: rgba(255,255,255,.12); }
/* 🗂 notes as a study book */
.ngroup > summary { font-weight: 800; font-size: 16px; cursor: pointer; padding: 6px 2px; }
.ngroup { margin-bottom: 6px; }
.aiform { display: flex; gap: 6px; align-items: center; }
.aiform .aiin { flex: 1; }

/* 📂 Studio → Courses: courses and units fold open and shut */
details.cfold > summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 2px; padding-left: 26px; position: relative; }
details.cfold > summary::-webkit-details-marker { display: none; }
details.cfold > summary::before { content: '▸'; position: absolute; left: 4px; top: 0; font-size: 18px; color: var(--muted); transition: transform .15s; }
details.cfold[open] > summary::before { transform: rotate(90deg); }
details.chapter.cfold > summary { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px; }
details.cfold[open] > summary { margin-bottom: 8px; }
/* 📋 Feed recipe */
.draftbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.draftbar.on { border: 2px solid #e8a33d; background: #fff6e5; }
.row.recipe { flex-wrap: wrap; }
.stepper { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 6px; }
.stepper b { min-width: 22px; text-align: center; }
.dk-plan .calday { border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; }
.dk-plan .calday summary { cursor: pointer; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dk-plan .calday.sel { border: 2px solid var(--accent); }
/* 📦 package builder */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.stepi { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; background: var(--card); }
.stepi:hover { border-color: var(--accent); }
.stepn { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); font-weight: 700; flex: none; }
.stepbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
/* 📱 Studio preview dock: beside the page on wide screens, a pull-up drawer on phones */
.st-wrap { display: block; }
.dock { display: none; }
.dk-open { background: #fff; color: #111; border: 0; }
.dk-open[hidden] { display: none; }
.dock .dk-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dock .dk-tabs { display: flex; gap: 4px; }
.dock .dk-as { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin: 6px 0; }
.dock .dk-as select { flex: 1; min-width: 0; }
.dock .dk-body { flex: 1; min-height: 0; overflow: auto; }
.dk-phone { height: 100%; display: flex; justify-content: center; }
.dk-frame { width: 390px; max-width: 100%; height: 100%; min-height: 560px; border: 8px solid #111; border-radius: 28px; background: #fff; }
.dk-plan { display: flex; flex-direction: column; gap: 8px; }
.dock.dk-side, .dock.dk-full { display: flex; flex-direction: column; background: var(--card); border-left: 1px solid var(--line); padding: 10px; }
@media (min-width: 1100px) {
  body.dk-on .app { max-width: 1300px; }
  body.dk-on .st-wrap { display: grid; grid-template-columns: minmax(0, 780px) 440px; justify-content: center; gap: 16px; align-items: start; }
  body.dk-on .st-wrap > main { max-width: none; min-width: 0; }
  .dock.dk-side { position: sticky; top: 8px; height: calc(100vh - 90px); border: 1px solid var(--line); border-radius: 16px; }
}
@media (max-width: 1099px) {
  .dock.dk-side { position: fixed; left: 0; right: 0; bottom: 0; height: 72vh; z-index: 60; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.3); }
}
.dock.dk-full { position: fixed; inset: 0; z-index: 70; border-radius: 0; }
.dock.dk-full .dk-frame { width: 430px; }

/* 🪟 Edit boxes on wide screens: move, minimise, maximise; the page behind stays visible */
.modal-bg.win { background: transparent; pointer-events: none; display: block; }
.modal-bg.win > .modal { pointer-events: auto; position: fixed; width: 600px; max-width: calc(100vw - 20px); max-height: calc(100vh - 80px); border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.28), 0 0 0 1px rgba(0,0,0,.08); padding-top: 0; }
.modal-bg.win > .modal.wide { width: 720px; }
.modal-bg.win > .modal.max { left: 10px !important; top: 10px !important; width: calc(100vw - 20px); max-height: calc(100vh - 20px); height: calc(100vh - 20px); }
.modal-bg.win > .modal.min { width: 300px; height: auto; max-height: 52px; overflow: hidden; top: auto !important; bottom: 12px; left: 12px !important; }
.modal.min > :not(.wbar) { display: none !important; }
.wbar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 6px; margin: 0 -20px; padding: 8px 10px 8px 16px; background: #EEF1F6; border-bottom: 1px solid #dde2ea; }
.wgrip { flex: 1; cursor: move; user-select: none; touch-action: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; color: #555555; }
.wgrip b { color: #222222; }
.wbtn { border: 0; background: #FFFFFF; border-radius: 8px; width: 32px; height: 30px; cursor: pointer; font-size: 15px; box-shadow: 0 0 0 1px rgba(0,0,0,.1); }
.wbtn:hover { background: var(--tint); }

/* ✏️ / 🚀 the draft bar under the Studio top bar (every page) */
.livebar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; background: #EAF6EE; border-bottom: 1px solid #cfe6d6; font-size: 14px; }
.livebar.on { background: #FFF1DD; border-bottom-color: #F5C98A; }
.livebar .linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--accent); text-decoration: underline; cursor: pointer; }
.livebar:empty { display: none; }

.btn.livenow { background: #FFF1DD; border-color: #F5C98A; color: #8a4b00; font-weight: 700; }

/* 📋 course map in the Plan window */
.cmap { border: 1px solid var(--line, #e3e6ea); border-radius: 12px; padding: 6px 10px; margin-bottom: 8px; background: var(--card, #fff); }
.cmap summary { cursor: pointer; padding: 4px 0; }
.cmap-unit { margin: 6px 0 4px 6px; padding-left: 8px; border-left: 3px solid var(--tint, #e8f1ec); }
.cmap .row { display: flex; align-items: center; gap: 6px; }
.cmap-item { font-size: 14px; padding-left: 6px; }
.cmap .linkbtn { background: none; border: 0; padding: 2px 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.cmap .linkbtn:hover { text-decoration: underline; }
.cmap .btn.icon.small { width: 28px; height: 26px; padding: 0; }

/* 📦 Start / ⬇ Download tiles */
.pk-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pk-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px; border: 1px solid #dfe3e8; border-radius: 14px; background: #FFFFFF; cursor: pointer; font: inherit; color: inherit; }
.pk-tile:hover { border-color: var(--accent); background: var(--tint); }
.pk-tile .pk-ic { font-size: 26px; }
.flash { outline: 3px solid var(--accent); outline-offset: 2px; transition: outline-color .6s; }

/* ⚡ a tab was tapped: a thin moving bar at once, and the tapped tab lights up */
body.l1-busy::before { content: ''; position: fixed; top: 0; left: 0; height: 3px; width: 40%; z-index: 9999; background: var(--accent); animation: l1busy 0.9s ease-in-out infinite; }
@keyframes l1busy { 0% { left: -40%; } 100% { left: 100%; } }
.bfn-tab:active, .bfn-ic:active { transform: scale(0.94); }

/* ⏳ the opening screen: a turning DNA, the centre's name, small science tips */
.splash { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center;
  background: radial-gradient(120% 80% at 50% 0%, #12343b 0%, #0d1a20 55%, #1b1838 100%); color: #EAF6F2; margin: -1px; }
.sp-dna { display: flex; gap: 9px; height: 90px; align-items: center; }
.sp-dna i { position: relative; width: 4px; height: 70px; border-radius: 2px; background: linear-gradient(#5EEAD4, #A78BFA); animation: spTwist 1.6s ease-in-out infinite; }
.sp-dna i::before, .sp-dna i::after { content: ''; position: absolute; left: -5px; width: 14px; height: 14px; border-radius: 50%; }
.sp-dna i::before { top: -7px; background: #5EEAD4; filter: drop-shadow(0 0 6px #5EEAD4); }
.sp-dna i::after { bottom: -7px; background: #A78BFA; filter: drop-shadow(0 0 6px #A78BFA); }
.sp-dna i:nth-child(2) { animation-delay: -0.13s; } .sp-dna i:nth-child(3) { animation-delay: -0.26s; } .sp-dna i:nth-child(4) { animation-delay: -0.4s; }
.sp-dna i:nth-child(5) { animation-delay: -0.53s; } .sp-dna i:nth-child(6) { animation-delay: -0.66s; } .sp-dna i:nth-child(7) { animation-delay: -0.8s; }
.sp-dna i:nth-child(8) { animation-delay: -0.93s; } .sp-dna i:nth-child(9) { animation-delay: -1.06s; } .sp-dna i:nth-child(10) { animation-delay: -1.2s; }
.sp-dna i:nth-child(11) { animation-delay: -1.33s; } .sp-dna i:nth-child(12) { animation-delay: -1.46s; }
@keyframes spTwist { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(-1); } }
.sp-name { font-size: 28px; font-weight: 800; letter-spacing: .3px; background: linear-gradient(90deg, #5EEAD4, #A78BFA); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sp-tip { font-size: 15px; opacity: .85; min-height: 2.6em; max-width: 320px; }
@media (prefers-reduced-motion: reduce) { .sp-dna i { animation: none; } }

/* 👋 the Today card (first slide), like BT: a full gradient in the card's colour, big greeting, glass boxes */
.slide.tday { --sc: #6d28d9; background: linear-gradient(165deg, color-mix(in srgb, var(--sc) 88%, #ffffff 0%) 0%, color-mix(in srgb, var(--sc) 55%, #1e1b4b) 55%, #1a1433 100%); color: #FFFFFF; overflow-y: auto; }
.tday-in { display: flex; flex-direction: column; gap: 14px; padding: 118px 22px 40px; min-height: 100%; box-sizing: border-box; }
.td-date { font-size: 16px; opacity: .92; font-weight: 600; }
.td-hi { margin: 0; font-size: 34px; line-height: 1.12; font-weight: 800; color: #FFFFFF; }
.td-wave { display: inline-block; transform-origin: 70% 70%; animation: tdWave 2.4s ease-in-out infinite; }
@keyframes tdWave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-8deg); } }
.td-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.td-pill { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 15px; }
.td-wide { flex-basis: 100%; border-radius: 22px; }
.td-otd { display: flex; flex-direction: column; gap: 12px; }
.td-otd:empty { display: none; }
.td-box { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 20px; padding: 14px 16px; }
.td-box p { margin: 6px 0 0; font-size: 18px; line-height: 1.45; color: #FFFFFF; }
.td-k { font-size: 13px; font-weight: 800; letter-spacing: .8px; opacity: .85; }
.brk-sec { margin-top: 10px; text-align: left; }
.brk-sec .otd-k { text-align: center; }
.brk-list { margin: 6px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 9px; }
.brk-list li { font-size: 16px; line-height: 1.4; }
.brk-list a { color: inherit; font-weight: 600; text-decoration: none; }
.brk-list a:hover, .brk-list a:focus { text-decoration: underline; }
.brk-src { display: block; font-size: 12.5px; opacity: .7; margin-top: 2px; }
.td-quote p { font-size: 21px; font-weight: 700; margin: 0; }
.td-by { margin-top: 8px; opacity: .85; }
.td-hint { margin-top: auto; text-align: center; opacity: .75; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .td-wave { animation: none; } }

/* 🌈 Full colour Feed cards (like Biotechnology Today): the whole card in its colour, a big emoji, a spaced label,
   big white text, a white main button and round icon buttons. Studio → Card designer → Card style. News keeps its photo. */
.reels.fullc { --fcw: #FFFFFF; --fci: #1b1530; --fcq: #F6F3FA; --fcr: #DDF5E3; --fcri: #0b3d1a; --fcx: #FBE3E1; --fcxi: #5c0f0b; }
.reels.fullc .k-fact { --sc: #6d3fd6; } .reels.fullc .k-quiz { --sc: #5b34c9; } .reels.fullc .k-myth { --sc: #b02a5a; }
.reels.fullc .k-word { --sc: #2f5fb3; } .reels.fullc .k-scientist { --sc: #2b6f86; } .reels.fullc .k-video { --sc: #b3302e; }
.reels.fullc .k-book { --sc: #c0501f; } .reels.fullc .k-quote { --sc: #5a3fb8; } .reels.fullc .k-history { --sc: #9a5a1c; }
.reels.fullc .k-day { --sc: #0f7f8f; } .reels.fullc .k-message { --sc: #b8326b; } .reels.fullc .k-examq { --sc: #8a5a00; }
.reels.fullc .k-otd { --sc: #7a4bd1; } .reels.fullc .k-notice { --sc: #1f5fae; } .reels.fullc .k-festival { --sc: #c2255c; }
.reels.fullc .slide:not(.k-news):not(.tday) { background: linear-gradient(180deg, var(--sc) 0%, color-mix(in srgb, var(--sc) 62%, #120a24) 60%, color-mix(in srgb, var(--sc) 30%, #0d0716) 100%) !important; color: #FFFFFF !important; justify-content: center; }
.reels.fullc .slide:not(.k-news):not(.tday) .sv { flex: 0 0 auto; background: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: max(126px, calc(var(--ovh, 0px) + 14px)) 16px 0; overflow: visible; }
.reels.fullc .slide:not(.k-news):not(.tday) .sv:after { display: none; }
.reels.fullc .slide:not(.k-news):not(.tday) .svbg { position: static; display: block; font-size: 96px; padding: 0; line-height: 1; }
.reels.fullc .slide:not(.k-news):not(.tday) .svbg i { display: none; }
.reels.fullc .slide:not(.k-news):not(.tday) .sv img { position: static; width: 100%; max-height: 220px; border-radius: 22px; object-fit: cover; }
.reels.fullc .slide:not(.k-news):not(.tday) .kb { position: static; background: none; color: #FFFFFF; font-size: 15px; font-weight: 800; letter-spacing: 2.4px; text-transform: uppercase; padding: 0; }
.reels.fullc .slide:not(.k-news):not(.tday) .sc { flex: 0 1 auto; align-items: stretch; text-align: center; padding: 14px 22px 28px; gap: 14px; }
.reels.fullc .slide:not(.k-news):not(.tday) .sc h2 { color: #FFFFFF; font-size: 26px; line-height: 1.28; font-weight: 800; }
.reels.fullc .k-examq .sc h2, .reels.fullc .k-history .sc h2 { font-size: 19px; text-align: left; font-weight: 700; }
.reels.fullc .slide:not(.k-news):not(.tday) .sbig { color: #FFFFFF; font-size: 44px; }
.reels.fullc .slide:not(.k-news):not(.tday) .hook, .reels.fullc .slide:not(.k-news):not(.tday) .sub, .reels.fullc .slide:not(.k-news):not(.tday) p { color: rgba(255,255,255,.92); font-size: 18px; line-height: 1.5; }
.reels.fullc .slide:not(.k-news):not(.tday) .qopt { background: var(--fcq); color: var(--fci); border: 0; border-radius: 16px; text-align: left; font-size: 17px; padding: 14px 18px; }
.reels.fullc .slide:not(.k-news):not(.tday) .qopt.right { background: var(--fcr); color: var(--fcri); }
.reels.fullc .slide:not(.k-news):not(.tday) .qopt.wrong { background: var(--fcx); color: var(--fcxi); }
.reels.fullc .slide:not(.k-news):not(.tday) .rmain { background: var(--fcw); color: var(--fci); border-radius: 999px; font-size: 17px; padding: 14px 18px; }
.reels.fullc .slide:not(.k-news):not(.tday) .btnw { background: rgba(0,0,0,.22); color: #FFFFFF; border: 1px solid rgba(255,255,255,.28); border-radius: 18px; min-height: 52px; }
.reels.fullc .slide:not(.k-news):not(.tday) .aibar { justify-content: center; }
.reels.fullc .slide:not(.k-news):not(.tday) .aibar .btnw:first-child { flex: 1 0 100%; background: var(--fcw); color: var(--fci); border: 0; border-radius: 999px; font-size: 18px; font-weight: 700; }
.reels.fullc .slide:not(.k-news):not(.tday) a { color: #FFFFFF; }

/* 📰 the Feed's contents bar like BT: named chips (📰 News 27) in a dark rounded strip; news streams in the top bar */
.rbar { --rjw: #FFFFFF; --rji: #1b1530; background: rgba(0,0,0,.28); border-radius: 999px; margin: 0 10px; padding: 5px 6px !important; left: 0; right: 0; }
.rbar .rj { width: auto !important; height: 38px !important; border-radius: 999px !important; padding: 0 14px; font-size: 15px !important; font-weight: 700; color: #FFFFFF; white-space: nowrap; display: flex !important; align-items: center; gap: 2px; background: rgba(255,255,255,.12) !important; }
.rbar .rj.on { background: var(--rjw) !important; color: var(--rji); }
.rbar .rj small { opacity: .7; font-weight: 600; margin-left: 4px; }
.bfn-streams { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.bfn-streams .bfn-chip { white-space: nowrap; font-size: 18px; }
.reels .nsrc { display: flex; align-items: center; font-size: 14px; color: var(--muted); }
.reels .ndot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--sc); margin-right: 8px; }

/* 🔘 Layout designer → Card buttons: one row of plain buttons (no big white main button) */
body.l1-btnrow .reels.fullc .slide .aibar .btnw:first-child { flex: 0 0 auto; background: rgba(0,0,0,.22); color: #FFFFFF; border: 1px solid rgba(255,255,255,.28); border-radius: 18px; font-size: 15px; }
body.l1-btnrow .reels.fullc .slide .rmain { border-radius: 14px; }

/* 🧩 Layout designer: the tabs in a bar at the bottom of the screen (body.l1-bottomtabs, look.layout.tabsAt) */
.bfn-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.bfn-bot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); font: 600 13px/1.2 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-user-select: none; user-select: none; }
.bfn-bot.t-dark { background: linear-gradient(0deg, rgba(8,22,17,.97), rgba(10,18,15,.93)); color: #fff; border-top: 1px solid rgba(120,220,170,.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.bfn-bot.t-dark.l-bar { background: var(--lbar); }
.bfn-bot .bfn-tabs { max-width: 720px; margin: 0 auto; }
body.l1-bottomtabs main.st-main { padding-bottom: calc(var(--botnh, 0px) + 40px); }
body.l1-bottomtabs .reels { bottom: var(--botnh, 0px); }
body.l1-bottomtabs .study { height: calc(100dvh - var(--navh, 64px) - var(--botnh, 0px)); }
body.l1-bottomtabs main.study-main { padding-bottom: 0; }

/* 🃏 card designer (Feed) and 📘 lesson slide designer: switches */
.slide.cd-noai [data-b="simple"], .slide.cd-noai [data-b="ask"], .slide.cd-noai [data-ai], .slide.cd-noshot [data-b="pic"] { display: none !important; }
.lslide.sd-nobar .sbar { display: none !important; }
.lslide.sd-noai [data-b="simple"], .lslide.sd-noai [data-b="ask"] { display: none !important; }

/* 📰 Feed cards never scroll sideways; the "All done" card: compact top, buttons wrap, news streams as small chips */
.reels .sc { overflow-x: hidden; }
.reels .slide.k-done .ract { flex-wrap: wrap; justify-content: center; }
.reels .slide.k-done .dstreams { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.reels.fullc .slide.k-done .dstreams .rmain.dchip, .reels .slide.k-done .dstreams .rmain.dchip { flex: 0 0 auto; padding: 9px 14px; font-size: 14px; border-radius: 999px; }
.reels.fullc .slide.k-done:not(.k-news):not(.tday) .sv { padding-top: max(126px, calc(var(--ovh, 0px) + 14px)); gap: 4px; }
.reels.fullc .slide.k-done:not(.k-news):not(.tday) .svbg { font-size: 60px; }
.reels .slide.k-done .badges { min-width: 0; }
.reels .slide.k-done .bdg { min-width: 0; overflow: hidden; }

/* 📱 Feed like Biotechnology Today (14 Nov): the strip right under the top bar; a thin progress line + count, ▶ Auto,
   its speed and ↻ under it; calmer text sizes; one tidy row of icon buttons under a full-width 🧠 Explain simply; 📸 in the corner */
.reels .rbar { top: 8px; }
.reels .rtop { top: 58px; left: 10px; right: 10px; padding: 0; gap: 6px; }
.reels .rtop .grow { display: none; }
.reels .rtop .rprog { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.28); overflow: hidden; pointer-events: none; }
.reels .rtop .rprog i { display: block; height: 100%; width: 0; background: #FFFFFF; border-radius: 2px; }
.reels .rtop .rbtn, .reels .rtop .rcount { padding: 4px 9px; font-size: 12px; }
.reels .rtop .rcount { background: rgba(0,0,0,.35); }
.reels.auto-on .rtop .rprog { height: 5px; background: rgba(255,255,255,.4); }
.rspeeds { position: absolute; top: 34px; right: 0; z-index: 9; pointer-events: auto; background: #18221d; color: #FFFFFF; border-radius: 16px; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 190px; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.rspeeds[hidden] { display: none; }
.rspeeds .rs-t { font-size: 12px; opacity: .75; padding: 4px 8px; }
.rspeeds button { border: 0; background: none; color: inherit; text-align: left; font: inherit; font-size: 14px; font-weight: 600; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.rspeeds button.on { background: #FFFFFF; color: #11221a; }
.reels.fullc .slide:not(.k-news):not(.tday) .svbg { font-size: 72px; }
.reels.fullc .slide:not(.k-news):not(.tday) .kb { font-size: 13px; letter-spacing: 2px; }
.reels.fullc .slide:not(.k-news):not(.tday) .sc { padding: 10px 20px 24px; gap: 12px; }
.reels.fullc .slide:not(.k-news):not(.tday) .sc h2 { font-size: 22px; line-height: 1.3; }
.reels.fullc .slide:not(.k-news):not(.tday) .sbig { font-size: 34px; }
.reels.fullc .slide:not(.k-news):not(.tday) .hook, .reels.fullc .slide:not(.k-news):not(.tday) .sub, .reels.fullc .slide:not(.k-news):not(.tday) p { font-size: 16px; line-height: 1.5; }
.reels.fullc .slide.k-examq:not(.k-news):not(.tday) .sc h2, .reels.fullc .slide.k-history:not(.k-news):not(.tday) .sc h2 { font-size: 16.5px; line-height: 1.45; font-weight: 600; text-align: left; }
.reels.fullc .slide:not(.k-news):not(.tday) .qopt { font-size: 15.5px; padding: 11px 16px; border-radius: 14px; }
.reels .tday-in { padding-top: 96px; gap: 12px; }
.reels .k-news .sc h2 { font-size: 20px; }
.reels .k-news .hook { font-size: 15px; }
/* the button row */
.reels .slide .sbar { width: 100%; align-items: stretch; }
.reels .slide .aibar { flex-wrap: nowrap; justify-content: center; gap: 8px; width: 100%; }
.reels.fullc .slide:not(.k-news) .aibar { flex-wrap: wrap; }
.reels.fullc .slide:not(.k-news):not(.tday) .aibar .btnw:first-child, .reels .tday .aibar .btnw:first-child { flex: 1 0 100%; min-height: 46px; font-size: 16px; border-radius: 999px; }
.reels .slide .aibar .btnw.ico, .reels .slide .aibar .btnw.allico { flex: 1 1 0; min-width: 0; max-width: 58px; height: 44px; min-height: 44px; padding: 0; border-radius: 14px; font-size: 17px; display: grid; place-items: center; }
.reels .slide .aibar .btnw.allico { font-size: 13px; }
.reels .k-news .aibar .btnw:first-child { flex: 0 0 auto; background: #63C38C; color: #0E2418; border: 0; border-radius: 999px; padding: 0 16px; height: 44px; font-size: 15px; }
.reels .slide .aibar [data-b="pic"] { position: absolute; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); width: 46px; max-width: none; flex: none; z-index: 3; background: rgba(255,255,255,.18) !important; border: 0 !important; color: #FFFFFF; }
/* 🌐 the language menu (like BT) */
.lang-menu { position: fixed; z-index: 2147483000; width: min(300px, calc(100vw - 16px)); max-height: 70vh; overflow-y: auto; background: #18221d; color: #FFFFFF; border-radius: 18px; padding: 8px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 14px 36px rgba(0,0,0,.45); font: 600 15px/1.3 Inter, system-ui, sans-serif; }
.lang-menu .lm-t { font-size: 13px; opacity: .8; padding: 6px 10px; }
.lang-menu button { border: 0; background: none; color: inherit; text-align: left; font: inherit; padding: 11px 12px; border-radius: 12px; cursor: pointer; }
.lang-menu button.on { background: rgba(255,255,255,.12); }
.lang-menu .lm-n { font-size: 12px; opacity: .7; padding: 8px 10px 4px; font-weight: 500; }

/* 🎬 📊 progress styles (public/motion.js). No class = today's look. --pgf = the fill colour of that place */
.rprog, .st-prog { --pgf: #fff; }
.tbar { --pgf: var(--accent); height: 4px; background: var(--line); overflow: hidden; margin: 0 0 2px; }
.tbar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .9s linear; }
.pg > i { background: var(--pgc, var(--pgf)); }
.pg.pg-thin { height: 2px !important; }
.pg.pg-thick { height: 10px !important; border-radius: 6px !important; }
.pg.pg-thick > i { border-radius: 6px; }
.pg.pg-stripes { height: 8px !important; border-radius: 5px !important; }
.pg.pg-stripes > i { border-radius: 5px; background-image: repeating-linear-gradient(45deg, rgba(0,0,0,.18) 0 6px, transparent 6px 12px); background-size: 17px 17px; animation: pgStripe .9s linear infinite; }
@keyframes pgStripe { to { background-position: 17px 0; } }
.pg.pg-gradient { height: 6px !important; border-radius: 4px !important; }
.pg.pg-gradient > i { border-radius: 4px; background: linear-gradient(90deg, #4fe0a6, #7fe7ff, #a88bff, #ffd43b); background-size: 200% 100%; animation: pgShift 3s linear infinite; }
@keyframes pgShift { to { background-position: -200% 0; } }
.pg.pg-glow { height: 5px !important; overflow: visible !important; border-radius: 4px !important; }
.pg.pg-glow > i { border-radius: 4px; box-shadow: 0 0 10px 1px var(--pgc, #7fe7ff), 0 0 3px var(--pgc, #fff); }
.pg.pg-dna { height: 12px !important; border-radius: 3px !important; }
.pg.pg-dna > i { background: linear-gradient(var(--pgc, #4fe0a6), var(--pgc, #4fe0a6)) top / 100% 2px no-repeat, linear-gradient(#a88bff, #a88bff) bottom / 100% 2px no-repeat, repeating-linear-gradient(90deg, var(--pgc, #7fe7ff) 0 2px, transparent 2px 7px); }
/* ⭐ my own marker: an emoji (data-pgm) or a picture (--pgimg) */
.pg.pg-mine { height: 6px !important; overflow: visible !important; border-radius: 4px !important; margin-top: 12px; }
.pg.pg-mine > i { position: relative; border-radius: 4px; }
.pg.pg-mine > i::after { content: attr(data-pgm); position: absolute; right: -11px; top: -17px; font-size: 17px; line-height: 1; width: 22px; height: 22px; text-align: center; }
.pg.pg-mine > i.pgm-pic::after { content: ''; background: var(--pgimg) center / contain no-repeat; }
.icp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.icp-prev { width: 44px; height: 44px; border-radius: 10px; border: 1px dashed var(--line); display: grid; place-items: center; font-size: 26px; background: repeating-conic-gradient(#0000000d 0 25%, transparent 0 50%) 0 0 / 12px 12px; }
.icp input.icp-emo { width: 76px; flex: none; text-align: center; font-size: 20px; padding: 0 6px; }
/* visually hidden (still works for screen readers and file pickers) */
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic-img { width: 36px; height: 36px; object-fit: contain; }
.pg.pg-plant, .pg.pg-flask { height: 6px !important; overflow: visible !important; border-radius: 4px !important; margin-top: 10px; }
.pg.pg-plant > i, .pg.pg-flask > i { position: relative; border-radius: 4px; }
.pg.pg-plant > i::after, .pg.pg-flask > i::after { position: absolute; right: -9px; top: -15px; font-size: 16px; line-height: 1; }
.pg.pg-plant > i::after { content: '🌱'; }
.pg.pg-flask > i::after { content: '🧪'; }
.pg.pg-dots { height: 8px !important; background: radial-gradient(circle, rgba(127,127,127,.35) 0 2.5px, transparent 3px) 0 50% / 12px 8px repeat-x !important; }
.pg.pg-dots > i { background: radial-gradient(circle, var(--pgc, var(--pgf)) 0 3px, transparent 3.5px) 0 50% / 12px 8px repeat-x; }
/* 🎉 at 100% */
.pg-party { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.pg-party-confetti i { position: absolute; top: -12px; width: 8px; height: 13px; border-radius: 2px; animation: pgFall 1.9s cubic-bezier(.2,.6,.4,1) forwards; }
@keyframes pgFall { to { transform: translate(var(--dx), 105vh) rotate(var(--rot)); opacity: .9; } }
.pg-party-sparkle i { position: absolute; left: 50%; top: 45%; font-style: normal; font-size: 26px; animation: pgBurst 1.3s ease-out forwards; }
@keyframes pgBurst { 0% { transform: translate(-50%, -50%) scale(.2); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1.1); opacity: 0; } }
.pg-party-badge { display: grid; place-items: center; }
.pg-party-badge b { display: flex; flex-direction: column; align-items: center; gap: 6px; background: rgba(17,24,20,.88); color: #fff; padding: 18px 26px; border-radius: 22px; animation: pgPop 2.2s ease forwards; }
.pg-party-badge b span { font-size: 54px; line-height: 1; }
.pg-party-badge b small { font-size: 15px; font-weight: 700; }
@keyframes pgPop { 0% { transform: scale(.3); opacity: 0; } 15% { transform: scale(1.08); opacity: 1; } 25% { transform: scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: scale(.95); } }
@media (prefers-reduced-motion: reduce) { .pg > i { animation: none !important; } }

/* ⏳ opening screen designs (public/splash.js; nothing chosen = .sp-dna as before) */
.sp-art { display: flex; align-items: center; justify-content: center; position: relative; }
.sp-atom { width: 110px; height: 110px; }
.sp-atom .sp-nuc { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #5EEAD4 45%, #0b7285); box-shadow: 0 0 16px #5EEAD4; }
.sp-atom .sp-orb { position: absolute; inset: 0; border: 2px solid rgba(167,139,250,.55); border-radius: 50%; transform: rotate(var(--r)) scaleY(.38); }
.sp-atom .sp-orb:nth-child(2) { --r: 0deg; } .sp-atom .sp-orb:nth-child(3) { --r: 60deg; } .sp-atom .sp-orb:nth-child(4) { --r: 120deg; }
.sp-atom .sp-orb u { position: absolute; inset: 0; animation: spOrbit 1.6s linear infinite; }
.sp-atom .sp-orb:nth-child(3) u { animation-duration: 2.1s; } .sp-atom .sp-orb:nth-child(4) u { animation-duration: 2.6s; animation-direction: reverse; }
.sp-atom .sp-orb u::after { content: ''; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #5EEAD4; box-shadow: 0 0 10px #5EEAD4; }
@keyframes spOrbit { to { transform: rotate(360deg); } }
.sp-cell { width: 130px; height: 90px; }
.sp-cell i { position: absolute; top: 15px; width: 60px; height: 60px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, rgba(94,234,212,.55), rgba(94,234,212,.15)); border: 2px solid #5EEAD4; box-shadow: inset 0 0 0 6px rgba(167,139,250,.25); animation: spSplit 2.4s ease-in-out infinite alternate; }
.sp-cell i::after { content: ''; position: absolute; left: 40%; top: 38%; width: 16px; height: 16px; border-radius: 50%; background: #A78BFA; }
.sp-cell .sp-c1 { left: 35px; --dx: -24px; } .sp-cell .sp-c2 { left: 35px; --dx: 24px; }
@keyframes spSplit { 0%, 20% { transform: translateX(0); } 100% { transform: translateX(var(--dx)); } }
.sp-mark { width: 96px; height: 96px; border-radius: 26px; display: grid; place-items: center; font-size: 56px; line-height: 1; overflow: hidden; }
.sp-mark img { width: 100%; height: 100%; object-fit: contain; }
.sp-mark.sp-ini { font-size: 34px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), #A78BFA); }
.sp-pulse .sp-mark { animation: spPulse 1.4s ease-in-out infinite; box-shadow: 0 0 0 0 rgba(94,234,212,.6); }
@keyframes spPulse { 0% { transform: scale(.94); box-shadow: 0 0 0 0 rgba(94,234,212,.55); } 70% { transform: scale(1.04); box-shadow: 0 0 0 22px rgba(94,234,212,0); } 100% { transform: scale(.94); } }
.sp-ring { width: 130px; height: 130px; }
.sp-ring .sp-spin { position: absolute; inset: 0; border-radius: 50%; border: 4px solid transparent; border-top-color: #5EEAD4; border-right-color: #A78BFA; animation: spOrbit 1.1s linear infinite; }
.sp-float .sp-mark { animation: spFloat 2.6s ease-in-out infinite; }
@keyframes spFloat { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-12px) rotate(3deg); } }
.sp-tip.sp-fx-fade.sp-in { animation: spFade .5s ease; }
.sp-tip.sp-fx-slide.sp-in { animation: spSlide .45s ease; }
@keyframes spFade { from { opacity: 0; } to { opacity: .85; } }
@keyframes spSlide { from { opacity: 0; transform: translateY(14px); } to { opacity: .85; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sp-art *, .sp-tip { animation: none !important; } }
/* the Studio 👀 preview of the opening screen, full screen for a few seconds */
.sp-preview { position: fixed; inset: 0; z-index: 95; border-radius: 0; }
.mo-open-mini { height: 150px; min-height: 0 !important; gap: 6px !important; padding: 10px !important; border-radius: 10px; overflow: hidden; }
.mo-open-mini .sp-art { transform: scale(.55); margin: -22px 0; }
.mo-open-mini .sp-name { font-size: 15px; }
.mo-open-mini .sp-tip { font-size: 11px; min-height: 0; }
/* ⏳ busy look inside the app */
.busy { display: flex; align-items: center; gap: 10px; }
.busy-art { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.busy-dna .busy-art i { width: 3px; height: 18px; border-radius: 2px; background: linear-gradient(#5EEAD4, #A78BFA); animation: spTwist 1.2s ease-in-out infinite; }
.busy-dna .busy-art i:nth-child(2) { animation-delay: -.2s; } .busy-dna .busy-art i:nth-child(3) { animation-delay: -.4s; } .busy-dna .busy-art i:nth-child(4) { animation-delay: -.6s; } .busy-dna .busy-art i:nth-child(5) { animation-delay: -.8s; } .busy-dna .busy-art i:nth-child(6) { animation-delay: -1s; }
.busy-dots .busy-art i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: bzDot 1s ease-in-out infinite; }
.busy-dots .busy-art i:nth-child(2) { animation-delay: .15s; } .busy-dots .busy-art i:nth-child(3) { animation-delay: .3s; }
@keyframes bzDot { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-6px); opacity: 1; } }
.busy-ring .busy-art { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spOrbit .8s linear infinite; }
.busy-pulse .busy-art { font-size: 20px; width: 24px; height: 24px; justify-content: center; animation: spPulse 1.4s ease-in-out infinite; border-radius: 8px; }
.busy-pulse .busy-art img { width: 24px; height: 24px; object-fit: contain; }

/* 🎉 festivals: logo, frame, middle-button flips, background effects, colours, greeting card (public/festive.js) */
.l-fest img.l-flogo, .l-flogo { width: 1.15em; height: 1.15em; object-fit: contain; vertical-align: middle; display: inline-block; }
.l-fb1 .l-fest img.l-flogo { width: 44px; height: 44px; }
.l-framed { border-radius: 50%; padding: .12em; box-shadow: 0 0 0 3px #ffd43b, 0 0 18px 4px rgba(255,212,59,.65); }
.l-start.l-sw-flip, .l-start.l-sw-fade, .l-start.l-sw-pop { perspective: 700px; }
.l-sw-flip .l-fb0, .l-sw-flip .l-fb1, .l-sw-fade .l-fb0, .l-sw-fade .l-fb1, .l-sw-pop .l-fb0, .l-sw-pop .l-fb1 { opacity: 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; animation-duration: var(--fsec, 5s) !important; animation-iteration-count: infinite !important; animation-timing-function: ease-in-out !important; }
.l-sw-flip .l-fb0 { animation-name: l-flipF !important; } .l-sw-flip .l-fb1 { animation-name: l-flipB !important; }
.l-sw-fade .l-fb0 { animation-name: l-fadeF !important; } .l-sw-fade .l-fb1 { animation-name: l-fadeB !important; }
.l-sw-pop .l-fb0 { animation-name: l-popF !important; } .l-sw-pop .l-fb1 { animation-name: l-popB !important; }
.l-once.l-sw-flip .l-fb0, .l-once.l-sw-flip .l-fb1, .l-once.l-sw-fade .l-fb0, .l-once.l-sw-fade .l-fb1, .l-once.l-sw-pop .l-fb0, .l-once.l-sw-pop .l-fb1 { animation-iteration-count: 1 !important; animation-fill-mode: forwards !important; }
@keyframes l-flipF { 0%, 40% { transform: rotateY(0); } 50%, 90% { transform: rotateY(180deg); } 100% { transform: rotateY(360deg); } }
@keyframes l-flipB { 0%, 40% { transform: rotateY(-180deg); } 50%, 90% { transform: rotateY(0); } 100% { transform: rotateY(180deg); } }
@keyframes l-fadeF { 0%, 40% { opacity: 1; } 50%, 90% { opacity: 0; } 100% { opacity: 1; } }
@keyframes l-fadeB { 0%, 40% { opacity: 0; } 50%, 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes l-popF { 0%, 38% { transform: scale(1); opacity: 1; } 46%, 92% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes l-popB { 0%, 46% { transform: scale(0); opacity: 0; } 54% { transform: scale(1.18); opacity: 1; } 60%, 86% { transform: scale(1); opacity: 1; } 94%, 100% { transform: scale(0); opacity: 0; } }
.l-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.land > .l-main { position: relative; z-index: 1; }
.l-fx .fx-piece { position: absolute; top: -50px; font-style: normal; line-height: 1; animation: fxFall 10s linear infinite; }
@keyframes fxFall { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 8% { opacity: .95; } 100% { transform: translate(40px, 110vh) rotate(260deg); opacity: .9; } }
.fx-confetti .fx-piece { width: 9px; height: 14px; border-radius: 2px; }
.fx-balloons .fx-piece, .fx-diyas .fx-piece:nth-child(odd) { top: auto; bottom: -60px; animation-name: fxRise; }
@keyframes fxRise { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .95; } 100% { transform: translate(-30px, -115vh); opacity: .85; } }
.fx-diyas .fx-piece:nth-child(even) { top: auto; bottom: 6px; animation: l-flick 1.6s ease-in-out infinite !important; filter: drop-shadow(0 0 10px #ffb84d); }
.fx-kites .fx-piece { top: 110%; animation-name: fxKite; }
@keyframes fxKite { 0% { transform: translate(-40vw, 0) rotate(-12deg); } 50% { transform: translate(10vw, -70vh) rotate(10deg); } 100% { transform: translate(60vw, -130vh) rotate(-8deg); } }
.fx-colours .fx-piece { top: auto; border-radius: 50%; filter: blur(14px); opacity: 0; animation: fxBurst 6s ease-out infinite; mix-blend-mode: screen; }
@keyframes fxBurst { 0% { transform: scale(.2); opacity: 0; } 20% { opacity: .75; } 100% { transform: scale(1.8); opacity: 0; } }
.fx-stars .fx-piece { top: auto; animation: fxTwinkle 2.4s ease-in-out infinite; }
.fx-stars .fx-piece:nth-child(3n) { top: 12%; } .fx-stars .fx-piece:nth-child(3n+1) { top: 46%; } .fx-stars .fx-piece:nth-child(3n+2) { top: 78%; }
@keyframes fxTwinkle { 0%, 100% { opacity: .15; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.15); } }
.fx-tricolour .tc { position: absolute; left: -10%; width: 120%; height: 16px; opacity: .8; border-radius: 8px; animation: fxWave 4s ease-in-out infinite; }
.fx-tricolour .tc1 { top: 0; background: #ff9933; } .fx-tricolour .tc2 { top: 16px; background: #fff; animation-delay: -.3s; } .fx-tricolour .tc3 { top: 32px; background: #138808; animation-delay: -.6s; }
@keyframes fxWave { 0%, 100% { transform: translateY(0) skewY(-1.5deg); } 50% { transform: translateY(6px) skewY(1.5deg); } }
.land.l-festcol { background-image: radial-gradient(90% 60% at 15% 0%, color-mix(in srgb, var(--f1) 75%, transparent), transparent 60%), radial-gradient(80% 60% at 100% 100%, color-mix(in srgb, var(--f2) 55%, transparent), transparent 60%), linear-gradient(170deg, color-mix(in srgb, var(--f1) 35%, #050a0c), color-mix(in srgb, var(--f2) 35%, #050a0c)) !important; }
@media (prefers-reduced-motion: reduce) { .l-fx { display: none; } .l-sw-flip .l-fb0, .l-sw-flip .l-fb1, .l-sw-fade .l-fb0, .l-sw-fade .l-fb1, .l-sw-pop .l-fb0, .l-sw-pop .l-fb1 { animation: none !important; } .l-sw-flip .l-fb1, .l-sw-fade .l-fb1, .l-sw-pop .l-fb1 { display: none; } }
.fcard-bg { position: fixed; inset: 0; z-index: 80; background: rgba(5,10,12,.6); display: grid; place-items: center; padding: 18px; animation: l-up .3s ease; }
/* 🎉 the festival greeting card only (16 Nov 2026: these rules also reached Studio's 🃏 All cards tiles) */
.fcard-bg .fcard { position: relative; width: min(380px, 100%); border-radius: 24px; padding: 26px 22px 20px; color: #fff; text-align: center; background: linear-gradient(160deg, var(--f1, #5f3dc4), var(--f2, #0b3d4a)); box-shadow: 0 20px 60px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.fcard-bg .fcard { animation: fcIn .45s cubic-bezier(.2,1.4,.4,1); }
@keyframes fcIn { from { transform: scale(.6) rotate(-4deg); opacity: 0; } to { transform: none; opacity: 1; } }
.fcard-bg .fcard h2 { margin: 0; font-size: 26px; } .fcard-bg .fcard p { margin: 0; opacity: .95; line-height: 1.45; }
.fcard-logo { font-size: 74px; line-height: 1; } .fcard-logo .l-flogo { width: 96px; height: 96px; }
.fcard-pic { width: 100%; max-height: 220px; object-fit: contain; border-radius: 14px; }
.fcard-sign { font-style: italic; opacity: .85; }
.fcard-bg .fcard .btn:not(.primary) { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.45); }
.fcard-bg .fcard .btn.primary { background: #fff; color: #17181C; }
.fcard-x { position: absolute; top: 10px; right: 12px; background: rgba(0,0,0,.25); color: #fff; border: 0; border-radius: 50%; width: 34px; height: 34px; font-size: 16px; cursor: pointer; }

/* 📦 Courses: which pack a paper came from */
.ws-chip { margin-top: 6px; font-weight: 600; max-width: 100%; white-space: normal; text-align: left; }
.pk-tag { font-size: 11.5px; margin-right: 4px; }
.pk-chips { align-items: center; flex-wrap: wrap; gap: 6px; }

/* 🔘 Buttons and text (words.js applyUi: classes on <body> or a Studio sample). No class = as now. */
.ui-lb .btnw.learnbtn { background: var(--lb-bg, #8fe3a8) !important; color: var(--lb-fg, #0d3b1eff) !important; border-color: transparent !important; }
.ui-ic-glass .aibar .btnw.ico, .ui-ic-glass .aibar .btnw.allico { background: rgba(255,255,255,.16) !important; border: 1px solid rgba(255,255,255,.32) !important; color: #ffffffff !important; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ui-ic-light .aibar .btnw.ico, .ui-ic-light .aibar .btnw.allico, .ui-ic-light .pk-icons .btnw { background: #ffffff !important; border: 1px solid rgba(0,0,0,.08) !important; color: #17201bff !important; }
.ui-ic-outline .aibar .btnw.ico, .ui-ic-outline .aibar .btnw.allico, .ui-ic-outline .pk-icons .btnw { background: transparent !important; border: 1.5px solid currentColor !important; }
.ui-icbg .aibar .btnw.ico, .ui-icbg .aibar .btnw.allico, .ui-icbg .pk-icons .btnw { background: var(--ic-bg) !important; border-color: transparent !important; }
.ui-r-soft .aibar .btnw, .ui-r-soft .pk-icons .btnw, .ui-r-soft .btnw.learnbtn { border-radius: 10px !important; }
.ui-r-square .aibar .btnw, .ui-r-square .pk-icons .btnw, .ui-r-square .btnw.learnbtn { border-radius: 4px !important; }
.ui-f-rounded .reels .slide, .ui-f-rounded .lslide, .ui-f-rounded .tpost, .ui-f-rounded .mo-uisample { font-family: ui-rounded, 'SF Pro Rounded', 'Nunito', 'Varela Round', system-ui, sans-serif; }
.ui-f-serif .reels .slide h1, .ui-f-serif .reels .slide h2, .ui-f-serif .reels .slide p, .ui-f-serif .lslide h2, .ui-f-serif .lslide p, .ui-f-serif .lslide li, .ui-f-serif .tpost, .ui-f-serif .mo-uisample h2, .ui-f-serif .mo-uisample p { font-family: Georgia, 'Noto Serif', 'Times New Roman', serif; }
.ui-s-small .reels .slide .sc > :not(.sbar), .ui-s-small .lslide .lbox > :not(.sbar), .ui-s-small .mo-uisample .txt { zoom: .9; }
.ui-s-large .reels .slide .sc > :not(.sbar), .ui-s-large .lslide .lbox > :not(.sbar), .ui-s-large .mo-uisample .txt { zoom: 1.12; }
/* 📋 Today posts and 📥 Learn anything: the same pattern as the Feed and Study (Learn more, then one row of icons) */
.tpost-bar .aibar { flex-wrap: wrap; width: 100%; }
.tpost-bar .aibar .learnbtn { flex: 1 0 100%; border-radius: 999px; background: #8fe3a8; color: #0d3b1eff; border: 0; }
.tpost-bar .aibar .btnw.ico, .tpost-bar .aibar .btnw.allico { flex: 1 1 0; min-width: 34px; max-width: 56px; height: 42px; padding: 0 !important; display: grid; place-items: center; font-size: 17px; border-radius: 14px; }
.tpost-bar .sbar { align-items: stretch; width: 100%; }
.pk-acts { display: flex; flex-direction: column; gap: 8px; }
.pk-acts .learnbtn { width: 100%; border-radius: 999px; background: #8fe3a8; color: #0d3b1eff; border: 0; cursor: pointer; font: inherit; }
.pk-icons { display: flex; gap: 6px; }
.pk-icons .btnw { flex: 1 1 0; min-width: 40px; height: 46px; display: grid; place-items: center; font-size: 19px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); cursor: pointer; padding: 0; }
.mo-uisample { border-radius: 16px; padding: 18px 14px 14px; background: linear-gradient(160deg, #5f3dc4, #3b2290); color: #fff; text-align: center; }
.mo-uisample h2 { color: #fff; margin: 4px 0; } .mo-uisample p { margin: 0 0 12px; opacity: .92; }
.mo-uisample .aibar { display: flex; flex-wrap: wrap; gap: 6px; }
.mo-uisample .aibar .learnbtn { flex: 1 0 100%; border-radius: 999px; background: #8fe3a8; color: #0d3b1eff; border: 0; }
.mo-uisample .aibar .btnw.ico, .mo-uisample .aibar .btnw.allico { flex: 1 1 0; min-width: 34px; max-width: 56px; height: 42px; display: grid; place-items: center; font-size: 17px; border-radius: 14px; background: rgba(20,24,22,.85); color: #fff; border: 0; padding: 0; }

/* 🧠 Learn more: the big button on every card, slim, two short lines; then ONE row of icons (Study like the Feed) */
.btnw.learnbtn { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1.1; padding-top: 7px !important; padding-bottom: 7px !important; min-height: 48px !important; height: auto !important; }
.learnbtn .lb1 { font-size: 16px; font-weight: 750; }
.learnbtn .lb2 { font-size: 11.5px; font-weight: 500; opacity: .78; letter-spacing: .1px; }
.lslide .aibar { flex-wrap: wrap; gap: 6px; }
.lslide .aibar .learnbtn { flex: 1 0 100%; border-radius: 999px; background: #8fe3a8; color: #0d3b1eff; border: 0; }
.lslide .aibar .btnw.ico, .lslide .aibar .btnw.allico { flex: 1 1 0; min-width: 34px; max-width: 56px; height: 44px; padding: 0 !important; display: grid; place-items: center; font-size: 17px; border-radius: 14px; }
.lslide .aibar .btnw.allico { font-size: 12.5px; }
.lslide .sbar > .btnw.ghost:first-child { font-size: 14px; }

/* 🏠 landing page choices (Studio → 🎬 → Landing page; no class = as before) */
.l-logo { width: 74px; height: 74px; border-radius: 22px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, var(--lc, #1f7a55), #a88bff); color: #fff; font-weight: 850; font-size: 28px; margin-bottom: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.l-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.l-greet { font-size: 15px; font-weight: 700; opacity: .92; margin-bottom: 2px; }
/* entrances: the logo (or the name) comes in */
.ent-spin .l-logo, .ent-spin:not(:has(.l-logo)) .l-h1 { animation: lEnSpin .9s cubic-bezier(.2,1.2,.4,1) both; }
.ent-glow .l-logo, .ent-glow:not(:has(.l-logo)) .l-h1 { animation: lEnGlow 1.4s ease both; }
.ent-bounce .l-logo, .ent-bounce:not(:has(.l-logo)) .l-h1 { animation: lEnBounce 1s cubic-bezier(.3,1.6,.5,1) both; }
.ent-rise .l-main > * { animation: l-up .6s ease both; }
.ent-rise .l-main > *:nth-child(2) { animation-delay: .08s; } .ent-rise .l-main > *:nth-child(3) { animation-delay: .16s; } .ent-rise .l-main > *:nth-child(4) { animation-delay: .24s; } .ent-rise .l-main > *:nth-child(5) { animation-delay: .32s; } .ent-rise .l-main > *:nth-child(n+6) { animation-delay: .4s; }
@keyframes lEnSpin { from { transform: rotate(-200deg) scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes lEnGlow { from { filter: blur(12px) brightness(2); opacity: 0; } 60% { filter: blur(0) brightness(1.4); opacity: 1; } to { filter: none; } }
@keyframes lEnBounce { 0% { transform: translateY(-120px) scale(.6); opacity: 0; } 60% { transform: translateY(8px); opacity: 1; } 100% { transform: none; } }
/* headline */
.hd-words .l-w { display: inline-block; animation: l-up .55s ease both; }
.hd-shimmer .l-n1, .hd-shimmer .l-n2 { background: linear-gradient(90deg, #fff 0%, #7fe7ff 20%, #fff 40%, #a88bff 60%, #fff 80%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: lShim 4s linear infinite; }
@keyframes lShim { to { background-position: -250% 0; } }
/* ▶ Start button */
.btn-ripple .l-start { animation: none; }
.btn-ripple .l-start::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(159,232,201,.8); animation: lRipple 1.8s ease-out infinite; }
@keyframes lRipple { from { transform: scale(1); opacity: .9; } to { transform: scale(1.55); opacity: 0; } }
.btn-glow .l-start { animation: lGlow 2.2s ease-in-out infinite; }
@keyframes lGlow { 0%, 100% { box-shadow: 0 0 18px 2px rgba(127,231,255,.45), 0 16px 44px rgba(0,0,0,.4); } 50% { box-shadow: 0 0 46px 14px rgba(127,231,255,.75), 0 16px 44px rgba(0,0,0,.4); } }
.btn-shine .l-start { overflow: hidden; }
.btn-shine .l-start::after { content: ''; position: absolute; top: -20%; left: -60%; width: 40%; height: 140%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.85), transparent); transform: skewX(-20deg); animation: lShine 2.6s ease-in-out infinite; }
@keyframes lShine { 0%, 40% { left: -60%; } 80%, 100% { left: 130%; } }
.btn-gradient .l-start { background: linear-gradient(135deg, #4fe0a6, #7fe7ff, #a88bff, #ffd43b, #4fe0a6); background-size: 300% 300%; animation: lFlow 5s ease infinite; }
@keyframes lFlow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.bsz-small .l-start { width: 116px; height: 116px; font-size: 17px; } .bsz-big .l-start { width: 184px; height: 184px; font-size: 23px; }
/* backgrounds */
.land.lbg-flow { background-image: linear-gradient(130deg, #0b3d4a, #1b1838, #0b7285, #3b2290, #0b3d4a) !important; background-size: 400% 400% !important; animation: lFlow 18s ease infinite; }
.l-parts { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.l-parts i { position: absolute; border-radius: 50%; background: #9fe8c9; opacity: .5; box-shadow: 0 0 6px #7fe7ff; animation: lDrift 12s ease-in-out infinite alternate; }
@keyframes lDrift { from { transform: translate(0, 0); opacity: .15; } 50% { opacity: .7; } to { transform: translate(30px, -60px); opacity: .25; } }
.land.dn-morning { background-image: radial-gradient(90% 60% at 20% 0%, rgba(255,190,92,.55), transparent 60%), linear-gradient(170deg, #12324a, #1d4e5f) !important; }
.land.dn-day { background-image: radial-gradient(90% 60% at 80% 0%, rgba(127,231,255,.5), transparent 60%), linear-gradient(170deg, #0b4f6c, #0b7285) !important; }
.land.dn-evening { background-image: radial-gradient(90% 60% at 50% 0%, rgba(255,120,80,.55), transparent 60%), linear-gradient(170deg, #3b1d3a, #1b1838) !important; }
.land.dn-night { background-image: radial-gradient(80% 50% at 80% 0%, rgba(168,139,255,.35), transparent 60%), linear-gradient(170deg, #05070f, #11142b) !important; }
.land.l-pic.ldim-light::before, .land.l-pic.ldim-dark::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.land.l-pic.ldim-light::before { background: rgba(0,0,0,.25); } .land.l-pic.ldim-dark::before { background: rgba(0,0,0,.55); }
.land.l-pic.lblur { backdrop-filter: none; }
.land.l-pic.lblur::after { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
/* layouts */
.lay-minimal .l-lattice, .lay-minimal .l-mol { display: none; }
.lay-grid .l-choose { max-width: 560px; display: none; }
.land.open.lay-grid .l-choose { display: grid; grid-template-columns: 1fr 1fr; }
.lay-grid .l-choose > :not(.l-go) { grid-column: 1 / -1; }
.lay-grid .l-go { flex-direction: column; align-items: flex-start; gap: 8px; }
.lay-grid .l-go::after { display: none; }
@media (min-width: 900px) {
  .land.lay-split .l-main { display: grid; grid-template-columns: 1fr 1fr; align-items: center; column-gap: 48px; max-width: 1100px; margin: 0 auto; text-align: left; justify-items: start; }
  .land.lay-split .l-main > :not(.l-start):not(.l-choose) { grid-column: 1; }
  .land.lay-split .l-start, .land.lay-split .l-choose { grid-column: 2; grid-row: 1 / span 8; justify-self: center; }
  .land.lay-split.open .l-choose { display: flex; }
}
/* the big buttons */
.lcard-glass .l-go { background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.25); }
.lcard-glass .l-go small, .lcard-outline .l-go small, .lcard-solid .l-go small { color: rgba(255,255,255,.8); }
.lcard-glass .l-go .l-e { background: rgba(255,255,255,.18); }
.lcard-solid .l-go { background: linear-gradient(135deg, var(--lc, #1f7a55), #3b2290); color: #fff; }
.lcard-solid .l-go .l-e { background: rgba(255,255,255,.2); }
.lcard-outline .l-go { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.55); box-shadow: none; }
.lcard-outline .l-go .l-e { background: rgba(255,255,255,.12); }
.lcard-glass .l-go::after, .lcard-solid .l-go::after, .lcard-outline .l-go::after { color: rgba(255,255,255,.7); }
@media (prefers-reduced-motion: reduce) { .l-logo, .l-h1, .l-w, .l-main > *, .l-start, .l-start::after, .l-parts i, .land.lbg-flow, .hd-shimmer .l-n1, .hd-shimmer .l-n2 { animation: none !important; } }
/* the Studio preview phone for the landing page */
.mo-land-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 1100px) { .mo-land-grid { grid-template-columns: minmax(0, 1fr) 330px; } }

/* 🎉 Studio festival editor */
.fe-modal { max-width: 980px !important; }
.fe-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 860px) { .fe-grid { grid-template-columns: minmax(0, 1fr) 330px; } .fe-side { position: sticky; top: 0; align-self: start; } }
.fe-phone { width: 320px; max-width: 100%; height: 600px; overflow: hidden; border-radius: 26px; border: 8px solid #111; margin: 6px auto 0; position: relative; }
.fe-phone .land { min-height: 584px !important; margin-top: 0 !important; }
.fe-phone .land .l-main { min-height: 584px !important; }
.fe-phone .fx-piece { animation-duration: 6s; }
.fe-phone .l-h1 { font-size: 36px !important; }
.fe-phone .l-start { width: 128px; height: 128px; }
.fe-logo { width: 34px; text-align: center; font-size: 22px; flex: none; }
.fe-logo img { width: 30px; height: 30px; object-fit: contain; }

/* 🎬 Studio: style tiles with a live sample */
.mo-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 8px 0; }
.mo-tile { display: flex; flex-direction: column; gap: 6px; align-items: stretch; text-align: left; padding: 8px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.mo-tile.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.mo-tile-t { justify-content: center; min-height: 48px; }
.mo-dark { background: linear-gradient(135deg, #0b7285, #0b3d4a); border-radius: 8px; padding: 16px 10px 10px; display: flex; justify-content: center; min-height: 40px; align-items: center; }
.mo-dark .mo-line { width: 100%; }
.mo-back { align-self: flex-start; }
#mo-places .row select { width: auto; max-width: 55%; flex: none; }
#mo-places .row .grow { min-width: 0; }
.mo-light { background: var(--bg); border-radius: 8px; padding: 10px; min-height: 40px; display: flex; align-items: center; }
.mo-light .thinking { margin: 0; }

/* a tall pop-up box scrolls; its parts never get squeezed to nothing */
.modal > * { flex-shrink: 0; }

/* 📚 Courses: Stream ▸ Year ▸ Semester folding rows */
.grp-bar { display: flex; align-items: center; gap: 8px; }
details.grp { border-radius: 16px; }
details.grp > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 48px; }
details.grp > summary::-webkit-details-marker { display: none; }
details.grp > summary small { display: block; font-weight: 400; opacity: .85; font-size: 13px; }
.gchev::before { content: '▶'; font-size: 12px; }
details.grp[open] > summary .gchev::before { content: '▼'; }
details.grp-prog { background: linear-gradient(135deg, #495057, #212529); color: #fff; padding: 2px 8px 8px; margin-bottom: 10px; }
details.grp-prog > summary { padding-left: 6px !important; padding-right: 6px !important; }
details.grp-prog.mine { background: linear-gradient(135deg, #0b7285, #0b3d4a); }
details.grp-prog > summary { font-size: 19px; font-weight: 700; padding: 10px 0; }
details.grp-year, details.grp-sem { background: var(--card, #fff); color: var(--ink, #111); padding: 0 8px 6px; margin: 6px 0; }
details.grp-sem { padding: 0 0 4px; border: 0 !important; background: transparent; }
details.grp-sem > summary { padding: 0 6px; }
.grp .ccard-wrap { margin: 6px 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.grp .ccard { padding: 12px; gap: 10px; }
details.grp-year > summary { font-weight: 700; font-size: 16px; }
details.grp-sem { border: 1px solid var(--line, #ddd); }
details.grp-sem > summary { font-weight: 600; }
.stream-note2 { color: #fff; opacity: .92; margin: 0 0 6px; }

/* 🎟 one student: what they can see */
.acc-prog { border: 1px solid var(--line, #ddd); border-radius: 12px; padding: 8px 12px; }
.acc-prog > summary { cursor: pointer; font-weight: 600; min-height: 36px; display: flex; align-items: center; }
.acc-sems { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 6px 0 4px; }
.acc-sem { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }

/* 📑 Studio folding cards */
.fold-bar { display: flex; gap: 8px; justify-content: flex-end; margin: 4px 0 8px; }
.card.foldable > .fold-h { cursor: pointer; user-select: none; }
.card.foldable > h2.fold-h, .card.foldable > .fold-h > h2 { display: flex; align-items: center; gap: 8px; }
.fold-ch { background: none; border: 0; padding: 4px 2px; margin: -4px 0; cursor: pointer; font: inherit; color: inherit; min-width: 28px; min-height: 32px; }
.fold-ch::before { content: '▼'; display: inline-block; width: 1em; font-size: 12px; color: var(--muted, #666); }
.card.folded > .fold-h .fold-ch::before { content: '▶'; }
.card.folded > :not(.fold-h) { display: none !important; }
.card.folded { padding-top: 12px; padding-bottom: 12px; }
.card.folded > .fold-h { margin: 0; }

/* 🔗 the open-link icon is a real link, looks like the other icon buttons */
a.btnw { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

/* news card like the others: 🧠 full width, then every icon (🔗 ⚠ …) in one row with a tappable width */
.reels .slide.k-news .aibar { flex-wrap: wrap; }
.reels .slide.k-news .aibar .btnw:first-child:not(.ico) { flex: 1 0 100%; min-height: 46px; font-size: 16px; border-radius: 999px; }
.reels .slide .aibar .btnw.ico, .reels .slide .aibar .btnw.allico { min-width: 34px; }

/* 👀 Other streams: stream header card + practice cards on the Courses list */
.stream-head { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #495057, #212529); }
.stream-head.mine { background: linear-gradient(135deg, #0b7285, #0b3d4a); }
.stream-head .ce { font-size: 30px; line-height: 1; }
.stream-head .grow { text-align: left; }
.stream-pcard > span:first-child { font-size: 22px; }
.stream-head b { display: block; font-size: 19px; }
.stream-head small { opacity: .9; }
.stream-head .stream-note { flex-basis: 100%; color: #fff; opacity: .92; }
.stream-pcard { display: flex; flex-direction: row; padding: 12px 14px; align-items: center; gap: 12px; text-decoration: none; color: inherit; border-left: 4px solid #f59f00; }
.stream-pcard small { display: block; color: var(--muted, #666); }

/* 📸 photos in a student's note (kept in their own Google Drive) */
.nphotos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nphotos:empty { display: none; }
.nphoto { position: relative; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line, #ddd); padding: 0; background: #f4f4f4; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.nphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nphoto-x { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; line-height: 24px; padding: 0; cursor: pointer; }

/* ☁️ Drive and 📱 phone card (My notes) and a note's 📍 address */
.dsync > summary { font-weight: 700; cursor: pointer; }
.naddr { display: block; text-decoration: none; color: var(--accent); font-weight: 600; }

/* 👑 Owner page: folding cards, a centre's buttons in small groups */
.ofold > summary { cursor: pointer; font-weight: 700; min-height: 36px; display: flex; align-items: center; gap: 8px; }
.ocentre { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 0; }
.ogrp { border-top: 1px solid var(--line, #e5e5e5); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.ogrp > summary { cursor: pointer; }
.osec { border: 1px solid #E3E3DE; box-shadow: inset 5px 0 0 var(--osec, #8A8A85); border-radius: 14px; background: #fff; overflow: hidden; }
.osec + .osec { margin-top: 2px; }
.osec > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 14px 16px 14px 20px; background: #F7F7F4; }
.osec > summary::-webkit-details-marker { display: none; }
.osec > summary::before { content: '▸'; color: #777; width: 12px; }
.osec[open] > summary::before { content: '▾'; }
.osec[open] > summary { border-bottom: 1px solid #E3E3DE; }
.osec-t { font-weight: 700; font-size: 16px; }
.osec-h { color: #6B6B66; font-size: 14px; }
.osec-b { padding: 12px 16px 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.osec-open { --osec: #2563A8; }
.osec-people { --osec: #6B4FB3; }
.osec-heads { --osec: #B8860B; }
.osec-plan { --osec: #C77700; }
.osec-pack { --osec: #2E8B57; }
.ogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.oact { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 12px; border: 1px solid #E3E3DE; border-radius: 12px; background: #FBFBF9; }
.oact > .sub { margin: 0; }
.ostate { font-weight: 600; padding: 8px 12px; border-radius: 10px; background: #EEF5EE; color: #1E5B2E; }
.ostate.none { background: #F1F1EE; color: #444; }
.ostate.part { background: #FFF4DC; color: #7A4B00; }
.ostate.hidden { background: #EEF2FA; color: #234A8A; }
.odanger { margin-top: 4px; }
.odanger > summary { cursor: pointer; color: #A3271F; font-weight: 600; padding: 4px 0; }
.odanger .oact { border-color: #EBC3BF; background: #FDF5F4; margin-top: 6px; }
.olist { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.5; }
.btn.danger { color: #A3271F; border-color: #E2B4AF; }

/* 🎮 Games: the page and 🦠 Microbe Invaders */
.gm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gm-head h1 { margin: 0; }
.gm-game { display: flex; flex-direction: column; gap: 10px; }
.gm-gt { display: flex; gap: 12px; align-items: center; }
.gm-ge { font-size: 40px; }
.gm-top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.gm-top li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: #F4F6F3; }
.gm-top li.me { background: #EAF4FF; box-shadow: inset 0 0 0 2px #74C0FC; }
.gm-rank { width: 32px; text-align: center; font-weight: 700; }
.gm-mine { font-weight: 600; padding: 6px 10px; }
.gm-nick { display: flex; flex-direction: column; gap: 10px; }
.gm-nick input { font-size: 18px; padding: 12px; border-radius: 12px; border: 1px solid #D0D0CA; }
.gi { position: relative; max-width: 520px; margin: 0 auto; width: 100%; }
.gi-hud { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 6px; }
.gi-hud > * { white-space: nowrap; }
@media (max-width: 420px) { .gi-hud { font-size: 13px; gap: 4px !important; } .gi-hud .gi-ic { padding: 0; width: 32px; } }
.gi-score { font-size: 18px; }
.gi-prog { height: 8px; background: #E6E8E4; border-radius: 9px; overflow: hidden; margin-bottom: 6px; }
.gi-prog i { display: block; height: 100%; width: 0; background: #40C057; transition: width .2s; }
.gi-canvas { width: 100%; display: block; border-radius: 14px; background: #0B1D2A; touch-action: none; }
.gi-drugs { display: flex; gap: 6px; margin-top: 8px; min-height: 46px; }
.gi-drugs button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; flex: 1; padding: 14px 2px; font-size: 14px; font-weight: 700; border-radius: 12px; border: 3px solid transparent; color: #fff; cursor: pointer; }
.gi-d-b { background: #2F9E44; } .gi-d-v { background: #7048E8; } .gi-d-f { background: #E8590C; }
.gi-drugs button.on { border-color: #fff; box-shadow: 0 0 0 2px #339AF0; transform: scale(1.04); }
.gi-one { flex: 1; text-align: center; font-size: 14px; color: #6B6B66; padding: 12px 0; }
.gi-ov { position: absolute; inset: 0; background: rgba(250,250,247,.97); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 22px; text-align: center; }
.gi-ov[hidden] { display: none; }
.gi-ov { overflow-y: auto; justify-content: flex-start; padding-top: 28px; }
.gi-ov > :first-child { margin-top: auto; } .gi-ov > :last-child { margin-bottom: auto; }
.gi-hud { gap: 8px; }
.gi-ic { border: 0; background: rgba(0,0,0,.06); border-radius: 10px; font-size: 18px; width: 38px; height: 34px; cursor: pointer; }
.gi.gi-full { position: fixed; inset: 0; z-index: 9000; max-width: none; margin: 0; padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); background: #0b1d2a; color: #fff; display: flex; flex-direction: column; }
.gi.gi-full .gi-canvas { flex: 1; border-radius: 10px; }
.gi.gi-full .gi-ic { background: rgba(255,255,255,.12); color: #fff; }
.gi.gi-full .gi-ov { border-radius: 0; }
.gi-learn { width: 100%; max-width: 560px; text-align: left; display: flex; flex-direction: column; gap: 10px; padding: 20px 20px; border-radius: 18px; border: 2px solid rgba(76,110,245,.35); background: #EEF3FB; color: #1D3557; }
.gi-ltag { font-size: 15px; font-weight: 700; letter-spacing: .2px; }
.gi-lt { font-size: 24px; font-weight: 800; line-height: 1.3; }
.gi-lx { font-size: 21px; line-height: 1.5; }
.gi-learn .btn { font-size: 17px; padding: 10px 16px; align-self: flex-start; }
.gi-lv { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; }
.gq-set > summary { cursor: pointer; font-size: 16px; }
.gq-item { border: 1px solid var(--line, #e3e6ea); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.gq-item.gq-flag { border-color: #f08c00; background: #fff9db; }
.gq-clue { font-weight: 700; font-size: 15.5px; }
.gq-ans { display: flex; flex-wrap: wrap; gap: 6px; }
.gq-right, .gq-wrong { border-radius: 999px; padding: 3px 10px; font-size: 13.5px; }
.gq-right { background: #d3f9d8; color: #1b5e20; font-weight: 700; }
.gq-wrong { background: #f1f3f5; color: #495057; }
.gq-warn { color: #a84300; font-weight: 600; font-size: 13.5px; }
.gm-card { border-radius: 20px; padding: 14px; color: #fff; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.gm-card.gm-catch { background: linear-gradient(135deg, #1c7ed6, #5f3dc4); }
.gm-card.gm-catapult { background: linear-gradient(135deg, #d6336c, #7048e8); }
.gi .cc-canvas { width: auto; margin: 0 auto; background: #fff0f6; }
.gi.gi-full .cc-canvas { flex: 0 0 auto; }
.cc-weps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; justify-content: center; }
.cc-w { touch-action: manipulation; -webkit-tap-highlight-color: transparent; flex: 1 1 30%; min-height: 46px; padding: 8px 6px; border-radius: 12px; border: 3px solid var(--wc); background: #fff; color: #212529; font: inherit; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.cc-w.on { background: var(--wc); color: #fff; transform: scale(1.03); }
.cc-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--wc); border: 2px solid #fff; flex: none; }
.cc-art { display: flex; justify-content: center; }
.cc-p { font-size: 17px; line-height: 1.5; max-width: 460px; }
.cc-how, .cc-steps { text-align: left; font-size: 16px; line-height: 1.55; margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; max-width: 460px; }
.cc-new { width: 100%; max-width: 460px; text-align: left; padding: 12px 14px; border-radius: 14px; background: #fff4e6; color: #5c2b00; display: flex; flex-direction: column; gap: 6px; }
.cc-book { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; width: 100%; max-width: 520px; text-align: left; }
.cc-card { border: 1px solid var(--line, #dee2e6); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; background: #fff; color: #212529; }
.cc-lock { opacity: .55; }
.cc-meet { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: 100%; max-width: 480px; }
.cc-mg { flex: 1 1 130px; max-width: 160px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px; border-radius: 14px; background: rgba(112,72,232,.08); }
.gi-ov .cc-play { position: sticky; bottom: 4px; min-width: 160px; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.cc-mg b { font-size: 15px; } .cc-mg small { font-size: 12.5px; line-height: 1.35; opacity: .85; }
.gm-which { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; }
.gm-wg { border: 1px solid var(--line, #dee2e6); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.gm-worlds { display: flex; flex-direction: column; gap: 6px; padding-left: 12px; border-left: 3px solid rgba(112,72,232,.3); }
.gm-levels { margin: 4px 0 0; padding-left: 22px; font-size: 13.5px; line-height: 1.45; }
.cc-worlds { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 480px; }
.cc-world { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 16px; background: rgba(112,72,232,.08); border: 1px solid rgba(112,72,232,.2); }
.cc-wtop { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } .cc-wtop b { font-size: 17px; }
.cc-wbar { height: 7px; border-radius: 4px; background: rgba(112,72,232,.15); overflow: hidden; } .cc-wbar i { display: block; height: 100%; background: #7048e8; }
.cc-wlist summary { cursor: pointer; font-size: 14px; font-weight: 600; padding: 6px 4px; }
.cc-wlist ol { margin: 4px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.cc-wlist .linkish { background: none; border: 0; padding: 0; font: inherit; color: #5f3dc4; text-decoration: underline; cursor: pointer; text-align: left; }
.cc-meet2 { flex-direction: column; align-items: stretch; }
.cc-gcard { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: rgba(112,72,232,.08); font-size: 15px; line-height: 1.45; }
.cc-gcard b { font-size: 17px; }
.cc-gtop { display: flex; align-items: center; gap: 10px; }
.cc-means { font-size: 14px; padding: 6px 10px; border-radius: 10px; background: rgba(253,126,20,.12); }
.cc-newmed { border: 2px solid #fd7e14; }
.im-board { border-radius: 14px; padding: 10px; background: linear-gradient(180deg, #fff0f6, #f3d9fa); color: #212529; display: flex; flex-direction: column; gap: 8px; }
.im-board[hidden], .gi .cc-canvas[hidden] { display: none; }
.im-top { font-weight: 700; font-size: 14px; text-align: center; color: #862e9c; }
.im-bar { height: 8px; border-radius: 4px; background: rgba(112,72,232,.15); overflow: hidden; }
.im-bar i { display: block; height: 100%; background: #7048e8; width: 100%; }
.im-stage { width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 360 / 250; border-radius: 14px; display: block; }
.im-title { text-align: center; display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; line-height: 1.4; }
.im-title b { font-size: 17px; }
.im-msg { min-height: 44px; padding: 8px 12px; border-radius: 12px; font-size: 15px; line-height: 1.45; background: rgba(255,255,255,.7); }
.im-msg.good { background: #d3f9d8; color: #1b5e20; } .im-msg.bad { background: #ffe3e3; color: #8a1c1c; }
.im-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.im-btns button { font: inherit; color: #212529; background: #fff; border: 2px solid rgba(134,46,156,.3); border-radius: 14px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.im-btns button:active { transform: scale(.97); }
.im-btns.im-text { grid-template-columns: 1fr; }
.im-btns.im-text button { text-align: left; align-items: flex-start; font-weight: 600; font-size: 14.5px; line-height: 1.4; padding: 10px 12px; }
.im-leave { font-size: 40px; line-height: 60px; }
.im-cellrow { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.cc-facts { display: flex; flex-direction: column; gap: 4px; font-size: 16px; text-align: left; }
.cc-wn { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.cc-wn small { font-size: 11px; font-weight: 600; opacity: .8; }
.gm-card.gm-invaders { background: linear-gradient(135deg, #087f5b, #0b7285); }
.gm-top2 { display: flex; align-items: center; gap: 12px; }
.gm-card .gm-ge { font-size: 44px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); }
.gm-name { font-size: 20px; font-weight: 800; }
.gm-sub { font-size: 13.5px; opacity: .9; line-height: 1.35; }
.gm-play { flex: none; width: 58px; height: 58px; border-radius: 50%; border: 0; background: #fff; color: #1d1d1b; font-size: 24px; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.gm-play:active { transform: scale(.94); }
.gm-more { background: rgba(255,255,255,.12); border-radius: 14px; padding: 8px 12px; }
.gm-more > summary { cursor: pointer; display: block; font-weight: 700; font-size: 14px; list-style: none; }
.gm-more > summary .sub { display: block; margin-top: 2px; font-size: 13px; }
.gm-more > summary::-webkit-details-marker { display: none; }
.gm-more > summary::before { content: '▸ '; } .gm-more[open] > summary::before { content: '▾ '; }
.gm-more .sub { color: rgba(255,255,255,.85); font-weight: 500; }
.gm-more[open] { display: flex; flex-direction: column; gap: 8px; }
.gm-more .f { color: #fff; }
.gm-more .gm-board { background: rgba(255,255,255,.95); color: #1d1d1b; box-shadow: none; margin: 0; }
.gm-more .gm-board .sub { color: #6b6b66; }
:root[data-theme=dark] .gm-more .gm-board { background: #1b2420; color: #e8f3ee; }
:root[data-theme=dark] .gm-more .gm-board .sub { color: #a9bab2; }
:root[data-theme=dark] .gm-top li { background: #24302b; }
:root[data-theme=dark] .gm-top li.me { background: #1d3550; }
.gc-clue { background: #EAF4FF; color: #12355B; border-radius: 14px; padding: 12px 14px; font-size: 17px; font-weight: 700; line-height: 1.35; min-height: 50px; margin-bottom: 6px; text-align: center; }
.gc-clue.gc-pop { animation: gcpop .35s ease; }
@keyframes gcpop { from { transform: scale(.96); opacity: .4; } to { transform: none; opacity: 1; } }
.gi.gi-full .gc-clue { background: rgba(255,255,255,.1); color: #fff; }
.gc-rev { width: 100%; max-width: 440px; text-align: left; background: #FFF6E0; color: #5B3B00; border-radius: 14px; padding: 10px 14px; font-size: 14.5px; display: flex; flex-direction: column; gap: 6px; }
.gc-rev ul { margin: 0; padding-left: 18px; max-height: 180px; overflow: auto; }
.gm-topic { width: 100%; }
.gm-after { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gm-after .chip { align-self: center; }
.gi-modes { display: flex; flex-wrap: nowrap; gap: 5px; align-items: center; justify-content: center; max-width: 100%; }
.gi-modes .chip { align-self: center; font-size: 14px; padding: 7px 10px; white-space: nowrap; }
.gi-modes > .sub { white-space: nowrap; }
.gi-modes .chip.on, .gm-after .chip.on { background: #1c7ed6; border-color: #1c7ed6; color: #fff; font-weight: 700; }
.gm-card .gm-topic, .gm-card .gm-topic option, .gm-card .gm-topic optgroup { color: #1d2b3a; background: #fff; }
:root[data-theme=dark] .gc-clue { background: #1c2c40; color: #dbe9fb; }
:root[data-theme=dark] .gc-rev { background: #3a2f12; color: #f6dcac; }
:root[data-theme=dark] .gi-learn { background: #202d41; color: #dbe4f3; }
:root[data-theme=dark] .gq-item.gq-flag { background: #3a2f12; border-color: #b8860b; }
:root[data-theme=dark] .gq-right { background: #1f3d26; color: #b2f2bb; }
:root[data-theme=dark] .gq-wrong { background: #2a2f36; color: #ced4da; }
:root[data-theme=dark] .gq-warn { color: #ffc078; }
:root[data-theme=dark] .im-board { background: linear-gradient(180deg, #2b1d33, #1f1830); color: #e9ecef; }
:root[data-theme=dark] .im-btns button { background: #1f2a36; color: #e9ecef; }
:root[data-theme=dark] .im-top { color: #e599f7; }
:root[data-theme=dark] .im-msg { background: #1f2a36; } :root[data-theme=dark] .im-msg.good { background: #1f3d26; color: #b2f2bb; } :root[data-theme=dark] .im-msg.bad { background: #4a1f1f; color: #ffc9c9; }
:root[data-theme=dark] .cc-w { background: #1f2a36; color: #e9ecef; }
:root[data-theme=dark] .cc-w.on { background: var(--wc); color: #fff; }
:root[data-theme=dark] .cc-new { background: #3a2a14; color: #ffe8cc; }
:root[data-theme=dark] .cc-card { background: #1f2a36; color: #e9ecef; border-color: #343a40; }
:root[data-theme=dark] .gi-modes .chip.on, :root[data-theme=dark] .gm-after .chip.on { background: #1c7ed6; border-color: #1c7ed6; color: #fff; }
:root[data-theme=dark] .gm-card .gm-topic, :root[data-theme=dark] .gm-card .gm-topic option { color: #e9ecef; background: #1f2a36; }
:root[data-theme=dark] .gi-ov { background: rgba(18,26,23,.97); color: #e8f3ee; }
:root[data-theme=dark] .gi-ov .sub { color: #b9c9c1; }
:root[data-theme=dark] .gi-one { color: #b9c9c1; }
.gi-big { font-size: 21px; font-weight: 700; }
.gi-stars { font-size: 36px; }
.gi-card { width: 90px; height: 90px; border-radius: 14px; background: #0B1D2A; }
.gi-fact { width: 100%; max-width: 560px; font-size: 21px; line-height: 1.5; padding: 20px; border-radius: 18px; border: 2px solid rgba(76,110,245,.35); background: #EEF3FB; color: #1D3557; }
.l-go.g-games { background: #EFE9FF; } .l-go.g-games .l-e { background: #DCD2FF; }

/* 🎯 quiz answers: ✓ / ✗ on the options, then the result, 💡 why and ⚠️ trap, one box each */
.qopt.right, .qopt.wrong { position: relative; padding-right: 40px !important; }
.qopt.right { box-shadow: inset 0 0 0 2px #2F9E44 !important; border-color: #2F9E44 !important; }
.qopt.wrong { box-shadow: inset 0 0 0 2px #E03131 !important; border-color: #E03131 !important; }
.qopt.right::after, .qopt.wrong::after { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.qopt.right::after { content: '✓'; background: #2F9E44; }
.qopt.wrong::after { content: '✗'; background: #E03131; }
.qopt.dim { opacity: .55; }
.qfb { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; text-align: left; }
.qfb-res { font-weight: 700; font-size: 15.5px; padding: 10px 12px; border-radius: 12px; }
.qfb-res.ok { background: #EBF7EE; color: #1E6B30; }
.qfb-res.no { background: #FDEDED; color: #A61E1E; }
.qfb-ans { display: block; font-weight: 600; margin-top: 3px; }
.qfb-box { padding: 10px 12px; border-radius: 12px; font-size: 14.5px; line-height: 1.5; font-weight: 400; }
.qfb-t { font-weight: 700; font-size: 13px; margin-bottom: 3px; letter-spacing: .2px; }
.qfb-why { background: #EEF3FB; color: #1D3557; }
.qfb-trap { background: #FFF6E0; color: #6B4600; }
:root[data-theme=dark] .qfb-res.ok { color: #A8E6B5; }
:root[data-theme=dark] .qopt.qopt.right { box-shadow: inset 0 0 0 2px #40C057 !important; border-color: #40C057 !important; }

/* ✏️ news streams: unsaved changes are marked */
.nd-flag { display: none; color: #A3271F; font-weight: 600; font-size: 13px; margin-left: 8px; }
.nd-dirty .nd-flag { display: inline; }
.nd-dirty.card { border-color: #E2B4AF; }

/* 🔍 Studio search (every Studio page) */
.ss-bar { position: relative; width: 100%; box-sizing: border-box; max-width: 1180px; margin: 8px auto 0; padding: 0 16px; align-self: center; }
.ss-in { width: 100%; box-sizing: border-box; padding: 10px 14px; border: 1px solid #D8D8D2; border-radius: 12px; font-size: 15px; background: #fff; }
.ss-list { position: absolute; left: 16px; right: 16px; top: calc(100% + 4px); z-index: 60; background: #fff; border: 1px solid #D8D8D2; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12); overflow: hidden; max-height: 70vh; overflow-y: auto; }
.ss-item { display: block; width: 100%; text-align: left; padding: 10px 14px; border: 0; border-bottom: 1px solid #EEE; background: none; font: inherit; cursor: pointer; }
.ss-note { display: block; margin-top: 2px; font-size: 12.5px; }
.ss-item:hover, .ss-item:focus { background: #F1F5FB; }
.ss-flash { outline: 3px solid #F2B705; outline-offset: 4px; border-radius: 6px; transition: outline-color .4s; }

/* ⚙️ Studio → Settings: group headings between the folding cards */
.sgroup { margin: 18px 2px 2px; }
.sgroup .sgroup-t { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: .02em; }
.sgroup .sub { font-size: 13px; }

/* 🧭 Studio menu: a left column on wide screens; ☰ opens it as a drawer elsewhere */
.st-side { display: none; }
.st-side .sn-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 8px; }
.st-side .sn-g { margin-top: 10px; }
.st-side .sn-t { font-size: 12px; font-weight: 800; color: var(--muted); padding: 4px 8px; letter-spacing: .03em; }
.st-side .sn-i { display: flex; flex-direction: column; padding: 7px 10px; border-radius: 10px; color: var(--ink, inherit); text-decoration: none; font-size: 14px; line-height: 1.25; }
.st-side .sn-i small { color: var(--muted); font-size: 11px; }
.st-side .sn-i:hover { background: var(--tint); }
.st-side .sn-i.on { background: var(--tint); color: var(--accent); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.sn-back { display: none; }
.sn-owner { background: transparent !important; color: #fff !important; border-color: #555 !important; white-space: nowrap; }
/* 📱 phones: the top bar keeps the centre name readable (👑 alone, names cut with …) */
header.top > .grow { min-width: 0; }
header.top > .grow > .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
header.top > .grow > .sub { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; }
@media (max-width: 720px) { .sn-owner-t { display: none; } }
@media (max-width: 520px) { .dk-open-t { display: none; } header.top > .grow > .title { font-size: 15px; } header.top > .grow > .sub { font-size: 12px; } }
.sn-open { background: transparent !important; color: #fff !important; border-color: #555 !important; font-size: 18px; padding: 4px 10px; }
body.nav-open .st-side { display: block; position: fixed; top: 0; left: 0; bottom: 0; width: 270px; max-width: 86vw; overflow: auto; z-index: 90; background: var(--card); padding: 10px; box-shadow: 10px 0 30px rgba(0,0,0,.25); }
body.nav-open .sn-back { display: block; position: fixed; inset: 0; z-index: 89; background: rgba(0,0,0,.35); }
@media (min-width: 1500px) {
  .app:has(nav[aria-label="Studio"]) { max-width: 1560px; }
  .st-wrap { display: grid !important; grid-template-columns: 230px minmax(0, 860px); justify-content: center; gap: 16px; align-items: start; }
  body.dk-on .st-wrap { grid-template-columns: 230px minmax(0, 780px) 440px !important; }
  .st-side, body.nav-open .st-side { display: block; position: sticky; top: 8px; max-height: calc(100vh - 90px); overflow: auto; width: auto; box-shadow: none; z-index: auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px; }
  .st-side .sn-x, .sn-open { display: none; }
  body.nav-open .sn-back { display: none; }
}

/* 📅 On this day (one card) and the richer Feed cards */
.otd .otd-sec { margin: 10px 0; text-align: left; }
.otd .otd-k { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .85; margin-bottom: 4px; }
.otd .otd-sec p { margin: 4px 0 8px; }
.otd .otd-about, .td-about { display: block; font-size: .85em; opacity: .85; margin-top: 2px; }
.td-about { margin: 4px 0 0; }
.kchip { display: inline-block; margin: 2px auto 6px; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.16); font-size: .82em; font-weight: 600; }
.kwhy { font-size: .95em; opacity: .95; }
.kwho { display: block; font-size: .8em; opacity: .8; margin-top: 2px; }
.kinside { text-align: left; background: rgba(255,255,255,.1); border-radius: 14px; padding: 10px 14px; margin: 8px 0; }
.kinside .kin-t { font-weight: 800; font-size: .85em; margin-bottom: 4px; }
.kinside ul { margin: 0; padding-left: 18px; line-height: 1.45; }

/* 📏 cards start below the parts strip and count row (their real height, --ovh, measured in feed.js) */
.reels .tday-in { padding-top: max(118px, calc(var(--ovh, 0px) + 14px)) !important; }

.reels .sbtn.kfind { color: #1b1530 !important; background: #FFFFFFff !important; font-weight: 700; padding: 8px 16px; border-radius: 999px; text-decoration: none; }

.cp-prog { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.cp-prog:empty { display: none; }
.cp-prog li.now { font-weight: 700; }
.cp-prog li.done { opacity: .75; }

/* 14 Nov (owner): cards sit a little higher; videos bigger; research cards show their journal, DOI and abstract */
.reels.fullc .slide:not(.k-news):not(.tday):not(.k-done):not(.k-video) { justify-content: flex-start !important; }
.reels.fullc .slide:not(.k-news):not(.tday):not(.k-done) .sv { padding-top: max(108px, calc(var(--ovh, 0px) + 8px)) !important; }
.reels.fullc .slide:not(.k-news):not(.tday):not(.k-done) .svbg { font-size: 76px !important; }
.reels.fullc .slide.k-video { justify-content: center !important; }
.reels.fullc .slide.k-video .svbg { display: none !important; }
.reels.fullc .slide.k-video .sc { padding-left: 10px !important; padding-right: 10px !important; }
.reels .slide.k-video .vthumb { width: 100%; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.nmeta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; opacity: .9; margin: 2px 0 4px; }
.nmeta a { color: inherit; text-decoration: underline; word-break: break-all; }
.nabs { text-align: left; }
.nabs .nabs-t { font-size: 15px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 10; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.nabs .nabs-t.open { -webkit-line-clamp: unset; display: block; }
.nfree-row { display: flex; justify-content: center; margin-top: 10px; }
.nfree { border: 1px solid currentColor; background: transparent; color: inherit; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }

.reels .vlinks .sbtn { color: #1b1530 !important; background: #FFFFFFff !important; font-weight: 700; padding: 8px 16px; border-radius: 999px; text-decoration: none; }

.cc-live{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* 🧬 Structure Lab (Games) */
.gm-card.gm-struct { background: linear-gradient(135deg, #1c7ed6, #0b7285); }
.sl { display: flex; flex-direction: column; gap: 8px; }
.sl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sl-modes { display: flex; gap: 6px; }
.sl-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.sl-tab { font: inherit; font-size: 12px; padding: 7px 2px; border-radius: 8px; border: 1px solid rgba(128,128,128,.45); background: transparent; color: inherit; cursor: pointer; }
.sl-tab.on { border: 2px solid #1c7ed6; font-weight: 700; }
.sl-view { position: relative; border-radius: 14px; background: #0f1b2d; touch-action: none; }
.sl-canvas { width: 100%; height: 330px; display: block; border-radius: 14px; cursor: grab; }
.sl-tip { position: absolute; left: 8px; right: 8px; bottom: 8px; font-size: 13px; color: #e9ecef; background: rgba(0,0,0,.6); border-radius: 8px; padding: 6px 8px; }
.sl-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; opacity: .85; }
.sl-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.2); }
.sl-body h3 { margin: 6px 0 2px; }
.sl-what { font-weight: 600; margin: 4px 0; }
.sl-pts { margin: 4px 0; padding-left: 20px; line-height: 1.55; }
.sl-pts li { margin: 4px 0; }
.sl-tipbox { background: rgba(250,176,5,.15); border-left: 4px solid #fab005; border-radius: 0; padding: 8px 10px; margin: 8px 0; }
.sl-chem { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sl-mol { margin: 0; background: white; border-radius: 10px; padding: 4px; text-align: center; }
.sl-mol.wide { grid-column: 1 / -1; }
.sl-mol canvas { max-width: 100%; }
.sl-mol figcaption { font-size: 12px; color: black; font-weight: 600; }
.sl-nav { display: flex; justify-content: space-between; margin: 10px 0; }
.sl-stars { font-size: 28px; letter-spacing: 4px; }
.sl-q h3 { margin: 4px 0; }

.sl-tabs[hidden], .sl-legend[hidden] { display: none; }
.sl-pairs { display: grid; gap: 8px; }
.sl-pair { border: 1px solid rgba(128,128,128,.35); border-radius: 10px; padding: 8px 10px; }
.sl-ph { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; font-size: 14px; margin-bottom: 4px; }
.sl-ph b:first-child { text-align: right; } .sl-ph b:nth-child(2) { font-size: 12px; opacity: .7; align-self: center; }
.sl-pb { display: grid; grid-template-columns: 1fr 70px 1fr; align-items: center; gap: 6px; font-family: ui-monospace, monospace; font-size: 14px; margin: 3px 0; }
.sl-pb span:first-child { text-align: right; }
.sl-pb i { border-top: 3px dotted currentColor; opacity: .7; }

.sl-svg svg { width: 100%; height: auto; max-height: 260px; }
.sl-key { grid-column: 1 / -1; font-size: 12px; opacity: .85; }

.sl-mol { cursor: zoom-in; }

.sl-wrap, .sl-room { display: flex; flex-direction: column; gap: 10px; }
.sl-pick { display: flex; gap: 12px; align-items: center; text-align: left; font: inherit; color: inherit; background: transparent; border: 1px solid rgba(128,128,128,.4); border-radius: 14px; padding: 12px; cursor: pointer; }
.sl-pick b { display: block; font-size: 16px; } .sl-pe { font-size: 30px; }
.sl-tabs7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sl-opts { display: grid; gap: 8px; } .sl-opt { text-align: left; }
.sl-opt.ok { border: 2px solid #2f9e44 !important; } .sl-opt.bad { border: 2px solid #e03131 !important; }
.sl-mutabox input[type=range] { width: 100%; }
.sl-muta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; font-size: 13px; font-weight: 600; }

.aa-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.aa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.aa-card figcaption { font-weight: 400; } .aa-card figcaption b { font-size: 13px; }
.aa-info { padding: 8px 10px; color: black; } .aa-info p { margin: 6px 0; }
.aa-table { display: grid; gap: 6px; } .aa-row { border: 1px solid rgba(128,128,128,.35); border-radius: 10px; padding: 8px 10px; }
.aa-facts { display: grid; gap: 8px; } .aa-fact { border-radius: 10px; padding: 8px 10px; border: 1px solid rgba(128,128,128,.35); }
.aa-fact.ok { border-left: 5px solid #2f9e44; } .aa-fact.no { border-left: 5px solid #e03131; }
.sl-zw { color: black; padding: 10px; } .sl-form { text-align: center; margin: 6px 0; } .sl-big { font-size: 20px; font-weight: 800; font-family: ui-monospace, monospace; }
.sl-zw input[type=range], .sl-ramabox { width: 100%; } .rama { touch-action: none; cursor: crosshair; }
.rama-out { color: black; font-size: 14px; margin: 6px 0; }

.gm-card.gm-snake { background: linear-gradient(135deg, #7048e8, #1c7ed6); }
/* 🐍 Protein Snake */
.psn { width: 100%; max-width: 520px; margin: 0 auto; -webkit-user-select: none; user-select: none; }
@media (max-width: 600px) { .gm .psn-board { margin: 0 -10px; } }   /* phones: the board uses the whole width */
.psn-intro { background: linear-gradient(160deg, #16213e, #0f3460); border-radius: 18px; padding: 18px; color: #f1f3f5; }
.psn-title { font-size: 21px; font-weight: 700; } .psn-sub { font-size: 13px; opacity: .8; margin: 2px 0 6px; }
.psn-step { display: flex; gap: 10px; align-items: center; margin: 8px 0; font-size: 14px; } .psn-step i { font-style: normal; font-size: 20px; width: 28px; text-align: center; }
.psn-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 10px 0; font-size: 13px; }
.psn-chip { padding: 7px 12px; border-radius: 999px; font: inherit; font-size: 13px; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); cursor: pointer; }
.psn-chip.on { background: #ffd43b; color: #1a1a2e; border-color: #ffd43b; }
.psn-levels { display: grid; gap: 6px; margin-top: 8px; }
.psn-lv { display: flex; justify-content: space-between; gap: 8px; align-items: center; text-align: left; font: inherit; padding: 10px 12px; border-radius: 12px; border: 0; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; }
.psn-lv span { font-size: 12px; opacity: .75; } .psn-lv.locked { opacity: .45; cursor: default; }
.psn-bar { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 6px; flex-wrap: wrap; }
.psn-seq { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; max-height: 92px; overflow: auto; }
.psn-seq span { padding: 3px 6px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.psn-board { position: relative; } .psn-cv { width: 100%; aspect-ratio: 1; display: block; border-radius: 14px; touch-action: none; }
.psn-toast { position: absolute; left: 50%; transform: translateX(-50%); top: 10px; max-width: 90%; padding: 7px 12px; border-radius: 999px; background: rgba(10,15,30,.85); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; pointer-events: none; transition: opacity .25s; }
.psn-over { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 14px; background: rgba(10,15,30,.55); border-radius: 14px; }
.psn-card { background: white; color: black; border-radius: 16px; padding: 16px; max-width: 330px; font-size: 14px; line-height: 1.5; max-height: 100%; overflow: auto; }
.psn-small { font-size: 12px; color: gray; } .psn-h { font-size: 18px; font-weight: 700; margin: 2px 0 6px; }
.psn-mono { margin-top: 8px; font-family: ui-monospace, monospace; font-weight: 700; letter-spacing: 2px; word-break: break-all; } .psn-warn { margin-top: 6px; color: #e03131; font-size: 13px; }
.psn-go { width: 100%; margin-top: 12px; padding: 12px; border-radius: 12px; border: 0; background: #ffd43b; color: #1a1a2e; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
.psn-mini { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
/* 🐍 arrows + ⏸ 🎨 ☰ in the corners (owner, 16 Nov 2026: bigger board, buttons easy to reach) */
.psn-pad { display: grid; grid-template-columns: repeat(3, minmax(64px, 84px)); gap: 6px; justify-content: center; margin-top: 8px; }
.psn-pad button { height: 54px; border-radius: 16px; font-size: 22px; background: white; color: black; border: 1px solid silver; box-shadow: 0 2px 0 silver; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.psn-pad .psn-side { width: 100%; height: 46px; align-self: center; font-size: 19px; background: rgba(128,128,128,.12); border-color: rgba(128,128,128,.3); box-shadow: none; color: inherit; }
.psn-pad.off button[data-d] { visibility: hidden; }
.psn-pad button:active { transform: translateY(2px); box-shadow: none; }
.psn-end { margin-top: 10px; } .psn-fact { text-align: center; font-size: 14px; margin-bottom: 6px; } .psn-fh { text-align: center; font-weight: 700; margin-bottom: 8px; }
.psn-fold { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-bottom: 8px; align-items: center; }
.psn-fold button { padding: 6px 5px; font: inherit; font-size: 12px; border-radius: 9px; border: 0; color: black; cursor: pointer; }
.psn-fold button.sel { box-shadow: 0 0 0 3px #fab005; } .psn-fold button.done { box-shadow: 0 0 0 3px #2f9e44; }
.psn-chain { margin-right: 4px; } .psn-opt { display: block; width: 100%; margin: 6px 0; text-align: left; } .psn-opt.bad { border: 2px solid #e03131 !important; }

.gm-card.gm-crush { background: linear-gradient(135deg, #f76707, #d6336c); }
/* 🍬 Base-Pair Crush */
.bpc { width: 100%; max-width: 560px; margin: 0 auto; -webkit-user-select: none; user-select: none; }
@media (max-width: 600px) { .bpc { width: calc(100% + 24px); margin: 0 -12px; } }   /* phones: use the whole width */
/* 🍬 Base-Pair Crush (16 Nov 2026 look-over: full width, one calm night-blue panel, the same in light and dark) */
.bpc-intro { background: linear-gradient(160deg, rgba(59,42,116,1), rgba(28,63,138,1)); border-radius: 14px; padding: 18px; color: white; }
.bpc-title { font-size: 22px; font-weight: 800; } .bpc-sub { font-size: 13.5px; opacity: .85; margin: 2px 0 8px; }
.bpc-step { display: flex; gap: 10px; align-items: center; margin: 8px 0; font-size: 14.5px; } .bpc-step i { font-style: normal; font-size: 20px; width: 28px; text-align: center; }
.bpc-levels { display: grid; gap: 7px; margin-top: 12px; }
.bpc-lv { display: flex; justify-content: space-between; gap: 8px; align-items: center; text-align: left; font: inherit; font-weight: 700; padding: 12px 14px; border-radius: 10px; border: 0; background: rgba(255,255,255,.13); color: white; cursor: pointer; }
.bpc-lv span { font-size: 12px; font-weight: 500; opacity: .75; } .bpc-lv.locked { opacity: .45; cursor: default; }
.bpc-game { background: white; border-radius: 14px; padding: 10px; color: rgba(33,37,41,1); box-shadow: 0 2px 10px rgba(0,0,0,.12); }
/* 🍬 16 Nov 2026 (owner): white like the preview, small corners, a short strand box */
.bpc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 2px 8px; flex-wrap: wrap; font-weight: 700; font-size: 16px; color: rgba(33,37,41,1); }
.bpc-moves { background: rgba(33,37,41,1); color: white; border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 13px; }
.bpc-strand { background: white; color: rgba(33,37,41,1); border-radius: 12px; padding: 4px 8px 7px; line-height: 1.2; margin-bottom: 8px; border: 1px solid rgba(0,0,0,.09); }
.bpc-srow { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; }
.bpc-sb { box-sizing: border-box; flex: none; width: 32px; height: 32px; max-height: 32px; line-height: 1; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; color: white; }
.bpc-sb.bpc-empty { background: rgba(241,243,245,1); color: rgba(134,142,150,1); border: 2px dashed rgba(206,212,218,1); }
.bpc-sb.next { border: 2px solid rgba(250,204,21,1); box-shadow: 0 0 0 2px rgba(250,204,21,.35); }
.bpc-bonds { display: flex; gap: 5px; justify-content: center; font-size: 12px; font-weight: 800; color: rgba(134,142,150,1); height: 12px; line-height: 12px; flex-wrap: wrap; } .bpc-bonds span { width: 32px; text-align: center; }
.bpc-slab { font-size: 11px; color: rgba(134,142,150,1); text-align: center; margin: 0 0 3px; }
.bpc-need { text-align: center; font-size: 14px; font-weight: 700; margin-top: 5px; color: rgba(33,37,41,1); }
.bpc-board { position: relative; width: 100%; aspect-ratio: 1; background: linear-gradient(160deg, rgba(59,42,116,1), rgba(28,63,138,1)); border-radius: 14px; overflow: hidden; touch-action: none; }
.bpc-tile { position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center; transition: transform .2s ease, opacity .2s ease; will-change: transform; cursor: pointer; }
.bpc-tile .in { width: 86%; height: 86%; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; color: white; box-shadow: inset 0 -4px 0 rgba(0,0,0,.18), inset 0 3px 0 rgba(255,255,255,.35); }
.bpc-tile.base .in { font-size: clamp(20px, 6vw, 26px); text-shadow: 0 2px 0 rgba(0,0,0,.25); } .bpc-tile.icon .in { font-size: clamp(22px, 6.2vw, 28px); background: rgba(255,255,255,.92); }
.bpc-tile.sel .in { outline: 3px solid rgba(255,212,59,1); outline-offset: 2px; } .bpc-tile.pop { opacity: 0; }
.bpc-toast { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); padding: 7px 12px; border-radius: 999px; background: rgba(10,15,30,.85); color: white; font-size: 13px; font-weight: 700; white-space: nowrap; opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 5; }
.bpc-over { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 14px; background: rgba(10,15,30,.55); z-index: 6; }
.bpc-card { background: white; color: rgba(25,25,35,1); border-radius: 14px; padding: 16px; max-width: 320px; font-size: 14px; line-height: 1.55; } .bpc-card h3 { margin: 2px 0 6px; font-size: 19px; }
.bpc-small { font-size: 12px; color: rgba(90,95,105,1); } .bpc-mono { font-family: ui-monospace, monospace; font-weight: 800; letter-spacing: 3px; margin: 4px 0 8px; }
.bpc-go { width: 100%; margin-top: 12px; padding: 12px; border-radius: 12px; border: 0; background: rgba(255,212,59,1); color: rgba(26,26,46,1); font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; }
.bpc-legend { display: flex; gap: 10px; justify-content: center; align-items: center; font-size: 13px; margin-top: 10px; font-weight: 600; flex-wrap: wrap; color: rgba(33,37,41,1); }
.bpc .bpc-legend button.btn { background: rgba(241,243,245,1) !important; color: rgba(33,37,41,1) !important; border: 1px solid rgba(206,212,218,1) !important; }
.bpc-chip { display: inline-flex; width: 22px; height: 22px; border-radius: 7px; align-items: center; justify-content: center; color: white; font-weight: 800; font-size: 13px; }
.bpc-burst { position: absolute; pointer-events: none; font-weight: 800; color: rgba(255,212,59,1); font-size: 16px; text-shadow: 0 2px 0 rgba(0,0,0,.35); transition: transform .7s ease, opacity .7s ease; z-index: 4; white-space: nowrap; }

/* 🗞 Top news page (15 Nov 2026 tidy-up): like the Today card, no big header that stays on top */
.slide.tday.brk { --sc: #a61e4d; }
.brk-hi { font-size: 30px; }
.brk-wait { opacity: .8; }
.brk-sec { margin-top: 0; text-align: left; }
.brk-sec .brk-list { margin: 8px 0 0; padding-left: 0; list-style: none; counter-reset: brk; gap: 0; }
.brk-sec .brk-list li { counter-increment: brk; display: grid; grid-template-columns: 26px 1fr; column-gap: 8px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.14); font-size: 16px; line-height: 1.4; }
.brk-sec .brk-list li:first-child { border-top: 0; padding-top: 4px; }
.brk-sec .brk-list li::before { content: counter(brk); grid-row: span 2; font-weight: 800; opacity: .7; }
.brk-sec .brk-list a { color: #FFFFFF; }
.brk-sec .brk-src { grid-column: 2; }
.td-pins .td-link { color: #FFFFFF; font-weight: 700; white-space: nowrap; }
/* 🔬 the Science feed chip: small icon + two-line name, same height as the other chips */
.rbar .rj .rj-ico { font-size: 15px; margin-right: 4px; }
.rbar .rj .rj2 { font-size: 11.5px; line-height: 1.05; text-align: left; font-weight: 800; }

/* 🧭 Feed cards map: small shortcuts under each Recipe row (🎨 Look · 📝 Cards · ⚙️ settings) */
.rc-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 3px; }
.rc-links .linkbtn, .lay-links .linkbtn { background: none; border: 0; padding: 4px 0; min-height: 28px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--accent); cursor: pointer; }
.rc-links .linkbtn:hover, .lay-links .linkbtn:hover { text-decoration: underline; }
.rc-fixed { background: var(--soft, rgba(0,0,0,.03)); }

.wbtn.wclose:hover { background: #fde2e1; color: #a1160a; }

.nl-sites { margin: 6px 0 0; padding-left: 20px; font-size: 14px; line-height: 1.5; }
.nl-stream.dim > summary { opacity: .65; }

/* 📜 Scroll view (16 Nov 2026 fix): full cards one under the other. The cards are flex items of the deck, so they must
   not shrink (they were squashed into thin lines); the big top space of the swipe view is not needed here. */
/* 📜 Scroll mode: the list starts BELOW the parts strip and the count row, so no text can ever slide under them (owner 17 Nov: headlines under the chips) */
.reels.list .rdeck { margin-top: var(--ovh, 96px); height: calc(100% - var(--ovh, 96px)); padding-top: 10px; }
.reels.list .slide { flex: 0 0 auto; height: auto !important; min-height: 0; overflow: visible; border-radius: 22px; }
.reels.list .slide.tday { overflow: visible; }
.reels.list .tday-in { min-height: 0; padding: 22px 18px 18px !important; }
.reels.list .td-hi { font-size: 28px; }
.reels.fullc.list .slide:not(.k-news):not(.tday) .sv { padding-top: 22px !important; height: auto; }
.reels.fullc.list .slide:not(.k-news):not(.tday) .svbg { font-size: 56px; }
.reels.fullc.list .slide:not(.k-news):not(.tday) .sc { padding: 10px 18px 18px; }
.reels.list .slide.k-news .sv { height: 150px; flex: 0 0 auto; }
.reels.list .sc { flex: 0 0 auto; overflow: visible; }
.reels.list .rframe::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: calc(var(--ovh, 96px) + 4px); background: linear-gradient(#0b0f0d 82%, rgba(11,15,13,0)); z-index: 4; pointer-events: none; }

/* 📰 Feed controls (16 Nov 2026): strip chip size, strip in one row or wrapped */
.reels.chip-s .rbar .rj { height: 32px !important; font-size: 13px !important; padding: 0 10px; }
.reels.chip-s .rbar .rj .rj2 { font-size: 10px; }
.reels.chip-l .rbar .rj { height: 46px !important; font-size: 17px !important; padding: 0 18px; }
.reels.chip-l .rbar .rj .rj2 { font-size: 13px; }
.reels.strip-wrap .rbar { flex-wrap: wrap; overflow-x: visible; border-radius: 20px; row-gap: 5px; }
.reels.auto-paused .rprog i { transition: none !important; }

.vers-few .vers-old { display: none; }
/* 👀 one preview at a time on Look and words: when the 📱 Student phone is open beside the page, the page's own preview hides */
@media (min-width: 900px) { body.dk-on .lk-grid { grid-template-columns: 1fr; } body.dk-on .lk-side { display: none; } }

.rbar[hidden] { display: none !important; }   /* 🧩 Feed strip switched off (the strip's own display won before) */

/* 📱 Base-Pair Crush plays on the whole screen (16 Nov 2026): over the top bar, edge to edge, the board as big as fits */
.bpc.bpc-full { position: fixed; inset: 0; z-index: 70; width: 100%; max-width: none; margin: 0; background: white; overflow-y: auto; box-sizing: border-box; }
.bpc.bpc-full .bpc-game { width: 100%; max-width: 620px; margin: 0 auto; border-radius: 0; box-shadow: none; padding: 8px 6px; box-sizing: border-box; }
.bpc.bpc-full .bpc-board { width: min(100%, calc(100dvh - 300px)); margin: 0 auto; flex: none; }
.bpc.bpc-full .bpc-strand { margin: 0 2px; padding: 8px 8px 10px; }
.bpc.bpc-full .bpc-game[style*="block"] { display: flex !important; flex-direction: column; justify-content: space-evenly; min-height: 100dvh; padding-top: max(8px, env(safe-area-inset-top)); }
.bpc.bpc-full .bpc-top { font-size: 18px; margin: 0 4px; }
.bpc.bpc-full .bpc-sb { width: 40px; height: 40px; max-height: 40px; font-size: 19px; border-radius: 9px; }
.bpc.bpc-full .bpc-bonds span { width: 40px; }
.bpc.bpc-full .bpc-need { font-size: 16px; margin-top: 8px; }
.bpc.bpc-full .bpc-legend { margin-top: 0; font-size: 14px; }

/* 🔍 Structure Lab picture viewer (zoomview.js, 16 Nov 2026): fitted, pinch to zoom; follows light / dark, picture area white */
.zv { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; background: white; color: rgba(33,37,41,1); }
.zv-bar { display: flex; align-items: center; gap: 10px; padding: max(8px, env(safe-area-inset-top)) 10px 8px 14px; border-bottom: 1px solid rgba(0,0,0,.12); }
.zv-bar b { flex: 1; min-width: 0; font-size: 16px; line-height: 1.25; }
.zv-x { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.08); color: inherit; font-size: 20px; font-weight: 700; cursor: pointer; }
.zv-extra { max-height: 30vh; overflow: auto; padding: 8px 14px; border-bottom: 1px solid rgba(0,0,0,.12); font-size: 14px; }
.zv-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; background: white; cursor: grab; }
.zv-pic { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.zv-pic svg { display: block; }
.zv-tools { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(33,37,41,.88); box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.zv-b { min-width: 48px; height: 44px; border: 0; border-radius: 999px; background: rgba(255,255,255,.14); color: white; font-size: 20px; font-weight: 700; cursor: pointer; }
.zv-b:nth-child(2) { font-size: 15px; padding: 0 14px; }
:root[data-theme=dark] .zv { background: rgba(24,26,30,1); color: rgba(235,237,240,1); }
:root[data-theme=dark] .zv-bar { border-color: rgba(255,255,255,.14); }
:root[data-theme=dark] .zv-extra, :root[data-theme=dark] .zv-extra * { background: white; color: rgba(33,37,41,1); }   /* facts sit on white like the picture */
:root[data-theme=dark] .zv-x { background: rgba(255,255,255,.16); }
/* 🍬 Crush whole screen: ✕ in the top-right corner */
.bpc-x { display: none; }
.bpc.bpc-full .bpc-x { display: block; position: fixed; top: max(8px, env(safe-area-inset-top)); right: 8px; z-index: 71; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.08); color: rgba(33,37,41,1); font-size: 18px; font-weight: 700; cursor: pointer; }
.bpc.bpc-full .bpc-top { padding-right: 44px; }

/* ✋ Catch the Answer: hold a finger still to stop and read (16 Nov 2026) */
.gc-hold { position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%); padding: 10px 18px; border-radius: 999px; background: rgba(0,0,0,.72); color: white; font-weight: 700; font-size: 16px; pointer-events: none; white-space: nowrap; z-index: 3; }
.gc-hold[hidden] { display: none; }
.gc .gi-canvas { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* 🧭 Games: one clear top bar in every game (16 Nov 2026) — "← Games" + the game's name; stays on top while scrolling */
.gm-bar { position: relative; z-index: 20; display: flex; align-items: center; gap: 10px; margin: -4px -4px 10px; padding: 6px; border-radius: 14px; background: white; color: rgba(33,37,41,1); box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.gm-back { flex: none; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 0; background: rgba(28,126,214,1); color: white; font-size: 15px; font-weight: 700; cursor: pointer; }
.gm-name { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-ask-bg { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 20px; }
.gm-ask { width: min(320px, 100%); border-radius: 16px; padding: 20px; background: white; color: rgba(33,37,41,1); display: grid; gap: 10px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.gm-ask b { font-size: 19px; }
:root[data-theme=dark] .gm-bar, :root[data-theme=dark] .gm-ask { background: rgba(37,41,46,1); color: rgba(235,237,240,1); box-shadow: 0 2px 10px rgba(0,0,0,.4); }

/* 🧱 Owner page: clear boxes (16 Nov 2026) — a grid of big boxes; a box opens only its part */
.ob-main { max-width: 980px; margin: 0 auto; }
.ob-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.ob-box { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 16px; min-height: 140px; border-radius: 16px; border: 1px solid rgba(0,0,0,.1); background: white; color: inherit; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.06); font: inherit; }
.ob-box:hover { box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.ob-box b { font-size: 18px; }
.ob-e { font-size: 30px; line-height: 1; }
.ob-n { font-weight: 700; color: rgba(28,126,214,1); }
.ob-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ob-bar h2 { margin: 0; }
.ob-back { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 0; background: rgba(28,126,214,1); color: white; font-weight: 700; font-size: 15px; cursor: pointer; }
.ob-health { display: grid; gap: 4px; }
:root[data-theme=dark] .ob-box { background: rgba(37,41,46,1); border-color: rgba(255,255,255,.12); }
:root[data-theme=dark] .ob-n { color: rgba(116,192,252,1); }

/* 👀 a course of another class (mentor with "See all courses and tests"): look only, no buttons to change it */
.cfold.view-only button, .cfold.view-only .tools { display: none !important; }

/* 🏛 Names and designations (Owner page) */
.nm-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line, #e5e7eb); }
.nm-in { display: flex; gap: 6px; }
.nm-in input { flex: 1; min-width: 0; }
@media (max-width: 560px) { .nm-row { grid-template-columns: 1fr; } }

/* 🎨 game backgrounds (owner, 16 Nov 2026) */
.gbg-pop { position: fixed; left: 50%; transform: translateX(-50%); z-index: 400; width: min(94vw, 420px); background: white; color: #212529; border-radius: 16px; padding: 10px 12px; box-shadow: 0 8px 30px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 8px; }
.gbg-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.gbg-chip { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; border: 2px solid #dee2e6; background: #f8f9fa; color: inherit; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.gbg-chip.on { border-color: #1c7ed6; background: #e7f5ff; font-weight: 700; }
.gbg-sw { width: 22px; height: 22px; border-radius: 6px; flex: none; background: var(--sw, #ccc); border: 1px solid rgba(128,128,128,.4); }
.gbg-pop { max-height: calc(100dvh - 16px); overflow: auto; }
:root[data-theme=dark] .gbg-pop { background: #25292e; color: #ebedf0; box-shadow: 0 8px 30px rgba(0,0,0,.6); }
:root[data-theme=dark] .gbg-chip { background: #1f2329; border-color: #3a3f45; color: #ebedf0; }
:root[data-theme=dark] .gbg-chip.on { background: #16354b; border-color: #4dabf7; }

/* 📨 emails follow "Send emails" (owner, 16 Nov 2026) */
.nf-mail .nf-offnote { display: none; font-size: 13px; font-weight: 600; color: #8a5a00; background: #fff4e6; border-radius: 8px; padding: 6px 10px; }
.nf-mail.nf-off .nf-offnote { display: block; }
.nf-mail.nf-off > :not(.nf-offnote):not(.nf-i) { opacity: .45; pointer-events: none; filter: grayscale(.6); }
:root[data-theme=dark] .nf-mail .nf-offnote { background: #3a2a14; color: #ffd8a8; }
.nf-i > summary { cursor: pointer; font-size: 13px; color: var(--accent, #1c7ed6); list-style: none; width: max-content; }
.nf-i > summary::-webkit-details-marker { display: none; }
.nf-i > div { font-size: 13px; line-height: 1.5; background: var(--tint, #f1f3f5); border-radius: 8px; padding: 8px 10px; margin-top: 4px; }
.nf-cols { display: flex; flex-direction: column; gap: 14px; }
.nf-save { position: sticky; bottom: 0; z-index: 5; padding: 10px 0; background: var(--bg); }

/* 🖥 Owner page on a computer (owner, 16 Nov 2026: "on PC it should look like PC, professionally"): a menu on the left,
   the part on the right using the width, tighter type and controls. Phones keep the one-column look. */
.ob-side { display: none; }
@media (min-width: 1000px) {
  .app:has(.ob-wrap) { max-width: 1480px; }
  .app:has(.ob-wrap) > header.top { padding: 14px 28px; border-radius: 0; }
  .ob-wrap { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; padding: 18px 28px 40px; align-items: start; }
  .ob-wrap > .ob-main { max-width: none; margin: 0; padding: 0 0 60px; font-size: 14px; }
  .ob-side { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 14px; background: var(--card, #fff); border: 1px solid var(--line, #e5e7eb); border-radius: 12px; padding: 8px; }
  .ob-si { display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
  .ob-si:hover { background: var(--tint, #f1f3f5); }
  .ob-si.on { background: var(--tint, #e7f5ff); color: var(--accent, #1c7ed6); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent, #1c7ed6); }
  .ob-si .grow { display: flex; flex-direction: column; min-width: 0; }
  .ob-si small { font-size: 12px; font-weight: 400; color: var(--muted, #868e96); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ob-se { width: 22px; text-align: center; flex: none; }
  .ob-wrap .ob-back { display: none; }
  .ob-wrap .ob-bar h2 { font-size: 22px; }
  .ob-wrap .ob-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
  .ob-wrap .ob-box { min-height: 0; padding: 16px 18px; border-radius: 12px; }
  .ob-wrap .ob-box b { font-size: 16px; }
  .ob-wrap .card { border-radius: 12px; padding: 16px 18px; }
  .ob-wrap .card h2 { font-size: 16px; }
  .ob-wrap .sub { font-size: 13px; }
  .ob-wrap input[type=checkbox], .ob-wrap input[type=radio] { width: 17px !important; height: 17px !important; }
  .ob-wrap .row { min-height: 0; }
  .ob-wrap .btn { min-height: 36px; font-size: 14px; }
  .ob-wrap .btn.small { min-height: 30px; font-size: 13px; }
  .ob-wrap input:not([type=checkbox]):not([type=radio]), .ob-wrap select, .ob-wrap textarea { font-size: 14px; padding: 8px 10px; min-height: 36px; }
  .ob-wrap .ofold, .ob-wrap .osec > summary { font-size: 14px; }
  .ob-wrap .osec-t { font-size: 15px; }
  /* 📨 two columns: the Sheet on the left, the emails on the right; Save stays at the bottom */
  .nf-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
  .nf-save { grid-column: 1 / -1; border-top: 1px solid var(--line, #e5e7eb); }
}

/* 🖥 Studio on a computer (owner, 16 Nov 2026: "on PC it should look like PC, professionally"): from 1000px the
   left menu is always there (no ☰), the bottom tab bar goes (the menu has the same pages), the page uses the width
   and type and controls are tighter. With the 📱 student preview open on a narrower screen the menu folds back
   into ☰ so the page keeps room. Phones keep the one-column look. */
@media (min-width: 1000px) {
  .app:has(nav[aria-label="Studio"]) { max-width: 1560px; }
  .app:has(nav[aria-label="Studio"]) > header.top { padding: 12px 24px; border-radius: 0; }
  .st-wrap { display: grid !important; grid-template-columns: 240px minmax(0, 1080px); justify-content: center; gap: 24px; align-items: start; padding: 0 24px; }
  .st-side, body.nav-open .st-side { display: block; position: sticky; top: 8px; max-height: calc(100vh - 90px); overflow: auto; width: auto; box-shadow: none; z-index: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
  .st-side .sn-x, .sn-open { display: none; }
  body.nav-open .sn-back { display: none; }
  nav.tabs[aria-label="Studio"] { display: none; }
  body.l1-bottomtabs main.st-main, .st-wrap > main { padding-bottom: 60px; }
  .st-wrap > main { max-width: none; min-width: 0; font-size: 14px; }
  .st-wrap > main .card { border-radius: 12px; padding: 16px 18px; }
  .st-wrap > main .card h2 { font-size: 17px; }
  .st-wrap > main .sub { font-size: 13px; }
  .st-wrap > main .btn { min-height: 36px; font-size: 14px; }
  .st-wrap > main .btn.small { min-height: 30px; font-size: 13px; }
  .st-wrap > main input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]), .st-wrap > main select, .st-wrap > main textarea { font-size: 14px; padding: 8px 10px; min-height: 36px; }
  .st-wrap > main input[type=checkbox], .st-wrap > main input[type=radio] { width: 17px !important; height: 17px !important; }
  .st-wrap > main .card > .btn, .st-wrap > main .card > a.btn { width: auto; align-self: flex-start; padding-left: 22px; padding-right: 22px; }
  body.dk-on .st-wrap { grid-template-columns: 240px minmax(0, 1fr) 420px !important; justify-content: stretch; }
}
@media (min-width: 1200px) and (max-width: 1399px) {
  body.dk-on .st-wrap { grid-template-columns: 210px minmax(0, 1fr) 360px !important; gap: 16px; padding: 0 16px; }
}
@media (min-width: 1000px) and (max-width: 1199px) {
  /* not enough room for three columns: the menu folds into ☰ and the bottom buttons come back */
  body.dk-on .st-wrap { grid-template-columns: minmax(0, 1fr) 380px !important; }
  body.dk-on .st-side { display: none; }
  body.dk-on .sn-open { display: inline-flex; }
  body.dk-on nav.tabs[aria-label="Studio"] { display: flex; }
  body.dk-on.nav-open .st-side { display: block; position: fixed; top: 0; left: 0; bottom: 0; width: 270px; z-index: 90; box-shadow: 10px 0 30px rgba(0,0,0,.25); }
}
@media (min-width: 1000px) and (max-width: 1099px) {
  body.dk-on .st-wrap { grid-template-columns: minmax(0, 1fr) !important; }
}

/* 🩺 Owner page → Problems */
.pb-row > summary { cursor: pointer; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; }
.pb-t { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pb-t .pill, .pb-all .pill { font-size: 12px; padding: 2px 8px; min-height: 0; line-height: 1.4; font-weight: 600; }
.pb-d { font-family: ui-monospace, Menlo, monospace; word-break: break-word; }
.pb-ex { font-size: 14px; line-height: 1.5; background: var(--tint, #f1f3f5); border-radius: 10px; padding: 10px 12px; }
.pb-all { border-top: 1px solid var(--line, #e5e7eb); padding: 8px 0; }
.pb-all > summary { cursor: pointer; font-weight: 600; }

/* 📘 Owner page → Guide and 🔍 its search */
.os-bar { position: relative; margin: 0 0 12px; }
.os-bar .ss-list { left: 0; right: 0; }
.os-list .ss-item { display: flex; flex-direction: column; gap: 2px; }
.gd-sec > summary { cursor: pointer; }
.gd-list { margin: 8px 0 0; padding-left: 20px; line-height: 1.55; }
.gd-list li { margin: 4px 0; }
.gd-bts { list-style: none; margin-left: -20px !important; background: var(--tint, #f1f3f5); border-left: 3px solid #f2b705; border-radius: 6px; padding: 6px 10px; }
.gd-sub { border-top: 1px solid var(--line, #e5e7eb); padding: 6px 0; }
.gd-sub > summary { cursor: pointer; font-weight: 600; }
.gd-p { margin: 8px 0; line-height: 1.55; }
.gd-tab { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.gd-tab th, .gd-tab td { text-align: left; vertical-align: top; padding: 7px 8px; border-top: 1px solid var(--line, #e5e7eb); line-height: 1.5; }
.gd-tab th { width: 28%; white-space: normal; }

/* 🔐 News streams: which centres may use each stream */
.nl-prow { border-top: 1px solid var(--line, #e5e7eb); padding: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.pill.dim { opacity: .55; }

/* 🌐 a centre's web address: the steps */
.dm-step.done { border-left: 4px solid #2f9e44; }
.dm-step h3 { margin: 0; font-size: 15px; }
.dm-ol { margin: 4px 0; padding-left: 20px; line-height: 1.6; }
.dm-pre { background: var(--tint, #f1f3f5); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 0; white-space: pre-wrap; }

/* 📱 student view only: the class picker */
.sv-pick { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; max-width: 100%; }
.sv-pick select { font: inherit; font-weight: 700; padding: 6px 10px; border-radius: 8px; width: 100%; max-width: 340px; text-overflow: ellipsis; }
.sv-pick .sv-note { font-size: 12px; opacity: .75; font-weight: 400; }
.l-hello .sv-pick { color: inherit; }

/* 🧱🎨 Studio + Owner page: clear boxes, every block and every option its own colour in turn (owner 17 Nov) */
/* the colours, in turn: green, blue, purple, orange, pink, teal. --c line, --cs header strip, --cb edge, --cp pale inside */
:is(.st-wrap, .ob-wrap) .card:not(.tint) { --c: #1B7F5A; --cs: #DCEFE5; --cb: #B9D6C6; --cp: #F3FAF6; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .card:not(.tint) { --cs: #173a2c; --cb: #2a5a45; --cp: #141f1a; }
:is(.st-wrap, .ob-wrap) .card:not(.tint):nth-child(6n+2 of .card:not(.tint)) { --c: #2F6FC4; --cs: #DDE9F8; --cb: #B7CDEB; --cp: #F3F7FD; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .card:not(.tint):nth-child(6n+2 of .card:not(.tint)) { --cs: #1a2d47; --cb: #2d4b73; --cp: #141a24; }
:is(.st-wrap, .ob-wrap) .card:not(.tint):nth-child(6n+3 of .card:not(.tint)) { --c: #7A4FC4; --cs: #EAE1F8; --cb: #CFBDEB; --cp: #F7F3FD; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .card:not(.tint):nth-child(6n+3 of .card:not(.tint)) { --cs: #2b2145; --cb: #46366e; --cp: #1b1726; }
:is(.st-wrap, .ob-wrap) .card:not(.tint):nth-child(6n+4 of .card:not(.tint)) { --c: #C9721A; --cs: #FBE9D6; --cb: #EDCBA6; --cp: #FEF8F1; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .card:not(.tint):nth-child(6n+4 of .card:not(.tint)) { --cs: #3d2a14; --cb: #634422; --cp: #221b14; }
:is(.st-wrap, .ob-wrap) .card:not(.tint):nth-child(6n+5 of .card:not(.tint)) { --c: #C2407A; --cs: #F9DFEA; --cb: #EBB9CF; --cp: #FDF4F8; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .card:not(.tint):nth-child(6n+5 of .card:not(.tint)) { --cs: #3d1a2b; --cb: #632b45; --cp: #22161c; }
:is(.st-wrap, .ob-wrap) .card:not(.tint):nth-child(6n+6 of .card:not(.tint)) { --c: #138A96; --cs: #D7F0F2; --cb: #AFD9DE; --cp: #F1FAFB; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .card:not(.tint):nth-child(6n+6 of .card:not(.tint)) { --cs: #133539; --cb: #22565c; --cp: #131f21; }
:is(.st-wrap, .ob-wrap) .chapter { --c: #1B7F5A; --cs: #DCEFE5; --cb: #B9D6C6; --cp: #F3FAF6; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .chapter { --cs: #173a2c; --cb: #2a5a45; --cp: #141f1a; }
:is(.st-wrap, .ob-wrap) .chapter:nth-child(6n+2 of .chapter) { --c: #2F6FC4; --cs: #DDE9F8; --cb: #B7CDEB; --cp: #F3F7FD; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .chapter:nth-child(6n+2 of .chapter) { --cs: #1a2d47; --cb: #2d4b73; --cp: #141a24; }
:is(.st-wrap, .ob-wrap) .chapter:nth-child(6n+3 of .chapter) { --c: #7A4FC4; --cs: #EAE1F8; --cb: #CFBDEB; --cp: #F7F3FD; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .chapter:nth-child(6n+3 of .chapter) { --cs: #2b2145; --cb: #46366e; --cp: #1b1726; }
:is(.st-wrap, .ob-wrap) .chapter:nth-child(6n+4 of .chapter) { --c: #C9721A; --cs: #FBE9D6; --cb: #EDCBA6; --cp: #FEF8F1; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .chapter:nth-child(6n+4 of .chapter) { --cs: #3d2a14; --cb: #634422; --cp: #221b14; }
:is(.st-wrap, .ob-wrap) .chapter:nth-child(6n+5 of .chapter) { --c: #C2407A; --cs: #F9DFEA; --cb: #EBB9CF; --cp: #FDF4F8; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .chapter:nth-child(6n+5 of .chapter) { --cs: #3d1a2b; --cb: #632b45; --cp: #22161c; }
:is(.st-wrap, .ob-wrap) .chapter:nth-child(6n+6 of .chapter) { --c: #138A96; --cs: #D7F0F2; --cb: #AFD9DE; --cp: #F1FAFB; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .chapter:nth-child(6n+6 of .chapter) { --cs: #133539; --cb: #22565c; --cp: #131f21; }
:is(.st-wrap, .ob-wrap) .list > * { --c: #1B7F5A; --cs: #DCEFE5; --cb: #B9D6C6; --cp: #F3FAF6; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .list > * { --cs: #173a2c; --cb: #2a5a45; --cp: #141f1a; }
:is(.st-wrap, .ob-wrap) .list > *:nth-child(6n+2) { --c: #2F6FC4; --cs: #DDE9F8; --cb: #B7CDEB; --cp: #F3F7FD; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .list > *:nth-child(6n+2) { --cs: #1a2d47; --cb: #2d4b73; --cp: #141a24; }
:is(.st-wrap, .ob-wrap) .list > *:nth-child(6n+3) { --c: #7A4FC4; --cs: #EAE1F8; --cb: #CFBDEB; --cp: #F7F3FD; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .list > *:nth-child(6n+3) { --cs: #2b2145; --cb: #46366e; --cp: #1b1726; }
:is(.st-wrap, .ob-wrap) .list > *:nth-child(6n+4) { --c: #C9721A; --cs: #FBE9D6; --cb: #EDCBA6; --cp: #FEF8F1; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .list > *:nth-child(6n+4) { --cs: #3d2a14; --cb: #634422; --cp: #221b14; }
:is(.st-wrap, .ob-wrap) .list > *:nth-child(6n+5) { --c: #C2407A; --cs: #F9DFEA; --cb: #EBB9CF; --cp: #FDF4F8; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .list > *:nth-child(6n+5) { --cs: #3d1a2b; --cb: #632b45; --cp: #22161c; }
:is(.st-wrap, .ob-wrap) .list > *:nth-child(6n+6) { --c: #138A96; --cs: #D7F0F2; --cb: #AFD9DE; --cp: #F1FAFB; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .list > *:nth-child(6n+6) { --cs: #133539; --cb: #22565c; --cp: #131f21; }
:is(.st-wrap, .ob-wrap) .switchrow { --c: #1B7F5A; --cs: #DCEFE5; --cb: #B9D6C6; --cp: #F3FAF6; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .switchrow { --cs: #173a2c; --cb: #2a5a45; --cp: #141f1a; }
:is(.st-wrap, .ob-wrap) .switchrow:nth-child(6n+2 of .switchrow) { --c: #2F6FC4; --cs: #DDE9F8; --cb: #B7CDEB; --cp: #F3F7FD; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .switchrow:nth-child(6n+2 of .switchrow) { --cs: #1a2d47; --cb: #2d4b73; --cp: #141a24; }
:is(.st-wrap, .ob-wrap) .switchrow:nth-child(6n+3 of .switchrow) { --c: #7A4FC4; --cs: #EAE1F8; --cb: #CFBDEB; --cp: #F7F3FD; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .switchrow:nth-child(6n+3 of .switchrow) { --cs: #2b2145; --cb: #46366e; --cp: #1b1726; }
:is(.st-wrap, .ob-wrap) .switchrow:nth-child(6n+4 of .switchrow) { --c: #C9721A; --cs: #FBE9D6; --cb: #EDCBA6; --cp: #FEF8F1; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .switchrow:nth-child(6n+4 of .switchrow) { --cs: #3d2a14; --cb: #634422; --cp: #221b14; }
:is(.st-wrap, .ob-wrap) .switchrow:nth-child(6n+5 of .switchrow) { --c: #C2407A; --cs: #F9DFEA; --cb: #EBB9CF; --cp: #FDF4F8; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .switchrow:nth-child(6n+5 of .switchrow) { --cs: #3d1a2b; --cb: #632b45; --cp: #22161c; }
:is(.st-wrap, .ob-wrap) .switchrow:nth-child(6n+6 of .switchrow) { --c: #138A96; --cs: #D7F0F2; --cb: #AFD9DE; --cp: #F1FAFB; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .switchrow:nth-child(6n+6 of .switchrow) { --cs: #133539; --cb: #22565c; --cp: #131f21; }
/* big boxes: a coloured top line, a coloured header strip when they fold, pale colour inside */
:is(.st-wrap, .ob-wrap) .card:not(.tint) { border: 1.5px solid var(--cb); border-top: 5px solid var(--c); background: var(--cp); box-shadow: 0 1px 4px rgba(0,0,0,.07); }
:is(.st-wrap, .ob-wrap) details.card > summary { background: var(--cs); margin: -14px -16px 0; padding: 12px 16px 12px 34px; border-bottom: 1.5px solid var(--cb); border-radius: 8px 8px 0 0; cursor: pointer; }
:is(.st-wrap, .ob-wrap) details.card:not([open]) > summary { border-bottom: 0; border-radius: 8px; margin-bottom: -14px; }
:is(.st-wrap, .ob-wrap) details.card:not([open]) { gap: 0; }
:is(.st-wrap, .ob-wrap) details.card.cfold > summary::before { left: 10px; top: 12px; }
/* a box inside a box: white, with its own colour on the left */
:is(.st-wrap, .ob-wrap) .card .card:not(.tint) { background: #fff; border-top-width: 1.5px; border-top-color: var(--cb); border-left: 6px solid var(--c); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
/* semesters, units: white box, coloured left edge and header strip */
:is(.st-wrap, .ob-wrap) .card .chapter { border: 1.5px solid var(--cb); border-left: 6px solid var(--c); border-radius: 12px; background: #fff; padding: 0 14px 12px; gap: 8px; margin-top: 12px; box-shadow: 0 2px 6px rgba(0,0,0,.08); overflow: hidden; }
:is(.st-wrap, .ob-wrap) .card .chapter > .row:first-child, :is(.st-wrap, .ob-wrap) .card details.chapter > summary { background: var(--cs); margin: 0 -14px; padding: 8px 14px; border-bottom: 1.5px solid var(--cb); font-size: 15px; }
:is(.st-wrap, .ob-wrap) .card details.chapter:not([open]) { padding-bottom: 0; gap: 0; }
:is(.st-wrap, .ob-wrap) .card details.chapter:not([open]) > summary { border-bottom: 0; }
:is(.st-wrap, .ob-wrap) .card details.chapter.cfold > summary { padding-left: 34px; }
:is(.st-wrap, .ob-wrap) .card details.chapter.cfold > summary::before { left: 12px; top: 7px; }
/* lists and on/off options: each line its own colour on the left */
:is(.st-wrap, .ob-wrap) .list { border: 1.5px solid #C9CCC6; background: #fff; }
:is(.st-wrap, .ob-wrap) .list > * { box-shadow: inset 5px 0 0 var(--c); padding-left: 18px; border-bottom: 1px solid #E2E3DE; }
:is(.st-wrap, .ob-wrap) .list > *:nth-child(even) { background: var(--cp); }
:is(.st-wrap, .ob-wrap) .switchrow { background: #fff; border: 1px solid var(--cb); border-left: 5px solid var(--c); border-radius: 10px; padding: 10px 12px; margin: 3px 0; }
:is(.st-wrap, .ob-wrap) .list > .switchrow { border: 0; border-radius: 0; margin: 0; }
/* buttons: a visible edge on every one */
:is(.st-wrap, .ob-wrap) .btn { border-color: #BDBDB4; box-shadow: 0 1px 0 rgba(0,0,0,.05); }
:is(.st-wrap, .ob-wrap) .btn.ghost { border-color: #D8DEE8; background: #F3F6FA; }
:is(.st-wrap, .ob-wrap) .btn.primary { border-color: var(--accent); }
:is(.st-wrap, .ob-wrap) .btn:not(:disabled):hover { border-color: var(--accent); }
:is(.st-wrap, .ob-wrap) .btn.danger { border-color: #E2B4AF; }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) :is(.card .card:not(.tint), .card .chapter, .list, .switchrow) { background: var(--card); }
:root[data-theme=dark] :is(.st-wrap, .ob-wrap) .list > * { border-bottom-color: #2a302d; }

/* ✨ AI sheet (student app, owner 17 Nov "confusing"): the chosen chip is clearly lit, ↻ Make a new one is a real button, the page behind is dimmed more */
.aisheet-bg { background: rgba(0,0,0,.62); }
/* the sheet's top edge: a bright line, a small handle and a deep shadow, so it clearly sits on top of the page */
.aisheet { border-top: 3px solid var(--ai-edge, #7bd9a8); box-shadow: 0 -14px 40px rgba(0,0,0,.75), 0 -1px 0 rgba(255,255,255,.25); position: relative; padding-top: 22px; }
.aisheet::before { content: ''; position: absolute; top: 8px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: rgba(255,255,255,.35); }
.aisheet { --ai-edge: #7bd9a8; --ai-on: #7bd9a8; --ai-on-ink: #0f2219; --ai-ring: #c9f2dc; }
:root .aisheet .aitabs .aitab.on { background: var(--ai-on); color: var(--ai-on-ink); box-shadow: 0 0 0 2px var(--ai-ring) inset; }
.aisheet .aitab:not(.on) { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); }
:root .aisheet .ainote .linkbtn { display: inline-block; margin-top: 6px; background: transparent; border: 1.5px solid var(--ai-on); color: var(--ai-on); border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 700; cursor: pointer; }

/* 🏆 Practice banks in the student app: summary, one big ▶ button, every section a coloured tile */
.pq-bank { background: var(--card); border: 1.5px solid var(--line); border-top: 5px solid var(--accent); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.pq-head { display: flex; gap: 12px; align-items: flex-start; }
.pq-head h3 { margin: 0 0 2px; font-size: 18px; }
.pq-ico { font-size: 28px; width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--tint); }
.pq-sum { display: flex; flex-direction: column; gap: 6px; }
.pq-nums { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.pq-nums b { font-size: 18px; color: var(--ink); }
.pq-bar { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; }
.pq-bar i { display: block; height: 100%; min-width: 4px; border-radius: 6px; background: linear-gradient(90deg, var(--accent), #2fbf71); }
.pq-bar.sm { height: 6px; margin-top: 4px; }
.pq-go { min-height: 56px; font-size: 17px; flex-direction: column; gap: 0; border-radius: 14px; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
:root[data-theme=dark] .pq-bank .pq-go { background: var(--accent); border-color: var(--accent); color: #fff; }
.pq-go small { font-size: 12px; font-weight: 500; opacity: .85; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pq-list { display: grid; gap: 8px; }
@media (min-width: 760px) { .pq-list { grid-template-columns: 1fr 1fr; } }
.pq-sec { --k: #1B7F5A; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; font: inherit; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-left: 6px solid var(--k); border-radius: 14px; padding: 10px 12px; cursor: pointer; }
.pq-sec:active { transform: scale(.99); }
.pq-c1 { --k: #2F6FC4; } .pq-c2 { --k: #7A4FC4; } .pq-c3 { --k: #C9721A; } .pq-c4 { --k: #C2407A; } .pq-c5 { --k: #138A96; }
.pq-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; background: var(--k); }
.pq-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pq-t b { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.pq-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.pq-sec .pq-bar i { background: var(--k); }
.pq-chip { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--ink); }
.pq-chip.new { background: #DDE9F8; color: #1d4f8f; }
.pq-chip.ok { background: #DCEFE5; color: #13623f; }
.pq-chip.again { background: #FBE9D6; color: #8a4b00; }
.pq-arrow { font-weight: 800; font-size: 13px; color: var(--k); border: 1.5px solid var(--k); border-radius: 999px; padding: 6px 10px; white-space: nowrap; }
:root[data-theme=dark] .pq-meta .pq-chip.ok { color: #9fe0bd; }
:root[data-theme=dark] .pq-meta .pq-chip.again { color: #f3c48d; }
:root[data-theme=dark] .pq-meta .pq-chip.new { color: #b9cee9; }

/* 💬 Ask AI: ready questions, one tap asks */
.aisugg { display: flex; flex-wrap: wrap; gap: 8px; }
.aisugg[hidden] { display: none; }
.aisheet .aisugg .aisugg-b { font: inherit; font-size: 14px; background: transparent; color: var(--ai-on); border: 1.5px dashed var(--ai-on); border-radius: 999px; padding: 8px 14px; cursor: pointer; text-align: left; }
.aisheet .aisugg .aisugg-b:active { background: rgba(123,217,168,.15); }

/* 🆕 the learning card inside the smaller level boxes (Protein Snake, Base-Pair Crush) */
:is(.psn-end, .bpc-card) .gi-learn { margin: 10px 0; padding: 12px 14px; gap: 6px; max-width: 100%; }
:is(.psn-end, .bpc-card) .gi-ltag { font-size: 12.5px; } :is(.psn-end, .bpc-card) .gi-lt { font-size: 17px; } :is(.psn-end, .bpc-card) .gi-lx { font-size: 15px; }
.bpc-card { max-height: calc(100% - 20px); overflow-y: auto; }

/* 👥 Studio → Students: the class picker */
.st-class { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 700; }
.st-class select { font: inherit; font-weight: 600; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--accent); min-width: 220px; max-width: 100%; background: var(--card); color: var(--ink); }

/* ➕ Add a class: the code in big letters */
.ac-done { text-align: center; align-items: stretch; }
.ac-code { font: 800 38px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 4px; padding: 14px; border: 2px dashed var(--accent); border-radius: 14px; background: var(--tint); user-select: all; }
.ac-msg { white-space: pre-line; text-align: left; font-size: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; user-select: all; }

/* 📰 All · 🟢 Easy · 🔬 Research: three small buttons side by side in the top bar, the chosen one lit */
.kind-seg { --ko: #FFFFFF; --koi: #11221a; display: inline-flex; flex: none; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); }
.kind-seg .kind-b { border: 0; background: transparent; color: #e8efe9; font: inherit; font-size: 13px; font-weight: 700; padding: 6px 9px; border-radius: 999px; white-space: nowrap; cursor: pointer; }
.kind-seg .kind-b.on { background: var(--ko); color: var(--koi); }

/* 📰 the Feed's parts strip: thinner and closer to the top bar (owner 17 Nov 2026); the count row follows it (measured in feed.js) */
.reels .rbar { top: 4px; padding: 3px 4px !important; }
.reels .rbar .rj { height: 32px !important; font-size: 14px !important; padding: 0 12px; }
.reels .rbar .rj .rj-ico { font-size: 14px; }
.reels .rbar .rj .rj2 { font-size: 10.5px; }
.reels.chip-s .rbar .rj { height: 28px !important; font-size: 12.5px !important; padding: 0 9px; }
.reels.chip-l .rbar .rj { height: 40px !important; font-size: 16px !important; padding: 0 16px; }
.reels .rtop { top: 46px; }
.reels .rtop .rbtn, .reels .rtop .rcount { padding: 3px 8px; font-size: 11.5px; }

/* 📏 Swipe mode: a card whose own text scrolls (the 👋 Today card, a card without a picture) scrolls BELOW the parts strip
   and the count row, never under them (owner 18 Nov: "Good morning" under the chips). --ovh = their measured height. */
.reels:not(.list) .slide.tday { overflow: hidden; }
.reels:not(.list) .slide.tday > .tday-in { margin-top: var(--ovh, 96px); height: calc(100% - var(--ovh, 96px)); min-height: 0; overflow-y: auto; padding-top: 14px !important; }
.reels:not(.list) .slide > .sc:first-child { margin-top: var(--ovh, 96px); }

/* 🃏 Feed in Swipe mode: one card at a time, like reels (owner, 18 Nov 2026). Each card has rounded corners and a dark
   gap before the next; the card in view (.cur) is full size, the others wait smaller and dimmer and grow in as they arrive. */
.reels:not(.list) .rdeck { background: #05090b; }
.reels:not(.list) .slide { height: calc(100% - 10px); margin-bottom: 10px; border-radius: 0 0 26px 26px; transform: scale(.93); opacity: .45; transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .28s ease; will-change: transform; }
.reels:not(.list) .slide.cur { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .reels:not(.list) .slide { transition: none; } }
/* 👆 Swipe | 📜 Scroll: the chosen one stands out in dark mode too (a bright pill with a green ring) */
.bfn-seg { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.28); }
.bfn-seg button:not(.on) { opacity: .75; }
:root[data-theme=dark] body .bfn-seg button.on { background: var(--seg-on-bg); color: var(--seg-on-ink); box-shadow: 0 0 0 2px var(--seg-on-ring) inset; opacity: 1; }
:root { --seg-on-bg: #ffffff; --seg-on-ink: #10241a; --seg-on-ring: #3ecf8e; }

/* 📊 Owner page → Free limits meter */
.mtr { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 6px; }
.mtr-top { display: flex; justify-content: space-between; gap: 8px; }
.mtr-p { font-weight: 900; }
.mtr-bar { height: 12px; border-radius: 999px; background: rgba(127,127,127,.18); overflow: hidden; }
.mtr-bar i { display: block; height: 100%; border-radius: 999px; background: var(--mtr-c); }
.mtr.green, .mtr-sum.green, .mtr-days td.green { --mtr-c: #1f9d55; }
.mtr.amber, .mtr-sum.amber, .mtr-days td.amber { --mtr-c: #d98a00; }
.mtr.red, .mtr-sum.red, .mtr-days td.red { --mtr-c: #d64545; }
.mtr .mtr-p { color: var(--mtr-c); }
.mtr-sum { font-weight: 800; padding: 10px 12px; border-radius: 12px; border-left: 6px solid var(--mtr-c); background: rgba(127,127,127,.08); }
.mtr-days { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 6px; }
.mtr-days th, .mtr-days td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--line); }
.mtr-days td.amber, .mtr-days td.red { color: var(--mtr-c); font-weight: 800; }

/* ===== 🌙 Dark theme (made by tools/dark-css.py) ===== */
/* follows the phone (or the student's / centre's choice): html data-theme="dark". Re-run after editing colours above. */
:root[data-theme=dark] {
  color-scheme: dark;
  --tint: color-mix(in srgb, var(--accent) 22%, transparent);
  --ink: #E8ECE9;
  --muted: #A5ADA8;
  --line: #2C3531;
  --line2: #242C28;
  --field: #3A4440;
  --bg: #0F1412;
  --card: #18201C;
  --good: #6BCB84;
  --warn: #FF8A65;
  --ai: #B69CF0;
}
:root[data-theme=dark] a { color: color-mix(in srgb, var(--accent) 55%, #fff); }
:root[data-theme=dark] input, :root[data-theme=dark] select, :root[data-theme=dark] textarea { background: #121916; color: var(--ink); }
:root[data-theme=dark] img:not([src$=".svg"]) { filter: brightness(.92); }
:root[data-theme=dark] .top.dark { background: #0A0E0C; border-bottom: 1px solid var(--line); }
:root[data-theme=dark] .pill.on { color: #0F1412; }
:root[data-theme=dark] .toast, :root[data-theme=dark] .update { background: #2A332F; border: 1px solid #3A4440; }
@media (min-width: 1000px) { :root[data-theme=dark] .ob-side { background: var(--card, var(--card)); border: 1px solid var(--line, #44464b); } }
@media (min-width: 1000px) { :root[data-theme=dark] .ob-si:hover { background: var(--tint, #2c3035); } }
@media (min-width: 1000px) { :root[data-theme=dark] .ob-si.on { background: var(--tint, #16354b); } }
@media (min-width: 1000px) { :root[data-theme=dark] .nf-save { border-top: 1px solid var(--line, #44464b); } }
:root[data-theme=dark] .btn { background: var(--card); }
:root[data-theme=dark] .pill { background: var(--card); }
:root[data-theme=dark] input[type=text], :root[data-theme=dark] input[type=email], :root[data-theme=dark] input[type=url], :root[data-theme=dark] input:not([type]), :root[data-theme=dark] select { background: var(--card); }
:root[data-theme=dark] .ai { background: #2e233e; }
:root[data-theme=dark] .stat { background: var(--card); }
:root[data-theme=dark] .sw::after { background: var(--card); }
:root[data-theme=dark] .tabs { background: var(--card); }
:root[data-theme=dark] .modal { background: var(--card); }
:root[data-theme=dark] .vbar { background: var(--card); }
:root[data-theme=dark] .lesson.scroll .slide .sin { background: var(--card); }
:root[data-theme=dark] .sterms dd { color: #dee0e2; }
:root[data-theme=dark] .slide.pic img { background: var(--card); }
:root[data-theme=dark] .qopt { background: var(--card); }
:root[data-theme=dark] .qopt.right { background: #29382b; border-color: #404e43; }
:root[data-theme=dark] .qopt.wrong { background: #43291e; border-color: #574038; }
:root[data-theme=dark] .swhy, :root[data-theme=dark] .sans { background: #2f3829; }
:root[data-theme=dark] .snav { background: var(--card); }
:root[data-theme=dark] .modal textarea { background: var(--card); }
:root[data-theme=dark] .mbtns { background: var(--card); }
:root[data-theme=dark] .update button { background: var(--card); }
:root[data-theme=dark] input[type=number], :root[data-theme=dark] input[type=date], :root[data-theme=dark] input[type=datetime-local], :root[data-theme=dark] input[type=search], :root[data-theme=dark] input[type=tel], :root[data-theme=dark] textarea { background: var(--card); }
:root[data-theme=dark] .tag.ok { background: #28392b; }
:root[data-theme=dark] .tag.no { background: #42281e; }
:root[data-theme=dark] .timer.low { background: #42281e; }
:root[data-theme=dark] .qfig img { background: var(--card); }
:root[data-theme=dark] .warnc { background: #43291e; }
:root[data-theme=dark] .okc { background: #29382b; }
:root[data-theme=dark] .qcell { background: var(--card); }
:root[data-theme=dark] .fest { background: linear-gradient(135deg, #4b3a16, #431d2f); }
:root[data-theme=dark] .reels .slide { background: var(--card); }
:root[data-theme=dark] .reels .kb { color: #dce4e0; }
:root[data-theme=dark] .reels .slide .qopt { border-color: color-mix(in srgb, var(--sc) 30%, #474747); }
:root[data-theme=dark] .reels .slide .qopt.right { background: #29382b; }
:root[data-theme=dark] .reels .slide .qopt.wrong { background: #43291e; }
:root[data-theme=dark] .lslide .panel { background: var(--card); color: #dce4e0; }
:root[data-theme=dark] .lslide .qopt { color: #dce4e0; }
:root[data-theme=dark] .lslide .qopt.right { background: #1c4522; }
:root[data-theme=dark] .lslide .qopt.wrong { background: #4b1616; }
:root[data-theme=dark] .lslide .btnw { background: var(--card); color: #dce4e0; }
:root[data-theme=dark] .lprog i { background: var(--card); }
:root[data-theme=dark] .lk-card { background: var(--card); }
:root[data-theme=dark] .lk-tabs { background: var(--card); }
:root[data-theme=dark] .lk-foot { background: var(--card); }
:root[data-theme=dark] .rtop .rbtn[aria-pressed="true"] { background: var(--card); color: #dce4e0; }
:root[data-theme=dark] .rbar .rj.on { background: var(--card); }
:root[data-theme=dark] .reels .rmain.alt { background: color-mix(in srgb, var(--sc) 12%, var(--card)); }
:root[data-theme=dark] .bdg.got { background: #29382b; }
:root[data-theme=dark] .nchip { background: var(--card); }
:root[data-theme=dark] .fcard { background: var(--card); }
:root[data-theme=dark] .calday { background: var(--card); }
:root[data-theme=dark] .reels .sbtn { background: var(--card); color: #e0e0e0; }
:root[data-theme=dark] .lbtn[aria-pressed="true"] { background: var(--card); color: #dce4e0; }
:root[data-theme=dark] .lsheet-in { background: var(--card); color: #dce4e0; }
:root[data-theme=dark] .lsheet-head .lbtn { background: #1f2622; color: #e0e0e0; }
:root[data-theme=dark] .lrow { background: var(--card); }
:root[data-theme=dark] .lno { background: #2c3035; }
:root[data-theme=dark] .ai-note { background: #4b3416; border: 1px solid #644a2b; }
:root[data-theme=dark] .ai-text { background: var(--card); }
:root[data-theme=dark] .tag.warn { background: #4b3416; }
:root[data-theme=dark] .infog { background: var(--card); }
:root[data-theme=dark] .ig0 { background: #16354b; }
:root[data-theme=dark] .ig1 { background: #1f4225; }
:root[data-theme=dark] .ig2 { background: #4b3416; }
:root[data-theme=dark] .ig3 { background: var(--card); }
:root[data-theme=dark] .ig4 { background: var(--card); }
:root[data-theme=dark] .ig5 { background: #1c4538; }
:root[data-theme=dark] .chat.ai { background: var(--card); }
:root[data-theme=dark] .fl { background: var(--card); }
:root[data-theme=dark] .fl .f2 { color: #e0e0e0; }
:root[data-theme=dark] .wf li span { color: #e0e0e0; }
:root[data-theme=dark] .ppics img { background: #1f2622; }
:root[data-theme=dark] .card.fest { background: linear-gradient(120deg, #4b3416, #4b4216); border-color: #644a2b; }
:root[data-theme=dark] .bfn-ic.on { background: var(--card); color: #c5ddd2; }
:root[data-theme=dark] .bfn-tab.on { background: var(--card); color: #c5ddd2; }
:root[data-theme=dark] .bfn-chip.on { background: var(--card); color: #c5ddd2; }
:root[data-theme=dark] .bfn-seg button.on { background: var(--card); color: #c5ddd2; }
:root[data-theme=dark] .bfn-fbox { background: var(--card); color: #dbe6e0; }
:root[data-theme=dark] .bfn-frow input { border: 1.5px solid #444a47; }
:root[data-theme=dark] .bfn-frow button { background: #2d342f; }
:root[data-theme=dark] .bfn-fres button { border-bottom: 1px solid #444b46; }
:root[data-theme=dark] .st-chip.on { background: var(--card); color: #c5ddd2; }
:root[data-theme=dark] .st-prog i { background: var(--card); }
:root[data-theme=dark] .aitab.on { background: var(--card); color: #dce4e0; }
:root[data-theme=dark] .aiopts option { color: #dce4e0; }
:root[data-theme=dark] .aiin { color: #dce4e0; }
:root[data-theme=dark] .aibody .qopt { color: #dce4e0; }
:root[data-theme=dark] .aisave { border: 1px solid #385747; }
:root[data-theme=dark] .aibody .infog { color: #dce4e0; }
:root[data-theme=dark] .lk-bar .on { background: var(--card); color: #dde0e4; }
:root[data-theme=dark] .picw-t { background: #1f2622; }
:root[data-theme=dark] .picr-img { background: #1f2622; }
:root[data-theme=dark] .zoom-bg img { background: var(--card); }
:root[data-theme=dark] .fm-paste textarea, :root[data-theme=dark] .fm-paste select { background: var(--card); color: #c5ddd4; }
:root[data-theme=dark] .land.th-light, :root[data-theme=dark] .lk-hero.th-light { color: #c5ddd4; background-image: radial-gradient(90% 60% at 15% 0%, color-mix(in srgb, var(--lc) 30%, transparent), transparent 60%), linear-gradient(170deg, var(--card), #293730); }
:root[data-theme=dark] .land.th-light .l-h1, :root[data-theme=dark] .land.th-light .l-kick { color: #c5ddd4; }
:root[data-theme=dark] .land.th-light .l-tag, :root[data-theme=dark] .land.th-light .l-org, :root[data-theme=dark] .land.th-light .l-org a, :root[data-theme=dark] .land.th-light .l-back, :root[data-theme=dark] .land.th-light .l-hello { color: #dde4e0; }
:root[data-theme=dark] .land.th-light .l-acct, :root[data-theme=dark] .land.th-light .l-cont { color: #c5ddd4; background: var(--card); }
:root[data-theme=dark] .land.th-light .l-go.g-notes { background: var(--card); color: #c5ddd4; border-color: #434c47; }
:root[data-theme=dark] .lk-hero.th-light .lk-hname { color: #c5ddd4; }
:root[data-theme=dark] .btlang .bl-row button.on { background: #2c3035; color: #c5ddd4; border-color: #43474c; }
:root[data-theme=dark] .btlang .bl-ai select option { color: #c5ddd4; }
:root[data-theme=dark] .reels .btnw, :root[data-theme=dark] .tpost-bar .btnw { background: var(--card); color: #dce4e0; }
:root[data-theme=dark] .draftbar.on { border: 2px solid #5e4c31; background: #4b3916; }
:root[data-theme=dark] .dk-open { background: var(--card); color: #e0e0e0; }
:root[data-theme=dark] .dk-frame { background: var(--card); }
:root[data-theme=dark] .wbar { background: #282e39; border-bottom: 1px solid #41464e; }
:root[data-theme=dark] .wgrip b { color: #e0e0e0; }
:root[data-theme=dark] .wbtn { background: var(--card); }
:root[data-theme=dark] .livebar { background: #263b2d; border-bottom: 1px solid #3e5044; }
:root[data-theme=dark] .livebar.on { background: #4b3516; border-bottom-color: #5f4c2f; }
:root[data-theme=dark] .btn.livenow { background: #4b3516; border-color: #5f4c2f; }
:root[data-theme=dark] .cmap { border: 1px solid var(--line, #43474b); background: var(--card, var(--card)); }
:root[data-theme=dark] .cmap-unit { border-left: 3px solid var(--tint, #404e47); }
:root[data-theme=dark] .pk-tile { border: 1px solid #43474c; background: var(--card); }
:root[data-theme=dark] .slide.tday { background: linear-gradient(165deg, color-mix(in srgb, var(--sc) 88%, var(--card) 0%) 0%, color-mix(in srgb, var(--sc) 55%, #1e1b4b) 55%, #1a1433 100%); }
:root[data-theme=dark] .reels .rtop .rprog i { background: var(--card); }
:root[data-theme=dark] .rspeeds button.on { background: var(--card); color: #c5ddd2; }
:root[data-theme=dark] .reels .k-news .aibar .btnw:first-child { color: #c1e1d0; }
:root[data-theme=dark] .pg.pg-glow > i { box-shadow: 0 0 10px 1px var(--pgc, #00000066), 0 0 3px var(--pgc, #00000066); }
:root[data-theme=dark] .sp-atom .sp-nuc { background: radial-gradient(circle at 35% 35%, var(--card), #5EEAD4 45%, #0b7285); box-shadow: 0 0 16px #00000066; }
:root[data-theme=dark] .sp-atom .sp-orb u::after { box-shadow: 0 0 10px #00000066; }
:root[data-theme=dark] .sp-cell i { border: 2px solid #315d56; }
:root[data-theme=dark] .sp-ring .sp-spin { border-top-color: #315d56; }
:root[data-theme=dark] .fx-tricolour .tc2 { background: var(--card); }
:root[data-theme=dark] .fcard-bg .fcard .btn.primary { background: var(--card); color: #dedfe3; }
:root[data-theme=dark] .ui-ic-light .aibar .btnw.ico, :root[data-theme=dark] .ui-ic-light .aibar .btnw.allico, :root[data-theme=dark] .ui-ic-light .pk-icons .btnw { background: var(--card) !important; }
:root[data-theme=dark] details.grp-year, :root[data-theme=dark] details.grp-sem { background: var(--card, var(--card)); color: var(--ink, #e0e0e0); }
:root[data-theme=dark] details.grp-sem { border: 1px solid var(--line, #474747); }
:root[data-theme=dark] .acc-prog { border: 1px solid var(--line, #474747); }
:root[data-theme=dark] .stream-pcard { border-left: 4px solid #64502b; }
:root[data-theme=dark] .nphoto { border: 1px solid var(--line, #474747); background: #1f2622; }
:root[data-theme=dark] .ogrp { border-top: 1px solid var(--line, #474747); }
:root[data-theme=dark] .osec { border: 1px solid #4a4a45; box-shadow: inset 5px 0 0 var(--osec, #00000066); background: var(--card); }
:root[data-theme=dark] .osec > summary { background: #35352c; }
:root[data-theme=dark] .osec[open] > summary { border-bottom: 1px solid #4a4a45; }
:root[data-theme=dark] .oact { border: 1px solid #4a4a45; background: var(--card); }
:root[data-theme=dark] .ostate { background: #2a372a; color: #bfe4c8; }
:root[data-theme=dark] .ostate.none { background: #1f2622; color: #e0e0e0; }
:root[data-theme=dark] .ostate.part { background: #4b3a16; }
:root[data-theme=dark] .ostate.hidden { background: #222c3f; color: #bbcce7; }
:root[data-theme=dark] .odanger > summary { color: #eabbb8; }
:root[data-theme=dark] .odanger .oact { border-color: #563b38; background: var(--card); }
:root[data-theme=dark] .btn.danger { color: #eabbb8; border-color: #553d3a; }
:root[data-theme=dark] .gm-top li { background: #2f342d; }
:root[data-theme=dark] .gm-top li.me { background: #162f4b; box-shadow: inset 0 0 0 2px #00000066; }
:root[data-theme=dark] .gm-nick input { border: 1px solid #494946; }
:root[data-theme=dark] .gi-prog { background: #1f2622; }
:root[data-theme=dark] .gi-drugs button.on { border-color: #474747; box-shadow: 0 0 0 2px #00000066; }
:root[data-theme=dark] .gi-learn { background: #202d41; color: #bfcee3; }
:root[data-theme=dark] .gq-item { border: 1px solid var(--line, #43474b); }
:root[data-theme=dark] .gq-item.gq-flag { background: #4b4216; }
:root[data-theme=dark] .gq-right { background: #1c4522; color: #bde5c0; }
:root[data-theme=dark] .gq-wrong { background: #2c3035; }
:root[data-theme=dark] .gi .cc-canvas { background: var(--card); }
:root[data-theme=dark] .cc-w { background: var(--card); color: #dee0e3; }
:root[data-theme=dark] .cc-dot { border: 2px solid #474747; }
:root[data-theme=dark] .cc-new { background: #4b3416; color: #f6cfac; }
:root[data-theme=dark] .cc-card { border: 1px solid var(--line, #43474b); background: var(--card); color: #dee0e3; }
:root[data-theme=dark] .gm-wg { border: 1px solid var(--line, #43474b); }
:root[data-theme=dark] .im-board { background: linear-gradient(180deg, var(--card), #3c1c45); color: #dee0e3; }
:root[data-theme=dark] .im-top { color: #ddbde5; }
:root[data-theme=dark] .im-msg.good { background: #1c4522; color: #bde5c0; }
:root[data-theme=dark] .im-msg.bad { background: #4b1616; color: #e9b9b9; }
:root[data-theme=dark] .im-btns button { color: #dee0e3; background: var(--card); }
:root[data-theme=dark] .gm-play { background: var(--card); color: #e1e1e0; }
:root[data-theme=dark] .gm-more .gm-board { color: #e1e1e0; }
:root[data-theme=dark] .gc-clue { background: #162f4b; color: #b9d0ea; }
:root[data-theme=dark] .gc-rev { background: #4b3c16; color: #f6dcac; }
:root[data-theme=dark] .gm-card .gm-topic, :root[data-theme=dark] .gm-card .gm-topic option, :root[data-theme=dark] .gm-card .gm-topic optgroup { color: #c5d1dd; background: var(--card); }
:root[data-theme=dark] .gi-fact { background: #202d41; color: #bfcee3; }
:root[data-theme=dark] .qopt.right { box-shadow: inset 0 0 0 2px #00000066 !important; }
:root[data-theme=dark] .qfb-res.ok { background: #253c2b; }
:root[data-theme=dark] .qfb-res.no { background: #461b1b; color: #ebb8b8; }
:root[data-theme=dark] .qfb-why { background: #202d41; color: #bfcee3; }
:root[data-theme=dark] .qfb-trap { background: #4b3c16; color: #f6dcac; }
:root[data-theme=dark] .nd-flag { color: #eabbb8; }
:root[data-theme=dark] .nd-dirty.card { border-color: #553d3a; }
:root[data-theme=dark] .ss-in { border: 1px solid #494945; background: var(--card); }
:root[data-theme=dark] .ss-list { background: var(--card); border: 1px solid #494945; }
:root[data-theme=dark] .ss-item { border-bottom: 1px solid #474747; }
:root[data-theme=dark] .ss-item:hover, :root[data-theme=dark] .ss-item:focus { background: #222d3f; }
:root[data-theme=dark] .ss-flash { outline: 3px solid #63552c; }
:root[data-theme=dark] .reels .sbtn.kfind { color: #c9c3df !important; }
:root[data-theme=dark] .reels .vlinks .sbtn { color: #c9c3df !important; }
:root[data-theme=dark] .sl-tipbox { border-left: 4px solid #63522c; }
:root[data-theme=dark] .psn-chip.on { color: #c7c7db; border-color: #64572b; }
:root[data-theme=dark] .psn-go { color: #c7c7db; }
:root[data-theme=dark] .psn-fold button.sel { box-shadow: 0 0 0 3px #00000066; }
:root[data-theme=dark] .psn-fold button.done { box-shadow: 0 0 0 3px #00000066; }
:root[data-theme=dark] .wbtn.wclose:hover { background: #481b19; color: #f2b6b1; }
:root[data-theme=dark] .nm-row { border-top: 1px solid var(--line, #44464b); }
:root[data-theme=dark] .gbg-pop { color: #dee0e3; }
:root[data-theme=dark] .gbg-chip { border: 2px solid #43474b; background: var(--card); }
:root[data-theme=dark] .gbg-chip.on { background: #16354b; }
:root[data-theme=dark] .nf-mail .nf-offnote { background: #4b3416; }
:root[data-theme=dark] .nf-i > div { background: var(--tint, #2c3035); }
:root[data-theme=dark] .pb-ex { background: var(--tint, #2c3035); }
:root[data-theme=dark] .pb-all { border-top: 1px solid var(--line, #44464b); }
:root[data-theme=dark] .gd-bts { background: var(--tint, #2c3035); border-left: 3px solid #63552c; }
:root[data-theme=dark] .gd-sub { border-top: 1px solid var(--line, #44464b); }
:root[data-theme=dark] .gd-tab th, :root[data-theme=dark] .gd-tab td { border-top: 1px solid var(--line, #44464b); }
:root[data-theme=dark] .nl-prow { border-top: 1px solid var(--line, #44464b); }
:root[data-theme=dark] .dm-pre { background: var(--tint, #2c3035); }
:root[data-theme=dark] :is(.st-wrap, :root[data-theme=dark] .ob-wrap) .card .card:not(.tint) { background: var(--card); }
:root[data-theme=dark] :is(.st-wrap, :root[data-theme=dark] .ob-wrap) .card .chapter { background: var(--card); }
:root[data-theme=dark] :is(.st-wrap, :root[data-theme=dark] .ob-wrap) .list { border: 1.5px solid #474946; background: var(--card); }
:root[data-theme=dark] :is(.st-wrap, :root[data-theme=dark] .ob-wrap) .list > * { border-bottom: 1px solid #494a45; }
:root[data-theme=dark] :is(.st-wrap, :root[data-theme=dark] .ob-wrap) .switchrow { background: var(--card); }
:root[data-theme=dark] :is(.st-wrap, :root[data-theme=dark] .ob-wrap) .btn { border-color: #494946; }
:root[data-theme=dark] :is(.st-wrap, :root[data-theme=dark] .ob-wrap) .btn.ghost { border-color: #40464f; background: #252f3b; }
:root[data-theme=dark] :is(.st-wrap, :root[data-theme=dark] .ob-wrap) .btn.danger { border-color: #553d3a; }
:root[data-theme=dark] .aisheet { border-top: 3px solid var(--ai-edge, #385747); }
:root[data-theme=dark] .pq-chip.new { background: #1f2f42; color: #b9cee9; }
:root[data-theme=dark] .pq-chip.ok { background: #273a30; }
:root[data-theme=dark] .pq-chip.again { background: #46311b; }
