/* [ui3] The ExplainOwl design of the Tutor (tutor_ui3.py; the default page with TUTOR_UI3_DEFAULT=1). Loaded after static/style.css,
   which keeps drawing the board's insides (figures, notes, quiz cards, pop-ups). Design system from the approved mockups
   (ai-tutor-lab/research/redesign/mockups: eo.css + pages.css): owl indigo brand, Fredoka for display, Inter for UI, Caveat for the board,
   soft lavender shadows, 44 px tap targets, light + dark. Own classes start with xo- (the owl itself uses eo-*); the add-ons' own ui2
   classes (u-btn, u-opt, u-card...) are restyled at the end so every add-on looks native here. */
@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/ui3/fonts/fredoka-600.woff2) format("woff2"); }

:root {
  --bg: #f6f5fe; --bg-2: #efedfc; --surface: #ffffff; --surface-2: #f7f6fd; --surface-3: #efecff;
  --ink: #1d1b3a; --ink-2: #3b3860; --muted: #5e5a7e; --faint: #8a86a8;
  --line: #e7e4f5; --line-2: #d6d1ee;
  --brand: #5b4bdb; --brand-hover: #4a3cc4; --brand-ink: #4a3cc4; --brand-soft: #efecff; --brand-softer: #f7f5ff; --on-brand: #ffffff;
  --ok: #15803d; --ok-soft: #e7f6ec; --warn: #b45309; --warn-soft: #fff4e5; --err: #c2400c; --err-soft: #fdeee6;
  --live: #d93a40; --live-soft: #fdecec;
  --board: #fffdf8; --board-ink: #1f2a44; --board-line: #ece7da;
  --scrim: rgba(22, 18, 54, .42);
  --f-display: "Fredoka", "Inter", ui-rounded, system-ui, sans-serif;
  --f-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(40, 30, 120, .06), 0 2px 8px rgba(40, 30, 120, .05);
  --sh-2: 0 4px 12px rgba(40, 30, 120, .07), 0 12px 32px rgba(40, 30, 120, .08);
  --sh-3: 0 12px 28px rgba(40, 30, 120, .12), 0 32px 80px rgba(40, 30, 120, .18);
  --ring: 0 0 0 3px rgba(91, 75, 219, .35);
  --ease: cubic-bezier(.2, .8, .2, 1); --d-1: 140ms; --d-2: 220ms; --d-3: 360ms;
  --tap: 44px; --head: 64px;
  /* the names style.css and the add-ons (ui2 look) read */
  --ink2: var(--ink-2); --muted2: var(--muted); --line2: var(--line-2); --r1: 12px; --r2: 20px; --shadow: var(--sh-2); --shadow2: var(--sh-3);
  --t12: 12px; --t14: 14px; --t16: 16px; --t20: 20px; --t28: 28px; --t40: 40px; --ui: var(--f-ui); --headh: var(--head);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #12112a; --bg-2: #171634; --surface: #1b1a36; --surface-2: #211f42; --surface-3: #2a2660;
  --ink: #f1efff; --ink-2: #d9d6f5; --muted: #b6b2d8; --faint: #8f8bb5;
  --line: #2e2c55; --line-2: #3d3a6b;
  --brand: #6d5ef0; --brand-hover: #7d70f5; --brand-ink: #b3a8ff; --brand-soft: #2a2660; --brand-softer: #201e45; --on-brand: #ffffff;
  --ok: #4ade80; --ok-soft: #173b2a; --warn: #fbbf24; --warn-soft: #3a2c10; --err: #fb923c; --err-soft: #3d2116;
  --live: #ff6b6f; --live-soft: #3d1c25;
  --board: #f7f4ea; --board-ink: #1f2a44; --board-line: #e6dfcd;
  --scrim: rgba(5, 4, 20, .62);
  --sh-1: 0 1px 2px rgba(0, 0, 0, .3); --sh-2: 0 8px 24px rgba(0, 0, 0, .35); --sh-3: 0 24px 64px rgba(0, 0, 0, .5);
  --ring: 0 0 0 3px rgba(179, 168, 255, .45);
  color-scheme: dark;
}
/* the board and today's pop-ups stay paper-light in the dark theme: they keep the light names */
:root[data-theme="dark"] #board, :root[data-theme="dark"] .zoom .expcard, :root[data-theme="dark"] .acccard, :root[data-theme="dark"] .hk-bar,
:root[data-theme="dark"] .pc-sheet, :root[data-theme="dark"] .rc-sheet, :root[data-theme="dark"] #tpMenu {
  --ink: #1d1b3a; --ink-2: #3b3860; --ink2: #3b3860; --muted: #5e5a7e; --muted2: #5e5a7e; --faint: #8a86a8; --line: #e7e4f5; --line-2: #d6d1ee; --line2: #d6d1ee;
  --surface: #ffffff; --surface-2: #f7f6fd; --surface-3: #efecff; --brand-ink: #4a3cc4; --brand-soft: #efecff; --brand-softer: #f7f5ff; --brand: #5b4bdb;
  color-scheme: light; color: var(--ink);
}

/* ------------------------------------------------------------------ base */
#u2 { background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--f-ui); -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; margin: 0; }
#u2 [hidden] { display: none !important; }
#u2 .u-legacy-ctl { display: none !important; }
#u2 .ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
#u2 .ic.sm { width: 16px; height: 16px; }
#u2 .u-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#u2 .u-skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--surface); padding: 10px 14px; border-radius: var(--r-sm); font-weight: 600; color: var(--brand-ink); }
#u2 .u-skip:focus { top: 8px; }
#u2 :focus { outline: none; }
#u2 :focus-visible { outline: none; box-shadow: var(--ring); }
#u2 a { color: var(--brand-ink); }
#u2 h1, #u2 h2, #u2 h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: -.01em; margin: 0; color: var(--ink); }
#u2 button { font-family: inherit; }
#u2 .xo-sp { flex: 1; }
#u2 .xo-owlslot { display: inline-grid; place-items: center; flex: none; position: relative; line-height: 0; }
#u2 .xo-owlslot > .eo { margin: auto; }

/* ------------------------------------------------------------------ buttons, chips, tags, switches */
#u2 .xo-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 16px; border-radius: var(--r-md);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 600 14px/1 var(--f-ui); text-decoration: none; cursor: pointer;
  white-space: nowrap; transition: background var(--d-1), border-color var(--d-1), transform var(--d-1); -webkit-tap-highlight-color: transparent; }
#u2 .xo-btn:hover { border-color: var(--faint); }
#u2 .xo-btn:active { transform: scale(.98); }
#u2 .xo-btn:disabled { opacity: .55; cursor: default; transform: none; }
#u2 .xo-btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: 0 6px 16px rgba(91, 75, 219, .28); }
#u2 .xo-btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
#u2 .xo-btn.soft { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }
#u2 .xo-btn.ghost { background: transparent; border-color: transparent; }
#u2 .xo-btn.ghost:hover { background: var(--surface-3); }
#u2 .xo-btn.lg { min-height: 52px; padding: 0 22px; font-size: 16px; border-radius: var(--r-lg); }
#u2 .xo-btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }
#u2 .xo-btn.icon { width: var(--tap); padding: 0; }
#u2 .xo-btn.round { border-radius: var(--r-pill); }
#u2 .xo-btn.block { width: 100%; }
#u2 .xo-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink-2); font: 500 14px/1.2 var(--f-ui); cursor: pointer; white-space: nowrap; text-decoration: none; transition: all var(--d-1); }
#u2 .xo-chip:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-softer); }
#u2 .xo-chip .ic { color: var(--faint); }
#u2 .xo-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: var(--r-pill); font: 600 12px/1.2 var(--f-ui); background: var(--brand-soft); color: var(--brand-ink); letter-spacing: 0; text-transform: none; }
#u2 .xo-tag.live { background: var(--live-soft); color: var(--live); }
#u2 .xo-tag.owner { background: #232a52; color: #f4d27a; }
#u2 .xo-livedot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; animation: xolivepulse 1.8s var(--ease) infinite; }
#u2 .xo-switch { position: relative; display: inline-flex; flex: none; width: 46px; height: 28px; border-radius: var(--r-pill); background: var(--line-2); border: 0; padding: 0; transition: background var(--d-2); }
#u2 .xo-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform var(--d-2) var(--ease); }
#u2 [aria-checked="true"] > .xo-switch { background: var(--brand); }
#u2 [aria-checked="true"] > .xo-switch::after { transform: translateX(18px); }
#u2 .xo-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: var(--r-md); background: var(--surface-3); width: 100%; }
#u2 .xo-seg button { min-height: 40px; padding: 0 8px; border: 0; border-radius: 11px; background: none; font: 600 13px/1.15 var(--f-ui); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
#u2 .xo-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
#u2 .xo-seg button:disabled { opacity: .5; cursor: default; }

/* ------------------------------------------------------------------ header */
#u2 .xo-head { position: sticky; top: 0; z-index: 40; min-height: var(--head); display: flex; align-items: center; gap: 6px; padding: 0 20px;
  padding-top: env(safe-area-inset-top); background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; }
#u2.u-v-lesson .xo-head { background: var(--surface); border-bottom-color: var(--line); padding: 0 12px; }
#u2 .xo-brand { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); color: var(--ink); text-decoration: none; font: 600 22px/1 var(--f-display); letter-spacing: -.01em; white-space: nowrap; }
#u2 .xo-brandname b { font-weight: 600; color: var(--brand); }
#u2 .xo-brand .xo-owlslot { width: 36px; height: 36px; }
#u2.u-v-lesson .xo-brandname { display: none; }
#u2.u-v-lesson .xo-brand .xo-owlslot { width: 34px; height: 34px; }
#u2 .xo-ltitle { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; padding-left: 4px; }
#u2 .xo-ltitle b { font: 600 18px/1.2 var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#u2 .xo-ltitle small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#u2.u-v-home .xo-in-lesson, #u2.u-v-lesson .xo-in-home { display: none !important; }
#u2 .xo-avbtn { display: inline-flex; align-items: center; gap: 6px; padding: 2px 6px 2px 2px; border-radius: var(--r-pill); border: 1px solid transparent; background: none; cursor: pointer; min-height: var(--tap); color: var(--muted); }
#u2 .xo-avbtn:hover { background: var(--surface-3); }
#u2 .xo-avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #f7b267, #f4845f); color: #fff; font: 700 15px/1 var(--f-ui); overflow: hidden; }
#u2 .xo-avatar img { width: 100%; height: 100%; object-fit: cover; }
#u2 .xo-avatar.anon { background: var(--surface-3); color: var(--brand-ink); }
#u2 .xo-vidpill { position: relative; overflow: hidden; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--brand-softer); color: var(--brand-ink); font: 600 13px/1 var(--f-ui); cursor: pointer; white-space: nowrap; max-width: 46vw; }
#u2 .xo-vidpill .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--brand-soft); transition: width 1.2s linear; }
#u2 .xo-vidpill .lbl { position: relative; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ popover menus (bottom sheets on phones) */
#u2 .xo-pop { position: relative; }
#u2 .xo-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 80; width: 340px; max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); overflow: auto; padding: 8px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-3); transform-origin: top right; animation: xopopin var(--d-2) var(--ease); color: var(--ink); text-align: left; }
#u2 .xo-menu.left { right: auto; left: 0; transform-origin: top left; }
@keyframes xopopin { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
#u2 .xo-mi { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 8px 12px; border: 0; border-radius: var(--r-sm); background: none; text-align: left;
  color: var(--ink); font: 500 14px/1.3 var(--f-ui); text-decoration: none; cursor: pointer; }
#u2 .xo-mi:hover { background: var(--surface-2); }
#u2 .xo-mi > .ic { color: var(--muted); }
#u2 .xo-mi .txt { flex: 1; min-width: 0; }
#u2 .xo-mi small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 1px; }
#u2 .xo-mi.danger, #u2 .xo-mi.danger .ic { color: var(--err); }
#u2 .xo-mi .ib { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); flex: none; }
#u2 .xo-mi .ib .ic { color: var(--brand-ink); }
#u2 .xo-mi:disabled { opacity: .55; cursor: default; }
#u2 .xo-mgroup { padding: 10px 12px 4px; font: 700 11px/1.2 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
#u2 .xo-mhr { height: 1px; background: var(--line); margin: 6px 4px; border: 0; }
#u2 .xo-mrow { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 12px 8px; }
#u2 .xo-mrow .xo-chip { min-height: 40px; }
#u2 .xo-acct { display: flex; gap: 12px; align-items: center; padding: 10px 12px 12px; }
#u2 .xo-acct .xo-avatar { width: 44px; height: 44px; }
#u2 .xo-acct b { display: block; font-size: 15px; }
#u2 .xo-acct small { color: var(--muted); font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; }
#u2 .xo-limits { margin: 0 8px 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); font-size: 12px; }
#u2 .xo-limits .r { display: flex; justify-content: space-between; font-weight: 600; }
#u2 .xo-limits .r + .r { color: var(--muted); font-weight: 400; margin-top: 8px; }
#u2 .xo-prog { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 8px; }
#u2 .xo-prog i { display: block; height: 100%; background: var(--brand); border-radius: 2px; }
#u2 .xo-mscrim { position: fixed; inset: 0; z-index: 94; background: var(--scrim); animation: xofade var(--d-2) var(--ease); }
#u2 .xo-menu form { margin: 0; }

/* ------------------------------------------------------------------ the sheet: a side panel (desktop) / bottom sheet (phones) */
#u2 .xo-scrim { position: fixed; inset: 0; z-index: 90; background: var(--scrim); animation: xofade var(--d-2) var(--ease); }
@keyframes xofade { from { opacity: 0; } }
#u2 .xo-sheet { position: fixed; top: 12px; right: 12px; bottom: 12px; width: 440px; max-width: calc(100vw - 24px); z-index: 91; display: flex; flex-direction: column;
  background: var(--surface); color: var(--ink); border-radius: var(--r-xl); box-shadow: var(--sh-3); animation: xoslidein var(--d-3) var(--ease); }
@keyframes xoslidein { from { transform: translateX(24px); opacity: 0; } }
#u2 .xo-grab { display: none; width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 8px auto 0; flex: none; }
#u2 .xo-sheet-h { display: flex; align-items: center; gap: 8px; padding: 16px 12px 8px 22px; flex: none; }
#u2 #uSheetBack:not([hidden]) + h2 { margin-left: -6px; }
#u2 .xo-sheet-h h2 { flex: 1; min-width: 0; font-size: 22px; line-height: 1.2; }
#u2 .xo-sheet-h h2 .sub { display: block; font: 400 13px/1.3 var(--f-ui); color: var(--muted); margin-top: 2px; letter-spacing: 0; }
#u2 .xo-sheet-b { flex: 1; overflow: auto; padding: 4px 16px 18px; overscroll-behavior: contain; }
#u2 .xo-sheet-f { display: flex; gap: 10px; align-items: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; }
#u2 .xo-drill { animation: xodrill var(--d-3) var(--ease); }
@keyframes xodrill { from { transform: translateX(16px); opacity: 0; } }

/* settings lists inside sheets */
#u2 .xo-sgroup { margin: 14px 0 6px; }
#u2 .xo-sgroup > h3 { display: flex; align-items: center; gap: 8px; font: 700 12px/1.2 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 0 8px 8px; }
#u2 .xo-list { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
#u2 .xo-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border: 0; width: 100%; background: none; text-align: left; color: var(--ink);
  text-decoration: none; cursor: pointer; font: 500 14px/1.3 var(--f-ui); }
#u2 .xo-list > * + * { border-top: 1px solid var(--line); }
#u2 button.xo-row:hover, #u2 a.xo-row:hover { background: var(--brand-softer); }
#u2 .xo-row > .ic { color: var(--muted); }
#u2 .xo-row .txt { flex: 1; min-width: 0; }
#u2 .xo-row .txt small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 2px; line-height: 1.35; }
#u2 .xo-row .val { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
#u2 .xo-row:disabled { cursor: default; }
#u2 .xo-row:disabled .txt > b, #u2 .xo-row:disabled .txt > span, #u2 .xo-row:disabled .xo-switch { opacity: .5; }
#u2 .xo-row .chk { color: var(--brand-ink); }
#u2 .xo-rowx { padding: 12px 14px; }
#u2 .xo-rowx .lbl { font: 500 14px/1.3 var(--f-ui); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
#u2 .xo-rowx .lbl small { color: var(--muted); font-size: 12px; font-weight: 400; }
#u2 .xo-rowx .hint { color: var(--muted); font-size: 12px; margin-top: 8px; }
#u2 .xo-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
#u2 .xo-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; min-height: 84px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface);
  text-align: left; cursor: pointer; font: 600 13px/1.25 var(--f-ui); color: var(--ink); text-decoration: none; transition: border-color var(--d-1), background var(--d-1); }
#u2 .xo-tile:hover { border-color: var(--brand); background: var(--brand-softer); }
#u2 .xo-tile .ib { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); }
#u2 .xo-tile .ib .ic { color: var(--brand-ink); width: 18px; height: 18px; }
#u2 .xo-tile small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
#u2 .xo-tile:disabled { opacity: .55; cursor: default; border-color: var(--line); background: var(--surface); }
#u2 .xo-sharebar { display: flex; gap: 8px; flex-wrap: wrap; }
#u2 .xo-note { color: var(--muted); font-size: 12px; margin: 10px 8px 0; }
#u2 .xo-search { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface); margin: 4px 0 12px; }

/* toast */
#u2 #uToast { position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: var(--r-md);
  background: var(--ink); color: var(--bg); font: 500 14px var(--f-ui); box-shadow: var(--sh-3); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#u2 #uToast button { min-height: 36px; padding: 0 10px; border: 1px solid currentColor; border-radius: 8px; background: transparent; color: inherit; font: 600 14px var(--f-ui); cursor: pointer; }

/* ------------------------------------------------------------------ home */
#u2 .u-main { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
#u2.u-v-home #uLesson { display: none; }
#u2.u-v-lesson #uHome { display: none; }
#u2.u-v-home { height: auto; min-height: 100vh; min-height: 100dvh; }
#u2 .xo-home { display: flex; flex-direction: column; align-items: center; padding: 28px 0 0; }
#u2 .xo-hero { width: min(800px, 100% - 32px); display: flex; flex-direction: column; align-items: center; text-align: center; }
#u2 .xo-top { display: contents; }
#u2 .xo-owlbig { width: 112px; height: 112px; margin-bottom: 6px; }
#u2 .xo-hello { font: 600 14px/1.2 var(--f-ui); color: var(--brand-ink); background: var(--brand-soft); padding: 6px 12px; border-radius: var(--r-pill); margin-bottom: 12px; display: inline-block; }
#u2 .xo-home h1 { font-size: 48px; line-height: 1.08; margin-bottom: 22px; }
#u2 .xo-toptxt { display: flex; flex-direction: column; align-items: center; }

/* composer */
#u2 #ask.xo-composer { display: block; flex: none; width: 100%; min-width: 0; margin: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--sh-2); padding: 8px; transition: border-color var(--d-2), box-shadow var(--d-2); text-align: left; }
#u2 #ask.xo-composer:focus-within { border-color: var(--brand); box-shadow: var(--sh-2), var(--ring); }
#u2 .xo-ctop { display: flex; align-items: flex-start; gap: 8px; padding: 8px 8px 4px 14px; }
#u2 #ask #topic { flex: 1; min-width: 0; min-height: 56px; max-height: 160px; resize: none; border: 0; background: none; outline: none; box-shadow: none; font: 400 18px/1.45 var(--f-ui); color: var(--ink); padding: 6px 0; margin: 0; border-radius: 0; }
#u2 #ask #topic::placeholder { color: var(--faint); }
#u2 #ask .xo-send { width: 48px; height: 48px; min-width: 48px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 0; padding: 0; background: var(--brand); color: #fff; cursor: pointer; box-shadow: 0 6px 16px rgba(91, 75, 219, .32); transition: transform var(--d-1), background var(--d-1); }
#u2 #ask .xo-send:hover { background: var(--brand-hover); transform: translateY(-1px); }
#u2 #ask .xo-send:disabled { opacity: 1; cursor: pointer; }
#u2 #ask .xo-send .ic { width: 22px; height: 22px; }
#u2 .xo-cbar { display: flex; align-items: center; gap: 6px; padding: 4px 4px 2px; flex-wrap: wrap; }
#u2 .xo-cbar-sp { flex: 1; }
#u2 #ask .xo-cbtn, #u2 #qa .xo-cbtn { width: 44px; height: 44px; min-width: 44px; padding: 0; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: all var(--d-1); flex: none; font: inherit; }
#u2 #ask .xo-cbtn:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-softer); }
#u2 #ask .xo-cbtn.cam { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }
#u2 #ask .xo-cbtn.on, #u2 #qa .xo-cbtn.on, #u2 #qa #mic.on { background: var(--live-soft); border-color: transparent; color: var(--live); }
#u2 #ask .xo-sumchip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 7px 0 14px; border-radius: var(--r-pill); border: 0; background: var(--surface-2); color: var(--ink-2); font: 600 13px/1 var(--f-ui); cursor: pointer; white-space: nowrap; max-width: 100%; }
#u2 #ask .xo-sumchip:hover { background: var(--brand-soft); color: var(--brand-ink); }
#u2 .xo-sumchip .gear { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--sh-1); flex: none; color: var(--ink-2); }
#u2 .xo-sumchip .gear .ic { width: 16px; height: 16px; }
#u2 .xo-sumchip .dotsep { color: var(--faint); }
#u2 .xo-sumchip .lng { overflow: hidden; text-overflow: ellipsis; max-width: 12ch; }
#u2 .xo-sumchip .xo-examtag { color: var(--brand-ink); }
#u2 .xo-under { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 6px 0; color: var(--muted); font-size: 13px; text-align: left; }
#u2 .xo-under .ic { width: 16px; height: 16px; }
#u2 #xoLeft:not(:empty)::before, #u2 #eoLeft:not(:empty)::before { content: " · "; }
#u2 .xo-wall { width: 100%; margin-top: 14px; padding: 14px 16px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); border-radius: var(--r-lg); color: var(--ink); font-size: 14px; text-align: left; }
#u2 .xo-wall p { margin: 0 0 10px; }
#u2 .xo-wall .u-btns { display: flex; flex-wrap: wrap; gap: 8px; }
#u2 .xo-examples { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; width: 100%; }
#u2 .xo-examples .lbl { font: 600 13px/40px var(--f-ui); color: var(--faint); margin-right: 2px; }
#u2 .xo-examples button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: 500 14px/1.2 var(--f-ui); cursor: pointer; white-space: nowrap; transition: all var(--d-1); }
#u2 .xo-examples button:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-softer); }
#u2 .xo-examples button small { color: var(--muted); font-size: 12px; font-weight: 500; }

/* shelves: My lessons (tutor-history.js), Ready to watch now, Want a video instead */
#u2 .xo-home > .u-shelf, #u2 .xo-home > .xo-sec, #u2 .xo-home > #rcHome { width: min(1120px, 100% - 32px); margin-top: 44px; }
#u2 .u-shelfh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
#u2 .u-shelfh h2 { font: 600 22px/1.2 var(--f-display); margin: 0; }
#u2 .u-shelfh a, #u2 .u-shelfh .u-link { font: 600 14px var(--f-ui); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; color: var(--brand-ink); }
#u2 .u-cards { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(200px, calc((100% - 56px) / 5), 280px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 10px; scrollbar-width: none; }
#u2 .u-cards::-webkit-scrollbar { display: none; }
#u2 .u-card { scroll-snap-align: start; display: flex; flex-direction: column; padding: 0; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; text-align: left;
  color: var(--ink); cursor: pointer; font: inherit; box-shadow: var(--sh-1); transition: transform var(--d-2) var(--ease), box-shadow var(--d-2); }
#u2 .u-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
#u2 .u-card .u-pic { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--board); border-bottom: 1px solid var(--line); overflow: hidden; }
#u2 .u-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
#u2 .u-card .u-pic > .ic { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; padding: 9px; border-radius: 50%; background: var(--brand); color: #fff; fill: #fff; stroke: none; box-shadow: var(--sh-2); }
#u2 .u-card .u-ct { display: block; padding: 12px 14px 14px; }
#u2 .u-card b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 600 14px/1.3 var(--f-ui); }
#u2 .u-card small { display: block; margin-top: 2px; color: var(--muted); font: 500 12px var(--f-ui); }
#u2 .th-shelf .th-cont { width: 100%; display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-1); color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
#u2 .th-shelf .th-cont .th-pic { width: 120px; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--board); flex: none; position: relative; }
#u2 .th-shelf .th-cont .th-pic img { width: 100%; height: 100%; object-fit: cover; }
#u2 .th-shelf .th-ct { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#u2 .th-shelf .th-kick { font: 700 11px/1.2 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--brand-ink); }
#u2 .th-shelf .th-ct b { font: 600 16px/1.3 var(--f-ui); }
#u2 .th-shelf .th-st { color: var(--muted); font-size: 12px; }
#u2 .th-shelf .th-go { flex: none; }
#u2 .th-shelf .th-privacy { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
#u2 .th-pic.none { background: var(--board) repeating-linear-gradient(0deg, transparent 0 17px, var(--board-line) 17px 18px); }
#u2 .th-pic .th-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--line); }
#u2 .th-pic .th-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 100%); background: var(--brand); }
#u2 .rc-home .rc-due, #u2 .th-slothome .rc-due { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px; border: 0; border-radius: var(--r-lg); color: #fff; font: 600 15px var(--f-ui); cursor: pointer;
  background: radial-gradient(120% 120% at 100% 0%, #8b7cf8 0%, #5b4bdb 45%, #3d2fb0 100%); box-shadow: var(--sh-2); }
#u2 .xo-maketiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
#u2 .xo-maketile { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); transition: all var(--d-2); }
#u2 .xo-maketile:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--sh-2); }
#u2 .xo-maketile .ib { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); flex: none; }
#u2 .xo-maketile .ib .ic { color: var(--brand-ink); }
#u2 .xo-maketile b { display: block; font: 600 14px/1.3 var(--f-ui); }
#u2 .xo-maketile small { color: var(--muted); font-size: 12px; line-height: 1.35; display: block; margin-top: 2px; }
#u2 .xo-foot { width: 100%; margin-top: 56px; border-top: 1px solid var(--line); padding: 22px max(16px, calc(50% - 560px)) 32px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; }
#u2 .xo-foot a { color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
#u2 .xo-foot a:hover { color: var(--ink); text-decoration: underline; }

/* ------------------------------------------------------------------ lesson: one screen, no page scroll */
#u2.u-v-lesson { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
#u2 .xo-lesson { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; padding: 10px 20px 0; }
#u2 .xo-stage { position: relative; flex: 1 1 auto; min-height: 0; width: 100%; max-width: 1180px; display: flex; }
#u2 #board { flex: 1 1 auto; margin: 0; min-height: 0; min-width: 0; border-radius: var(--r-xl); border: 0; background: var(--board); background-image: none;
  box-shadow: var(--sh-2), inset 0 0 0 1px var(--board-line); grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); grid-template-rows: auto minmax(0, 1fr); padding: 16px 26px 18px; transition: opacity var(--d-3); }
#u2 #boardTitle { font: 700 40px/1.1 var(--hand); color: var(--board-ink); min-height: 46px; }
#u2 #fig { min-height: 0; }
#u2 #notes { min-height: 0; max-height: none; }
#u2 #board:has(#notes .quiz) { grid-template-rows: auto minmax(0, 1fr); }
#u2 .quiz button { min-height: 44px; }
#u2 #empty .big { font: 700 28px var(--hand); color: var(--ink-2); }
#u2 #empty .small { font-size: 14px; color: var(--muted); }
#u2 #empty .xo-owlwait { width: 96px; height: 96px; margin-bottom: 4px; }
#u2 #empty .startsaved { pointer-events: auto; margin-top: 10px; min-height: 48px; padding: 0 24px; border: 0; border-radius: var(--r-pill); background: var(--brand); color: #fff; font: 600 16px var(--f-ui); cursor: pointer; box-shadow: 0 6px 16px rgba(91, 75, 219, .32); }
#u2 #tpEnd { display: none !important; }
#u2 .xo-pausedtag { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 7; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; padding: 10px 16px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--sh-2); font: 600 14px var(--f-ui); color: var(--ink-2); pointer-events: none; }
#u2[data-live="hearing"] #board { opacity: .45; }

/* the dock: caption, then the player bar with the owl */
#u2 .xo-dock { flex: none; width: 100%; max-width: 1180px; display: flex; flex-direction: column; gap: 6px; padding: 8px 0 0; position: relative; }
#u2 .xo-cap { display: flex; align-items: center; justify-content: center; min-height: calc(2.8 * 21px); text-align: center; padding: 0 24px; }
#u2 #caption { display: block; width: 100%; min-height: 0; font: 500 21px/1.4 var(--f-ui); color: var(--muted); text-align: center; }
#u2 #caption .w.on { color: var(--ink); }
#u2 #caption .w.now { color: var(--brand-ink); background: var(--brand-soft); border-radius: 6px; box-shadow: 0 0 0 3px var(--brand-soft); }
#u2 #caption .error { color: var(--err) !important; }
#u2 #caption .capbtn { min-height: 44px; padding: 0 14px; border-radius: var(--r-pill); font: 600 14px var(--f-ui); }
#u2.xo-nocap .xo-cap { display: none; }
#u2 .xo-player { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
#u2 .xo-playbtn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; padding: 0; }
#u2 .xo-playbtn .ic { fill: currentColor; }
#u2 .xo-playbtn.is-replay .ic { fill: none; }
#u2 .xo-playbtn:disabled { opacity: .5; cursor: default; }
#u2 .u-prog { flex: 1 1 160px; min-width: 80px; display: flex; align-items: center; height: 44px; }
#u2 .u-segs { display: flex; gap: 4px; width: 100%; height: 6px; }
#u2 .u-segs i { flex: 1; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; position: relative; }
#u2 .u-segs i.done { background: var(--brand); }
#u2 .u-segs i.now b { position: absolute; inset: 0; background: var(--brand); transform-origin: left; transform: scaleX(0); border-radius: 3px; }
#u2 .u-segs.cont { gap: 0; border-radius: 3px; overflow: hidden; }
#u2 .u-segs.cont i { border-radius: 0; }
#u2 .u-step { font: 600 13px/1 var(--f-ui); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 82px; text-align: right; }
#u2 .xo-ratebtn { min-width: 52px; min-height: 36px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); font: 700 13px/1 var(--f-ui); color: var(--ink-2); cursor: pointer; font-variant-numeric: tabular-nums; }
#u2 .xo-ratebtn:hover { border-color: var(--brand); }
#u2 .xo-ownstate { display: inline-flex; align-items: center; gap: 6px; padding-left: 8px; border-left: 1px solid var(--line); min-width: 0; }
#u2 .xo-ownstate .xo-owlslot { width: 40px; height: 40px; }
#u2 .xo-ownstate .xo-st { font: 600 12px/1.15 var(--f-ui); color: var(--muted); white-space: nowrap; min-width: 64px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
#u2 .xo-ownstate.busy .xo-st { color: var(--brand-ink); }
#u2.tp-ctl .u-prog, #u2.tp-ctl .u-step, #u2.tp-ctl .xo-ratebtn { display: none; }
#u2 .xo-player #tpBar { flex: 1 1 300px; min-width: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
#u2 .xo-player #tpBar > button { width: 44px; height: 44px; }
#u2 .xo-player #tpBar #tpPlay { display: none; }
#u2 .xo-player #tpTicks { height: 44px; align-items: center; }
#u2 .xo-player #tpTicks .tp-tick { height: 44px; background-clip: content-box; padding: 16px 0; border-radius: 0; }
#u2 .xo-player #tpTicks .tp-tick i { top: 16px; bottom: 16px; }
#u2 .xo-player #tpChap { font-size: 12px; color: var(--muted); margin-top: -12px; }

/* ask row */
#u2 #qa.xo-askrow { flex: none; width: 100%; max-width: 860px; display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 0 14px; padding-bottom: max(14px, env(safe-area-inset-bottom)); background: none; border: 0; }
#u2 .xo-askbox { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; min-height: 56px; padding: 0 6px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--sh-1); transition: border-color var(--d-2), box-shadow var(--d-2); }
#u2 .xo-askbox:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
#u2 #qa #question { flex: 1; min-width: 0; height: 44px; border: 0; background: none; font: 400 16px var(--f-ui); color: var(--ink); outline: none; padding: 0 4px; border-radius: 0; box-shadow: none; }
#u2 #qa #question::placeholder { color: var(--faint); }
#u2 #qa .xo-cbtn { width: 40px; height: 40px; min-width: 40px; border: 0; background: none; color: var(--ink-2); font-size: inherit; }
#u2 #qa .xo-cbtn:hover { background: var(--surface-3); }
#u2 #qa #askBtn.xo-askbtn { min-height: 44px; border-radius: var(--r-pill); padding: 0 20px; font: 600 15px var(--f-ui); background: var(--brand); color: #fff; border: 1px solid var(--brand); }
#u2 #qa #askBtn.xo-askbtn:hover { background: var(--brand-hover); }
#u2 #qa #tpTapBtn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: 600 14px var(--f-ui); cursor: pointer; }
#u2 #qa #tpTapBtn[aria-pressed="true"] { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }
#u2 #qa #tpTapBtn .ic { width: 18px; height: 18px; }
#u2 .xo-livehint { text-align: center; font-size: 12px; color: var(--muted); margin: -8px 0 0; padding-bottom: 10px; }
#u2 .xo-livehint b { color: var(--live); }

/* Live: the switch (static/live/live.js draws it; the Tutor host puts it next to each microphone), the owl in the ask box */
#u2 .lt-live { flex: none; }
#u2 .lvm-sw:not(#_#_) { min-height: 40px; padding: 0 12px 0 10px; gap: 8px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: 600 14px/1 var(--f-ui); }
#u2 .lvm-sw:not(#_#_):hover { border-color: var(--brand); background: var(--surface); }
#u2 .lvm-track:not(#_#_) { width: 10px; height: 10px; border-radius: 50%; background: transparent; border: 2px solid var(--faint); transition: all var(--d-2); }
#u2 .lvm-knob:not(#_#_) { display: none; }
#u2 .lvm-sw[aria-pressed=true]:not(#_#_) { background: var(--live-soft); border-color: transparent; color: var(--live); }
#u2 .lvm-sw[aria-pressed=true]:not(#_#_) .lvm-track { background: var(--live); border-color: var(--live); animation: xolivepulse 1.8s var(--ease) infinite; }
@keyframes xolivepulse { 0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .45); } 70% { box-shadow: 0 0 0 8px rgba(229, 72, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); } }
#u2 .lt-live .lt-state { display: none; }
#u2 .lvm-more:not(#_#_) { width: 32px; height: 32px; color: var(--muted); }
#u2 #qa .lvm-sw:not(#_#_) { min-height: 40px; }
#u2 .lt-live .lvm-label:not(#_#_) { position: static; width: auto; height: auto; overflow: visible; clip: auto; }  /* "Live" in words, on phones too */
#u2 #eoBack, #u2 #eoMoreBtn, #u2 .xo-avbtn { flex: none; }
#u2 .xo-ltitle { flex: 0 1 auto; }
#u2[data-live]:not([data-live="off"]) .xo-askbox { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(90deg, #8b7cf8, #e5484d, #f4b740, #8b7cf8) border-box; background-size: 100% 100%, 300% 100%; animation: xoliveborder 6s linear infinite; }
@keyframes xoliveborder { to { background-position: 0 0, 300% 0; } }
#u2 .xo-liveowl { width: 40px; height: 40px; margin-left: 2px; }
#u2[data-live]:not([data-live="off"]) #qa #mic, #u2[data-live]:not([data-live="off"]) #qa #photoBtn2 { display: none; }
#u2[data-live]:not([data-live="off"]) .xo-ownstate { display: none; }
#u2[data-live]:not([data-live="off"]) #qa #question::placeholder { color: var(--muted); }
#u2 #ltBar.lt-bar:not(#_) { width: 100%; max-width: 860px; margin: -6px 0 10px; }
#u2 #ask #ltBar.lt-bar:not(#_) { margin: 8px 4px 2px; }
#u2 #ltBar .lt-chip:not(#_) { border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); border-color: var(--line-2); }
#u2 #ltBar .lt-chip.lt-yes:not(#_) { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ------------------------------------------------------------------ end card (over the board) */
#u2 .xo-endcard { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 20px; border-radius: var(--r-xl);
  background: color-mix(in srgb, var(--board) 70%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: xofade var(--d-3) var(--ease); }
#u2 .xo-endin { position: relative; width: min(720px, 100%); max-height: 100%; overflow: auto; background: var(--surface); color: var(--ink); border-radius: var(--r-xl); box-shadow: var(--sh-3); padding: 24px 28px 20px; border: 1px solid var(--line); }
#u2 .xo-endin > .u-x { position: absolute; top: 10px; right: 10px; }
#u2 .xo-endtop { display: flex; gap: 16px; align-items: center; margin: 0 40px 16px 0; }
#u2 .xo-endtop .xo-owlslot { width: 96px; height: 96px; }
#u2 .xo-endtop h2 { font-size: 28px; line-height: 1.15; }
#u2 .xo-endtop p { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
#u2 .xo-keypts { list-style: none; padding: 14px 16px; margin: 0 0 16px; border-radius: var(--r-lg); background: var(--surface-2); display: grid; gap: 8px; }
#u2 .xo-keypts li { display: flex; gap: 10px; font-size: 14px; line-height: 1.4; }
#u2 .xo-keypts li .ic { color: var(--ok); width: 18px; height: 18px; margin-top: 1px; }
#u2 .xo-keypts .kh { font: 700 11px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
#u2 .xo-endacts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
#u2 .xo-followups { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
#u2 .xo-followups .xo-chip { white-space: normal; text-align: left; line-height: 1.25; padding: 8px 14px; }
#u2 .xo-endmore { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 4px; }
#u2 .xo-endmore summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font: 600 14px var(--f-ui); color: var(--brand-ink); }
#u2 .xo-endmore summary::-webkit-details-marker { display: none; }
#u2 .xo-endmore[open] summary .ic { transform: rotate(180deg); }
#u2 .xo-endmore .u-endrow { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; padding: 4px 0; }
#u2 .xo-endmore .u-endrow > .u-btn { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px; min-height: 76px; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: 600 13px/1.25 var(--f-ui); white-space: normal; text-align: left; box-shadow: none; }
#u2 .xo-endmore .u-endrow > .u-btn:hover { border-color: var(--brand); background: var(--brand-softer); }
#u2 .xo-endmore .u-endrow > .u-btn > .ic { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); box-sizing: border-box; }
#u2 .xo-endmore .u-endrow > .u-btn.u-ghost { border-style: dashed; }
#u2 .xo-endmore .u-sep { display: none; }
#u2 .xo-endin .t3d-endnotes { margin: 0 0 16px; border-radius: var(--r-lg); }  /* the 3D model's facts (tutor3d.js), under the key points */
#u2 .xo-endmore .u-endrow > .t3d-endbtn .t3d-ic { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); box-sizing: border-box; fill: none; stroke: currentColor; stroke-width: 2; }
#u2 .u-endmsg { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
#u2 .u-endmsg:empty { display: none; }
#u2 .xo-endpill { position: absolute; left: 16px; bottom: 16px; z-index: 6; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-2); font: 600 14px var(--f-ui); color: var(--ink); cursor: pointer; }
#u2 .xo-endpill .ic { color: var(--ok); }

/* ------------------------------------------------------------------ the add-ons' ui2 classes, in this look */
#u2 .u-btn, #u2 .u-chip { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 14px;
  font: 600 14px/1 var(--f-ui); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md); cursor: pointer; text-decoration: none; white-space: nowrap; }
#u2 .u-btn:hover, #u2 .u-chip:hover { border-color: var(--faint); }
#u2 .u-btn:disabled, #u2 .u-chip:disabled { opacity: .5; cursor: default; }
#u2 .u-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
#u2 .u-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
#u2 .u-secondary { background: var(--surface); border-color: var(--line-2); }
#u2 .u-ghost { background: transparent; border-color: transparent; }
#u2 .u-ghost:hover { background: var(--surface-3); }
#u2 .u-ico { padding: 0; width: 44px; }
#u2 .u-link { background: none; border: 0; padding: 0 4px; min-height: 44px; font: 600 14px var(--f-ui); color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#u2 .u-group { margin: 16px 8px 6px; font: 700 12px/1.2 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
#u2 .u-opt { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 10px 14px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
#u2 .u-opt:first-child { border-top: 0; }
#u2 .u-opt .t { flex: 1; min-width: 0; }
#u2 .u-opt b { display: block; font: 500 14px/1.3 var(--f-ui); }
#u2 .u-opt small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 2px; }
#u2 .u-opt .ic { color: var(--ink-2); }
#u2 .u-opt:hover { background: var(--brand-softer); }
#u2 .u-opt:disabled { cursor: default; }
#u2 .u-opt:disabled b, #u2 .u-opt:disabled .u-sw { opacity: .5; }
#u2 .u-sw { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); transition: background .15s; }
#u2 .u-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: left .15s; }
#u2 .u-opt[aria-checked="true"] .u-sw { background: var(--brand); }
#u2 .u-opt[aria-checked="true"] .u-sw::after { left: 21px; }
#u2 .u-opt .u-check { width: 22px; height: 22px; color: var(--brand-ink); visibility: hidden; }
#u2 .u-opt[aria-checked="true"] .u-check { visibility: visible; }
#u2 .u-sheetbody > [role="radiogroup"], #u2 .xo-sheet-b > .u-opt { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
#u2 .u-sheetbody > .u-opt { border-radius: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
#u2 .u-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; margin-top: 8px; border-radius: var(--r-md); background: var(--surface-3); }
#u2 .u-seg button { min-height: 40px; border: 0; border-radius: 11px; background: none; font: 600 13px var(--f-ui); color: var(--muted); cursor: pointer; }
#u2 .u-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
#u2 .u-row { padding: 12px 14px; border-top: 1px solid var(--line); }
#u2 .u-row:first-child { border-top: 0; }
#u2 .u-row > b { display: block; font: 600 15px var(--f-ui); }
#u2 .u-row > small { display: block; color: var(--muted); font-size: 13px; }
#u2 .u-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
#u2 .u-acts .u-note { flex: 1 1 100%; font-size: 13px; color: var(--muted); }
#u2 .u-pill { position: relative; overflow: hidden; display: inline-flex; align-items: center; min-height: 44px; min-width: 190px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--brand-softer); color: var(--brand-ink); font: 600 14px var(--f-ui); cursor: pointer; }
#u2 .u-pill .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--brand-soft); transition: width 1.2s linear; }
#u2 .u-pill .lbl { position: relative; }
#u2 .u-sheetbody p.u-hint, #u2 .u-sheetbody .ex-intro { margin: 0 8px 12px; color: var(--muted); font-size: 13px; }
#u2 .xo-vrows { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
/* the language list (app.js), moved into the sheet while it is open */
#u2 .u-sheet #langPop { position: static; width: auto; padding: 0; border: 0; box-shadow: none; background: none; display: block; }
#u2 .u-sheet #langSearch { height: 48px; font-size: 16px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); margin: 4px 0 10px; padding: 0 14px; width: 100%; }
#u2 .u-sheet #langList { max-height: none; overflow: visible; padding: 0; margin: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); }
#u2 .u-sheet #langList .lopt { min-height: 48px; align-items: center; font-size: 15px; color: var(--ink); border-radius: 0; padding: 8px 14px; border-top: 1px solid var(--line); }
#u2 .u-sheet #langList .lopt:hover, #u2 .u-sheet #langList .lopt.on { background: var(--brand-softer); }
#u2 .u-sheet #langList .lopt.on { color: var(--brand-ink); font-weight: 600; }
#u2 .u-sheet #langList .lopt span { color: var(--muted); }
#u2 .u-sheet #langList .lhead { color: var(--faint); padding: 12px 14px 6px; background: var(--surface); }
/* the voice picker (voicepick.js), moved into the Voice row while Options is open */
#u2 .xo-voicebox { display: flex; align-items: center; gap: 8px; min-width: 0; }
#u2 .xo-voicebox .vp-wrap { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
#u2 .xo-voicebox .vp-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); max-width: 210px; }
#u2 .xo-voicebox .vp-ico { display: none; }
#u2 .xo-voicebox .vp-lbl { display: inline-block !important; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 13px var(--f-ui); }
#u2 .xo-voicebox .vp-chip::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); flex: none; }
#u2 .xo-voicebox .vp-listen { min-height: 36px; padding: 0 12px; border-radius: var(--r-pill); border: 0; background: var(--brand-soft); color: var(--brand-ink); font: 600 13px var(--f-ui); cursor: pointer; }
#u2 .ex-chip, #u2 #ask .hk-ckchip { display: none !important; }  /* Exam style: Options; Check my working: the + menu */

/* today's pop-ups (video, notes, Edit video, Video style, Share, Practice): the new look */
#u2 .zoom { background: var(--scrim); z-index: 88; backdrop-filter: blur(2px); }
#u2 .zoom .expcard { position: relative; border-radius: var(--r-xl); padding: 24px 24px 20px; box-shadow: var(--sh-3); font-family: var(--f-ui); }
#u2 .zoom .expcard .exph { font: 600 22px/1.2 var(--f-display); padding-right: 48px; color: var(--ink); }
#u2 .zoom .expcard > .zx { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-3); color: var(--ink); font-size: 16px; border: 0; }
#u2 .zoom > .zx { width: 44px; height: 44px; }
#u2 .zoom .vidact { border-radius: var(--r-pill); min-height: 44px; display: inline-flex; align-items: center; background: var(--brand); }
#u2 .zoom .seg button.on { background: var(--brand-soft); color: var(--brand-ink); border-color: var(--brand); }
#u2 #vidEditBox .edbadge, #u2 #vidEditBox .edchips, #u2 #vidEditBox > .expcard > .edlbl { display: none !important; }
#u2 #vidEditBox .edsec.u-hide { display: none !important; }
#u2 #styleBox .edbadge, #u2 #styleBox .sketchlink { display: none !important; }
#u2 .tp-back, #u2 #tpMenu { z-index: 89; }
#u2 #notice { bottom: max(24px, env(safe-area-inset-bottom)); border-radius: var(--r-md); font: 500 14px/1.45 var(--f-ui); padding: 8px 8px 8px 16px; background: var(--ink); color: var(--bg); }
#u2 #notice button { min-height: 44px; padding: 0 14px; border-radius: var(--r-pill); font: 600 14px var(--f-ui); background: var(--brand); }
#u2 #notice button.nx { min-width: 44px; padding: 0; background: transparent; color: inherit; }
#u2 .acccard { border-radius: var(--r-xl); }
#u2 #shortsFeed { z-index: 80; }
#u2 .te-pill { display: none !important; }  /* the front door's fixed "Sign in / My library" pill: the avatar menu replaces it */
#u2 .hk-bar { border-radius: var(--r-lg); }
/* the Add sources box (srcbox.js): its "+" lives in our composer bar, its cards under the text */
#u2 #ask .sb-comp { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 6px; }
#u2 #ask .sb-comp > .sb-plus { display: none; }
#u2 #ask .sb-under { padding: 0 8px; }

/* ------------------------------------------------------------------ tablets */
@media (max-width: 1100px) { #u2 .xo-maketiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 721px) and (max-height: 820px) {
  #u2 .xo-lesson { padding-top: 6px; }
  #u2 #boardTitle { font-size: 34px; min-height: 38px; }
  #u2 #caption { font-size: 19px; }
  #u2 #qa.xo-askrow { padding-top: 8px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}

/* ------------------------------------------------------------------ phones (<= 720 px) */
@media (max-width: 720px) {
  #u2 { --head: 56px; }
  #u2 .xo-wide { display: none !important; }
  #u2 .xo-head { padding: 0 8px 0 14px; }
  #u2.u-v-lesson .xo-head { padding: 0 4px 0 6px; gap: 2px; }
  #u2 .xo-brand { font-size: 20px; }
  #u2.u-v-lesson .xo-brand { display: none; }
  #u2 .xo-ltitle b { font-size: 16px; }
  #u2 #eoMoreBtn span, #u2 #xoMoreBtn span { font-size: 15px; }
  #u2 .xo-menu { position: fixed; z-index: 95; top: auto; left: 0; right: 0; bottom: 0; width: 100% !important; max-height: 86vh; max-height: 86dvh; border-radius: var(--r-xl) var(--r-xl) 0 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom)); animation: xosheetup var(--d-3) var(--ease); }
  #u2 .xo-sheet { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-width: none; max-height: 88vh; max-height: 88dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; animation: xosheetup var(--d-3) var(--ease); }
  #u2 .xo-grab { display: block; }
  #u2 .xo-sheet-h { padding: 6px 8px 6px 18px; }
  @keyframes xosheetup { from { transform: translateY(40px); opacity: 0; } }

  #u2 .xo-home { padding-top: 14px; }
  #u2 .xo-hero { text-align: left; align-items: stretch; }
  #u2 .xo-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
  #u2 .xo-owlbig { width: 76px; height: 76px; margin: 0; }
  #u2 .xo-toptxt { align-items: flex-start; }
  #u2 .xo-hello { margin-bottom: 6px; padding: 4px 10px; font-size: 12px; }
  #u2 .xo-home h1 { font-size: 30px; margin: 0; }
  #u2 #ask.xo-composer { border-radius: 24px; }
  #u2 #ask #topic { font-size: 17px; min-height: 52px; }
  #u2 .xo-ctop { padding: 6px 6px 2px 10px; }
  #u2 .xo-cbar { gap: 6px; flex-wrap: nowrap; }
  #u2 .xo-sumchip .lng, #u2 .xo-sumchip .dotsep { display: none; }
  #u2 .xo-examples { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin: 16px -16px 0; padding: 0 16px 4px; width: auto; scrollbar-width: none; }
  #u2 .xo-examples::-webkit-scrollbar { display: none; }
  #u2 .xo-examples button { min-height: 44px; flex: none; }
  #u2 .xo-home > .u-shelf, #u2 .xo-home > .xo-sec, #u2 .xo-home > #rcHome { margin-top: 30px; }
  #u2 .u-shelfh h2 { font-size: 19px; }
  #u2 .u-cards { grid-auto-columns: minmax(200px, 72%); }
  #u2 .xo-maketiles { gap: 10px; }
  #u2 .xo-maketile { padding: 12px; gap: 10px; flex-direction: column; }
  #u2 .xo-maketile .ib { width: 38px; height: 38px; }
  #u2 .th-shelf .th-cont .th-pic { width: 88px; }
  #u2 .th-shelf .th-go { display: none; }
  #u2 .xo-foot { margin-top: 36px; }
  #u2 .xo-tiles { grid-template-columns: repeat(3, 1fr); }
  #u2 .xo-tile { min-height: 78px; padding: 10px; }

  #u2 .xo-lesson { padding: 6px 8px 0; }
  #u2 .xo-stage { min-height: 200px; }
  #u2 #board { padding: 10px 12px; border-radius: 18px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
  #u2 #boardTitle { font-size: 28px; min-height: 34px; }
  #u2 #notes { max-height: 22dvh; gap: 4px; }
  #u2 #board:has(#notes .quiz) { grid-template-rows: auto minmax(70px, 1fr) auto; }
  #u2 #board:has(#notes .quiz) #notes { max-height: calc(100dvh - 370px); }
  #u2 .note { font-size: 23px; }
  #u2 .xo-dock { padding-top: 6px; gap: 6px; }
  #u2 .xo-cap { padding: 0 6px; }
  #u2 .xo-cap { min-height: 46px; }
  #u2 #caption { font-size: 17px; line-height: 1.35; max-height: 69px; overflow: hidden; scroll-behavior: smooth; }
  #u2 .xo-player { gap: 6px; padding: 4px 6px 4px 4px; }
  #u2 .u-prog { min-width: 0; flex: 1 1 auto; }
  #u2 .u-step { min-width: 0; font-size: 12px; }
  #u2 .xo-ownstate { padding-left: 4px; }
  #u2 .xo-ownstate .xo-st { display: none; }
  #u2 #qa.xo-askrow { padding: 8px 0 10px; gap: 6px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  #u2 .xo-askbox { min-height: 52px; padding-left: 12px; }
  #u2 #qa #photoBtn2 { display: none; }
  #u2 #qa #askBtn.xo-askbtn { padding: 0 16px; }
  #u2 #qa #tpTapBtn .lbl { display: none; }
  #u2 .lt-live .lvm-label { font-size: 13px; }
  #u2 .xo-endcard { position: fixed; inset: var(--head) 0 0 0; z-index: 50; border-radius: 0; place-items: end center; padding: 0; background: var(--scrim); backdrop-filter: none; }
  #u2 .xo-endin { border-radius: 24px 24px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 100%; }
  #u2 .xo-endtop { margin-right: 36px; gap: 12px; }
  #u2 .xo-endtop .xo-owlslot { width: 72px; height: 72px; }
  #u2 .xo-endtop h2 { font-size: 22px; }
  #u2 .xo-endacts .xo-btn { flex: 1 1 auto; }
  #u2 .xo-endmore .u-endrow { grid-template-columns: repeat(3, 1fr); }
  #u2 .xo-endpill { left: 8px; bottom: 8px; }
  #u2 #uToast, #u2 #notice { bottom: 96px; }
  #u2 .zoom .expcard { width: calc(100vw - 24px); padding: 18px 16px; }
}
@media (max-width: 380px) {
  #u2 .xo-brand { font-size: 18px; }
  #u2 .xo-cbar { gap: 4px; }
  #u2 #ask .xo-cbtn { width: 42px; height: 42px; min-width: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  #u2 *, #u2 *::before, #u2 *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
