/* TaniLearn — sunny game theme */
* { box-sizing: border-box; margin: 0; }

:root {
  --ink: #2E2A5C;
  --ink-soft: #6B6893;
  --faint: #8B87BE;
  --card-shadow: rgba(46, 42, 92, .10);
  --accent: #7C4DFF;
}

html, body { height: 100%; }
body {
  background: linear-gradient(180deg, #FDF9FF 0%, #EFEBFF 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
}
button { font-family: inherit; color: inherit; border: none; background: none; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.screen-page {
  display: none;
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 24px 40px;
  min-height: 100vh;
  flex-direction: column;
  position: relative;
}
.screen-page.active { display: flex; }

/* ---------- top bar ---------- */
.gbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gspacer { flex: 1; }

/* ---------- TaniLearn logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 14px; flex: none;
  background: linear-gradient(135deg, #FFB020, #FF6B6B 55%, #F15BB5);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: 0 4px 0 rgba(180, 60, 90, .35);
  transform: rotate(-6deg);
}
.brand-word { font-weight: 800; font-size: 22px; letter-spacing: .01em; line-height: 1; }
.brand-word span:nth-child(1) { color: #FF6B6B; }
.brand-word span:nth-child(2) { color: #FFB020; }
.brand-word span:nth-child(3) { color: #10C6A0; }
.brand-word span:nth-child(4) { color: #38BDF8; }
.brand-word span:nth-child(5) { color: #8B5CF6; }
.brand-word span:nth-child(6) { color: #F15BB5; }
.brand-word span:nth-child(7) { color: #FF6B6B; }
.brand-word span:nth-child(8) { color: #FFB020; }
.brand-word b { color: var(--ink); font-weight: 800; }
.brand.big { flex-direction: column; gap: 16px; }
.brand.big .brand-mark {
  width: 92px; height: 92px; border-radius: 30px; font-size: 52px;
  box-shadow: 0 8px 0 rgba(180, 60, 90, .35);
}
.brand.big .brand-word { font-size: clamp(36px, 7vw, 54px); }

.pill {
  background: #fff; border-radius: 999px; padding: 8px 16px;
  font-size: 14px; font-weight: 800;
  box-shadow: 0 4px 0 var(--card-shadow);
  display: inline-flex; align-items: center; gap: 8px;
  font-variant-numeric: tabular-nums;
}
button.pill:hover { transform: translateY(-1px); }
button.pill:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--card-shadow); }
.pill.sound { background: #2E2A5C; color: #fff; box-shadow: 0 4px 0 rgba(46, 42, 92, .35); min-width: 52px; justify-content: center; }
.pill.sound.off { background: #fff; color: #A5A3C8; box-shadow: 0 4px 0 var(--card-shadow); }
.pill.subj { color: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .18); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: #FFE3E3;
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
}
.linkbtn {
  color: var(--faint); font-weight: 700; font-size: inherit;
  border-bottom: 1.5px dashed #A5A3C8; padding: 0;
}
.linkbtn:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- login ---------- */
.login-hero { text-align: center; margin: 6vh 0 8px; }
.biglogo { font-size: clamp(40px, 8vw, 58px); line-height: 1; }
.login-sub { font-size: 16px; color: var(--ink-soft); margin-top: 10px; font-family: "Segoe UI", sans-serif; }
.whos { text-align: center; font-size: 24px; font-weight: 800; margin: 30px 0 20px; }
.profiles { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.prof {
  background: #fff; border-radius: 22px; width: 150px; padding: 20px 14px 16px; text-align: center;
  box-shadow: 0 7px 0 var(--card-shadow); border: 3px solid transparent; cursor: pointer;
  transition: transform .12s;
}
.prof:hover { transform: translateY(-3px); }
.prof.sel { border-color: var(--accent); box-shadow: 0 7px 0 #C9B4FF; }
.prof .face {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center; font-size: 34px;
}
.prof .nm { font-weight: 800; font-size: 16px; }
.prof .gd { font-size: 12px; color: var(--ink-soft); font-family: "Segoe UI", sans-serif; margin-top: 2px; }
.prof .st { font-size: 13px; margin-top: 6px; }
.prof.new {
  border: 3px dashed #C9C4EE; background: transparent; box-shadow: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--faint);
  min-height: 165px;
}
.prof.new .plus { font-size: 36px; line-height: 1; font-weight: 800; }
.prof.new .nm { color: var(--faint); margin-top: 8px; }
.login-go {
  margin: 30px auto 0; background: var(--accent); color: #fff; font-weight: 800; font-size: 17px;
  border-radius: 999px; padding: 14px 48px; box-shadow: 0 6px 0 #5B36C4; display: block;
}
.login-go:hover { transform: translateY(-1px); }
.login-go:active { transform: translateY(3px); box-shadow: 0 3px 0 #5B36C4; }
.login-note { text-align: center; font-size: 12.5px; color: var(--faint); margin-top: 14px; font-family: "Segoe UI", sans-serif; }

/* ---------- home ---------- */
.greet { font-size: 26px; font-weight: 800; margin: 26px 0 4px; }
.greet-sub { font-size: 14px; color: var(--ink-soft); font-family: "Segoe UI", sans-serif; margin-bottom: 20px; }
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cat {
  border-radius: 20px; padding: 18px 18px 15px; color: #fff;
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: 0 7px 0 rgba(0, 0, 0, .12);
  cursor: pointer; transition: transform .12s;
}
.cat:hover { transform: translateY(-3px); }
.cat .top { display: flex; align-items: center; gap: 10px; }
.cat .ico { font-size: 26px; line-height: 1; }
.cat .nm { font-weight: 800; font-size: 18px; }
.cat .lvpick {
  margin-left: auto; background: rgba(255, 255, 255, .25); border-radius: 8px;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}
.cat .lvpick:hover { background: rgba(255, 255, 255, .45); }
.cat .lv { font-size: 12.5px; opacity: .95; font-family: "Segoe UI", sans-serif; margin-top: 4px; }
.cat .bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .35); margin-top: 7px; overflow: hidden; }
.cat .bar i { display: block; height: 100%; background: #fff; border-radius: 99px; }
.cat .play {
  margin-top: 10px; background: rgba(255, 255, 255, .22); border-radius: 999px;
  text-align: center; font-size: 13px; font-weight: 800; padding: 8px;
}
.cat.locked { opacity: .68; filter: saturate(.55); }
.cat.locked .play { background: rgba(0, 0, 0, .28); }
.mixrow {
  margin-top: 18px; background: #2E2A5C; color: #fff; border-radius: 18px;
  display: flex; align-items: center; gap: 14px; padding: 15px 20px;
  box-shadow: 0 6px 0 rgba(46, 42, 92, .35); cursor: pointer;
}
.mixrow:hover { transform: translateY(-2px); }
.mix-ico { font-size: 26px; }
.mixrow .t { font-weight: 800; font-size: 16px; }
.mixrow .d { font-size: 12.5px; opacity: .85; font-family: "Segoe UI", sans-serif; }
.mixrow .go { margin-left: auto; background: #FFB020; color: #5C3A00; border-radius: 999px; padding: 9px 24px; font-weight: 800; font-size: 14px; }

/* ---------- quiz ---------- */
.qgrid { display: grid; grid-template-columns: 1fr 210px; gap: 22px; flex: 1; margin-top: 20px; }
.qmain { display: flex; flex-direction: column; min-width: 0; }
.pic {
  background: #fff; border-radius: 20px; padding: 22px; text-align: center;
  box-shadow: 0 6px 0 var(--card-shadow);
}
.pic-row { font-size: 27px; letter-spacing: 3px; line-height: 1.65; }
.pic-row.big-emoji { font-size: 33px; }
.pic-row.seq { display: flex; justify-content: center; gap: 12px; align-items: center; padding: 6px 0; }
.pic-big { font-size: 30px; font-weight: 800; line-height: 1.5; font-variant-numeric: tabular-nums; }
.pic-big .op, .pic-row .op { color: var(--accent); font-weight: 800; padding: 0 4px; }
.pic-big .frac { color: #FF6B6B; }
.pic-big small.pic-hint { display: block; font-size: 13px; color: var(--faint); font-weight: 700; margin-top: 6px; }
.pic-clock { font-size: 64px; line-height: 1.2; }
.pic-para { font-size: 16.5px; line-height: 1.65; text-align: left; font-family: Georgia, "Times New Roman", serif; max-width: 56ch; margin: 0 auto; }
.mystery {
  display: inline-flex; align-items: center; justify-content: center;
  background: #EFEAFF; border: 2.5px dashed var(--accent); color: var(--accent);
  border-radius: 10px; min-width: 44px; padding: 0 8px;
}
.pie { width: 130px; height: 130px; border-radius: 50%; margin: 6px auto; border: 4px solid #fff; box-shadow: 0 0 0 3px #EDEAFA; }
.rect-wrap { position: relative; display: inline-block; padding: 6px 54px 30px 6px; }
.rect { background: #D6EDFF; border: 3px solid #38BDF8; border-radius: 6px; }
.rect-w { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); font-weight: 800; font-size: 15px; }
.rect-h { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-weight: 800; font-size: 15px; }

.shp { width: 38px; height: 38px; border-radius: 10px; display: inline-block; vertical-align: middle; }
.shp.ci { border-radius: 50%; }
.shp.di { transform: rotate(45deg) scale(.85); }
.shp.tr { width: 0; height: 0; border-radius: 0; background: transparent !important;
  border-left: 20px solid transparent; border-right: 20px solid transparent; border-bottom: 36px solid #FF6B6B; }
.shp.small { width: 28px; height: 28px; }
.shp.small.tr { border-left-width: 15px; border-right-width: 15px; border-bottom-width: 27px; }
.shp.mysteryshp {
  background: #EFEAFF; border: 2.5px dashed var(--accent); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px;
}
.optwrap { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; }

.qtext { text-align: center; font-weight: 800; font-size: 20px; margin: 16px auto; text-wrap: balance; max-width: 58ch; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: auto; }
.opt {
  background: #fff; border-radius: 16px; text-align: center; padding: 16px 10px;
  font-weight: 800; font-size: 19px; box-shadow: 0 6px 0 #D9D5F2;
  border: 3px solid transparent; font-variant-numeric: tabular-nums;
  transition: transform .1s; line-height: 1.35;
}
.opt:hover:not(:disabled) { transform: translateY(-2px); border-color: #C9B4FF; }
.opt:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 3px 0 #D9D5F2; }
.opt:disabled { cursor: default; opacity: .85; }
.opt.good { border-color: #22C55E; background: #EBFBF0; box-shadow: 0 6px 0 #B9E8C6; opacity: 1; }
.opt.badx { border-color: #EF4444; background: #FEF0F0; box-shadow: 0 6px 0 #F3C2C2; }
.skip { text-align: center; font-size: 13px; color: var(--ink-soft); margin-top: 14px; font-family: "Segoe UI", sans-serif; }

.qside { display: flex; flex-direction: column; gap: 14px; }
.side-card {
  background: #fff; border-radius: 18px; padding: 14px; text-align: center;
  box-shadow: 0 5px 0 var(--card-shadow);
}
.side-card .lab { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 700; font-family: "Segoe UI", sans-serif; }
.ring { position: relative; width: 92px; height: 92px; margin: 8px auto 2px; }
.ring svg { transform: rotate(-90deg); }
.ring circle { transition: stroke-dashoffset 1s linear, stroke .3s; }
.ring .num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 29px; font-variant-numeric: tabular-nums; }
.side-big { font-size: 27px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; }
.qdots { display: flex; justify-content: center; gap: 5px; margin-top: 9px; flex-wrap: wrap; }
.qdots i { width: 10px; height: 10px; border-radius: 50%; background: #E2DEF6; transition: transform .2s; }
.qdots i.done { background: #22C55E; }
.qdots i.badd { background: #EF4444; }
.qdots i.skipdot { background: #C9C4EE; }
.qdots i.cur { background: var(--accent); transform: scale(1.3); }
.streak { font-size: 13px; margin-top: 8px; font-weight: 800; min-height: 18px; }

.toast {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%) rotate(-3deg);
  color: #fff; font-weight: 800; border-radius: 18px;
  padding: 15px 28px; font-size: 20px; text-align: center;
  z-index: 40; pointer-events: none; max-width: min(80vw, 480px);
  animation: pop .25s ease-out;
}
.toast.hidden { display: none; }
.toast small { display: block; font-size: 12.5px; font-weight: 700; opacity: .95; margin-top: 3px; font-family: "Segoe UI", sans-serif; }
.toast.good-toast { background: #22C55E; box-shadow: 0 12px 30px rgba(34, 197, 94, .45); }
.toast.bad-toast { background: #EF4444; box-shadow: 0 12px 30px rgba(239, 68, 68, .4); }
.toast.miss-toast { background: #6B6893; box-shadow: 0 12px 30px rgba(107, 104, 147, .4); }
@keyframes pop {
  0% { transform: translate(-50%, -50%) rotate(-3deg) scale(.5); opacity: 0; }
  100% { transform: translate(-50%, -50%) rotate(-3deg) scale(1); opacity: 1; }
}

/* ---------- results ---------- */
.rescol { display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; justify-content: center; padding: 20px 0; }
.burst { font-size: 50px; animation: bounce .6s ease; }
@keyframes bounce { 0% { transform: scale(.3); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.res-h { font-size: 30px; font-weight: 800; margin: 8px 0 2px; }
.res-sub { font-size: 14px; color: var(--ink-soft); font-family: "Segoe UI", sans-serif; }
.stars { font-size: 38px; letter-spacing: 8px; margin: 12px 0 4px; min-height: 20px; }
.bigscore { font-size: 50px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.05; }
.bigscore small { font-size: 14px; color: var(--ink-soft); display: block; font-weight: 700; margin-top: 2px; }
.statrow { display: flex; gap: 14px; margin-top: 20px; flex-wrap: wrap; justify-content: center; }
.stat {
  background: #fff; border-radius: 16px; padding: 12px 22px; min-width: 130px;
  box-shadow: 0 5px 0 var(--card-shadow); font-family: "Segoe UI", sans-serif;
}
.stat .k { font-size: 11px; color: var(--faint); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.stat .v { font-size: 18px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.unlock { margin-top: 20px; background: #FFF3D6; border-radius: 14px; padding: 12px 28px; font-size: 15px; font-weight: 800; color: #B07B00; }

/* ---------- level-up fanfare ---------- */
.levelup { margin-top: 22px; text-align: center; animation: lu-pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.lu-banner {
  display: inline-block;
  background: linear-gradient(135deg, #7C4DFF, #F15BB5);
  color: #fff; font-weight: 800; font-size: 24px; letter-spacing: .06em;
  border-radius: 999px; padding: 12px 36px;
  box-shadow: 0 8px 0 rgba(91, 54, 196, .4), 0 14px 40px rgba(124, 77, 255, .35);
  transform: rotate(-2deg);
}
.lu-rank { font-size: 20px; font-weight: 800; margin-top: 12px; }
.lu-rank .lu-ico { font-size: 34px; display: block; animation: lu-bounce 1s ease .3s 2; }
@keyframes lu-pop {
  0% { transform: scale(.2) rotate(-8deg); opacity: 0; }
  70% { transform: scale(1.12) rotate(1deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes lu-bounce {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-14px) scale(1.2); }
}

/* ---------- confetti ---------- */
#confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 60; }
.cf {
  position: absolute; top: -14px; width: 10px; height: 14px;
  border-radius: 3px; opacity: .95;
  animation: cf-fall linear forwards;
}
@keyframes cf-fall {
  0% { transform: translateY(-10px) rotate(0) ; }
  100% { transform: translateY(105vh) rotate(720deg); }
}
.btnrow { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; justify-content: center; }
.btn { border-radius: 999px; text-align: center; padding: 13px 32px; font-weight: 800; font-size: 15px; }
.btn.pri { background: var(--accent); color: #fff; box-shadow: 0 6px 0 #5B36C4; }
.btn.sec { background: #fff; color: var(--ink); box-shadow: 0 6px 0 #D9D5F2; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #D9D5F2; }
.btn.pri:active { box-shadow: 0 2px 0 #5B36C4; }

/* ---------- overlays ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(46, 42, 92, .45);
  display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.overlay.open { display: flex; }
.ov-card {
  background: linear-gradient(180deg, #FDF9FF, #F3EFFF);
  border-radius: 24px; padding: 26px 28px; width: 100%; max-width: 460px;
  box-shadow: 0 24px 60px rgba(30, 25, 90, .35);
  max-height: 90vh; overflow-y: auto;
}
.ov-title { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 14px; }
.ov-lab { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 700; margin: 16px 0 8px; font-family: "Segoe UI", sans-serif; }
.av-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.av-pick {
  font-size: 26px; background: #fff; border-radius: 14px; padding: 8px 0;
  border: 3px solid transparent; box-shadow: 0 4px 0 var(--card-shadow);
}
.av-pick.sel { border-color: var(--accent); box-shadow: 0 4px 0 #C9B4FF; }
#wiz-name {
  width: 100%; font-size: 18px; font-weight: 800; font-family: inherit; color: var(--ink);
  background: #fff; border: 3px solid #D9D5F2; border-radius: 14px; padding: 12px 16px;
}
#wiz-name:focus { border-color: var(--accent); outline: none; }
#wiz-name.shake { animation: shake .35s; border-color: #EF4444; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.age-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.age-btn {
  background: #fff; border-radius: 14px; padding: 9px 2px; font-weight: 800; font-size: 14px;
  border: 3px solid transparent; box-shadow: 0 4px 0 var(--card-shadow); text-align: center;
}
.age-btn small { display: block; font-size: 10px; color: var(--faint); font-family: "Segoe UI", sans-serif; font-weight: 700; }
.age-btn.sel { border-color: var(--accent); color: var(--accent); }
@media (max-width: 540px) { .age-row { grid-template-columns: repeat(3, 1fr); } }
.ov-card.wide { max-width: 560px; }
.hist-subjects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hist-sub {
  background: #fff; border-radius: 12px; padding: 8px 12px;
  display: flex; align-items: center; gap: 8px;
  border-left: 5px solid #ccc; box-shadow: 0 3px 0 var(--card-shadow);
  font-size: 13.5px;
}
.hs-ico { font-size: 18px; }
.hs-nm { font-weight: 800; }
.hs-lv { margin-left: auto; color: var(--ink-soft); font-family: "Segoe UI", sans-serif; font-size: 12px; }
.hs-st { font-weight: 800; font-size: 12.5px; }
.hist-list { display: flex; flex-direction: column; gap: 7px; max-height: 300px; overflow-y: auto; padding-right: 4px; }
.hist-row {
  background: #fff; border-radius: 12px; padding: 8px 12px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 3px 0 var(--card-shadow);
}
.hr-ico {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.hr-what { display: flex; flex-direction: column; min-width: 0; }
.hr-what b { font-size: 14px; }
.hr-what small { font-size: 11.5px; color: var(--ink-soft); font-family: "Segoe UI", sans-serif; }
.hr-stars { margin-left: auto; font-size: 13px; letter-spacing: 1px; }
.hr-score { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }
.hist-empty { text-align: center; color: var(--faint); font-family: "Segoe UI", sans-serif; padding: 16px 0; }

.timer-row { display: flex; align-items: center; gap: 16px; }
#set-timer { flex: 1; accent-color: var(--accent); height: 26px; }
.timer-val { background: #fff; border-radius: 14px; padding: 8px 14px; text-align: center; min-width: 84px;
  box-shadow: 0 4px 0 var(--card-shadow); }
.timer-val b { font-size: 24px; font-variant-numeric: tabular-nums; }
.timer-val small { display: block; font-size: 10px; color: var(--faint); font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; font-family: "Segoe UI", sans-serif; }
.timer-hint { font-size: 12.5px; color: var(--ink-soft); font-family: "Segoe UI", sans-serif; margin-top: 8px; }

.lvl-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.lvl-btn {
  background: #fff; border-radius: 14px; padding: 10px 4px; text-align: center;
  box-shadow: 0 4px 0 var(--card-shadow); border: 3px solid transparent;
}
.lvl-btn b { display: block; font-size: 19px; }
.lvl-btn span { font-size: 11px; letter-spacing: 1px; }
.lvl-btn:hover:not(.locked) { border-color: var(--accent); }
.lvl-btn.locked { opacity: .45; cursor: default; }
.lvl-btn small { display: block; font-size: 9.5px; color: var(--ink-soft); font-family: "Segoe UI", sans-serif; margin-top: 1px; line-height: 1.15; }
.lvl-note { text-align: center; font-size: 12.5px; color: var(--ink-soft); font-family: "Segoe UI", sans-serif; margin-top: 14px; }
.cat .topic { font-size: 11.5px; opacity: .9; font-family: "Segoe UI", sans-serif; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .cats { grid-template-columns: 1fr 1fr; }
  .qgrid { grid-template-columns: 1fr; }
  .qside { flex-direction: row; flex-wrap: wrap; }
  .side-card { flex: 1; min-width: 140px; }
}
@media (max-width: 540px) {
  .screen-page { padding: 14px 14px 30px; }
  .cats { grid-template-columns: 1fr; }
  .opts { grid-template-columns: 1fr; }
  .qtext { font-size: 17px; }
  .pic-row { font-size: 22px; }
  .greet { font-size: 21px; }
  .profpill span:not(.avatar) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
