/* Abhay's Study Station — app styles. Everything is driven by the CSS variables set from the settings panel. */
:root {
  --bg: #f8f9fa; --card: #ffffff; --text: #010110; --accent: #144a58; --on-accent: #ffffff;
  --hdr-bg: #ffffff; --hdr-text: #010110; --ftr-bg: #ffffff; --ftr-text: #45545e;
  --font-head: "Geist Variable", "Inter Variable", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Geist Variable", "Inter Variable", ui-sans-serif, system-ui, sans-serif;
  --fs: 1; --logo-size: 32px;
  --muted: color-mix(in srgb, var(--text) 62%, var(--card));
  --line: color-mix(in srgb, var(--text) 12%, transparent);
  --line-strong: color-mix(in srgb, var(--text) 26%, transparent);
  --soft: color-mix(in srgb, var(--text) 5%, var(--card));
  --hline: color-mix(in srgb, var(--hdr-text) 20%, transparent);
}
body { background: var(--bg); color: var(--text); font-family: var(--font-body); margin: 0; }
body.sh-modal-open { overflow: hidden; }
.sh-app { font-size: calc(1rem * var(--fs)); line-height: 1.5; font-family: var(--font-body); color: var(--text); }
.sh-app *, .sh-app *::before, .sh-app *::after { box-sizing: border-box; }
.sh-app h1, .sh-app h2, .sh-app h3, .sh-app h4 { font-family: var(--font-head); line-height: 1.2; margin: 0; }
.sh-app p { margin: 0; }
.sh-app [hidden], .sh-modal-wrap [hidden] { display: none !important; }
.sh-app :focus-visible, .sh-modal-wrap :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sh-app button { font: inherit; }
.sh-ico { flex: none; }

/* ---------- form controls ---------- */
.sh-app input[type=text], .sh-app input[type=number], .sh-app select, .sh-app textarea,
.sh-modal input[type=number], .sh-modal select {
  font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line-strong);
  border-radius: 9px; padding: 9px 11px; width: 100%; min-width: 0; line-height: 1.3;
}
.sh-app select { appearance: auto; }
.sh-app textarea { resize: vertical; min-height: 280px; line-height: 1.55; }
.sh-app input[type=color] { width: 44px; height: 34px; padding: 2px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--card); cursor: pointer; flex: none; }
.sh-app input[type=range] { width: 100%; accent-color: var(--accent); }
.sh-app input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.sh-num { width: 84px !important; text-align: center; }
.sh-num--sm { width: 64px !important; padding: 5px 6px !important; }

/* ---------- buttons ---------- */
.sh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent; background: var(--accent); color: var(--on-accent);
  font-weight: 600; cursor: pointer; transition: transform .15s, opacity .15s; white-space: nowrap;
}
.sh-btn:hover { opacity: .9; } .sh-btn:active { transform: scale(.97); }
.sh-btn:disabled { opacity: .4; cursor: default; }
.sh-btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.sh-btn--sm { min-height: 34px; padding: 0 14px; font-size: .88em; }
.sh-btn--lg { min-height: 52px; padding: 0 28px; font-size: 1.05em; }
.sh-btn--danger { background: transparent; color: #b91c1c; border-color: #b91c1c; }
.sh-btn--danger.is-armed, .is-armed { background: #b91c1c !important; color: #fff !important; border-color: #b91c1c !important; }
.sh-link { background: none; border: 0; padding: 4px 2px; color: var(--accent); text-decoration: underline; cursor: pointer; font-size: .9em; }
.sh-icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid transparent;
  background: transparent; color: inherit; cursor: pointer;
}
.sh-icon-btn:hover { background: var(--soft); }
.sh-icon-btn:disabled { opacity: .3; cursor: default; }
.sh-icon-btn--sm { width: 30px; height: 30px; }
.sh-chip { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; width: 38px; height: 38px; font-size: 1.15em; cursor: pointer; }
.sh-note { font-size: .84em; color: var(--muted); }
.sh-lead { color: var(--muted); margin-bottom: 14px; max-width: 62ch; }
.sh-empty { color: var(--muted); padding: 14px 0; }
.sh-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sh-row > input, .sh-row > select { flex: 1 1 140px; }

/* ---------- subject symbol badges ---------- */
.sh-sym {
  display: inline-grid; place-items: center; width: var(--sz, 28px); height: var(--sz, 28px); flex: none;
  border-radius: calc(var(--sz, 28px) * .28); background: var(--sc); color: var(--si); line-height: 1;
}
.sh-sym svg { width: 70%; height: 70%; display: block; }
.sh-sym-glyph { font-family: "Tillana", "Nirmala UI", "Noto Sans Kannada", "Noto Sans Devanagari", Georgia, serif; font-weight: 400; font-size: calc(var(--sz, 28px) * .64); }
.sh-sym-glyph.is-wide { font-size: calc(var(--sz, 28px) * .48); font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
.sh-sym--none { background: var(--soft); color: var(--muted); font-weight: 700; }

/* ---------- panel (left) ---------- */
.sh-panel {
  position: fixed; inset: 0 auto 0 0; width: 360px; max-width: 92vw; z-index: 60; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); color: var(--text); border-right: 1px solid var(--line-strong);
  transform: translateX(-102%); visibility: hidden; transition: transform .26s cubic-bezier(.2, .7, .2, 1), visibility 0s .26s;
  box-shadow: 8px 0 40px -16px rgba(0, 0, 0, .35); font-size: calc(.94rem);
}
.panel-open .sh-panel { transform: none; visibility: visible; transition: transform .26s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
.sh-panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 18px 16px 12px; position: sticky; top: 0; background: var(--card); z-index: 2; border-bottom: 1px solid var(--line); }
.sh-panel-head h2 { font-size: 1.3em; } .sh-panel-head p { color: var(--muted); font-size: .85em; margin-top: 2px; }
.sh-group { border-bottom: 1px solid var(--line); }
.sh-group summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; flex-direction: column; gap: 1px; position: relative; }
.sh-group summary::-webkit-details-marker { display: none; }
.sh-group summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.sh-group[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.sh-group-title { font-weight: 700; font-family: var(--font-head); }
.sh-group-sub { font-size: .8em; color: var(--muted); }
.sh-group-body { padding: 2px 16px 16px; display: grid; gap: 12px; }
.sh-field { display: grid; gap: 5px; font-size: .88em; font-weight: 500; }
.sh-field > span:first-child { color: var(--muted); font-weight: 600; }
.sh-field--color { grid-template-columns: 1fr auto; align-items: center; }
.sh-field--check { grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.sh-field--check > span { color: var(--text) !important; font-weight: 500 !important; }
.sh-range { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.sh-range output { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 3.4ch; text-align: right; }
.sh-themes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sh-theme { position: relative; }
.sh-theme-btn { width: 100%; text-align: left; display: grid; gap: 8px; padding: 10px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--soft); color: var(--text); cursor: pointer; }
.sh-theme.is-active .sh-theme-btn { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.sh-theme-dots { display: flex; } .sh-theme-dots i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--card); margin-right: -6px; box-shadow: 0 0 0 1px var(--line-strong); }
.sh-theme-name { font-weight: 600; font-size: .9em; }
.sh-theme-x { position: absolute; top: 6px; right: 6px; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); cursor: pointer; display: grid; place-items: center; font-size: .8em; }
.sh-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-emoji-in { max-width: 120px; font-size: 1.2em !important; text-align: center; }
.sh-pagelist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sh-pagelist li { display: grid; grid-template-columns: 22px 1fr auto auto auto; gap: 4px; align-items: center; }
.sh-pagelist li input { padding: 6px 9px !important; }
.sh-pagelist .sh-icon-btn.is-armed { width: auto; border-radius: 15px; padding: 0 8px; font-size: .78em; }
.sh-pl-ico { text-align: center; }
.sh-panel-foot { padding: 16px; display: grid; }
.sh-scrim { display: none; }

/* ---------- shell, header, footer ---------- */
/* the menu (Home, Timer, … and Settings) lives in a panel down the left-hand side */
.sh-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: row; align-items: flex-start; transition: margin-left .26s cubic-bezier(.2, .7, .2, 1); }
.sh-body { flex: 1 1 0; min-width: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
@media (min-width: 1100px) { .panel-open .sh-shell { margin-left: 360px; } }
@media (max-width: 1099px) { .panel-open .sh-scrim { display: block; position: fixed; inset: 0; background: rgba(8, 12, 20, .45); z-index: 55; } }
.sh-header { flex: none; width: 228px; position: sticky; top: 0; height: 100vh; height: 100dvh; z-index: 40; }
.sh-header[hidden] { display: none; }
.sh-header-in {
  height: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 16px 12px 14px;
  background: var(--hdr-bg); color: var(--hdr-text); border-right: 1px solid var(--hline);
  box-shadow: 8px 0 28px -20px rgba(0, 0, 0, .45);
}
.sh-set-btn { display: flex; gap: 10px; align-items: center; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--hline); background: transparent; color: inherit; font-weight: 600; cursor: pointer; flex: none; margin-top: auto; width: 100%; text-align: left; }
.sh-set-btn:hover { background: color-mix(in srgb, var(--hdr-text) 8%, transparent); }
.sh-set-btn[aria-expanded=true] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.sh-brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: var(--font-head); font-weight: 600; font-size: 1.08em; line-height: 1.2; min-width: 0; flex: none; padding: 2px 4px 12px; border-bottom: 1px solid var(--hline); }
.sh-brand-title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; min-width: 0; }
.sh-logo { display: inline-flex; align-items: center; flex: none; max-width: 100%; }
.sh-logo-emoji { font-size: var(--logo-size); line-height: 1; }
.sh-logo-img { height: var(--logo-size); width: auto; max-width: calc(var(--logo-size) * 2.4); object-fit: contain; border-radius: 6px; }
.sh-nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; scrollbar-width: thin; min-height: 0; flex: 0 1 auto; }
.sh-nav-link { display: flex; gap: 11px; align-items: center; padding: 10px 12px; border-radius: 12px; color: inherit; text-decoration: none; font-weight: 500; font-size: .96em; opacity: .85; }
.sh-nav-ico { width: 1.4em; text-align: center; flex: none; }
.sh-nav-link:hover { opacity: 1; background: color-mix(in srgb, var(--hdr-text) 8%, transparent); }
.sh-nav-link[aria-current=page] { background: var(--accent); color: var(--on-accent); opacity: 1; }
@media (max-width: 760px) {
  .sh-header { width: 62px; }
  .sh-header-in { padding: 12px 6px; align-items: center; gap: 10px; }
  .sh-brand { padding: 0 0 10px; justify-content: center; width: 100%; }
  .sh-brand-title, .sh-nav-link > span:last-child, .sh-set-btn span { display: none; }
  .sh-logo-img, .sh-logo-emoji { max-width: 44px; }
  .sh-logo-emoji { font-size: min(var(--logo-size), 30px); } .sh-logo-img { height: min(var(--logo-size), 34px); }
  .sh-nav { width: 100%; align-items: center; }
  .sh-nav-link { padding: 9px 0; width: 100%; justify-content: center; font-size: 1.05em; }
  .sh-set-btn { width: 42px; padding: 0; justify-content: center; }
}
.sh-main { flex: 1; width: 100%; }
.sh-footer { padding: 18px 16px; text-align: center; font-size: .88em; background: var(--ftr-bg); color: var(--ftr-text); margin-top: 24px; border-top: 1px solid color-mix(in srgb, var(--ftr-text) 18%, transparent); }
.sh-page { padding: 22px 12px 8px; }
.sh-page--home { padding: 0; }
.sh-wrap { max-width: 1100px; margin: 0 auto; } .sh-wrap--narrow { max-width: 760px; } .sh-wrap--wide { max-width: 1280px; }

/* the original hero + globe stay as they were; they just sit on the page background now */
#root > div { background: transparent !important; }
#root section[aria-labelledby="onchat-hero-heading"] header { display: none; }

/* ---------- cards ---------- */
.sh-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: clamp(16px, 3vw, 28px); box-shadow: 0 4px 14px rgba(0, 0, 0, .04); }
.sh-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 18px; }
.sh-card-head h2 { font-size: 1.3em; font-weight: 700; }
.sh-saved { font-size: .82em; color: var(--muted); }

/* ---------- timer ---------- */
.tm-card { --ring: var(--accent); }
.tm-card[data-mode=short], .tm-card[data-mode=long] { --ring: #1f9d6e; }
.tm-modes { display: flex; gap: 4px; padding: 4px; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; width: max-content; max-width: 100%; margin: 0 auto 8px; overflow-x: auto; }
.tm-modes button { border: 0; background: transparent; color: var(--text); padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: .9em; cursor: pointer; white-space: nowrap; }
.tm-modes button.is-on { background: var(--card); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.tm-edit { background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 12px 0; display: grid; gap: 12px; }
.tm-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; }
.tm-edit .sh-field { align-content: end; }
.tm-ring { position: relative; width: min(300px, 78vw); aspect-ratio: 1; margin: 12px auto 8px; }
.tm-ring-svg { width: 100%; height: 100%; display: block; }
.tm-track { fill: none; stroke: var(--line); stroke-width: 12; }
.tm-prog { fill: none; stroke: var(--ring); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s; }
.tm-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px; }
.tm-time { font-family: var(--font-head); font-size: clamp(2.7rem, 11vw, 3.9rem); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.02em; }
.tm-label { color: var(--muted); font-weight: 600; }
.tm-study { max-width: 460px; margin: 10px auto 4px; display: grid; gap: 6px; transition: opacity .2s; }
.tm-study.is-dim { opacity: .55; }
.tm-study-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: end; }
.tm-badge { display: grid; place-items: center; height: 40px; }
.tm-controls { display: flex; justify-content: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.tm-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.tm-dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); }
.tm-dots i.is-on { background: var(--ring); border-color: var(--ring); }

/* ---------- goals ---------- */
.sh-subj-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.sh-subj-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); cursor: pointer; font-weight: 600; font-size: .9em; }
.sh-subj-chip.is-on { background: var(--text); color: var(--card); border-color: var(--text); }
.sh-addrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sh-addrow > input[type=text] { flex: 1 1 220px; }
.sh-inline { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .88em; }
.sh-goals { margin-top: 22px; display: grid; gap: 18px; }
.sh-goal-group { border: 1px solid var(--line); border-left: 4px solid var(--sc); border-radius: 12px; padding: 12px 14px 4px; }
.sh-goal-group > header { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.sh-goal-group h3 { font-size: 1.05em; flex: 1; } .sh-goal-avg { font-size: .84em; color: var(--muted); font-weight: 600; }
.sh-goal { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.sh-goal:first-of-type { border-top: 0; }
.sh-goal-top { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; }
.sh-topic-name { border-color: transparent !important; background: transparent !important; font-weight: 600; padding-left: 6px !important; }
.sh-topic-name:hover, .sh-topic-name:focus { border-color: var(--line-strong) !important; background: var(--card) !important; }
.sh-goal-prog { display: grid; gap: 6px; padding-left: 28px; }
.sh-bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.sh-bar i { display: block; height: 100%; background: var(--sc); border-radius: 5px; transition: width .4s; min-width: 0; }
.sh-goal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .84em; color: var(--muted); }
.sh-goal-meta .sh-link { margin-left: auto; }
.sh-checks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 4px; }
.sh-checks li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.sh-checks li span { flex: 1; } .sh-checks li.is-done span { text-decoration: line-through; color: var(--muted); }
.flashcard { text-align: center; cursor: pointer; background: var(--soft); border: 1px dashed var(--line-strong); border-radius: 12px; display: flex; justify-content: center; align-items: center; height: 140px; padding: 1rem; font-weight: 500; }

/* ---------- toasts, modal, tooltip ---------- */
#sh-toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 300; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 24px); }
.sh-toast { background: #10222b; color: #fff; padding: 10px 16px; border-radius: 12px; display: flex; gap: 14px; align-items: center; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); font-size: .92rem; }
.sh-toast-btn { background: transparent; border: 0; color: #9ee0f5; font-weight: 700; cursor: pointer; }
.sh-modal-wrap { position: fixed; inset: 0; z-index: 100; background: rgba(8, 12, 22, .6); display: grid; place-items: center; padding: 16px; overflow: auto; font-family: var(--font-body); }
.sh-modal { background: var(--card); color: var(--text); border-radius: 20px; width: 100%; max-width: 920px; max-height: calc(100dvh - 32px); overflow: auto; padding: clamp(16px, 3vw, 28px); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); outline: 0; font-size: 1rem; line-height: 1.5; }
.sh-modal * { box-sizing: border-box; }
.sh-modal h2, .sh-modal h3 { font-family: var(--font-head); line-height: 1.2; margin: 0; }
.sh-modal p { margin: 0; }
.sh-modal--small { max-width: 460px; }
.sh-tip { position: fixed; z-index: 400; background: #10222b; color: #fff; padding: 6px 10px; border-radius: 8px; font-size: .8rem; pointer-events: none; max-width: 270px; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .5); }

/* ---------- report: alarm + charts ---------- */
.sh-report { display: grid; gap: 18px; }
.sh-report-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.sh-report-head h2 { font-size: 1.4em; } .sh-report-head p { color: var(--muted); margin-top: 3px; }
.sh-bell { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); animation: sh-ring 1.1s ease-in-out infinite; transform-origin: 50% 20%; }
@keyframes sh-ring { 0%, 55%, 100% { transform: rotate(0); } 10% { transform: rotate(16deg); } 20% { transform: rotate(-14deg); } 30% { transform: rotate(10deg); } 40% { transform: rotate(-8deg); } }
.sh-alarm-btn { background: #b91c1c; color: #fff; }
.sh-charts { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; }
.sh-chart-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.sh-chart-card h3 { font-size: 1.05em; } .sh-chart-sub { color: var(--muted); font-size: .86em; }
.sh-subj-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .84em; color: var(--muted); }
.sh-subj-key > span { display: inline-flex; gap: 6px; align-items: center; }
.sh-chart-host { width: 100%; min-width: 0; }
.sh-chart { display: block; max-width: 100%; overflow: visible; font-family: var(--font-body); }
.ct-grid { stroke: var(--line); stroke-width: 1; }
.ct-axis { fill: var(--muted); font-size: 11px; }
.ct-label { fill: var(--text); font-size: 12.5px; }
.ct-value { fill: var(--text); font-size: 12.5px; font-weight: 700; }
.ct-gain { fill: var(--muted); font-weight: 500; font-size: 11.5px; }
.ct-hit { fill: transparent; } .ct-row:hover .ct-hit { fill: var(--soft); }
.ct-empty { stroke: var(--line); }
.ct-center-big { fill: var(--text); font-size: 21px; font-weight: 700; font-family: var(--font-head); }
.ct-slice { transition: opacity .15s; } g:hover > .ct-slice { opacity: .85; }
.sh-pie-wrap { display: grid; justify-items: center; gap: 12px; }
.sh-pie-host { width: 220px; max-width: 100%; }
.sh-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; width: 100%; font-size: .88em; }
.sh-legend li { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; }
.sh-legend i { width: 12px; height: 12px; border-radius: 4px; }
.sh-legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sh-legend b { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.sh-report-tools { display: flex; justify-content: flex-start; }
.sh-report-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.sh-report-table table { width: 100%; border-collapse: collapse; font-size: .88em; }
.sh-report-table th, .sh-report-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sh-report-table th { color: var(--muted); font-weight: 600; background: var(--soft); }
.sh-report-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
@media (max-width: 760px) { .sh-charts { grid-template-columns: 1fr; } .sh-report-head { grid-template-columns: auto 1fr; } .sh-report-head .sh-alarm-btn { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .sh-bell { animation: none; } html { scroll-behavior: auto; } .sh-shell, .sh-panel { transition: none; } }

/* ================= whiteboard ================= */
.wb { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.wb > * { min-width: 0; }
.wb:fullscreen { background: var(--bg); padding: 14px; overflow: auto; align-content: start; }
.wb-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.wb-top h2 { font-size: 1.3em; font-weight: 700; }
.wb-subjects { display: flex; flex-wrap: wrap; gap: 6px; }
.wb-subj { display: inline-flex; align-items: center; gap: 8px; padding: 4px 13px 4px 5px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); cursor: pointer; font-weight: 600; font-size: .88em; }
.wb-subj[aria-pressed=true] { background: var(--text); color: var(--card); border-color: var(--text); }
.wb-bar { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 8px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.wb-grp { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.wb-grp + .wb-grp { padding-left: 16px; border-left: 1px solid var(--line); }
.wb-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 56px; padding: 6px 8px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text); font-size: .72rem; font-weight: 600; cursor: pointer; }
.wb-btn:hover { background: var(--soft); }
.wb-btn[aria-pressed=true] { background: var(--accent); color: var(--on-accent); }
.wb-btn:disabled { opacity: .35; cursor: default; background: transparent; }
.wb-btn--danger { color: #b91c1c; }
.wb-grp--size { gap: 10px; }
.wb-grp--size label { display: grid; gap: 2px; font-size: .72rem; font-weight: 600; color: var(--muted); }
.wb-grp--size input[type=range] { width: 110px; }
.wb-sizedot { display: block; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px var(--line-strong); }
.wb-colorpick { display: grid; gap: 2px; }
.wb-bgsel { display: grid; gap: 2px; font-size: .72rem; font-weight: 600; color: var(--muted); margin-right: 6px; }
.wb-bgsel select { padding: 4px 6px !important; font-size: .85rem; width: auto !important; }

.wb-board { position: relative; }
.wb-frame {
  padding: clamp(8px, 1.4vw, 16px); border-radius: 16px 16px 6px 6px;
  background: linear-gradient(150deg, #eceff2 0%, #b8bec6 38%, #dfe3e7 58%, #a7aeb7 100%);
  box-shadow: inset 0 2px 0 #fff, inset 0 -2px 0 rgba(0, 0, 0, .15), 0 22px 44px -22px rgba(0, 0, 0, .55);
}
.wb-surface {
  position: relative; width: 100%; aspect-ratio: 16 / 9; background-color: #fbfcfc; border-radius: 5px; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14), inset 0 4px 14px rgba(0, 0, 0, .12); touch-action: none; user-select: none; -webkit-user-select: none;
}
.wb-surface[data-bg=ruled] { background-image: linear-gradient(rgba(60, 110, 170, .24) 1px, transparent 1px); background-size: 100% 5.5556%; }
.wb-surface[data-bg=grid] { background-image: linear-gradient(rgba(60, 110, 170, .2) 1px, transparent 1px), linear-gradient(90deg, rgba(60, 110, 170, .2) 1px, transparent 1px); background-size: 3.125% 5.5556%; }
.wb-surface[data-bg=dots] { background-image: radial-gradient(rgba(60, 110, 170, .45) 1.6px, transparent 1.8px); background-size: 3.125% 5.5556%; background-position: 0 0; }
.wb-surface::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5; background: linear-gradient(115deg, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, 0) 26%, rgba(255, 255, 255, 0) 72%, rgba(0, 0, 0, .04) 100%); }
.wb-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wb-live { touch-action: none; cursor: crosshair; }
.wb-surface[data-tool=eraser] .wb-live { cursor: none; }
.wb-surface[data-tool=text] .wb-live { cursor: text; }
.wb-surface.is-stamping .wb-live { cursor: copy; }
.wb-ov { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; touch-action: none; overflow: visible; z-index: 2; }
.ov-body { pointer-events: all; cursor: move; }
.ov-handle { pointer-events: all; cursor: grab; }
.ov-handle circle { fill: #fff; stroke: #2a3f55; stroke-width: 2.5; }
.ov-handle--del circle { fill: #fee2e2; stroke: #b91c1c; }
.ov-hglyph { font: 700 20px ui-sans-serif, system-ui, sans-serif; fill: #1f3347; pointer-events: none; }
.ov-glass { fill: rgba(176, 213, 244, .5); stroke: #4d7ba6; stroke-width: 2.5; }
.ov-amber { fill: rgba(250, 213, 128, .5); stroke: #a9781b; }
.ov-teal { fill: rgba(146, 218, 205, .5); stroke: #2f857a; }
.ov-window { fill: rgba(255, 255, 255, .28); stroke: rgba(0, 0, 0, .22); stroke-width: 1.5; pointer-events: none; }
.ov-tick { stroke: #223a52; stroke-width: 1.5; pointer-events: none; }
.ov-num { font: 600 14px ui-sans-serif, system-ui, sans-serif; fill: #1f3347; pointer-events: none; }
.ov-num--dim { opacity: .6; font-size: 12px; }
.ov-unit { font: 700 15px ui-sans-serif, system-ui, sans-serif; fill: #1f3347; opacity: .8; pointer-events: none; }
.ov-cross { stroke: #c0392b; stroke-width: 1.8; fill: none; pointer-events: none; }
.wb-plate { position: absolute; top: 2.2%; left: 1.6%; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 5px 16px 5px 6px; background: rgba(255, 255, 255, .78); border: 1px solid rgba(0, 0, 0, .1); border-radius: 999px; font: 700 clamp(11px, 1.6vw, 16px) var(--font-head); color: #1b1b1f; pointer-events: none; }
.wb-banner { position: absolute; left: 50%; top: 2.5%; transform: translateX(-50%); z-index: 6; background: #10222b; color: #fff; padding: 8px 16px; border-radius: 999px; font-size: .86rem; pointer-events: none; max-width: 92%; text-align: center; }
.wb-textin { position: absolute; z-index: 4; border: 2px dashed #5b8bb5 !important; background: rgba(255, 255, 255, .88) !important; font-family: Tillana, "Segoe Print", "Nirmala UI", sans-serif !important; width: auto !important; min-width: 8ch; padding: 0 4px !important; border-radius: 3px !important; outline: 0; line-height: 1.15 !important; }

.wb-ledge { position: relative; margin: 0 clamp(10px, 2vw, 22px); height: 30px; background: linear-gradient(#d3d8de, #8c939c); border-radius: 0 0 12px 12px; box-shadow: 0 10px 16px -10px rgba(0, 0, 0, .55), inset 0 1px 0 #fff; display: flex; align-items: flex-start; justify-content: space-between; padding: 0 clamp(10px, 2vw, 22px); }
.wb-markers { display: flex; gap: clamp(5px, 1vw, 14px); transform: translateY(-11px); flex-wrap: nowrap; }
.wb-marker { position: relative; width: clamp(30px, 4.6vw, 62px); height: 17px; border: 0; border-radius: 6px; cursor: pointer; background: linear-gradient(90deg, #f6f6f6 0 24%, var(--mc) 24% 100%); box-shadow: 0 2px 0 rgba(0, 0, 0, .3); transition: transform .15s; }
.wb-marker::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 11px; background: var(--mc); filter: brightness(.76); border-radius: 0 6px 6px 0; }
.wb-marker[aria-pressed=true] { transform: translateY(-9px); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--accent); }
.wb-duster { width: clamp(60px, 8vw, 88px); letter-spacing: .06em; height: 27px; border: 0; border-radius: 5px; transform: translateY(-14px); cursor: pointer; background: linear-gradient(#34383d 0 52%, #8d5b2a 52%); color: #d7d9dc; font: 700 9px ui-sans-serif, system-ui, sans-serif; display: grid; place-items: end center; padding-bottom: 2px; box-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.wb-duster[aria-pressed=true] { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--accent); }

.wb-shelf { --sc: #2a78d6; background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--sc); border-radius: 6px 6px 16px 16px; padding: 16px 18px 18px; margin-top: 2px; }
.wb-shelf[data-subject=science] { --sc: #eb6834; } .wb-shelf[data-subject=english] { --sc: #1baf7a; } .wb-shelf[data-subject=social] { --sc: #eda100; }
.wb-shelf[data-subject=hindi] { --sc: #e87ba4; } .wb-shelf[data-subject=kannada] { --sc: #008300; }
.wb-shelf-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.wb-shelf-head h3 { font-size: 1.05em; }
.wb-tools-row { display: flex; flex-wrap: wrap; gap: 10px; }
.wb-tool-card { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 118px; padding: 10px 8px 9px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--soft); color: var(--text); font-size: .82rem; font-weight: 600; cursor: pointer; text-align: center; }
.wb-tool-card:hover { background: var(--card); }
.wb-tool-card[aria-pressed=true] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); background: var(--card); }
.wb-tool-art svg { width: 70px; height: 42px; display: block; }
.wb-hint-line { color: var(--muted); font-size: .86em; max-width: 70ch; margin-top: 12px; }
.wb-globe-box { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.wb-globe-cv { flex: none; padding: 4px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #dfe9f1); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45); }
.wb-globe { display: block; cursor: grab; touch-action: none; border-radius: 50%; }
.wb-globe:active { cursor: grabbing; }
.wb-globe-side { flex: 1 1 280px; display: grid; gap: 10px; min-width: 0; }
.wb-globe-side .wb-hint-line { margin-top: 0; }
.wb-readout { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: .95em; min-height: 40px; }
.wb-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.wb-chip { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); font-size: .84em; font-weight: 600; cursor: pointer; }
.wb-chip[aria-pressed=true] { background: var(--text); color: var(--card); border-color: var(--text); }
.wb-keylines { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 3px 14px; font-size: .82em; color: var(--muted); }
.wb-keylines li { display: flex; align-items: center; gap: 8px; } .wb-keylines i { width: 18px; height: 3px; border-radius: 2px; flex: none; }
.wb-globe-side .sh-btn { justify-self: start; }

.wb-book-closed { display: flex; align-items: center; gap: 18px; background: none; border: 0; padding: 4px; cursor: pointer; color: var(--text); text-align: left; border-radius: 12px; }
.wb-book-art svg { width: 96px; height: 120px; display: block; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .3)); transition: transform .2s; }
.wb-book-closed:hover .wb-book-art svg { transform: rotate(-3deg) translateY(-3px); }
.wb-book-cap { font-weight: 700; font-size: 1.05em; }
.wb-book-open { display: grid; grid-template-columns: 210px minmax(0, 1fr); border-radius: 12px; overflow: hidden; background: #f7efd6; color: #2c2417; font-family: Georgia, "Times New Roman", serif; box-shadow: 0 10px 28px -12px rgba(0, 0, 0, .5); }
.wb-page { padding: 16px 18px; } .wb-page h4 { font-family: Georgia, serif; font-size: 1.15em; color: #6d1b27; margin: 0; }
.wb-page--left { background: linear-gradient(90deg, #eee0b6, #f3e8c6); border-right: 2px solid rgba(70, 40, 10, .25); box-shadow: inset -10px 0 12px -10px rgba(70, 40, 10, .35); display: flex; flex-direction: column; gap: 4px; }
.wb-page--right { max-height: 330px; overflow: auto; }
.wb-page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.wb-tabbtn { text-align: left; background: transparent; border: 0; border-radius: 8px; padding: 7px 10px; font-family: Georgia, serif; font-size: .95em; color: #2c2417; cursor: pointer; }
.wb-tabbtn:hover { background: rgba(109, 27, 39, .1); }
.wb-tabbtn.is-on { background: #6d1b27; color: #f7efd6; }
.wb-tabbtn--close { margin-top: auto; color: #6d1b27; font-style: italic; }
.wb-entries { list-style: none; padding: 0; margin: 0; }
.wb-entries li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed rgba(60, 40, 10, .3); line-height: 1.45; }
.wb-entries em { color: #6d1b27; }
.wb-write { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(109, 27, 39, .5); background: #fff8e6; color: #6d1b27; cursor: pointer; display: grid; place-items: center; }
.wb-write:hover { background: #6d1b27; color: #fff; }
.wb-stamp-label { font-weight: 600; font-size: .86em; color: var(--muted); margin: 6px 0; }
.wb-stamp-row { display: flex; flex-wrap: wrap; gap: 6px; }
.wb-stamp { min-width: 46px; height: 46px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--soft); color: var(--text); font: 400 1.3rem "Tillana", "Nirmala UI", "Noto Sans Kannada", "Noto Sans Devanagari", system-ui, sans-serif; cursor: pointer; }
.wb-stamp:hover { background: var(--card); border-color: var(--accent); }
@media (max-width: 760px) {
  .wb-grp + .wb-grp { padding-left: 0; border-left: 0; }
  .wb-book-open { grid-template-columns: 1fr; } .wb-page--left { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 2px solid rgba(70, 40, 10, .25); }
  .wb-tabbtn--close { margin-top: 0; }
  .wb-subj-name { display: none; } .wb-subj { padding-right: 5px; }
  .wb-markers { display: none; } .wb-ledge { justify-content: flex-end; }
}

/* ================= whiteboard v5: board colour, pen colours, live globe ================= */
.wb-surface[data-board=black] { background-color: #101417; }
.wb-surface[data-board=black][data-bg=ruled] { background-image: linear-gradient(rgba(255, 255, 255, .15) 1px, transparent 1px); }
.wb-surface[data-board=black][data-bg=grid] { background-image: linear-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .13) 1px, transparent 1px); }
.wb-surface[data-board=black][data-bg=dots] { background-image: radial-gradient(rgba(255, 255, 255, .32) 1.6px, transparent 1.8px); }
.wb-surface[data-board=black]::after { background: linear-gradient(115deg, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, 0) 26%, rgba(255, 255, 255, 0) 72%, rgba(0, 0, 0, .2) 100%); }
.wb-surface[data-board=black] .ov-glass { fill: rgba(255, 255, 255, .13); stroke: #9fc2e3; }
.wb-surface[data-board=black] .ov-amber { fill: rgba(250, 213, 128, .2); stroke: #e8b84a; }
.wb-surface[data-board=black] .ov-teal { fill: rgba(146, 218, 205, .2); stroke: #62c9b9; }
.wb-surface[data-board=black] .ov-window { fill: rgba(255, 255, 255, .05); stroke: rgba(255, 255, 255, .22); }
.wb-surface[data-board=black] .ov-tick { stroke: #e6eef6; }
.wb-surface[data-board=black] .ov-num, .wb-surface[data-board=black] .ov-unit { fill: #f2f6fa; }
.wb-surface[data-board=black] .ov-cross { stroke: #ff8a7a; }
.wb-surface[data-board=black] .wb-plate { background: rgba(20, 25, 28, .82); border-color: rgba(255, 255, 255, .2); color: #f3f5f7; }
.wb-surface[data-board=black] .wb-textin { background: rgba(16, 20, 23, .92) !important; border-color: #8fb4d8 !important; }

.wb-grp--ink { gap: 8px; flex-wrap: wrap; align-items: center; }
.wb-grplab { font-size: .72rem; font-weight: 600; color: var(--muted); }
.wb-swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.wb-sw { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--sw); cursor: pointer; transition: transform .12s; }
.wb-sw[data-color="#ffffff"] { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.wb-sw[data-color="#aab2bd"] { background: linear-gradient(135deg, #f4f6f8 0%, #aab2bd 42%, #858d98 58%, #e3e7ec 100%); }
.wb-sw[data-color="#c8960c"] { background: linear-gradient(135deg, #f6dd7f 0%, #c8960c 52%, #9a6f00 100%); }
.wb-sw:hover { transform: scale(1.1); }
.wb-sw[aria-pressed=true] { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); transform: scale(1.1); }
.wb-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px; background: var(--soft); }
.wb-segbtn { border: 0; background: transparent; color: var(--text); font: 600 .8rem var(--font-body); padding: 6px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.wb-segbtn[aria-pressed=true] { background: var(--accent); color: var(--on-accent); }

.wb-gbox { position: absolute; z-index: 3; aspect-ratio: 1 / 1; border-radius: 50%; touch-action: none; }
.wb-gcv { width: 100%; height: 100%; display: block; border-radius: 50%; cursor: grab; touch-action: none; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .35)); }
.wb-gcv:active { cursor: grabbing; }
.wb-gh { position: absolute; width: 9%; min-width: 22px; max-width: 36px; aspect-ratio: 1 / 1; border-radius: 50%; border: 2px solid #2a3f55; background: #fff; color: #1f3347; font: 700 clamp(11px, 1.3vw, 17px)/1 ui-sans-serif, system-ui, sans-serif; cursor: pointer; display: grid; place-items: center; padding: 0; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.wb-gh--move { left: 50%; top: 1.5%; transform: translateX(-50%); cursor: move; touch-action: none; }
.wb-gh--spin { left: 50%; bottom: 1.5%; transform: translateX(-50%); }
.wb-gh--spin[aria-pressed=true] { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.wb-gh--del { right: 7%; top: 9%; background: #fee2e2; border-color: #b91c1c; color: #b91c1c; }
.wb-chip--strong { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.wb-speedlab, .wb-sizelab { display: inline-flex; align-items: center; gap: 8px; font-size: .84em; font-weight: 600; color: var(--muted); }
.wb-speedlab select { width: auto !important; padding: 4px 8px !important; }
.wb-sizelab input { width: 150px; }
.wb-globe-boardrow { align-items: center; padding-top: 2px; }

/* ================= flashcards ================= */
.fc { display: grid; gap: 16px; }
.fc-head h2 { font-size: 1.4em; } .fc-head p { color: var(--muted); max-width: 64ch; margin-top: 4px; }
.fc-subjects { display: flex; flex-wrap: wrap; gap: 8px; }
.fc-subj { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); cursor: pointer; font-weight: 600; font-size: .92em; }
.fc-subj[aria-pressed=true] { background: var(--text); color: var(--card); border-color: var(--text); }
.fc-subj-count { font-size: .76rem; opacity: .72; font-variant-numeric: tabular-nums; }
.fc-stage { --fc: #2a78d6; --fci: #fff; display: grid; gap: 12px; width: 100%; max-width: 780px; margin: 0 auto; }
.fc-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.fc-shuffle[aria-pressed=true] { background: var(--text); color: var(--card); border-color: var(--text); }
.fc-meta { color: var(--muted); font-size: .88em; text-align: center; min-height: 1.4em; font-variant-numeric: tabular-nums; }
.fc-card { display: block; width: 100%; padding: 0; border: 0; background: none; perspective: 1500px; cursor: pointer; text-align: left; color: inherit; font: inherit; border-radius: 22px; }
.fc-card:disabled { cursor: default; }
.fc-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.fc-inner { display: grid; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, .7, .2, 1); }
.fc-card.is-flipped .fc-inner { transform: rotateY(180deg); }
.fc-face {
  grid-area: 1 / 1; position: relative; min-height: 320px; padding: 54px 28px 54px 34px; border-radius: 22px; display: flex; flex-direction: column; justify-content: center; gap: 12px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 1px solid var(--line-strong);
  box-shadow: inset 8px 0 0 var(--fc), 0 22px 36px -26px rgba(0, 0, 0, .5);
}
.fc-face--front { background-color: var(--card); background-image: repeating-linear-gradient(transparent 0 37px, color-mix(in srgb, var(--fc) 12%, transparent) 37px 38px); background-position: 0 14px; }
.fc-face--back { background: color-mix(in srgb, var(--fc) 15%, var(--card)); transform: rotateY(180deg); }
.fc-tag { position: absolute; top: 16px; left: 30px; font-size: .78rem; font-weight: 700; padding: 3px 11px; border-radius: 999px; background: var(--fc); color: var(--fci); }
.fc-mark { position: absolute; top: 12px; right: 14px; }
.fc-q { font: 700 clamp(1.3rem, 3.4vw, 2rem)/1.28 var(--font-head); margin: 0; color: var(--text); text-wrap: balance; }
.fc-en { color: var(--muted); font-size: .98em; margin: 0; }
.fc-a { font: 600 clamp(1.15rem, 2.8vw, 1.65rem)/1.4 var(--font-head); margin: 0; color: var(--text); }
.fc-say { margin: 0; font-style: italic; color: var(--muted); }
.fc-note { margin: 4px 0 0; padding-top: 10px; border-top: 1px dashed var(--line-strong); color: var(--muted); font-size: .96em; line-height: 1.5; }
.fc-flip-hint { position: absolute; left: 34px; bottom: 16px; display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.fc-empty { min-height: 320px; display: grid; place-content: center; text-align: center; gap: 8px; padding: 20px; border: 1px dashed var(--line-strong); border-radius: 22px; background: var(--card); }
.fc-controls, .fc-grade { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.fc-know { background: #15803d; border-color: #15803d; color: #fff; }
.fc-done { margin: 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, #15803d 14%, var(--card)); border: 1px solid #15803d; text-align: center; font-weight: 600; }
.fc-progress { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fc-bar { flex: 1 1 160px; height: 10px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); overflow: hidden; }
.fc-bar i { display: block; height: 100%; background: var(--fc); transition: width .3s; }
.fc-bartext { font-size: .86em; color: var(--muted); font-variant-numeric: tabular-nums; }
.fc-add { width: 100%; max-width: 780px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 2px 16px; }
.fc-add summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.fc-add-body { display: grid; gap: 10px; padding-bottom: 14px; }
.fc-add .sh-addrow { flex-wrap: wrap; } .fc-add .sh-addrow input { flex: 1 1 200px; }
.fc-own-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.fc-own-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.fc-own-text { min-width: 0; overflow-wrap: anywhere; } .fc-own-text span { color: var(--muted); }
@media (max-width: 560px) { .fc-face { padding: 56px 18px 52px 24px; min-height: 300px; } .fc-tag { left: 22px; } .fc-flip-hint { left: 24px; } .fc-subj-name { display: none; } .fc-subj { padding-right: 10px; } }
@media (prefers-reduced-motion: reduce) { .fc-inner { transition: none; } }
@media (max-width: 560px) { .wb-banner { font-size: .74rem; padding: 6px 12px; line-height: 1.35; } }

/* ===== patch 7: Goals steps, custom subjects, light/dark mode, maths signs ===== */
.sh-step { padding: 14px 0 4px; }
.sh-step + .sh-step { border-top: 1px solid var(--line); margin-top: 8px; }
.sh-step-h { display: flex; align-items: center; gap: 10px; font-size: 1.02em; font-weight: 700; margin-bottom: 10px; }
.sh-step-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: .82em; font-weight: 700; }
.sh-step-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .92em; margin: 0 0 10px; }
.sh-step-note b { color: var(--text); }
.sh-step.is-locked .sh-addrow { opacity: .55; }
.sh-step.is-locked .sh-step-n { background: var(--line-strong); color: var(--text); }
.sh-step input:disabled, .sh-step .sh-btn:disabled { cursor: not-allowed; }
.sh-step .sh-btn:disabled { filter: grayscale(.6); opacity: .6; }
.sh-addrow--subject { margin-top: 2px; }
.sh-glyph-in { width: 74px; text-align: center; flex: none; }
.sh-addrow > input.sh-glyph-in { flex: 0 0 74px; }
.sh-swatches { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sh-swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0; }
.sh-swatch.is-on { box-shadow: 0 0 0 2px var(--text); }
.sh-chip-wrap { display: inline-flex; align-items: center; position: relative; }
.sh-chip-wrap .sh-subj-chip { padding-right: 30px; }
.sh-chip-x { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: inherit; opacity: .6; cursor: pointer; padding: 0; }
.sh-chip-x:hover, .sh-chip-x:focus-visible { opacity: 1; background: color-mix(in srgb, currentColor 16%, transparent); }
.sh-subj-chip.is-on + .sh-chip-x { color: var(--card); }

.sh-mode { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.sh-mode-head { display: flex; flex-direction: column; gap: 1px; margin-bottom: 10px; }
.sh-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: color-mix(in srgb, var(--text) 8%, var(--card)); }
.sh-seg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font: inherit; font-weight: 600; font-size: .9em; cursor: pointer; }
.sh-seg-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.sh-seg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wb-stamps + .wb-hint-line { margin-top: 8px; }
.wb-maths > .wb-stamps { margin-top: 12px; }
.wb-maths .wb-stamp-label { margin-top: 12px; }

/* ===== patch 8: always-on progress charts ===== */
.sh-progress { display: grid; gap: 10px; }
.sh-wrap > .sh-card + .sh-card { margin-top: 18px; }
.sh-wrap--narrow .sh-charts { grid-template-columns: 1fr; }
.sh-progress .sh-pie-wrap { justify-items: center; }
.sh-pie-note { text-align: center; margin: 0; }

/* ===== patch 10: Glow Border ring on boxes ===== */
.sh-glow-host { position: relative; }
.sh-glow-ring { position: absolute; inset: 0; pointer-events: none; z-index: 3; border-radius: inherit; }
.fc-card .sh-glow-ring { border-radius: 22px; }

/* ===== patch 10: Home ===== */
.hm-stage { position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, #0e2b34 0%, #06161b 62%, #040e12 100%); padding: clamp(34px, 6vw, 76px) clamp(26px, 6vw, 84px); }
.hm-hero { position: relative; max-width: 1060px; margin: 0 auto; }
.hm-hero-in { position: relative; display: grid; grid-template-columns: minmax(200px, 34%) 1fr; align-items: end; gap: clamp(8px, 3vw, 36px); min-height: clamp(400px, 46vw, 500px); overflow: hidden; border-radius: 28px; padding: clamp(24px, 4vw, 48px) clamp(20px, 4vw, 52px) 0 clamp(10px, 2vw, 28px); color: #fff;
  background: radial-gradient(90% 120% at 15% 100%, color-mix(in srgb, var(--accent) 38%, #03090c) 0%, color-mix(in srgb, var(--accent) 14%, #03090c) 60%, #040d11 100%); }
.hm-neon { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.hm-photo { align-self: end; justify-self: center; display: block; width: auto; max-width: 100%; height: clamp(360px, 42vw, 452px); object-fit: contain; object-position: bottom; }
.hm-copy { align-self: center; padding-bottom: clamp(24px, 4vw, 52px); min-width: 0; }
.hm-copy h1 { font-family: var(--font-head); font-size: clamp(2.1rem, 5.6vw, 4rem); line-height: 1.04; letter-spacing: -.02em; font-weight: 700; color: #fff; margin: 0 0 14px; text-wrap: balance; }
.hm-lead { font-size: clamp(1rem, 1.7vw, 1.2rem); color: rgba(255,255,255,.78); max-width: 34ch; margin: 0 0 24px; }
.hm-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hm-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; }
.hm-btn--gold { background: #CC9149; color: #1b1205; }
.hm-btn--gold:hover { background: #d9a05a; }
.hm-btn--line { border-color: rgba(255,255,255,.5); color: #fff; }
.hm-btn--line:hover { background: rgba(255,255,255,.1); }
.hm-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.hm-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.hm-body { padding: clamp(22px, 4vw, 44px) 12px 8px; display: grid; gap: 14px; }
.hm-h { font-size: 1.25rem; font-weight: 700; margin: 14px 0 0; }
.hm-h--in { margin: 0 0 12px; font-size: 1.1rem; }
.hm-muted { color: var(--muted); font-size: .92em; }
.hm-box { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: clamp(16px, 2.4vw, 24px); color: var(--text); text-decoration: none; display: block; position: relative; }
.hm-top { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.hm-keep { display: grid; gap: 12px; align-content: start; }
.hm-keep .sh-btn, .hm-keep .sh-bar { justify-self: stretch; }
.hm-keep .sh-btn { justify-self: start; }
.hm-big { font-size: 1.3rem; font-weight: 700; }
.hm-next { display: flex; align-items: center; gap: 14px; }
.hm-next-txt { display: grid; min-width: 0; } .hm-next-txt b { font-size: 1.15rem; overflow-wrap: anywhere; }
.hm-stats { display: grid; gap: 14px; }
.hm-stats > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.hm-stats > div:last-child { border-bottom: 0; padding-bottom: 0; }
.hm-stats b { font-size: 1.5rem; font-variant-numeric: tabular-nums; } .hm-stats span { color: var(--muted); font-size: .92em; text-align: right; }
.hm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.hm-tile { display: grid; gap: 6px; align-content: start; }
.hm-tile:hover, .hm-subj:hover { background: color-mix(in srgb, var(--accent) 6%, var(--card)); }
.hm-tile:focus-visible, .hm-subj:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.hm-tile-ico { font-size: 1.9rem; line-height: 1; margin-bottom: 4px; }
.hm-tile b { font-size: 1.1rem; }
.hm-subjects { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.hm-subj { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 14px; }
.hm-subj .sh-bar { grid-column: 1 / -1; margin-top: 6px; }
.hm-subj-txt { display: grid; min-width: 0; }
.hm-subj .sh-bar i { background: var(--sc); }

@media (max-width: 760px) {
  .hm-hero-in { grid-template-columns: 1fr; min-height: 0; padding: 28px 20px 0; }
  .hm-copy { order: 1; padding-bottom: 8px; }
  .hm-photo { order: 2; height: 280px; justify-self: center; }
  .hm-top { grid-template-columns: 1fr; }
}

/* ---- 11: Backup panel in Settings ---- */
.sh-sync-lead{margin:0 0 10px;font-size:.9rem;opacity:.85}
.sh-sync-msg{margin:0 0 4px;font-weight:600}
.sh-sync-msg[data-state="ok"]{color:#1b7a3a}
.sh-sync-msg[data-state="locked"],.sh-sync-msg[data-state="error"],.sh-sync-msg[data-state="notsetup"],.sh-sync-msg[data-state="offline"]{color:#b4400f}
html[data-sh-dark="1"] .sh-sync-msg[data-state="ok"]{color:#6fd68f}
html[data-sh-dark="1"] .sh-sync-msg[data-state="locked"],html[data-sh-dark="1"] .sh-sync-msg[data-state="error"],html[data-sh-dark="1"] .sh-sync-msg[data-state="notsetup"],html[data-sh-dark="1"] .sh-sync-msg[data-state="offline"]{color:#ffb089}
.sh-sync-when{margin:0 0 10px;font-size:.85rem;opacity:.7}
.sh-row--wrap{flex-wrap:wrap}
.sh-row--wrap .sh-btn{text-decoration:none}

/* ---- 12: badge glyphs centred in the icon box ---- */
.sh-sym-glyph { display: block; line-height: 1; }
.sh-sym-glyph.is-cap { transform: translateY(calc(var(--sz, 28px) * .04)); }
.sh-sym-glyph.is-kn { transform: translateY(calc(var(--sz, 28px) * -.037)); }
.sh-sym-glyph.is-dv { transform: translateX(calc(var(--sz, 28px) * -.046)); }
.sh-sym svg { width: 78%; height: 78%; }

/* ---- 13: Quiz page ---- */
.qz-root { max-width: 760px; margin: 0 auto; }
.qz-label { margin: 16px 0 6px; font-weight: 700; font-size: .9em; }
.qz-card select { max-width: 100%; }
.qz-start { margin-top: 20px; }
.qz-note { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); font-size: .92em; }
.qz-src { margin: 12px 0 0; font-size: .85em; color: var(--muted); }
.qz-hist { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.qz-hist h3, .qz-review h3 { margin: 0 0 8px; font-size: 1rem; }
.qz-hist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qz-hist li { display: flex; align-items: center; gap: 10px; }
.qz-hist-when { color: var(--muted); font-size: .88em; }
.qz-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.qz-count { margin-left: auto; color: var(--muted); font-size: .9em; }
.qz-q { margin: 20px 0 16px; font-size: 1.35rem; line-height: 1.4; font-weight: 600; }
.qz-opts { display: grid; gap: 10px; }
.qz-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--text); font: inherit; font-size: 1.05rem; cursor: pointer; transition: border-color .15s, background .15s; }
.qz-opt:hover:not(:disabled) { border-color: var(--accent); background: var(--soft); }
.qz-letter { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--soft); border: 1px solid var(--line-strong); font-weight: 700; font-size: .85rem; }
.qz-opt:disabled { cursor: default; opacity: 1; }
.qz-opt.is-dim { opacity: .55; }
.qz-opt.is-right { border-color: #1b7a3a; background: color-mix(in srgb, #1b7a3a 14%, var(--card)); }
.qz-opt.is-right .qz-letter { background: #1b7a3a; color: #fff; border-color: #1b7a3a; }
.qz-opt.is-wrong { border-color: #c0392b; background: color-mix(in srgb, #c0392b 12%, var(--card)); }
.qz-opt.is-wrong .qz-letter { background: #c0392b; color: #fff; border-color: #c0392b; }
.qz-fb { margin-top: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--soft); }
.qz-fb p { margin: 6px 0 0; }
.qz-fb.is-ok b { color: #1b7a3a; }
.qz-fb.is-no b { color: #b4400f; }
html[data-sh-dark="1"] .qz-fb.is-ok b { color: #6fd68f; }
html[data-sh-dark="1"] .qz-fb.is-no b { color: #ffb089; }
html[data-sh-dark="1"] .qz-opt.is-right { border-color: #6fd68f; }
html[data-sh-dark="1"] .qz-opt.is-wrong { border-color: #ff8a78; }
.qz-next { margin-top: 16px; }
.qz-score { display: flex; align-items: baseline; gap: 14px; margin: 6px 0 4px; }
.qz-score-n { font-size: 3rem; font-weight: 800; line-height: 1; }
.qz-score-pct { font-size: 1.4rem; color: var(--muted); font-weight: 700; }
.qz-review { margin-top: 18px; }
.qz-rev-item { padding: 10px 0; border-top: 1px solid var(--line); }
.qz-rev-item p { margin: 4px 0 0; }
.qz-rev-a { color: #1b7a3a; font-weight: 600; }
html[data-sh-dark="1"] .qz-rev-a { color: #6fd68f; }
.qz-rev-e { color: var(--muted); font-size: .92em; }
.qz-actions { margin-top: 18px; }
@media (max-width: 520px) { .qz-q { font-size: 1.15rem; } }
.qz-card .qz-label + div > .wb-seg { margin-top: 2px; }

/* 14. Whiteboard: Sun and Earth scenes (Rotation, Revolution) */
.wb-seg--sky { flex-wrap: wrap; border-radius: 18px; margin-bottom: 12px; }
.wb-social { display: block; }
.wb-sky-box { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.wb-sky-cv { flex: 1 1 320px; max-width: 640px; min-width: 0; }
.wb-scv { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; border-radius: 14px; cursor: grab; touch-action: none; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .5); }
.wb-scv:active { cursor: grabbing; }
.wb-sky-side { flex: 1 1 260px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.wb-sky-side .wb-hint-line { margin-top: 0; }
.wb-sky-side .sh-btn { justify-self: start; max-width: 100%; white-space: normal; text-align: left; height: auto; }
.wb-sky-side .wb-sizelab { flex-wrap: wrap; }
.wb-sky-side .wb-sizelab input { flex: 1 1 140px; min-width: 0; }
.wb-sky-side input[type=range] { max-width: 100%; }
.wb-sbox { position: absolute; z-index: 3; aspect-ratio: 2 / 1; border-radius: 14px; touch-action: none; }
.wb-sbox .wb-scv { height: 100%; box-shadow: 0 8px 14px -6px rgba(0, 0, 0, .45); }
.wb-sbox .wb-gh { width: 26px; min-width: 26px; max-width: 26px; font-size: 13px; right: 1%; left: auto; transform: none; }
.wb-sbox .wb-gh--move { top: 2.5%; }
.wb-sbox .wb-gh--del { top: calc(2.5% + 31px); }
.wb-sbox .wb-gh--spin { bottom: 3%; top: auto; }
@media (max-width: 640px) {
  .wb-sky-cv { flex-basis: 100%; max-width: none; }
  .wb-seg--sky { display: flex; width: 100%; box-sizing: border-box; }
  .wb-seg--sky .wb-segbtn { flex: 1 1 auto; padding: 6px 6px; font-size: .76rem; white-space: normal; text-align: center; }
}

/* 15. Ottakshara tiles and ink-centred letters */
.sh-app .wb-stamp--ink { font: 400 3rem "Nirmala UI", "Noto Sans Kannada", "Tunga", system-ui, sans-serif; overflow: hidden; display: inline-grid; place-items: center; padding: 0; width: 46px; }
.wb-ink { display: block; line-height: 1; white-space: pre; }

/* 16. Sign-in screen and Account panel */
.sh-auth-screen { position: fixed; inset: 0; z-index: 99999; display: grid; place-items: center; padding: 20px; overflow: auto;
  --au-bg: #eef2f4; --au-card: #ffffff; --au-ink: #0d1b24; --au-mut: #51636f; --au-line: #c7d2d9; --au-acc: #144a58; --au-on: #ffffff; --au-err: #b42318;
  background: radial-gradient(120% 90% at 20% 0%, #f7fafb 0%, var(--au-bg) 55%, #dfe8ec 100%); color: var(--au-ink); font-family: "Geist Variable", "Inter Variable", ui-sans-serif, system-ui, sans-serif; }
@media (prefers-color-scheme: dark) { .sh-auth-screen { --au-bg: #0f1a20; --au-card: #172830; --au-ink: #eef4f6; --au-mut: #9db2bb; --au-line: #2b424c; --au-acc: #5cc7dc; --au-on: #07222a; --au-err: #ff9b8e; background: radial-gradient(120% 90% at 20% 0%, #1a2d36 0%, var(--au-bg) 60%, #0a1217 100%); } }
.sh-auth-card { width: min(380px, 100%); background: var(--au-card); border: 1px solid var(--au-line); border-radius: 20px; padding: 28px 26px 24px; box-shadow: 0 18px 50px -20px rgba(8, 30, 40, .45); display: grid; gap: 4px; }
.sh-auth-logo { width: 56px; height: 56px; border-radius: 14px; justify-self: center; margin-bottom: 6px; }
.sh-auth-card h1 { margin: 0; text-align: center; font-size: 1.45rem; }
.sh-auth-sub { margin: 0 0 12px; text-align: center; color: var(--au-mut); font-size: .95rem; }
.sh-auth-card label { font-weight: 600; font-size: .88rem; margin-top: 8px; }
.sh-auth-card input { width: 100%; box-sizing: border-box; padding: 12px 13px; font: inherit; font-size: 1rem; color: var(--au-ink); background: transparent; border: 1px solid var(--au-line); border-radius: 11px; }
.sh-auth-card input:focus { outline: 2px solid var(--au-acc); outline-offset: 1px; border-color: transparent; }
.sh-auth-pw { position: relative; }
.sh-auth-pw input { padding-right: 64px; }
.sh-auth-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--au-acc); font-weight: 600; font-size: .82rem; font-family: inherit; padding: 6px 9px; cursor: pointer; border-radius: 8px; }
.sh-auth-msg { min-height: 1.3em; margin: 6px 0 2px; color: var(--au-err); font-size: .9rem; font-weight: 600; }
.sh-auth-go { margin-top: 4px; padding: 13px; border: 0; border-radius: 12px; background: var(--au-acc); color: var(--au-on); font-weight: 700; font-size: 1rem; font-family: inherit; cursor: pointer; }
.sh-auth-go:disabled { opacity: .65; cursor: default; }
.sh-auth-help { margin: 10px 0 0; text-align: center; font-size: .82rem; color: var(--au-mut); }
.sh-acct-who { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.sh-acct-role { padding: 1px 10px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line-strong); font-size: .78rem; font-weight: 600; }
.sh-acct-user { opacity: .65; font-size: .85rem; }
.sh-acct-links { margin-top: 8px; }
.sh-acct-pw { margin-top: 12px; }
.sh-acct-pw summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.sh-acct-pwbody { display: grid; gap: 8px; margin-top: 8px; max-width: 360px; }
.sh-sync-msg[data-state="ok"].is-pw, .sh-acct-pwbody .sh-sync-msg[data-state="error"] { color: #b4400f; }
.sh-acct-pwbody .sh-sync-msg[data-state="ok"] { color: #1b7a3a; }

/* 17. Whiteboard: tools float at the right-hand side of the board */
.wb-stage { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.wb-stage > * { min-width: 0; }
.wb-btn[hidden] { display: none; }
.wb-float { position: sticky; top: 16px; width: 188px; z-index: 30; background: var(--card); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .08); overflow: hidden; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.wb:fullscreen .wb-float { top: 10px; max-height: calc(100vh - 28px); }
.sh-app .wb-float-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--soft); color: var(--text); font-weight: 700; font-size: .92rem; cursor: pointer; text-align: left; }
.wb-float-toggle:hover { background: var(--card); }
.wb-float-chev { margin-left: auto; transition: transform .15s; font-size: .8rem; }
.wb-float-toggle[aria-expanded=true] .wb-float-chev { transform: rotate(90deg); }
.wb-float.is-collapsed { width: auto; }
.wb-float.is-collapsed .wb-bar { display: none; }
.wb-float.is-collapsed .wb-float-toggle { border-bottom: 0; }
.wb-float.is-collapsed .wb-float-name { display: none; }
.wb-float.is-collapsed .wb-float-chev { margin-left: 0; transform: rotate(180deg); }
.wb-float .wb-bar { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px; padding: 8px 10px; border: 0; border-radius: 0; background: transparent; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.wb-float .wb-grp { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; align-items: stretch; }
.wb-float .wb-grp + .wb-grp { padding-left: 0; border-left: 0; padding-top: 8px; border-top: 1px solid var(--line); }
.wb-float .wb-btn { min-width: 0; width: 100%; padding: 5px 2px; font-size: .72rem; }
.wb-float .wb-grp:nth-child(4) { grid-template-columns: repeat(3, 1fr); }
.wb-float .wb-grp--size { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.wb-float .wb-grp--size input[type=range] { width: 100%; }
.wb-float .wb-grp--ink { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.wb-float .wb-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; justify-items: center; }
.wb-float .wb-sw { width: 26px; height: 26px; }
.wb-float .wb-colorpick { grid-template-columns: auto 1fr; align-items: center; gap: 8px; font-size: .72rem; font-weight: 600; color: var(--muted); }
.wb-float .wb-colorpick input { width: 100%; }
.wb-float .wb-bgsel { margin-right: 0; grid-column: 1 / -1; }
.wb-float .wb-bgsel select { width: 100% !important; }
.wb-float .wb-seg { display: grid; grid-template-columns: 1fr 1fr; border-radius: 12px; }
.wb-float .wb-segbtn { padding: 5px 4px; font-size: .72rem; white-space: normal; line-height: 1.15; }
@media (max-width: 900px) {
  .wb-stage { grid-template-columns: minmax(0, 1fr); }
  .wb-float { position: fixed; right: 8px; top: 12px; width: 180px; max-height: calc(100vh - 24px); }
  .wb:fullscreen .wb-float { top: 10px; }
}

/* narrow board (for example with the Settings panel open): the decorative marker row steps aside */
.wb-board { container-type: inline-size; }
@container (max-width: 700px) { .wb-markers { display: none; } .wb-ledge { justify-content: flex-end; } }

/* narrow content area (menu on the left, Settings open): charts stack instead of squeezing */
.sh-wrap { container-type: inline-size; }
@container (max-width: 640px) { .sh-charts { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .tm-ring { width: min(300px, calc(100vw - 130px)); } }

/* ---- 18: Home globe and light/dark control ---- */
.hm-mode { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.hm-mode-lab { font-weight: 600; color: var(--muted); font-size: .92em; }
.hm-mode .sh-seg { width: min(100%, 270px); }
.hm-globe-box { display: grid; justify-items: center; gap: 16px; text-align: center; }
.hm-globe { display: block; width: 280px; height: 280px; max-width: 100%; aspect-ratio: 1; touch-action: pan-y; cursor: grab; filter: drop-shadow(0 18px 24px rgba(20, 60, 100, .28)); }
.hm-globe:active { cursor: grabbing; }
.hm-gstats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; width: min(100%, 520px); }
.hm-gstat { display: grid; gap: 2px; padding: 12px 10px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 8%, var(--card)); border: 1px solid var(--line); }
.hm-gstat b { font-size: clamp(1.6rem, 4vw, 2.1rem); font-variant-numeric: tabular-nums; line-height: 1.1; }
.hm-gstat span { color: var(--muted); font-size: .92em; }
.hm-gtools { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.hm-gtools li { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; font-size: 1.3rem; border: 1px dashed var(--line-strong); filter: grayscale(1); opacity: .45; }
.hm-gtools li.is-on { filter: none; opacity: 1; border-style: solid; background: var(--card); box-shadow: 0 0 0 2px var(--accent); }
.hm-gtools li i { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.hm-gstats .hm-gtools { margin-top: 0; }
@media (max-width: 760px) { .hm-mode { justify-content: space-between; } }

/* ---- 19: Notes with pen and eraser ---- */
.nt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: -4px 0 12px; padding: 8px 10px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); }
.nt-grp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nt-grp + .nt-grp { padding-left: 16px; border-left: 1px solid var(--line); }
.sh-app .nt-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text); font-weight: 600; font-size: .9rem; cursor: pointer; }
.sh-app .nt-btn:hover { background: var(--card); }
.sh-app .nt-btn[aria-pressed=true] { background: var(--accent); color: var(--on-accent); }
.sh-app .nt-btn:disabled { opacity: .4; cursor: default; background: transparent; }
.sh-app .nt-btn--danger { color: #b91c1c; }
.nt-sw { display: flex; gap: 6px; }
.sh-app .nt-swatch { width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--c, var(--text)); cursor: pointer; }
.sh-app .nt-swatch[aria-pressed=true] { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.nt-size { display: grid; gap: 2px; font-size: .72rem; font-weight: 600; color: var(--muted); margin-left: 8px; }
.nt-size input { width: 100px; }
.nt-board { position: relative; height: clamp(380px, 62vh, 640px); --nt-bg: #fbfcfc; --nt-fg: #111827; --nt-line: rgba(0, 0, 0, .14); color: var(--nt-fg); }
.nt-board[data-board=black] { --nt-bg: #101417; --nt-fg: #f1f5f9; --nt-line: rgba(255, 255, 255, .16); }
.sh-app .nt-board textarea { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; resize: none; box-sizing: border-box; }
.nt-ink { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.nt-board:not([data-mode=type]) .nt-ink { pointer-events: auto; touch-action: none; cursor: crosshair; }
.nt-board[data-mode=eraser] .nt-ink { cursor: cell; }
.nt-board:not([data-mode=type]) textarea { caret-color: transparent; }
@media (max-width: 640px) { .nt-grp + .nt-grp { padding-left: 0; border-left: 0; } .nt-btn span:last-child { font-size: .84rem; } .sh-app .nt-btn { padding: 6px 9px; } }

.nt-grp[aria-label=Shapes] { padding-left: 12px; border-left: 1px solid var(--line); }

/* ---- 20: Light / Dark switch in the left menu (on every page) ---- */
.sh-modebar { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: color-mix(in srgb, var(--hdr-text) 9%, transparent); margin-top: auto; flex: none; }
.sh-modebar + .sh-set-btn { margin-top: 0; }
.sh-app .sh-modebtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 6px; border: 0; border-radius: 9px; background: transparent; color: inherit; font-weight: 600; font-size: .86rem; cursor: pointer; }
.sh-app .sh-modebtn:hover { background: color-mix(in srgb, var(--hdr-text) 10%, transparent); }
.sh-app .sh-modebtn[aria-pressed=true] { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
@media (max-width: 760px) { .sh-modebar { grid-template-columns: 1fr; width: 44px; } .sh-modebtn span { display: none; } .sh-app .sh-modebtn { min-height: 38px; } }

/* board colour and lines for Notes */
.sh-app .nt-board textarea { background-color: var(--nt-bg); color: var(--nt-fg); line-height: 32px; padding: 8px 14px; background-attachment: local; border-color: var(--line-strong); }
.sh-app .nt-board textarea::placeholder { color: color-mix(in srgb, var(--nt-fg) 50%, transparent); }
.nt-board[data-lines=ruled] textarea { background-image: linear-gradient(var(--nt-line) 1px, transparent 1px); background-size: 100% 32px; background-position: 0 7px; }
.nt-board[data-lines=grid] textarea { background-image: linear-gradient(var(--nt-line) 1px, transparent 1px), linear-gradient(90deg, var(--nt-line) 1px, transparent 1px); background-size: 32px 32px; background-position: 0 7px; }
.nt-board[data-lines=dots] textarea { background-image: radial-gradient(circle at center, var(--nt-line) 1.6px, transparent 1.9px); background-size: 32px 32px; background-position: 0 7px; }
.nt-grp--page { gap: 8px; }
.nt-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px; background: var(--card); }
.sh-app .nt-segbtn { border: 0; background: transparent; color: var(--text); font-weight: 600; font-size: .82rem; padding: 7px 11px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.sh-app .nt-segbtn[aria-pressed=true] { background: var(--accent); color: var(--on-accent); }
.nt-lines { display: grid; gap: 2px; font-size: .72rem; font-weight: 600; color: var(--muted); }
.nt-lines select { padding: 4px 6px !important; font-size: .85rem; width: auto !important; }
.nt-card:fullscreen { background: var(--bg); padding: 14px; display: flex; flex-direction: column; overflow: auto; border-radius: 0; }
.nt-card:fullscreen .nt-board { flex: 1 1 auto; height: auto; min-height: 320px; }
@media (max-width: 640px) {
  .sh-app .nt-btn { padding: 6px 8px; min-width: 40px; justify-content: center; }
  .nt-btn > span:last-child { display: none; }
  .nt-grp[aria-label=Shapes] { padding-left: 0; border-left: 0; }
  .nt-bar { gap: 6px 10px; }
}

/* 21. v24: quiz clock + result charts */
.qz-clock { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; padding: 3px 10px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line-strong); font-variant-numeric: tabular-nums; font-size: .92em; }
.qz-top .qz-count + .qz-clock { margin-left: 10px; }
.qz-skiprow { margin-top: 14px; gap: 8px; }
.qz-charts { display: grid; grid-template-columns: 1fr 1.5fr; gap: 14px; align-items: center; margin: 14px 0 4px; }
.qz-chart svg { width: 100%; height: auto; max-height: 230px; display: block; }
.qz-slice { stroke: var(--card); stroke-width: 2; }
.qz-pie-t { font-size: 15px; font-weight: 800; fill: #111; }
.qz-axis { stroke: var(--line-strong); stroke-width: 1.5; }
.qz-bar-n { font-size: 15px; font-weight: 800; fill: var(--text); }
.qz-bar-l { font-size: 11.5px; fill: var(--muted); }
.qz-legend { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.qz-legend li { display: flex; align-items: center; gap: 7px; }
.qz-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
@media (max-width: 520px) { .qz-charts { grid-template-columns: 1fr; } .qz-chart svg { max-height: 190px; margin: 0 auto; } }

/* 22. v24: compact subject cards on Goals - all six side by side, no long rectangles */
.sh-goals { margin-top: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }
.sh-goal-group { container-type: inline-size; padding: 8px 10px 4px; border-radius: 10px; min-width: 0; }
.sh-goal-group > header { gap: 8px; margin-bottom: 2px; }
.sh-goal-group h3 { font-size: .98em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-goal-avg { flex: none; padding: 1px 8px; border-radius: 999px; background: var(--soft); font-size: .78em; }
.sh-goal { padding: 6px 0 8px; gap: 5px; }
.sh-goal-top { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 6px; }
.sh-goal-top .sh-topic-name { min-width: 0; font-size: .92em; padding: 4px 6px; }
.sh-goal-prog { padding-left: 0; gap: 4px; }
.sh-goal-meta { gap: 4px; font-size: .78em; }
.sh-goal-meta .sh-num--sm { width: 46px; padding: 2px 4px; }
.sh-goal-meta .sh-link { font-size: .95em; }
.sh-goal-group .sh-btn--sm { padding: 4px 9px; }
@container (max-width: 300px) { .sh-study-t { display: none; } .sh-goal-group .sh-btn--sm { padding: 5px 7px; } }
@media (max-width: 1180px) { .sh-goals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .sh-goals { gap: 8px; } }

/* 23. v24: voice report card */
.vr-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.vr-head .hm-h { margin: 0; }
.vr-seg { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--text) 8%, var(--card)); }
.vr-seg-btn { border: 0; border-radius: 999px; padding: 6px 14px; background: transparent; color: var(--text); font: inherit; font-weight: 600; font-size: .88em; cursor: pointer; }
.vr-seg-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.vr-seg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vr-sub { margin: 8px 0 10px; }
.vr-text { padding: 12px 14px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); line-height: 1.55; font-size: .98em; margin-bottom: 12px; }
.vr-line { transition: background .2s; border-radius: 4px; }
.vr-line.is-now { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.vr-go.is-on { background: #c0392b; border-color: #c0392b; color: #fff; }

/* 24. v24: the colour marker row on the whiteboard ledge is gone; only the duster stays */
.wb-ledge { justify-content: flex-end; }

/* 25. v24: Notes sections (subject tabs) and the subject tools shelf */
.nt-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; margin: -2px 0 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.sh-app .nt-tab { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 5px 14px 5px 7px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.sh-app .nt-tab.is-on { background: var(--text); color: var(--card); border-color: var(--text); }
.sh-app .nt-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nt-tab-g { width: 20px; text-align: center; font-size: 15px; line-height: 20px; }
.nt-shelf { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.nt-shelf[hidden] { display: none; }
.nt-shelf > summary { display: flex; align-items: center; gap: 4px; padding: 8px 12px; cursor: pointer; list-style: none; font-size: .92rem; }
.nt-shelf > summary::-webkit-details-marker { display: none; }
.nt-shelf > summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
.nt-shelf:not([open]) > summary::after { content: '▸'; }
.nt-shelf-hint { color: var(--muted); font-size: .82rem; }
.nt-shelf-body { padding: 4px 12px 12px; display: grid; gap: 10px; }
.nt-stamps-l { font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.nt-stamps-row, .nt-gram { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-app .nt-stamp { min-width: 42px; min-height: 38px; padding: 4px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); font: inherit; font-size: 1.05rem; cursor: pointer; }
.sh-app .nt-stamp.is-big { font-size: 1.35rem; min-width: 46px; font-family: "Tillana", "Nirmala UI", "Noto Sans Kannada", "Noto Sans Devanagari", sans-serif; }
.sh-app .nt-stamp--word { font-size: .88rem; font-weight: 600; }
.sh-app .nt-stamp:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.nt-shelf-note { margin: 0; font-size: .82rem; color: var(--muted); }
.nt-shelf select { max-width: 100%; margin-bottom: 8px; }
.nt-globe-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.nt-globe { border-radius: 50%; touch-action: none; cursor: grab; flex: none; }
.nt-globe-side { display: grid; gap: 8px; min-width: 200px; flex: 1; }
.nt-gread { font-weight: 600; }
@media (max-width: 640px) { .nt-shelf > summary .nt-shelf-hint { display: none; } }
.nt-card { min-width: 0; max-width: 100%; }
.nt-card > * { min-width: 0; max-width: 100%; }
.nt-sw { flex-wrap: wrap; max-width: 100%; }
@media (max-width: 640px) { .sh-app .nt-swatch { width: 26px; height: 26px; } .nt-grp--ink { max-width: 100%; } }

/* 26. v25: layout and controls */
/* Notes: sections on the right, Save notes, no auto-save */
.nt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 168px; gap: 14px; align-items: start; }
.nt-main { min-width: 0; }
.nt-tabs { flex-direction: column; flex-wrap: nowrap; overflow-x: visible; overflow-y: auto; max-height: min(640px, 70vh); padding: 0; margin: 0; gap: 6px; }
.nt-tabs .nt-tab { width: 100%; justify-content: flex-start; border-radius: 12px; }
.nt-head-r { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.sh-app .nt-save { min-height: 38px; }
.sh-app .nt-save.is-dirty { background: #b45309; border-color: #b45309; color: #fff; }
.nt-status.is-dirty { color: #b45309; font-weight: 700; }
html[data-sh-dark="1"] .nt-status.is-dirty { color: #fbbf24; }
@media (max-width: 760px) {
  .nt-layout { grid-template-columns: 1fr; }
  .nt-tabs { order: -1; flex-direction: row; overflow-x: auto; overflow-y: hidden; max-height: none; padding: 2px 0 8px; }
  .nt-tabs .nt-tab { width: auto; }
}
/* Calculator */
.calc-panel { position: fixed; z-index: 300; left: calc(228px + 16px); bottom: 16px; width: 300px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow: auto; background: var(--card); color: var(--text); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .5); padding: 12px; font-family: var(--font-body); }
.calc-panel[hidden] { display: none; }
@media (max-width: 1100px) { .calc-panel { left: 16px; right: 16px; width: auto; max-width: none; } }
.calc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.calc-head b { display: inline-flex; align-items: center; gap: 8px; font-size: 1rem; }
.calc-in { width: 100%; font-size: 1.15rem !important; font-variant-numeric: tabular-nums; text-align: right; padding: 8px 10px !important; }
.calc-out { min-height: 1.6em; margin: 6px 2px 10px; text-align: right; font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.calc-out.is-hint { color: var(--muted); font-size: .85rem; font-weight: 500; }
.calc-out.is-err { color: #b4400f; font-size: .9rem; font-weight: 600; }
html[data-sh-dark="1"] .calc-out.is-err { color: #ffb089; }
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sh-app .calc-k { min-height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--soft); color: var(--text); font: inherit; font-size: 1.1rem; font-weight: 600; cursor: pointer; }
.sh-app .calc-k:hover { border-color: var(--accent); }
.sh-app .calc-k--fn { font-size: .95rem; color: var(--muted); }
.sh-app .calc-k--eq { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.calc-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.calc-hist { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.calc-hist[hidden] { display: none; }
.sh-app .calc-h { width: 100%; display: flex; justify-content: space-between; gap: 8px; background: none; border: 0; padding: 4px 2px; color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; text-align: left; }
.calc-h b { font-variant-numeric: tabular-nums; }
/* Voice: volume row, floating button and panel */
.vr-vol { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: .9em; font-weight: 600; }
.vr-vol-ico { display: inline-flex; color: var(--muted); }
.vr-vol-l { color: var(--muted); }
.vr-vol input { flex: 1; min-width: 80px; }
.vr-vol-n { min-width: 3.2em; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.vr-fab { position: fixed; right: 18px; bottom: 18px; z-index: 250; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .5); }
.vr-fab[hidden], .vr-dock[hidden] { display: none; }
.vr-fab:focus-visible, .vr-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.vr-dock { position: fixed; right: 18px; bottom: 74px; z-index: 260; width: min(380px, calc(100vw - 36px)); max-height: min(70dvh, 620px); overflow: auto; border-radius: 18px; box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .55); }
.vr-dock .vr { margin: 0; }
.vr-dock .vr-x { position: absolute; top: 10px; right: 10px; z-index: 2; }
.vr-dock .vr-head { padding-right: 36px; }
@media (max-width: 760px) { .vr-fab span:last-child { display: none; } .vr-fab { padding: 0 14px; } }
/* Quiz countdown warning */
.qz-clock.is-low { background: #fde2de; border-color: #d63a2f; color: #8f1d14; }
html[data-sh-dark="1"] .qz-clock.is-low { background: #4a1f1a; color: #ffd0c8; }
/* Whiteboard: no duster row */
.wb-ledge { display: none; }

/* 18. Account: top-right corner, with Settings and Sign out inside its menu */
.sh-acct { position: fixed; top: 12px; right: 14px; z-index: 70; }
html.sh-auth .sh-acct { display: none; }
.sh-acct-btn { display: inline-flex; align-items: center; gap: 9px; max-width: 260px; padding: 5px 12px 5px 5px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); color: var(--text); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .35); }
.sh-acct-btn:hover { background: var(--soft); }
.sh-acct-btn:focus-visible { outline: 2px solid var(--acc, #1d4ed8); outline-offset: 2px; }
.sh-acct-av { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--acc, #1d4ed8); color: #fff; font-weight: 700; font-size: .9rem; flex: 0 0 auto; }
.sh-acct-av:empty::before { content: '?'; }
.sh-acct-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-acct-chev { font-size: .8rem; opacity: .7; }
.sh-acct-menu { position: absolute; top: calc(100% + 8px); right: 0; width: min(340px, calc(100vw - 28px)); max-height: calc(100vh - 90px); overflow-y: auto; padding: 14px; background: var(--card); color: var(--text); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 22px 44px -18px rgba(0, 0, 0, .45); }
.sh-acct-menu[hidden] { display: none; }
.sh-acct-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.sh-acct-role-l { font-size: .78rem; font-weight: 600; padding: 1px 10px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line-strong); }
@media (max-width: 760px) {
  .sh-acct { top: 10px; right: 10px; }
  .sh-acct-btn { padding: 4px; gap: 0; }
  .sh-acct-name, .sh-acct-chev { display: none; }
  .sh-acct-menu { right: -2px; }
}

/* 19. Home: "A World of Things to Learn" globe band */
.gh { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(16px, 4vw, 48px); width: 100%; box-sizing: border-box; overflow: hidden; margin: 0 0 22px; padding: clamp(28px, 5vw, 56px) clamp(20px, 5vw, 56px); background: #000; color: #fff; border-radius: 22px; isolation: isolate; }
.gh-halo { position: absolute; inset: -30% -10%; z-index: -1; background: radial-gradient(closest-side at 28% 50%, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0)); pointer-events: none; }
.gh-stage { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1 / 1; justify-self: center; }
.gh-globe { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.gh-globe:active { cursor: grabbing; }
.gh-copy { pointer-events: none; display: grid; gap: 14px; justify-items: start; max-width: 520px; }
.gh-badge { display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 6px 14px 6px 8px; border: 1px solid #2a2d33; border-radius: 999px; color: #adb1b8; font-size: .9rem; font-weight: 600; }
.gh-badge img { display: block; width: 22px; height: 22px; filter: invert(1); opacity: .85; }
.gh-title { margin: 0; color: #fff; font-family: var(--font-head, inherit); font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.04; font-weight: 700; letter-spacing: -.01em; text-shadow: 0 0 28px rgba(255, 255, 255, .18); text-wrap: balance; }
.gh-lead { margin: 0; color: #9297a0; font-size: clamp(1rem, 1.6vw, 1.12rem); line-height: 1.55; max-width: 44ch; }
@media (max-width: 760px) {
  .gh { grid-template-columns: 1fr; justify-items: center; text-align: center; min-height: 520px; padding: 28px 18px 32px; }
  .gh-copy { justify-items: center; }
  .gh-stage { max-width: min(100%, 360px); }
}
@media (prefers-reduced-motion: reduce) { .gh-globe { cursor: default; } }

/* 20. Home: the globe band and the study station hero side by side */
.hm-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0 0 22px; align-items: stretch; }
.hm-pair > .hm-stage, .hm-pair > .gh { margin: 0; border-radius: 22px; min-width: 0; }
.hm-pair > .hm-stage { display: flex; flex-direction: column; justify-content: center; padding: clamp(22px, 3vw, 40px) clamp(14px, 2vw, 26px); }
.hm-pair .hm-hero { max-width: none; width: 100%; margin: 0; }
.hm-pair .hm-hero-in { min-height: 0; height: 100%; }
.hm-pair > .gh { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 18px; padding: clamp(22px, 3vw, 40px) clamp(18px, 3vw, 36px); }
.hm-pair > .gh .gh-stage { max-width: min(100%, 300px); }
.hm-pair > .gh .gh-copy { justify-items: center; max-width: 44ch; }
.hm-pair > .gh .gh-title { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.hm-pair > .gh .gh-lead { font-size: .98rem; }
@media (max-width: 760px) {
  .hm-pair { grid-template-columns: 1fr; }
  .hm-pair > .gh { min-height: 520px; }
}
.hm-pair > .hm-stage { padding-top: clamp(64px, 7vw, 84px); }
.hm-pair .hm-hero-in { grid-template-columns: minmax(120px, 36%) minmax(0, 1fr); padding-right: 22px; gap: 10px; }
.hm-pair .hm-copy h1 { font-size: clamp(1.7rem, 2.9vw, 2.5rem); }
.hm-pair .hm-copy { padding-bottom: 28px; }
.hm-pair .hm-cta .hm-btn { white-space: normal; padding: 11px 16px; font-size: .95rem; }
.hm-pair .hm-cta { gap: 10px; }
@media (max-width: 760px) {
  .hm-pair .hm-hero-in { grid-template-columns: 1fr; padding-right: 20px; }
  .hm-pair .hm-copy h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
}

/* 21. Progress by topic (Timer and Goals): charts on the left, the topic table on the right */
.sh-prog-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sh-prog-layout > * { min-width: 0; }
.sh-charts.sh-charts--stack { grid-template-columns: minmax(0, 1fr); }
.sh-prog-table .sh-report-table { overflow-x: auto; }
.sh-prog-table table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.sh-prog-table th, .sh-prog-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sh-prog-table th { font-weight: 700; font-size: .8rem; opacity: .8; }
@media (max-width: 900px) {
  .sh-prog-layout { grid-template-columns: minmax(0, 1fr); }
}
/* Table runs the full height on the right; bar and pie stack on the left */
.sh-prog-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.sh-prog-layout > .sh-charts.sh-charts--stack { display: contents; }
.sh-prog-layout > .sh-chart-card[data-chart="bar"], .sh-prog-layout > .sh-charts--stack > .sh-chart-card { min-width: 0; }
.sh-prog-table { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; }
.sh-prog-table table { font-size: .84rem; }
.sh-prog-table th, .sh-prog-table td { padding: 7px 5px; }
.sh-prog-table th { white-space: nowrap; }
@media (max-width: 900px) {
  .sh-prog-layout > .sh-charts.sh-charts--stack { display: grid; }
  .sh-prog-table { grid-column: 1; grid-row: auto; }
}

/* 22. Shapes gallery: 19 flat shapes and 9 basic 3D solids, with a 2D | 3D switch */
.shp-modal { width: min(900px, 96vw); }
.shp-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.shp-left { max-height: 64vh; overflow-y: auto; padding-right: 6px; }
.shp-left h4 { margin: 8px 0 8px; font-size: .85rem; opacity: .75; }
.shp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.shp-chip { display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 5px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card); color: var(--text); font: inherit; font-size: .84rem; cursor: pointer; text-align: left; }
.shp-chip:hover { background: var(--soft); }
.shp-chip[aria-pressed="true"] { border-color: var(--acc, #1d4ed8); box-shadow: inset 0 0 0 1.5px var(--acc, #1d4ed8); }
.shp-chip:focus-visible, .shp-segbtn:focus-visible { outline: 2px solid var(--acc, #1d4ed8); outline-offset: 2px; }
.shp-thumb { flex: 0 0 auto; border-radius: 8px; background: var(--soft); }
.shp-right { display: grid; gap: 10px; align-content: start; justify-items: start; }
.shp-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.shp-segbtn { border: 0; background: transparent; color: var(--text); padding: 7px 14px; font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; }
.shp-segbtn[aria-pressed="true"] { background: var(--acc, #1d4ed8); color: #fff; }
.shp-cv { display: block; max-width: 100%; border-radius: 16px; background: var(--soft); touch-action: none; cursor: grab; }
.shp-cv:active { cursor: grabbing; }
.shp-cap { margin: 0; font-size: .9rem; line-height: 1.4; }
.shp-foot { display: flex; justify-content: flex-end; width: 100%; }
@media (max-width: 760px) {
  .shp-wrap { grid-template-columns: minmax(0, 1fr); }
  .shp-left { max-height: none; }
  .shp-right { justify-items: center; }
  .shp-cv { width: 100% !important; height: auto !important; aspect-ratio: 320 / 260; }
}
/* on a phone the account avatar sits top right; keep the Tools toggle's arrow clear of it */
@media (max-width: 760px) { .wb-float .wb-float-toggle { padding-right: 56px; } }

/* 23. Calculator: choose Normal or Scientific first */
.calc-choose { display: grid; gap: 10px; padding: 4px 0 2px; }
.calc-choose > p { margin: 0 0 2px; font-size: .92rem; opacity: .8; }
.sh-app .calc-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--card); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.sh-app .calc-opt:hover { background: var(--soft); border-color: var(--accent); }
.calc-opt b { font-size: 1.02rem; }
.calc-opt span { font-size: .84rem; opacity: .75; line-height: 1.4; }
.calc-body[hidden], .calc-choose[hidden] { display: none; }
.calc-back { margin-right: auto; }
.calc-head { gap: 8px; }
.calc-head b { flex: 1 1 auto; }
.calc-panel--sci { width: 380px; }
@media (max-width: 1100px) { .calc-panel--sci { width: auto; } }
.calc-grid--normal { grid-template-columns: repeat(4, 1fr); }
.calc-grid--sci { grid-template-columns: repeat(5, 1fr); }
.sh-app .calc-k--sci { font-size: .9rem; }
.sh-app .calc-k--wide { grid-column: span 2; }
.calc-angle { margin: 0 0 8px auto; display: block; }
.calc-angle[hidden] { display: none; }
.sh-app .calc-k--full { grid-column: 1 / -1; }
/* the calculator panel sits on <body>, outside .sh-app, so its keys need their own selectors */
#calc-panel .calc-k { min-height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--soft); color: var(--text); font: inherit; font-size: 1.1rem; font-weight: 600; cursor: pointer; }
#calc-panel .calc-k:hover { border-color: var(--accent); }
#calc-panel .calc-k--fn { font-size: .95rem; color: var(--muted); }
#calc-panel .calc-k--sci { font-size: .9rem; }
#calc-panel .calc-k--eq { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
#calc-panel .calc-k--wide { grid-column: span 2; }
#calc-panel .calc-k--full { grid-column: 1 / -1; }
#calc-panel .calc-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--card); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
#calc-panel .calc-opt:hover { background: var(--soft); border-color: var(--accent); }
#calc-panel .calc-h { width: 100%; display: flex; justify-content: space-between; gap: 8px; background: none; border: 0; padding: 4px 2px; color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; text-align: left; }

/* 24. The class switch in the side menu: Class 5 to Class 10 */
.sh-classbar { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 2px; border-bottom: 1px solid var(--hline); }
.sh-classbar-l { font-size: .78em; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .6; }
.sh-classsel { flex: 1 1 auto; min-width: 0; appearance: none; -webkit-appearance: none; padding: 7px 26px 7px 10px; border: 1px solid color-mix(in srgb, var(--hdr-text) 26%, transparent); border-radius: 10px; background-color: color-mix(in srgb, var(--hdr-text) 8%, transparent); color: inherit; font: inherit; font-size: .92em; font-weight: 600; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: right 12px top 54%, right 7px top 54%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.sh-classsel:hover { background-color: color-mix(in srgb, var(--hdr-text) 14%, transparent); }
.sh-classsel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sh-classsel option { color: #1a1a1a; background: #fff; }
@media (max-width: 760px) {
  .sh-classbar { width: 100%; justify-content: center; padding: 6px 0 10px; }
  .sh-classbar-l { display: none; }
  .sh-classsel { flex: 0 0 auto; width: 100%; padding: 7px 4px 7px 6px; text-align: center; font-size: .86em; background-image: none; }
}
.sh-class-num { display: none; }
@media (max-width: 760px) {
  /* the icon rail is too narrow for a drop-down, so the number is drawn and the select sits
     invisibly on top of it, which keeps the phone's own picker */
  .sh-classbar { position: relative; }
  .sh-classsel { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; opacity: 0; }
  .sh-class-num { display: grid; place-items: center; width: 100%; padding: 7px 0; border: 1px solid color-mix(in srgb, var(--hdr-text) 26%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--hdr-text) 8%, transparent); font-size: 1.02em; font-weight: 700; line-height: 1.1; }
  .sh-classsel:focus-visible + .sh-class-num { outline: 2px solid var(--accent); outline-offset: 2px; }
}

/* 25. The whiteboard's General section, shown first like the Notes page */
.wb-subj-g { display: inline-block; text-align: center; flex: 0 0 auto; }

/* 26. The Subjects tool: one button that opens every section, used by the
   Whiteboard, Notes and Quiz notes in place of a row of tabs. */
.sp-btn { display: inline-flex; align-items: center; gap: 9px; max-width: 100%; padding: 6px 14px 6px 7px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.sp-btn:hover { background: var(--soft); border-color: var(--accent); }
.sp-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sp-btn-ico { display: inline-flex; flex: 0 0 auto; }
.sp-btn-txt { display: grid; min-width: 0; line-height: 1.15; }
.sp-btn-lbl { font-size: .72em; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .6; }
.sp-btn-name { font-weight: 700; font-size: .96em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-g { display: inline-block; text-align: center; }

.sp-modal { width: min(620px, 94vw); }
.sp-lead { margin: 0 0 12px; font-size: .92rem; opacity: .8; }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 8px; }
.sp-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--card); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.sp-item:hover { background: var(--soft); border-color: var(--accent); }
.sp-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sp-item[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.sp-item-ico { display: inline-flex; flex: 0 0 auto; }
.sp-item-name { font-weight: 700; min-width: 0; }
.sp-item-on { margin-left: auto; flex: 0 0 auto; white-space: nowrap; font-size: .68em; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }

/* where the button sits on each page */
.wb-grp--subj { flex: 0 0 auto; }
.wb-grp--subj .sp-btn { width: 100%; }
.nt-grp--subj .sp-btn { padding: 5px 12px 5px 6px; }
.nt-layout { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) { .nt-layout { grid-template-columns: 1fr; } }

/* 27. Notes and Quiz notes: the tools in a panel of their own, as on the Whiteboard */
.nt-layout { grid-template-columns: minmax(0, 1fr) 196px; gap: 14px; align-items: start; }
.nt-tools { position: sticky; top: 16px; z-index: 30; display: flex; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .35); }
.sh-app .nt-tools-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--soft); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.nt-tools-toggle:hover { background: var(--card); }
.nt-tools-chev { margin-left: auto; transition: transform .15s; font-size: .8rem; }
.nt-tools-toggle[aria-expanded="true"] .nt-tools-chev { transform: rotate(180deg); }
.nt-tools.is-collapsed { width: auto; }
.nt-tools.is-collapsed .nt-bar { display: none; }
.nt-tools.is-collapsed .nt-tools-toggle { border-bottom: 0; }
.nt-tools .nt-bar { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 10px; margin: 0; border: 0; border-radius: 0; background: transparent; overflow-y: auto; }
.nt-tools .nt-grp { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; align-items: stretch; padding: 0; border: 0; }
.nt-tools .nt-grp + .nt-grp { padding-top: 8px; border-top: 1px solid var(--line); }
.nt-tools .nt-grp--subj, .nt-tools .nt-grp--ink { grid-template-columns: 1fr; }
.nt-tools .nt-grp--subj .sp-btn { width: 100%; }
.sh-app .nt-tools .nt-btn { flex-direction: column; gap: 3px; padding: 8px 4px; font-size: .74rem; text-align: center; }
.nt-tools .nt-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; justify-items: center; }
.nt-tools .nt-size { display: grid; gap: 2px; font-size: .74rem; }
.nt-tools .nt-size input { width: 100%; }
.nt-tools select, .nt-tools .nt-seg { width: 100%; }
@media (max-width: 900px) {
  .nt-layout { grid-template-columns: minmax(0, 1fr); }
  .nt-tools { position: static; order: -1; }
  .nt-tools .nt-bar { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .nt-tools .nt-grp { display: flex; flex-wrap: wrap; }
  .nt-tools .nt-grp + .nt-grp { padding-top: 0; border-top: 0; }
  .sh-app .nt-tools .nt-btn { flex-direction: row; font-size: .82rem; padding: 7px 10px; }
}
/* keep the panel inside its column: grid and flex children need an explicit zero minimum */
.nt-tools, .nt-tools * { min-width: 0; }
.nt-tools { width: 100%; box-sizing: border-box; }
.nt-tools .nt-bar { width: 100%; box-sizing: border-box; }
.nt-tools .nt-btn { width: 100%; box-sizing: border-box; overflow: hidden; }
.nt-tools .nt-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.nt-tools .nt-seg { display: grid; grid-template-columns: 1fr 1fr; }
.nt-tools .nt-seg button { width: 100%; padding: 6px 2px; font-size: .74rem; }
.nt-tools .nt-swatch { width: 22px; height: 22px; }
@media (max-width: 900px) {
  .nt-tools .nt-btn { width: auto; }
  .nt-tools .nt-seg { display: inline-flex; grid-template-columns: none; }
  .nt-tools .nt-seg button { width: auto; padding: 7px 14px; font-size: .86rem; }
}
/* the board and page controls need the full width of the panel to stay readable */
.nt-tools .nt-grp--page { grid-template-columns: 1fr; gap: 6px; }
.nt-tools .nt-grp--page .nt-seg { grid-template-columns: 1fr 1fr; }
.nt-tools .nt-grp--page .nt-seg button { font-size: .7rem; padding: 6px 2px; }
.nt-tools .nt-lines { display: grid; gap: 2px; font-size: .74rem; }
.nt-tools .nt-lines select { width: 100%; }
@media (max-width: 900px) {
  .nt-tools .nt-grp--page { display: flex; gap: 10px; }
  .nt-tools .nt-grp--page .nt-seg button { font-size: .86rem; padding: 7px 14px; }
  .nt-tools .nt-lines { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; }
  .nt-tools .nt-lines select { width: auto; }
}
.qz-hint { margin: 6px 0 0; font-size: .86rem; opacity: .75; }
