:root {
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  color: #222747;
  background: #fbf7ec;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #222747;
  --ink-soft: #626987;
  --blue-900: #35388f;
  --blue-800: #4652b5;
  --blue-700: #3766d6;
  --blue-500: #7597e6;
  --blue-300: #9fb9ec;
  --blue-200: #cbdaf5;
  --blue-100: #eaf0fc;
  --cream: #fbf7ec;
  --cream-deep: #eee6d2;
  --white: #fffdf5;
  --lemon: #fff0a9;
  --peach: #f6c6b5;
  --line: #30356f;
  --danger: #b66067;
  --success: #4f8a72;
  --shadow: 8px 8px 0 rgba(48, 53, 111, .14);
  --shadow-soft: 4px 5px 0 rgba(48, 53, 111, .10);
}

* { box-sizing: border-box; }
html, body, #root { min-height: 100%; margin: 0; }
html { background: var(--cream); }
body {
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12px 12px, rgba(48, 53, 111, .035) 1.1px, transparent 1.4px) 0 0 / 22px 22px,
    linear-gradient(180deg, #fbf8ef 0%, #f7f4ec 100%);
  font-size: 15px;
  line-height: 1.5;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(55, 102, 214, .25); outline-offset: 2px; }

.app-shell { min-height: 100vh; padding-bottom: 28px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 13px clamp(22px, 4vw, 64px);
  overflow: visible;
  color: var(--ink);
  background: rgba(251, 247, 236, .94);
  border-bottom: 2px solid rgba(48, 53, 111, .16);
  backdrop-filter: blur(14px);
}
.topbar-scribble { position: absolute; pointer-events: none; }
.topbar-scribble--arc { width: 110px; height: 28px; right: 38%; bottom: -15px; border-top: 3px solid var(--blue-700); border-radius: 50%; transform: rotate(-2deg); opacity: .52; }
.topbar-scribble--dot { width: 14px; height: 14px; right: 35.5%; top: 17px; border: 3px solid var(--blue-700); border-radius: 50%; opacity: .62; }

.brand { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; min-width: 260px; }
.brand__mark { width: 42px; height: 42px; overflow: visible; }
.brand__mark-board-fill { fill: #f7f9ff; }
.brand__mark-board-outline, .brand__mark-sweep { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.brand__mark-board-outline { stroke-width: 2.65; opacity: .92; }
.brand__mark-shelf-shadow { fill: currentColor; opacity: .14; }
.brand__mark-sweep { stroke-width: 4.2; }
.brand__mark-sweep--two { opacity: 1; }
.brand { color: var(--blue-700); }
.brand__copy strong { display: block; color: var(--ink); font-family: "Arial Black", "Trebuchet MS", sans-serif; font-size: 1.13rem; line-height: 1; letter-spacing: -.055em; white-space: nowrap; }
.brand__copy strong span { color: var(--blue-700); }
.brand__copy small { display: block; max-width: 185px; margin-top: 4px; color: var(--ink-soft); font-size: .58rem; font-weight: 700; line-height: 1.15; letter-spacing: .015em; }
.brand--compact { min-width: auto; }
.brand--compact .brand__mark { width: 38px; height: 38px; }
.brand--light { color: #dce8ff; }
.brand--light .brand__mark-board-fill { fill: rgba(53, 56, 143, .82); }
.brand--light .brand__mark-shelf-shadow { opacity: .18; }
.brand--light .brand__copy strong, .brand--light .brand__copy small { color: #fff; }

.desktop-nav { display: flex; align-items: center; gap: 3px; }
.desktop-nav a { min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 12px; color: #555b78; font-weight: 800; transition: background .15s ease, color .15s ease, transform .15s ease; }
.desktop-nav a:hover { color: var(--blue-900); background: var(--blue-100); transform: rotate(-1deg); }
.desktop-nav a.active { color: var(--cream); background: var(--blue-900); box-shadow: 3px 3px 0 var(--blue-300); }
.desktop-nav svg { width: 18px; height: 18px; }
.account-wrap { position: relative; z-index: 90; margin-left: auto; }
.avatar { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: 2px solid rgba(48, 53, 111, .16); border-radius: 50%; color: var(--blue-900); background: var(--lemon); box-shadow: 3px 3px 0 rgba(48, 53, 111, .13); font-weight: 900; transition: transform .18s ease; }
.avatar:hover { transform: translate(-1px, -1px); }
.avatar--large { width: 72px; height: 72px; font-size: 1.45rem; }
.account-menu { position: absolute; top: calc(100% + 11px); right: 0; width: min(270px, calc(100vw - 24px)); padding: 8px; border: 2px solid rgba(48, 53, 111, .18); border-radius: 18px 18px 6px 18px; background: rgba(255, 253, 245, .98); box-shadow: 8px 9px 0 rgba(48, 53, 111, .14); }
.account-menu::before { content: ""; position: absolute; top: -7px; right: 17px; width: 12px; height: 12px; border-left: 2px solid rgba(48, 53, 111, .18); border-top: 2px solid rgba(48, 53, 111, .18); background: var(--white); transform: rotate(45deg); }
.account-menu__identity { display: grid; gap: 2px; padding: 10px 11px 12px; border-bottom: 1px solid rgba(48, 53, 111, .12); }
.account-menu__identity span { overflow: hidden; color: var(--ink-soft); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.account-menu button { width: 100%; margin-top: 4px; padding: 10px 11px; border: 0; border-radius: 10px; background: transparent; font-weight: 750; text-align: left; }
.account-menu button:hover { background: var(--blue-100); }
.account-menu .account-menu__logout { color: #9b4852; }
.mobile-nav { display: none; }

.page { width: min(1480px, 100%); margin: 0 auto; padding: 34px clamp(22px, 4vw, 64px) 70px; }
.page-heading { min-height: 105px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; padding: 0 2px 14px; border-bottom: 2px solid rgba(48, 53, 111, .14); }
.page-heading > div { position: relative; }
.page-heading h1 { margin: 0; color: var(--ink); font-family: "Arial Black", "Trebuchet MS", sans-serif; font-size: clamp(2.6rem, 5vw, 4.9rem); line-height: .88; letter-spacing: -.055em; text-transform: uppercase; }
.page-heading--calendar h1 { font-size: clamp(2.6rem, 5vw, 4.6rem); }
.heading-stroke { position: absolute; width: 118px; height: 18px; left: 8px; bottom: -25px; border-top: 3px solid var(--blue-500); border-radius: 50%; transform: rotate(-2deg); opacity: .8; }
.eyebrow { display: block; margin-bottom: 6px; color: var(--blue-700); font-family: Georgia, serif; font-size: .88rem; font-style: italic; letter-spacing: 0; text-transform: none; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; color: var(--ink); font-family: "Arial Black", "Trebuchet MS", sans-serif; font-size: clamp(1.5rem, 2.5vw, 2.45rem); line-height: .95; text-transform: uppercase; }
.text-button { padding: 3px 0; border: 0; border-bottom: 2px solid var(--blue-300); color: var(--blue-900); background: transparent; font-family: Georgia, serif; font-size: 1rem; font-style: italic; font-weight: 700; }

.button { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 2px solid var(--blue-900); border-radius: 14px; color: #fff; background: var(--blue-900); box-shadow: 3px 4px 0 rgba(48, 53, 111, .18); font-weight: 800; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.button:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 5px 6px 0 rgba(48, 53, 111, .16); }
.button--primary { color: #fff; background: var(--blue-900); }
.button--ghost { border-color: rgba(48, 53, 111, .28); color: var(--blue-900); background: var(--white); }
.button--danger { border-color: rgba(182, 96, 103, .45); color: #964750; background: #fff0ee; }
.button--large { min-height: 50px; font-size: 1rem; }
.icon-button, .round-button { display: inline-grid; place-items: center; border: 2px solid rgba(48, 53, 111, .18); color: var(--blue-900); background: var(--white); }
.icon-button { width: 38px; height: 38px; padding: 0; border-radius: 50%; }
.round-button { width: 40px; height: 40px; border-radius: 50%; box-shadow: 2px 3px 0 rgba(48, 53, 111, .10); font-weight: 900; }
.icon-button:hover, .round-button:hover { background: var(--lemon); }

/* Home */
.hero { position: relative; min-height: 355px; overflow: hidden; display: grid; grid-template-columns: minmax(0, .88fr) minmax(440px, 1.12fr); align-items: stretch; margin: 12px 0 30px; border: 2px solid var(--line); border-radius: 42px 42px 42px 12px; color: var(--cream); background: #95b2ea; box-shadow: 10px 11px 0 #d7def2; }
.hero::before { content: ""; position: absolute; width: 390px; height: 390px; left: -155px; bottom: -250px; border-radius: 45% 55% 48% 52%; background: var(--blue-900); transform: rotate(14deg); }
.hero::after { content: ""; position: absolute; width: 220px; height: 85px; right: 34%; top: -52px; border: 3px solid rgba(255, 255, 255, .52); border-radius: 50%; transform: rotate(8deg); }
.hero-copy { position: relative; z-index: 2; align-self: center; padding: 46px 24px 46px clamp(34px, 5vw, 68px); }
.hero-date-line { display: inline-flex; flex-direction: column; margin-bottom: 12px; }
.hero-date { margin: 0; color: #fff9e8; font-family: Georgia, serif; font-size: 1.05rem; font-style: italic; text-transform: capitalize; }
.hero-date-line span { width: 94%; height: 9px; margin-top: -1px; border-top: 3px solid var(--lemon); border-radius: 50%; transform: rotate(-2deg); }
.hero h1 { margin: 0 0 20px; color: var(--cream); font-family: "Arial Black", "Trebuchet MS", sans-serif; font-size: clamp(3.2rem, 6.8vw, 6.6rem); line-height: .82; letter-spacing: -.075em; text-transform: uppercase; }
.hero h1 span, .hero h1 em { display: block; }
.hero h1 em { color: var(--lemon); font-family: Georgia, serif; font-size: .68em; font-weight: 400; font-style: italic; text-transform: none; letter-spacing: -.035em; }
.hero-summary { margin-bottom: 22px; color: #fff9e8; font-size: 1.05rem; font-weight: 800; text-shadow: 0 1px 0 rgba(48, 53, 111, .22); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button--hero-primary { color: var(--blue-900); background: var(--lemon); }
.button--hero-secondary { border-color: rgba(255, 255, 255, .8); color: #fff; background: transparent; box-shadow: none; }
.hero-illustration { position: relative; z-index: 1; min-height: 355px; }
.hero-illustration svg { width: 100%; height: 100%; overflow: visible; }
.hero-doodle__blob { fill: #3e429a; }
.hero-doodle__line { fill: none; stroke: #fff9e8; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.hero-doodle__line--thin { stroke-width: 3; opacity: .72; }
.hero-doodle__board rect { fill: #fbf7ec; stroke: #30356f; stroke-width: 4; }
.hero-doodle__board path { fill: none; stroke: #5c61ad; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.hero-doodle__board circle { fill: var(--lemon); stroke: #30356f; stroke-width: 3; }
.hero-doodle__people circle { fill: var(--peach); stroke: #30356f; stroke-width: 3; }
.hero-doodle__people path { fill: none; stroke: #fff9e8; stroke-width: 4; stroke-linecap: round; }
.hero-doodle__formula { fill: #fff9e8; font: italic 24px Georgia, serif; }
.hero-doodle__formula--small { font-size: 28px; }
.hero-doodle__accent { fill: none; stroke: var(--lemon); stroke-width: 5; stroke-linecap: round; }
.hero-doodle__star { fill: var(--lemon); stroke: #30356f; stroke-width: 3; stroke-linejoin: round; }
.hero-doodle__camera rect { fill: var(--lemon); stroke: #30356f; stroke-width: 4; }
.hero-doodle__camera path { fill: var(--lemon); stroke: #30356f; stroke-width: 4; stroke-linejoin: round; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(315px, .55fr); gap: 27px; }
.panel-sketch { position: relative; overflow: hidden; border: 2px solid rgba(48, 53, 111, .48); border-radius: 28px 28px 12px 28px; background: var(--white); box-shadow: 7px 8px 0 rgba(48, 53, 111, .10); }
.today-panel { min-height: 470px; padding: 29px 31px; background: linear-gradient(155deg, rgba(255,255,255,.65), transparent 42%), #f8f5ea; }
.panel-corner-doodle { position: absolute; width: 190px; height: 125px; right: -30px; bottom: -30px; color: var(--blue-300); pointer-events: none; }
.panel-corner-doodle path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.quick-access { position: relative; overflow: hidden; padding: 30px 29px 34px; border: 2px solid var(--line); border-radius: 12px 30px 30px 30px; color: var(--cream); background: var(--blue-900); box-shadow: 8px 9px 0 var(--blue-300); }
.quick-access header { position: relative; z-index: 2; margin-bottom: 22px; }
.quick-access h2 { margin: 0; color: var(--lemon); font-family: "Arial Black", "Trebuchet MS", sans-serif; font-size: 2rem; line-height: .87; letter-spacing: -.04em; }
.quick-access header svg { display: block; width: 125px; height: 28px; margin-top: 7px; }
.quick-access header path, .quick-access__doodle path, .quick-access__doodle circle { fill: none; stroke: var(--peach); stroke-width: 3; stroke-linecap: round; }
.quick-access__item { position: relative; z-index: 2; width: 100%; min-height: 84px; display: flex; align-items: center; gap: 14px; margin-bottom: 13px; padding: 14px 15px; border: 2px solid rgba(255, 255, 255, .65); border-radius: 17px 17px 17px 5px; color: var(--ink); background: #b5c9ef; box-shadow: 4px 4px 0 rgba(20, 23, 75, .35); text-align: left; transition: transform .16s ease, background .16s ease; }
.quick-access__item--yellow { background: var(--lemon); transform: rotate(.6deg); }
.quick-access__item--peach { background: #f4d3c6; transform: rotate(-.5deg); }
.quick-access__item--cream { background: var(--white); }
.quick-access__item:hover { transform: translate(-2px, -2px) rotate(0); background: #fff; }
.quick-access__item > span { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 50%; color: var(--blue-900); }
.quick-access__item strong, .quick-access__item small { display: block; }
.quick-access__item strong { margin-bottom: 3px; font-size: 1rem; }
.quick-access__item small { color: var(--ink-soft); font-size: .76rem; }
.quick-access__doodle { position: absolute; left: 0; right: 0; bottom: -5px; width: 100%; height: 115px; color: rgba(255,255,255,.18); opacity: .35; pointer-events: none; }
.quick-access__doodle path, .quick-access__doodle circle { stroke: currentColor; }

/* Meetings */
.meeting-list { position: relative; z-index: 1; display: grid; gap: 13px; }
.meeting-card { min-height: 92px; display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 15px 17px; border: 2px solid rgba(48, 53, 111, .34); border-radius: 16px 16px 16px 5px; background: #dbe5f8; box-shadow: 4px 4px 0 rgba(48, 53, 111, .09); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; cursor: pointer; }
.meeting-card--cream { background: #fffdf5; }
.meeting-card--peach { background: #f7ddd3; }
.meeting-card:hover { transform: translate(-2px, -2px); border-color: var(--blue-900); box-shadow: 6px 6px 0 rgba(48, 53, 111, .12); }
.meeting-card--cancelled { opacity: .58; filter: grayscale(.25); }
.meeting-card__time { min-width: 0; padding-right: 16px; border-right: 2px solid rgba(48, 53, 111, .14); }
.meeting-card__time strong { display: block; color: var(--blue-900); font-family: "Arial Black", "Trebuchet MS", sans-serif; font-size: 1.34rem; }
.meeting-card__time span { display: flex; align-items: center; gap: 4px; margin-top: 5px; color: var(--ink-soft); font-size: .72rem; }
.meeting-card__time svg { width: 13px; height: 13px; }
.meeting-card__title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.meeting-card h3 { margin: 0; font-size: 1.06rem; }
.meeting-card p { margin: 4px 0 8px; color: var(--ink-soft); font-size: .83rem; }
.meeting-status { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 8px; border: 1px solid rgba(48, 53, 111, .14); border-radius: 999px; color: #4f6f64; background: rgba(221, 239, 229, .74); font-size: .66rem; font-weight: 800; }
.meeting-status--live { color: #8d454d; background: #ffe2df; }
.meeting-status--finished { color: #596073; background: rgba(230, 232, 237, .7); }
.meeting-status--cancelled { color: #8d454d; background: #f4dddd; }
.meeting-card__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--ink-soft); font-size: .69rem; }
.meeting-card__meta span { display: inline-flex; align-items: center; gap: 4px; }
.meeting-card__meta svg { width: 13px; height: 13px; }
.meeting-card__record { color: #9b5d28; }
.meeting-card__actions { display: flex; align-items: center; gap: 7px; opacity: 0; transform: translateX(5px); transition: opacity .16s ease, transform .16s ease; }
.meeting-card:hover .meeting-card__actions, .meeting-card:focus-within .meeting-card__actions { opacity: 1; transform: translateX(0); }
.meeting-action { min-height: 37px; padding: 8px 11px; border: 2px solid rgba(48, 53, 111, .22); border-radius: 11px; color: var(--blue-900); background: var(--white); font-size: .72rem; font-weight: 800; }
.meeting-action--join { display: inline-flex; align-items: center; gap: 6px; border-color: var(--blue-900); color: #fff; background: var(--blue-900); }
.meeting-action svg { width: 15px; height: 15px; }
.meeting-modal-lead { display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: center; margin-bottom: 20px; padding: 17px; border: 2px solid rgba(48, 53, 111, .22); border-radius: 18px 18px 6px 18px; background: #dbe5f8; }
.meeting-modal-time { color: var(--blue-900); font-family: "Arial Black", "Trebuchet MS", sans-serif; font-size: 1.7rem; }
.meeting-modal-lead p { margin: 0; color: var(--ink-soft); }

.empty-state { padding: 58px 20px; border: 2px dashed rgba(48, 53, 111, .34); border-radius: 22px 22px 8px 22px; background: #eef2fa; text-align: center; }
.empty-state > span { display: inline-grid; place-items: center; width: 52px; height: 52px; border: 2px solid var(--line); border-radius: 50%; color: var(--blue-700); background: var(--lemon); font-size: 1.5rem; }
.empty-state h3 { margin: 12px 0 4px; }
.empty-state p { margin: 0; color: var(--ink-soft); }

/* Shared toolbars and forms */
.section-toolbar { margin-bottom: 25px; padding: 17px 19px; border: 2px solid rgba(48, 53, 111, .22); border-radius: 22px 22px 8px 22px; background: #dbe5f8; box-shadow: 5px 6px 0 rgba(48, 53, 111, .08); }
.segmented { display: flex; padding: 4px; border: 2px solid rgba(48, 53, 111, .22); border-radius: 14px; background: var(--cream); }
.segmented button { padding: 8px 14px; border: 0; border-radius: 9px; color: var(--ink-soft); background: transparent; font-weight: 800; }
.segmented button.is-active { color: var(--cream); background: var(--blue-900); }
.library-toolbar { display: flex; align-items: center; gap: 14px; }
.tabs { display: flex; gap: 5px; }
.tabs button { min-height: 42px; padding: 9px 13px; border: 2px solid transparent; border-radius: 12px; color: var(--ink-soft); background: transparent; font-weight: 800; }
.tabs button.is-active { border-color: rgba(48, 53, 111, .22); color: var(--blue-900); background: var(--lemon); box-shadow: 2px 3px 0 rgba(48, 53, 111, .09); }
.search { min-width: 240px; flex: 1; min-height: 44px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 2px solid rgba(48, 53, 111, .20); border-radius: 13px; background: var(--white); }
.search svg { color: var(--ink-soft); }
.search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.library-toolbar select, .field input, .field textarea, .field select { width: 100%; min-height: 44px; padding: 10px 12px; border: 2px solid rgba(48, 53, 111, .20); border-radius: 13px; outline: none; color: var(--ink); background: var(--white); }
.library-toolbar > select { width: auto; min-width: 225px; }
.field { display: grid; align-content: start; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field > span { color: var(--ink-soft); font-size: .78rem; font-weight: 800; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--blue-700); box-shadow: 0 0 0 3px rgba(55, 102, 214, .12); }
.field textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.switch-row { min-height: 44px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 2px solid rgba(48, 53, 111, .15); border-radius: 13px; background: var(--white); }
.switch-row input { width: 18px; height: 18px; accent-color: var(--blue-900); }
.recurrence-box { padding: 16px; border: 2px dashed rgba(48, 53, 111, .25); border-radius: 17px 17px 6px 17px; background: var(--blue-100); }
.weekday-picker { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.weekday-picker button { width: 42px; height: 39px; border: 2px solid rgba(48, 53, 111, .2); border-radius: 12px; background: var(--white); font-weight: 800; }
.weekday-picker button.is-active { color: #fff; background: var(--blue-900); }
.hint { margin: 12px 0 0; color: var(--ink-soft); font-size: .75rem; }

/* Calendar */
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.calendar-navigation { display: flex; align-items: center; gap: 13px; }
.calendar-navigation > div { min-width: 270px; }
.calendar-navigation h2 { margin: 0; font-family: "Arial Black", "Trebuchet MS", sans-serif; font-size: 1.25rem; line-height: 1.05; text-transform: capitalize; }
.today-button { min-height: 38px; padding: 8px 13px; border: 2px solid rgba(48, 53, 111, .22); border-radius: 12px; color: var(--blue-900); background: var(--white); font-weight: 800; }
.calendar-shell { position: relative; overflow: hidden; padding-bottom: 38px; border: 2px solid rgba(48, 53, 111, .34); border-radius: 26px 26px 8px 26px; background: var(--white); box-shadow: 7px 8px 0 rgba(48, 53, 111, .09); }
.calendar-grid { display: grid; overflow: hidden; }
.calendar-grid--week, .calendar-grid--month { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-day { min-width: 0; min-height: 450px; padding: 13px 9px; border-right: 1px solid rgba(48, 53, 111, .14); background: rgba(255, 253, 245, .72); }
.calendar-grid--month .calendar-day { min-height: 155px; border-bottom: 1px solid rgba(48, 53, 111, .14); }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.is-today { background: linear-gradient(180deg, rgba(255, 240, 169, .38), transparent 45%), #fffdf5; }
.calendar-day.is-outside { opacity: .46; background: #f2efe7; }
.calendar-day > header { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 11px; padding: 0 4px 8px; border-bottom: 1px solid rgba(48, 53, 111, .10); }
.calendar-day > header span { overflow: hidden; color: var(--ink-soft); font-family: Georgia, serif; font-size: .75rem; font-style: italic; text-overflow: ellipsis; text-transform: capitalize; white-space: nowrap; }
.calendar-day > header strong { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: var(--blue-900); font-family: "Arial Black", sans-serif; }
.calendar-day.is-today > header strong { border: 2px solid var(--line); background: var(--lemon); box-shadow: 2px 2px 0 rgba(48, 53, 111, .13); }
.calendar-day__events { display: grid; gap: 8px; }
.calendar-event { position: relative; width: 100%; display: grid; gap: 3px; padding: 9px 9px 10px; overflow: hidden; border: 2px solid rgba(48, 53, 111, .28); border-left: 5px solid var(--blue-700); border-radius: 11px 11px 4px 11px; color: var(--ink); background: #dce7fa; box-shadow: 2px 3px 0 rgba(48, 53, 111, .08); text-align: left; }
.calendar-event--tone-1 { border-left-color: #b38c37; background: #fff4bf; }
.calendar-event--tone-2 { border-left-color: #b76f60; background: #f6d8cd; }
.calendar-event > div { display: flex; justify-content: space-between; gap: 5px; color: var(--blue-900); font-size: .68rem; font-weight: 900; }
.calendar-event strong { overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event small { display: -webkit-box; overflow: hidden; color: var(--ink-soft); font-size: .64rem; line-height: 1.28; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.calendar-event__marks { position: absolute; right: 6px; bottom: 5px; display: flex; gap: 3px; color: var(--blue-900); opacity: .7; }
.calendar-event__marks svg { width: 12px; height: 12px; }
.calendar-empty-slot { width: 100%; min-height: 42px; border: 2px dashed rgba(48, 53, 111, .18); border-radius: 10px; color: rgba(48, 53, 111, .45); background: transparent; font-size: .68rem; }
.calendar-empty-slot:hover { color: var(--blue-900); background: var(--blue-100); }
.calendar-legend { position: absolute; left: 18px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 14px; color: var(--ink-soft); font-size: .68rem; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.calendar-legend svg { width: 13px; height: 13px; color: var(--blue-900); }
.legend-dot { width: 9px; height: 9px; border: 2px solid var(--blue-900); border-radius: 50%; }
.legend-dot--blue { background: var(--blue-500); }
.calendar-doodle { position: absolute; width: 250px; height: 90px; right: -35px; bottom: -35px; opacity: .24; pointer-events: none; }
.calendar-doodle path { fill: none; stroke: var(--blue-700); stroke-width: 3; stroke-linecap: round; }
.calendar-mobile-list { display: none; }

/* Boards */
.boards-intro, .recordings-intro, .account-identity-card { min-height: 145px; display: flex; align-items: center; gap: 20px; margin-bottom: 24px; padding: 24px 28px; background: #dbe5f8; }
.boards-intro > div:first-child { display: flex; align-items: center; gap: 18px; }
.boards-intro > div:first-child > svg { width: 58px; height: 58px; padding: 13px; border: 2px solid var(--line); border-radius: 50% 50% 42% 58%; color: var(--blue-900); background: var(--lemon); }
.boards-intro h2, .recordings-intro h2, .account-identity-card h2 { margin: 0 0 5px; font-family: "Arial Black", "Trebuchet MS", sans-serif; font-size: 1.45rem; line-height: 1; text-transform: uppercase; }
.boards-intro p, .recordings-intro p, .account-identity-card p { margin: 0; color: var(--ink-soft); }
.boards-intro__stats { display: flex; gap: 12px; margin-left: auto; }
.boards-intro__stats span { min-width: 105px; padding: 12px 14px; border: 2px solid rgba(48, 53, 111, .22); border-radius: 16px 16px 5px 16px; background: var(--white); color: var(--ink-soft); font-size: .72rem; text-align: center; }
.boards-intro__stats strong { display: block; color: var(--blue-900); font-family: "Arial Black", sans-serif; font-size: 1.45rem; }
.boards-intro > svg, .recordings-intro > svg, .account-identity-card > svg { position: absolute; right: -20px; bottom: -15px; width: 240px; height: 95px; opacity: .25; pointer-events: none; }
.boards-intro > svg path, .recordings-intro > svg path, .recordings-intro > svg circle, .account-identity-card > svg path { fill: none; stroke: var(--blue-700); stroke-width: 3; stroke-linecap: round; }
.board-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.board-card { position: relative; overflow: hidden; border: 2px solid rgba(48, 53, 111, .36); border-radius: 25px 25px 8px 25px; background: var(--white); box-shadow: 6px 7px 0 rgba(48, 53, 111, .10); transition: transform .17s ease, box-shadow .17s ease; }
.board-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 9px 0 rgba(48, 53, 111, .13); }
.board-preview-button { width: 100%; padding: 0; border: 0; background: transparent; }
.board-preview { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 2px solid rgba(48, 53, 111, .20); background-color: #fff; color: #315d9d; }
.board-preview--grid { background-image: linear-gradient(#dce5eb 1px, transparent 1px), linear-gradient(90deg, #dce5eb 1px, transparent 1px); background-size: 20px 20px; }
.board-preview--dots { background-image: radial-gradient(#cfd9e0 1.2px, transparent 1.2px); background-size: 18px 18px; }
.board-preview--lined { background-image: linear-gradient(#dfe6e9 1px, transparent 1px); background-size: 100% 24px; }
.board-preview--tone-1 { color: #6150a7; }
.board-preview--tone-2 { color: #9b5a4f; }
.preview-equation, .preview-note, .preview-angle, .preview-cloud, .preview-arrow { position: absolute; font-family: "Comic Sans MS", "Segoe Print", cursive; }
.preview-equation { top: 24%; left: 13%; font-size: clamp(1rem, 2vw, 1.42rem); transform: rotate(-2deg); }
.preview-note { top: 62%; left: 57%; font-size: 1.05rem; transform: rotate(2deg); }
.preview-line { position: absolute; top: 57%; left: 18%; width: 50%; height: 3px; border-radius: 50%; background: #bd5d50; transform: rotate(5deg); }
.preview-axes { position: absolute; left: 23%; top: 17%; width: 45%; height: 67%; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.preview-axes::before, .preview-axes::after { content: ""; position: absolute; background: currentColor; }
.preview-axes::before { width: 8px; height: 2px; left: -5px; top: 0; transform: rotate(45deg); }
.preview-parabola { position: absolute; left: 30%; top: 26%; width: 34%; height: 48%; border: 3px solid currentColor; border-top: 0; border-radius: 0 0 50% 50%; transform: rotate(180deg); }
.preview-note--graph { left: 65%; top: 27%; }
.preview-triangle { position: absolute; left: 26%; top: 20%; width: 0; height: 0; border-left: 70px solid transparent; border-right: 45px solid transparent; border-bottom: 105px solid rgba(117, 151, 230, .12); filter: drop-shadow(0 0 0 currentColor); }
.preview-triangle::after { content: ""; position: absolute; left: -70px; top: 3px; width: 112px; height: 101px; border-left: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: skewX(-33deg); }
.preview-angle { left: 54%; top: 58%; }
.preview-note--geo { left: 62%; top: 27%; }
.preview-cloud { left: 18%; top: 28%; padding: 13px 19px; border: 2px solid currentColor; border-radius: 50%; background: rgba(255,255,255,.75); transform: rotate(-5deg); }
.preview-arrow { left: 48%; top: 40%; font-size: 2rem; }
.preview-note--draft { left: 62%; top: 52%; }
.board-preview__corner { position: absolute; width: 110px; height: 65px; right: -28px; bottom: -25px; border: 3px solid var(--blue-700); border-radius: 50%; opacity: .22; transform: rotate(-13deg); }
.board-card__meta { padding: 15px 90px 17px 16px; }
.board-title { max-width: 100%; display: block; padding: 0; overflow: hidden; border: 0; color: var(--ink); background: transparent; font-size: 1rem; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.board-card__meta > span, .board-card__meta > small { display: block; margin-top: 5px; color: var(--ink-soft); font-size: .7rem; }
.board-card__meta > small { color: var(--blue-700); }
.board-card__actions { position: absolute; right: 10px; bottom: 12px; display: flex; gap: 4px; }
.star-button { color: #b28c31; }

/* Recordings */
.recordings-intro { background: #f5ded5; }
.recordings-intro__icon { width: 62px; height: 62px; flex: 0 0 auto; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 50%; color: var(--blue-900); background: var(--lemon); }
.recordings-intro__icon svg { width: 29px; height: 29px; }
.storage-pill { min-width: 190px; display: grid; gap: 2px; padding: 9px 13px; border: 2px solid rgba(48, 53, 111, .22); border-radius: 15px 15px 5px 15px; color: var(--ink); background: var(--white); box-shadow: 3px 4px 0 rgba(48, 53, 111, .10); text-align: left; }
.storage-pill span { color: var(--ink-soft); font-size: .65rem; }
.storage-pill strong { color: var(--blue-900); font-size: .78rem; }
.storage-pill > i { height: 5px; margin-top: 4px; overflow: hidden; border-radius: 999px; background: #e4e6ee; }
.storage-pill > i b { height: 100%; display: block; border-radius: inherit; background: var(--blue-700); }
.recording-list { display: grid; gap: 14px; }
.recording-card { width: 100%; min-height: 126px; display: grid; grid-template-columns: 210px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 0 18px 0 0; overflow: hidden; border: 2px solid rgba(48, 53, 111, .32); border-radius: 22px 22px 7px 22px; color: var(--ink); background: var(--white); box-shadow: 5px 6px 0 rgba(48, 53, 111, .08); text-align: left; transition: transform .16s ease, box-shadow .16s ease; }
.recording-card:hover { transform: translate(-2px, -2px); border-color: var(--blue-900); box-shadow: 7px 8px 0 rgba(48, 53, 111, .11); }
.recording-thumb { position: relative; width: 100%; height: 126px; overflow: hidden; color: #fff; background: #4550a2; }
.recording-thumb--tone-1 { background: #718fd2; }
.recording-thumb--tone-2 { background: #a2648d; }
.recording-thumb::after { content: ""; position: absolute; width: 135px; height: 135px; right: -50px; bottom: -60px; border: 3px solid rgba(255,255,255,.35); border-radius: 50%; }
.recording-thumb__board { position: absolute; left: 17px; top: 16px; width: 128px; height: 82px; padding: 12px; border: 2px solid var(--line); border-radius: 12px 12px 4px 12px; color: var(--blue-900); background: var(--white); transform: rotate(-1.5deg); }
.recording-thumb__board span, .recording-thumb__board b { display: block; font-family: Georgia, serif; font-size: .72rem; font-style: italic; }
.recording-thumb__board i { display: block; width: 75%; height: 2px; margin: 12px 0 8px; background: var(--peach); transform: rotate(5deg); }
.recording-thumb__people { position: absolute; right: 15px; top: 17px; display: flex; }
.recording-thumb__people span { width: 32px; height: 32px; display: grid; place-items: center; margin-left: -7px; border: 2px solid var(--white); border-radius: 50%; color: var(--blue-900); background: var(--lemon); font-size: .7rem; font-weight: 900; }
.recording-thumb__duration { position: absolute; right: 12px; bottom: 9px; padding: 3px 7px; border-radius: 999px; background: rgba(29, 32, 74, .68); font-size: .62rem; }
.recording-thumb__play { position: absolute; left: 50%; top: 50%; width: 43px; height: 43px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.72); border-radius: 50%; background: rgba(53, 56, 143, .74); transform: translate(-50%, -50%); }
.recording-info__title { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.recording-info h3 { margin: 0; font-size: 1.08rem; }
.recording-info p { margin: 6px 0 13px; color: var(--ink-soft); font-size: .78rem; }
.recording-info > div:last-child { display: flex; flex-wrap: wrap; gap: 9px 16px; color: var(--ink-soft); font-size: .72rem; }
.recording-info > div:last-child span { display: inline-flex; align-items: center; gap: 5px; }
.recording-info svg { width: 14px; height: 14px; }
.recording-status { padding: 4px 8px; border: 1px solid rgba(48, 53, 111, .15); border-radius: 999px; color: #4f7565; background: #e2f0e9; font-size: .66rem; font-weight: 800; }
.recording-status--processing { color: #8b6425; background: #fff1bf; }
.recording-status--error { color: #98454d; background: #f8dfe0; }
.recording-player { position: relative; aspect-ratio: 16/9; overflow: hidden; border: 2px solid var(--line); border-radius: 20px 20px 7px 20px; background: #4751a0; }
.recording-player__board { position: absolute; left: 8%; top: 10%; width: 65%; height: 72%; padding: 7% 8%; border: 3px solid var(--line); border-radius: 18px; color: var(--blue-900); background: var(--white); }
.recording-player__board span, .recording-player__board b { display: block; font-family: Georgia, serif; font-size: clamp(1rem, 2vw, 1.7rem); font-style: italic; }
.recording-player__board i { display: block; width: 70%; height: 4px; margin: 8% 0; border-radius: 50%; background: var(--peach); transform: rotate(4deg); }
.recording-player__faces { position: absolute; right: 4%; top: 8%; display: grid; gap: 9px; }
.recording-player__faces span { width: 58px; height: 58px; display: grid; place-items: center; border: 3px solid var(--white); border-radius: 50%; color: var(--blue-900); background: var(--lemon); font-weight: 900; }
.recording-player > button { position: absolute; left: 50%; top: 50%; min-width: 74px; min-height: 74px; display: grid; place-items: center; border: 3px solid rgba(255,255,255,.8); border-radius: 50%; color: #fff; background: rgba(53, 56, 143, .82); transform: translate(-50%, -50%); }
.recording-player--processing > button { min-width: auto; min-height: 44px; padding: 10px 16px; border-radius: 13px; }
.storage-meter > div:first-child { height: 14px; overflow: hidden; border: 2px solid rgba(48, 53, 111, .15); border-radius: 999px; background: #e5e7ef; }
.storage-meter > div:first-child span { height: 100%; display: block; border-radius: inherit; background: var(--blue-700); }
.storage-meter p { margin: 15px 0 7px; }
.storage-meter small { color: var(--ink-soft); }
.storage-breakdown { display: grid; gap: 8px; margin-top: 20px; padding-top: 15px; border-top: 1px solid rgba(48, 53, 111, .12); }
.storage-breakdown span { display: flex; align-items: center; gap: 7px; }
.storage-breakdown strong { margin-left: auto; }
.storage-dot { width: 11px; height: 11px; border-radius: 50%; }
.storage-dot--video { background: var(--blue-700); }
.storage-dot--free { background: #dcdfea; }

/* Account */
.account-identity-card { position: relative; }
.account-identity-card .avatar { flex: 0 0 auto; }
.account-identity-card > div:nth-child(2) { position: relative; z-index: 1; }
.account-chip { position: relative; z-index: 1; margin-left: auto; padding: 7px 11px; border: 1px solid rgba(79, 138, 114, .25); border-radius: 999px; color: #467863; background: #e3f1e9; font-size: .72rem; font-weight: 900; }
.account-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.settings-card { padding: 25px; border: 2px solid rgba(48, 53, 111, .30); border-radius: 25px 25px 8px 25px; background: var(--white); box-shadow: 6px 7px 0 rgba(48, 53, 111, .09); }
.settings-card--accent { background: #fff4c7; }
.settings-card header { margin-bottom: 20px; }
.settings-card h2 { margin: 0; font-family: "Arial Black", "Trebuchet MS", sans-serif; font-size: 1.35rem; text-transform: uppercase; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.settings-option { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 12px; padding: 13px; border: 2px solid rgba(48, 53, 111, .18); border-radius: 17px 17px 6px 17px; background: var(--white); }
.settings-option > span { width: 45px; height: 45px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 50%; color: var(--blue-900); background: #dbe5f8; }
.settings-option strong, .settings-option small { display: block; }
.settings-option small { margin-top: 3px; color: var(--ink-soft); }
.settings-option select { min-height: 40px; border: 2px solid rgba(48, 53, 111, .18); border-radius: 11px; background: var(--white); }
.simple-switch input { position: absolute; opacity: 0; }
.simple-switch i { position: relative; width: 46px; height: 26px; display: block; border: 2px solid rgba(48, 53, 111, .25); border-radius: 999px; background: #e2e4eb; }
.simple-switch i::after { content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; border-radius: 50%; background: var(--white); box-shadow: 1px 2px 4px rgba(48,53,111,.2); transition: transform .16s ease; }
.simple-switch input:checked + i { background: var(--blue-900); }
.simple-switch input:checked + i::after { transform: translateX(20px); }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(29, 32, 74, .64); backdrop-filter: blur(3px); }
.modal { width: min(540px, 100%); max-height: calc(100vh - 40px); overflow: auto; border: 2px solid var(--line); border-radius: 28px 28px 9px 28px; background: var(--cream); box-shadow: 12px 13px 0 rgba(22, 24, 65, .35); }
.modal--wide { width: min(820px, 100%); }
.modal__header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px 15px; border-bottom: 2px solid rgba(48, 53, 111, .14); background: rgba(251, 247, 236, .97); }
.modal__header h2 { margin: 0; font-family: "Arial Black", "Trebuchet MS", sans-serif; font-size: 1.45rem; text-transform: uppercase; }
.modal__content { padding: 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.modal-actions--spread { justify-content: space-between; }
.modal-actions--spread > div { display: flex; gap: 8px; }
.details-list { display: grid; gap: 0; margin: 0; }
.details-list > div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(48, 53, 111, .12); }
.details-list dt { color: var(--ink-soft); font-size: .76rem; }
.details-list dd { margin: 0; overflow-wrap: anywhere; }
.details-list code { padding: 4px 7px; border-radius: 6px; background: var(--blue-100); font-size: .74rem; }
.details-list.compact { margin-top: 18px; }
.action-list { display: grid; gap: 7px; }
.action-list button { padding: 12px; border: 2px solid rgba(48, 53, 111, .13); border-radius: 12px; background: var(--white); font-weight: 800; text-align: left; }
.action-list button:hover { background: var(--blue-100); }
.action-list .danger { color: #994b53; background: #fff0ee; }

/* Prejoin */
.prejoin-page { min-height: 100vh; padding: 24px; background: radial-gradient(circle at 12px 12px, rgba(48, 53, 111, .035) 1.1px, transparent 1.4px) 0 0 / 22px 22px, var(--cream); }
.prejoin-page > header { width: min(1180px, 100%); margin: 0 auto 24px; }
.prejoin-card { width: min(1180px, 100%); display: grid; grid-template-columns: 1.35fr .9fr; gap: 28px; margin: 0 auto; padding: 24px; border: 2px solid var(--line); border-radius: 30px 30px 10px 30px; background: var(--white); box-shadow: 10px 11px 0 rgba(48,53,111,.14); }
.camera-preview { position: relative; min-height: 530px; display: grid; place-items: center; align-content: center; gap: 14px; overflow: hidden; border: 2px solid var(--line); border-radius: 22px 22px 7px 22px; color: rgba(255,255,255,.8); background: linear-gradient(145deg, #363a8f, #728fd2); }
.camera-preview::before { content: ""; position: absolute; width: 420px; height: 260px; right: -100px; bottom: -120px; border: 3px solid rgba(255,255,255,.26); border-radius: 50%; transform: rotate(-11deg); }
.avatar-large { width: 105px; height: 105px; display: grid; place-items: center; border: 3px solid var(--white); border-radius: 50%; color: var(--blue-900); background: var(--lemon); font-size: 2.3rem; font-weight: 900; box-shadow: 6px 7px 0 rgba(29,32,74,.25); }
.prejoin-controls { position: absolute; left: 50%; bottom: 22px; display: flex; gap: 10px; transform: translateX(-50%); }
.prejoin-controls button { display: flex; align-items: center; gap: 7px; padding: 10px 12px; border: 2px solid var(--white); border-radius: 13px; color: #9c4a53; background: var(--white); font-weight: 800; }
.prejoin-controls button.is-on { color: var(--blue-900); background: var(--lemon); }
.prejoin-form { align-self: center; padding: 20px 12px; }
.prejoin-form h1 { margin-bottom: 9px; font-family: "Arial Black", "Trebuchet MS", sans-serif; font-size: 2.1rem; line-height: 1; text-transform: uppercase; }
.prejoin-form > p:not(.eyebrow) { margin-bottom: 25px; color: var(--ink-soft); }
.prejoin-form .field { margin-bottom: 15px; }
.prejoin-form .button--large, .prejoin-form .text-button { width: 100%; margin-top: 8px; }

/* Room */
.room-page { height: 100vh; display: grid; grid-template-rows: 58px minmax(0, 1fr) 82px; overflow: hidden; color: #fff; background: #191b38; }
.room-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 19px; border-bottom: 1px solid rgba(255,255,255,.11); background: #2a2d70; }
.room-header > div:first-child { display: flex; align-items: center; gap: 14px; }
.room-header span { color: #ffb9b2; font-size: .72rem; }
.room-clock { color: rgba(255,255,255,.68); font-variant-numeric: tabular-nums; font-size: .78rem; }
.room-workspace { min-height: 0; display: grid; grid-template-columns: 1fr; }
.room-workspace.has-panel { grid-template-columns: minmax(0, 1fr) 310px; }
.room-stage { position: relative; min-height: 0; overflow: hidden; background: #15162f; }
.room-panel { min-width: 0; display: grid; grid-template-rows: 54px minmax(0, 1fr); border-left: 1px solid rgba(255,255,255,.12); background: #2d306a; }
.room-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.11); }
.room-panel > header button { border: 0; color: #fff; background: transparent; font-size: 1.4rem; }
.participant-list { padding: 10px; }
.participant-list > div { display: grid; grid-template-columns: 39px 1fr auto; align-items: center; gap: 9px; padding: 10px; border-radius: 12px; }
.participant-list > div:hover { background: rgba(255,255,255,.07); }
.participant-list > div > span { width: 39px; height: 39px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.7); border-radius: 50%; color: var(--blue-900); background: var(--lemon); font-weight: 900; }
.participant-list strong, .participant-list small { display: block; }
.participant-list small { margin-top: 2px; color: rgba(255,255,255,.56); font-size: .65rem; }
.chat-panel { min-height: 0; display: grid; grid-template-rows: 1fr auto; }
.chat-empty { display: grid; place-items: center; color: rgba(255,255,255,.45); }
.chat-panel form { display: grid; grid-template-columns: 1fr auto; gap: 7px; padding: 10px; border-top: 1px solid rgba(255,255,255,.1); }
.chat-panel input { min-width: 0; padding: 10px; border: 0; border-radius: 10px; }
.chat-panel button { width: 40px; border: 0; border-radius: 10px; color: var(--blue-900); background: var(--lemon); }
.video-grid { height: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; }
.video-tile { display: grid; place-items: center; align-content: center; gap: 14px; border: 2px solid rgba(255,255,255,.12); border-radius: 16px; background: #30336f; }
.video-tile span { width: 92px; height: 92px; display: grid; place-items: center; border: 3px solid rgba(255,255,255,.74); border-radius: 50%; color: var(--blue-900); background: var(--lemon); font-size: 2rem; font-weight: 900; }
.floating-videos { position: absolute; z-index: 5; right: 17px; bottom: 17px; display: flex; gap: 8px; padding: 8px; border: 1px solid rgba(255,255,255,.17); border-radius: 14px; background: rgba(30,32,73,.86); box-shadow: 0 10px 30px rgba(0,0,0,.25); cursor: move; }
.floating-videos > div { position: relative; width: 126px; height: 82px; display: grid; place-items: center; border-radius: 10px; background: #41458e; }
.floating-videos > div span { width: 41px; height: 41px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; color: var(--blue-900); background: var(--lemon); font-weight: 900; }
.floating-videos small { position: absolute; left: 7px; bottom: 5px; font-size: .58rem; }
.room-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 14px; border-top: 1px solid rgba(255,255,255,.1); background: #2a2d70; }
.room-controls > div { display: flex; align-items: center; gap: 4px; }
.room-controls button:not(.leave-button) { min-width: 72px; height: 61px; display: grid; place-items: center; align-content: center; gap: 4px; padding: 4px 8px; border: 0; border-radius: 11px; color: rgba(255,255,255,.73); background: transparent; }
.room-controls button:not(.leave-button):hover, .room-controls button.is-on { color: #fff; background: rgba(255,255,255,.1); }
.room-controls button.is-off, .room-controls button.is-recording { color: #ffaaa4; }
.room-controls button span { font-size: .59rem; }
.leave-button { padding: 12px 18px; border: 2px solid #dc8e91; border-radius: 12px; color: #fff; background: #9f4d56; font-weight: 800; }

/* Whiteboard */
.whiteboard { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); color: var(--ink); background: #f5f5f1; }
.whiteboard__tools { min-height: 59px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; overflow-x: auto; border-bottom: 2px solid rgba(48, 53, 111, .18); background: var(--cream); box-shadow: 0 3px 0 rgba(48,53,111,.06); }
.tool-cluster, .eraser-cluster { display: flex; gap: 5px; }
.eraser-cluster { padding-left: 5px; border-left: 1px solid rgba(48,53,111,.16); }
.tool-button { min-height: 39px; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 2px solid rgba(48, 53, 111, .18); border-radius: 11px; color: var(--ink); background: var(--white); font-size: .72rem; font-weight: 800; }
.tool-button:hover { background: var(--blue-100); }
.tool-button.is-active { border-color: var(--blue-900); color: #fff; background: var(--blue-900); box-shadow: 2px 3px 0 var(--blue-300); }
.tool-button--danger { color: #974850; }
.tool-button svg { width: 17px; height: 17px; }
.tool-divider { width: 1px; height: 31px; flex: 0 0 auto; background: rgba(48,53,111,.16); }
.color-control, .range-control, .select-control { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: .68rem; font-weight: 800; }
.color-control input { width: 34px; height: 34px; padding: 2px; border: 2px solid rgba(48,53,111,.18); border-radius: 10px; background: var(--white); }
.range-control input { width: 95px; accent-color: var(--blue-900); }
.select-control select { min-height: 38px; padding: 7px 9px; border: 2px solid rgba(48,53,111,.18); border-radius: 10px; color: var(--ink); background: var(--white); }
.background-control { gap: 5px; }
.background-control > svg { width: 18px; height: 18px; color: var(--blue-900); }
.whiteboard__surface { position: relative; min-height: 0; overflow: hidden; background-color: #fff; touch-action: none; }
.whiteboard__surface--grid { background-image: linear-gradient(#dce5eb 1px, transparent 1px), linear-gradient(90deg, #dce5eb 1px, transparent 1px); background-size: 24px 24px; }
.whiteboard__surface--lined { background-image: linear-gradient(#dfe6ea 1px, transparent 1px); background-size: 100% 28px; }
.whiteboard__surface--dots { background-image: radial-gradient(#cfd8df 1.2px, transparent 1.2px); background-size: 22px 22px; }
.whiteboard__surface canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.whiteboard__hint { position: absolute; right: 12px; bottom: 10px; padding: 5px 9px; border: 1px solid rgba(48,53,111,.12); border-radius: 999px; color: var(--ink-soft); background: rgba(255,253,245,.86); font-size: .62rem; pointer-events: none; }
.standalone-board { height: 100vh; display: grid; grid-template-rows: 70px minmax(0, 1fr); overflow: hidden; background: var(--cream); }
.standalone-board > header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 0 18px; border-bottom: 2px solid rgba(48,53,111,.16); background: var(--cream); }
.standalone-board > header > div { text-align: center; }
.standalone-board > header strong, .standalone-board > header span { display: block; }
.standalone-board > header strong { font-family: "Arial Black", "Trebuchet MS", sans-serif; }
.standalone-board > header span { margin-top: 2px; color: var(--ink-soft); font-size: .65rem; }
.standalone-board > header > :last-child { justify-self: end; }

.update-toast { position: fixed; z-index: 300; right: 20px; bottom: 20px; max-width: 360px; padding: 16px; border: 2px solid var(--line); border-radius: 18px 18px 6px 18px; background: var(--lemon); box-shadow: var(--shadow); }
.update-toast p { margin-bottom: 10px; }

@media (max-width: 1180px) {
  .brand { min-width: 210px; }
  .brand__copy small { display: none; }
  .hero { grid-template-columns: minmax(0, .9fr) minmax(380px, 1.1fr); }
  .board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meeting-card { grid-template-columns: 82px minmax(0, 1fr); }
  .meeting-card__actions { grid-column: 2; opacity: 1; transform: none; justify-content: flex-end; }
}

@media (max-width: 980px) {
  .topbar { gap: 14px; padding-inline: 18px; }
  .brand { min-width: auto; }
  .brand__copy { display: none; }
  .desktop-nav a { padding-inline: 11px; }
  .topbar-scribble { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-illustration { position: absolute; inset: 0 0 0 43%; opacity: .88; }
  .hero-copy { max-width: 62%; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .quick-access { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
  .quick-access header { grid-column: 1 / -1; }
  .quick-access__item { margin: 0; }
  .calendar-grid--week { min-width: 980px; }
  .calendar-shell { overflow-x: auto; }
  .calendar-legend, .calendar-doodle { display: none; }
  .calendar-shell { padding-bottom: 0; }
  .recording-card { grid-template-columns: 190px minmax(0, 1fr) auto; }
  .prejoin-card { grid-template-columns: 1fr; }
  .camera-preview { min-height: 390px; }
  .account-settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .app-shell { padding-bottom: 78px; }
  .topbar { position: sticky; min-height: 65px; justify-content: space-between; padding: 9px 15px; }
  .brand__mark { width: 38px; height: 38px; }
  .desktop-nav { display: none; }
  .mobile-nav { position: fixed; z-index: 120; left: 10px; right: 10px; bottom: 9px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border: 2px solid rgba(48,53,111,.2); border-radius: 18px; background: rgba(251,247,236,.96); box-shadow: 0 10px 35px rgba(29,32,74,.2); backdrop-filter: blur(14px); }
  .mobile-nav a { min-height: 52px; display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 12px; color: var(--ink-soft); font-size: .62rem; font-weight: 800; }
  .mobile-nav a.active { color: #fff; background: var(--blue-900); }
  .mobile-nav svg { width: 19px; height: 19px; }
  .page { padding: 20px 14px 35px; }
  .page-heading { min-height: 86px; align-items: center; margin-bottom: 20px; }
  .page-heading h1 { font-size: 2.45rem; }
  .page-heading .button { min-height: 40px; padding-inline: 11px; font-size: .75rem; }
  .heading-stroke { display: none; }
  .hero { min-height: 430px; margin-top: 0; border-radius: 28px 28px 28px 9px; }
  .hero-copy { max-width: none; align-self: start; padding: 32px 24px; }
  .hero h1 { font-size: clamp(3.25rem, 17vw, 5.3rem); }
  .hero-illustration { inset: 42% -15% -5% 6%; opacity: .9; }
  .hero-actions { position: relative; z-index: 3; }
  .button--hero-primary, .button--hero-secondary { width: 100%; }
  .today-panel { min-height: 0; padding: 23px 18px; }
  .section-heading { align-items: start; }
  .section-heading h2 { font-size: 1.65rem; }
  .quick-access { grid-template-columns: 1fr; padding: 25px 20px; }
  .meeting-card { grid-template-columns: 72px minmax(0, 1fr); gap: 11px; padding: 13px; }
  .meeting-card__time strong { font-size: 1.12rem; }
  .meeting-card__title-row { align-items: flex-start; }
  .meeting-status { display: none; }
  .meeting-card__meta { gap: 5px 9px; }
  .meeting-card__actions { grid-column: 1 / -1; }
  .meeting-action { flex: 1; }
  .meeting-action span { display: inline; }
  .section-toolbar, .library-toolbar, .calendar-toolbar { display: grid; gap: 12px; }
  .calendar-navigation { display: grid; grid-template-columns: auto 1fr auto; }
  .calendar-navigation > div { min-width: 0; }
  .calendar-navigation h2 { font-size: .95rem; }
  .today-button { grid-column: 1 / -1; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .calendar-shell { display: none; }
  .calendar-mobile-list { display: grid; gap: 12px; }
  .calendar-mobile-list .section-heading > svg { width: 31px; height: 31px; color: var(--blue-700); }
  .boards-intro, .recordings-intro, .account-identity-card { align-items: flex-start; padding: 20px; }
  .boards-intro__stats { display: none; }
  .boards-intro h2, .recordings-intro h2, .account-identity-card h2 { font-size: 1.12rem; }
  .boards-intro p, .recordings-intro p, .account-identity-card p { font-size: .78rem; }
  .library-toolbar .tabs { width: 100%; }
  .library-toolbar .tabs button { flex: 1; }
  .search { min-width: 0; }
  .library-toolbar > select { width: 100%; min-width: 0; }
  .board-grid { grid-template-columns: 1fr; }
  .recording-card { grid-template-columns: 120px minmax(0, 1fr); min-height: 104px; padding-right: 11px; gap: 12px; }
  .recording-card > svg { display: none; }
  .recording-thumb { height: 104px; }
  .recording-thumb__board { left: 9px; top: 12px; width: 78px; height: 65px; padding: 8px; }
  .recording-thumb__board span, .recording-thumb__board b { font-size: .48rem; }
  .recording-thumb__people { right: 5px; top: 8px; }
  .recording-thumb__people span { width: 24px; height: 24px; font-size: .55rem; }
  .recording-info__title { display: block; }
  .recording-status { display: inline-flex; margin-top: 5px; }
  .recording-info p { margin: 5px 0 8px; font-size: .68rem; }
  .recording-info > div:last-child { gap: 5px 9px; font-size: .62rem; }
  .storage-pill { min-width: 145px; }
  .settings-grid { grid-template-columns: 1fr; }
  .account-chip { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .field--full { grid-column: auto; }
  .modal { max-height: calc(100vh - 20px); border-radius: 22px 22px 7px 22px; }
  .modal-actions--spread { display: grid; }
  .modal-actions--spread > div { display: grid; }
  .details-list > div { grid-template-columns: 110px 1fr; }
  .prejoin-page { padding: 14px; }
  .prejoin-card { padding: 14px; }
  .camera-preview { min-height: 330px; }
  .prejoin-controls { width: calc(100% - 28px); }
  .prejoin-controls button { flex: 1; justify-content: center; font-size: .68rem; }
  .room-page { grid-template-rows: 52px minmax(0, 1fr) 76px; }
  .room-workspace.has-panel { grid-template-columns: 1fr; }
  .room-panel { position: absolute; z-index: 15; inset: 52px 0 76px auto; width: min(310px, 88vw); }
  .room-controls { overflow-x: auto; }
  .room-controls > div { min-width: max-content; }
  .room-controls button:not(.leave-button) { min-width: 61px; }
  .leave-button { position: sticky; right: 0; }
  .floating-videos > div { width: 86px; height: 60px; }
  .whiteboard__tools { padding: 6px; }
  .tool-button span, .color-control > span, .range-control > span, .select-control > span { display: none; }
  .range-control input { width: 72px; }
  .standalone-board > header { grid-template-columns: auto 1fr auto; gap: 8px; padding: 0 8px; }
  .standalone-board > header .button { padding-inline: 9px; font-size: .67rem; }
  .standalone-board > header span { display: none; }
}

@media (max-width: 480px) {
  .page-heading { display: grid; align-items: start; }
  .page-heading .button, .page-heading .storage-pill { justify-self: stretch; width: 100%; }
  .hero { min-height: 470px; }
  .hero-copy { padding-inline: 20px; }
  .hero-illustration { inset: 47% -28% -4% -2%; }
  .meeting-card__meta span:first-child { display: none; }
  .board-card__meta { padding-right: 82px; }
  .recording-card { grid-template-columns: 105px minmax(0, 1fr); }
  .recording-thumb { height: 112px; }
  .recording-info h3 { font-size: .88rem; }
  .recording-info > div:last-child span:last-child { display: none; }
  .prejoin-controls button { padding-inline: 7px; }
  .prejoin-controls button svg { width: 17px; height: 17px; }
  .prejoin-controls button { font-size: 0; }
  .room-header strong { max-width: 65vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .room-controls button span { display: none; }
  .room-controls button:not(.leave-button) { min-width: 45px; height: 50px; }
}

/* Teach.Room 1.0.1 — functional internet layer */
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

/* The modal must completely separate itself from the illustrated hero behind it. */
.modal-backdrop { background: rgba(24, 27, 67, .88); backdrop-filter: blur(12px) saturate(.62); }
.modal { isolation: isolate; overflow: auto; background: #fbf7ec; }
.modal__header, .modal__content { position: relative; background: #fbf7ec; }
.modal__content { z-index: 1; }

/* Meaningful meeting colors: recurring / single / live / finished / cancelled. */
.meeting-card--recurring { background: #dbe5f8; border-left: 6px solid #3766d6; }
.meeting-card--single { background: #fff8d9; border-left: 6px solid #c79d35; }
.meeting-card--instant, .meeting-card--live { background: #f6d9cf; border-left: 6px solid #b76f60; }
.meeting-card--finished { background: #edf0f6; border-left: 6px solid #8e96ad; }
.meeting-card--cancelled { background: #f3e5e1; border-left: 6px solid #aa7473; }
.meeting-kind-label { color: #7a641f; font-weight: 800; }

.calendar-meaning { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 18px; padding: 13px 17px; overflow: visible; background: #fffdf5; }
.calendar-meaning > div { margin-right: auto; }
.calendar-meaning > div strong { display: block; font-size: .82rem; }
.calendar-meaning > span { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: .72rem; font-weight: 800; }
.legend-swatch { width: 13px; height: 13px; display: inline-block; border: 2px solid rgba(48,53,111,.25); border-radius: 4px; }
.legend-swatch--recurring { background: #dbe5f8; border-left-color: #3766d6; }
.legend-swatch--single { background: #fff4bf; border-left-color: #c79d35; }
.legend-swatch--live { background: #f6d9cf; border-left-color: #b76f60; }
.legend-swatch--finished { background: #edf0f6; border-left-color: #8e96ad; }
.legend-swatch--cancelled { background: #f3e5e1; border-left-color: #aa7473; }
.calendar-event--recurring { border-left-color: #3766d6; background: #dce7fa; }
.calendar-event--single { border-left-color: #c79d35; background: #fff4bf; }
.calendar-event--instant, .calendar-event--live { border-left-color: #b76f60; background: #f6d8cd; }
.calendar-event--finished { border-left-color: #8e96ad; background: #edf0f6; opacity: .82; }
.calendar-event--cancelled { border-left-color: #aa7473; background: #f3e5e1; opacity: .68; text-decoration: line-through; }

/* Recurring meeting editor */
.segmented--form { width: fit-content; }
.meeting-repeat-switch { align-items: start; }
.recurrence-editor { gap: 16px; padding: 17px; border: 2px solid rgba(48,53,111,.18); border-radius: 18px 18px 6px 18px; background: #eaf0fc; }
.recurrence-period { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.recurrence-section { display: grid; gap: 10px; padding-top: 13px; border-top: 1px solid rgba(48,53,111,.13); }
.field-caption { color: var(--ink-soft); font-size: .78rem; font-weight: 800; }
.weekday-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.weekday-picker button { width: 43px; height: 39px; border: 2px solid rgba(48,53,111,.18); border-radius: 12px; color: var(--ink-soft); background: var(--white); font-weight: 900; }
.weekday-picker button.is-active { border-color: var(--blue-900); color: #fff; background: var(--blue-900); box-shadow: 2px 3px 0 var(--blue-300); }
.weekday-times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.weekday-times label { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 2px solid rgba(48,53,111,.14); border-radius: 12px; background: var(--white); }
.weekday-times label span { font-size: .72rem; font-weight: 800; }
.weekday-times input { width: 112px; min-height: 36px; padding: 5px 8px; border: 1px solid rgba(48,53,111,.2); border-radius: 9px; }
.exception-adder { display: flex; gap: 9px; }
.exception-adder input { min-height: 42px; flex: 1; padding: 8px 10px; border: 2px solid rgba(48,53,111,.18); border-radius: 12px; background: var(--white); }
.exception-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.exception-chips button { padding: 6px 9px; border: 1px solid rgba(48,53,111,.18); border-radius: 999px; color: var(--blue-900); background: var(--lemon); font-size: .7rem; font-weight: 800; }
.hint { margin: 0; color: var(--ink-soft); font-size: .7rem; }
.form-error { padding: 10px 12px; border: 2px solid rgba(55,102,214,.24); border-radius: 12px; color: var(--blue-900); background: #e6edfc; font-size: .78rem; font-weight: 800; }

/* Record errors stay in the product palette instead of a red alarm block. */
.recording-status--error { color: #354f91; background: #dce7fa; }
.recording-card:has(.recording-status--error) { background: #f1f5fd; }

/* Real board additions */
.whiteboard__tools { scrollbar-width: thin; }
.whiteboard__hint { max-width: min(430px, 80%); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Real camera preview */
.camera-preview > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.camera-preview > span { position: relative; z-index: 2; padding: 5px 9px; border-radius: 999px; background: rgba(29,32,74,.55); }
.prejoin-controls { z-index: 3; }
.prejoin-note { margin-top: 13px !important; margin-bottom: 0 !important; padding: 9px 11px; border-radius: 11px; color: var(--ink-soft) !important; background: var(--blue-100); font-size: .68rem; }

/* LiveKit room */
.room-connection { color: #b9d8c8 !important; }
.live-video-tile { position: relative; min-width: 0; min-height: 0; display: grid; place-items: center; overflow: hidden; border: 2px solid rgba(255,255,255,.12); border-radius: 16px; background: #30336f; }
.live-video-tile.is-speaking { border-color: var(--lemon); box-shadow: 0 0 0 3px rgba(255,240,169,.18); }
.live-video-tile video { width: 100%; height: 100%; object-fit: cover; }
.live-video-tile > span { width: 88px; height: 88px; display: grid; place-items: center; border: 3px solid rgba(255,255,255,.74); border-radius: 50%; color: var(--blue-900); background: var(--lemon); font-size: 2rem; font-weight: 900; }
.live-video-tile small { position: absolute; left: 9px; bottom: 7px; padding: 3px 6px; border-radius: 6px; color: #fff; background: rgba(24,27,67,.7); font-size: .62rem; }
.live-video-tile.is-compact { width: 126px; height: 82px; border-radius: 10px; }
.live-video-tile.is-compact > span { width: 41px; height: 41px; border-width: 2px; font-size: 1rem; }
.video-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.video-grid.has-screen-share { grid-template-columns: 1fr; }
.video-grid.has-screen-share .live-video-tile { border-radius: 10px; }
.floating-videos .live-video-tile { flex: 0 0 auto; }
.chat-messages { min-height: 0; overflow: auto; padding: 12px; }
.chat-messages > div { margin-bottom: 10px; padding: 8px 10px; border-radius: 11px 11px 4px 11px; background: rgba(255,255,255,.08); }
.chat-messages strong { display: block; margin-bottom: 2px; font-size: .68rem; }
.chat-messages p { margin: 0; color: rgba(255,255,255,.8); font-size: .74rem; }

.room-setup { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 12px 12px, rgba(48,53,111,.04) 1px, transparent 1.4px) 0 0 / 22px 22px, var(--cream); }
.setup-card { width: min(620px, 100%); padding: 30px; border: 2px solid var(--line); border-radius: 28px 28px 9px 28px; background: var(--white); box-shadow: var(--shadow); }
.setup-card h1 { font-family: "Arial Black", "Trebuchet MS", sans-serif; line-height: 1; text-transform: uppercase; }
.setup-card ol { padding-left: 22px; color: var(--ink-soft); }
.setup-card code { padding: 2px 5px; border-radius: 5px; background: var(--blue-100); }
.setup-spinner { width: 42px; height: 42px; display: block; margin-bottom: 15px; border: 4px solid var(--blue-200); border-top-color: var(--blue-900); border-radius: 50%; animation: teach-room-spin .8s linear infinite; }
@keyframes teach-room-spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .calendar-meaning { display: grid; grid-template-columns: 1fr 1fr; }
  .calendar-meaning > div { grid-column: 1 / -1; }
  .recurrence-period, .weekday-times { grid-template-columns: 1fr; }
  .exception-adder { display: grid; }
  .live-video-tile.is-compact { width: 86px; height: 60px; }
  .room-connection { display: none; }
}

/* Teach.Room — shared account and recording */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1.08fr) minmax(360px, .92fr); padding: clamp(18px, 4vw, 54px); gap: clamp(20px, 4vw, 58px); align-items: stretch; background: radial-gradient(circle at 12px 12px, rgba(48,53,111,.04) 1px, transparent 1.4px) 0 0 / 22px 22px, var(--cream); }
.auth-page--single { grid-template-columns: minmax(320px, 620px); place-content: center; }
.auth-brand-panel, .auth-card { position: relative; overflow: hidden; border: 2px solid var(--line); background: var(--white); box-shadow: var(--shadow); }
.auth-brand-panel { min-height: 620px; display: grid; align-content: space-between; padding: 34px clamp(28px, 5vw, 68px); border-radius: 40px 40px 12px 40px; color: #fff; background: var(--blue-900); }
.auth-brand-panel .logo__text strong, .auth-brand-panel .logo__text small { color: #fff; }
.auth-brand-panel .logo-mark path { stroke: var(--blue-200); }
.auth-brand-panel h1 { max-width: 680px; margin: 8px 0 18px; font-family: "Arial Black", "Trebuchet MS", sans-serif; font-size: clamp(2.3rem, 6vw, 5.3rem); line-height: .94; text-transform: uppercase; }
.auth-brand-panel p { max-width: 620px; color: rgba(255,255,255,.76); font-size: 1rem; line-height: 1.55; }
.auth-brand-panel .eyebrow { color: var(--lemon); }
.auth-brand-art { position: absolute; right: -7%; bottom: -11%; width: min(42vw, 480px); aspect-ratio: 1.2; border: 3px solid rgba(255,255,255,.28); border-radius: 50% 48% 16% 52%; transform: rotate(-8deg); }
.auth-brand-art span, .auth-brand-art i { position: absolute; border: 3px solid var(--blue-200); border-radius: 50%; }
.auth-brand-art span { width: 46%; height: 46%; left: 10%; top: 15%; }
.auth-brand-art i { width: 25%; height: 25%; right: 16%; bottom: 20%; background: var(--peach); }
.auth-brand-art b { position: absolute; left: 28%; top: 48%; color: var(--lemon); font-family: Georgia, serif; font-size: clamp(2rem, 5vw, 4.6rem); font-style: italic; transform: rotate(8deg); }
.auth-card { align-self: center; padding: clamp(28px, 5vw, 54px); border-radius: 36px 36px 10px 36px; }
.auth-card > .logo { margin-bottom: 35px; }
.auth-card h1, .auth-card h2 { margin: 8px 0 18px; color: var(--ink); font-family: "Arial Black", "Trebuchet MS", sans-serif; line-height: 1.03; text-transform: uppercase; }
.auth-card form { display: grid; gap: 14px; margin-top: 24px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 28px; padding: 5px; border-radius: 16px; background: var(--blue-100); }
.auth-tabs button { flex: 1; min-height: 42px; border: 0; border-radius: 12px; color: var(--ink-soft); background: transparent; font-weight: 900; }
.auth-tabs button.is-active { color: #fff; background: var(--blue-900); box-shadow: 3px 4px 0 var(--blue-300); }
.auth-text-button { margin-top: 14px; border: 0; color: var(--blue-900); background: transparent; font-weight: 800; text-decoration: underline; }
.form-success { padding: 10px 12px; border: 2px solid rgba(62,132,98,.22); border-radius: 12px; color: #315f48; background: #e3f1e8; font-size: .78rem; font-weight: 800; }

.prejoin-meeting-time { margin: 12px 0 18px; padding: 9px 12px; border: 2px solid rgba(48,53,111,.13); border-radius: 12px; color: var(--blue-900); background: var(--blue-100); font-size: .76rem; font-weight: 800; }
.room-page { grid-template-rows: 58px auto minmax(0, 1fr) 82px; }
.room-header__status { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.room-notice { max-width: min(42vw, 520px); overflow: hidden; color: rgba(255,255,255,.78) !important; text-overflow: ellipsis; white-space: nowrap; }
.recording-live-dot { color: #ffbbb4 !important; font-weight: 900; }
.permission-requests { display: grid; gap: 6px; padding: 7px 12px; border-bottom: 1px solid rgba(255,255,255,.12); background: #343879; }
.permission-requests > div { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 10px; background: rgba(255,255,255,.08); font-size: .72rem; }
.permission-requests span { flex: 1; }
.permission-requests button { min-height: 30px; padding: 4px 9px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; color: #fff; background: transparent; font-weight: 800; }
.permission-requests button.button--primary { border-color: var(--lemon); color: var(--blue-900); background: var(--lemon); }
.participant-list > div.has-raised-hand { background: rgba(255,240,169,.13); }
.participant-actions { margin-left: auto; display: flex !important; gap: 5px; }
.participant-actions button { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.15); border-radius: 8px; color: #fff; background: rgba(255,255,255,.06); }
.participant-actions button svg { width: 16px; height: 16px; }
.participant-access { display: grid !important; grid-template-columns: 1fr !important; gap: 7px !important; padding: 12px !important; background: rgba(255,255,255,.05) !important; }
.participant-access span { width: auto !important; height: auto !important; display: block !important; border: 0 !important; color: rgba(255,255,255,.72) !important; background: transparent !important; font-size: .66rem !important; }
.participant-access select { width: 100%; min-height: 35px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; color: #fff; background: #24275d; }

.board-access-settings { display: grid; gap: 16px; }
.board-access-settings > p, .board-access-settings > small { margin: 0; color: var(--ink-soft); line-height: 1.45; }
.share-link-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px; border: 2px solid rgba(48,53,111,.15); border-radius: 14px; background: var(--blue-100); }
.share-link-box code { min-width: 0; align-self: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shared-board .logo { flex: 0 0 auto; }
.shared-board > header { gap: 24px; }
.shared-board > header > div { flex: 1; }

.recording-player video { width: 100%; max-height: 62vh; display: block; border-radius: 13px; background: #12142d; }
.recording-template { width: 100vw; height: 100vh; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 270px; overflow: hidden; color: #fff; background: #161832; }
.recording-template__stage { min-width: 0; min-height: 0; position: relative; overflow: hidden; background: #fff; }
.recording-template__stage .whiteboard { height: 100%; }
.recording-template__stage .whiteboard__zoom, .recording-template__stage .whiteboard__hint { display: none; }
.recording-template__screen, .recording-template__screen video { width: 100%; height: 100%; object-fit: contain; background: #111329; }
.recording-template__people { display: grid; grid-auto-rows: minmax(0, 1fr); gap: 8px; padding: 8px; background: #292c68; }
.recording-template__person { min-height: 0; position: relative; display: grid; place-items: center; overflow: hidden; border: 3px solid transparent; border-radius: 12px; background: #353978; }
.recording-template__person.is-speaking { border-color: var(--lemon); }
.recording-template__person video { width: 100%; height: 100%; object-fit: cover; }
.recording-template__person span { position: absolute; left: 7px; bottom: 6px; padding: 3px 6px; border-radius: 5px; background: rgba(20,22,53,.72); font-size: .65rem; }
.recording-template__avatar b { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; color: var(--blue-900); background: var(--lemon); font-size: 1.8rem; }
.recording-template__brand { position: absolute; left: 16px; top: 14px; z-index: 8; padding: 5px 9px; border-radius: 8px; color: var(--blue-900); background: rgba(255,253,245,.88); font-weight: 900; }
.recording-template--empty { display: grid; place-content: center; padding: 40px; text-align: center; }

@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 360px; }
  .room-header__status .room-notice { display: none; }
  .recording-template { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) 150px; }
  .recording-template__people { grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow: hidden; }
}
@media (max-width: 640px) {
  .auth-page { padding: 10px; }
  .auth-brand-panel { display: none; }
  .auth-card { padding: 24px 18px; border-radius: 25px 25px 8px 25px; }
  .permission-requests > div { align-items: stretch; flex-wrap: wrap; }
  .permission-requests span { flex-basis: 100%; }
  .room-page { grid-template-rows: 52px auto minmax(0, 1fr) 68px; }
  .room-header__status .recording-live-dot { font-size: 0; }
  .room-header__status .recording-live-dot::before { content: '●'; font-size: .8rem; }
  .share-link-box { grid-template-columns: 1fr; }
}

/* Teach.Room 1.0.1: transparent synchronous annotations over screen sharing. */
.whiteboard__surface--transparent {
  background: transparent !important;
  background-image: none !important;
}
.whiteboard__surface--transparent .whiteboard__hint {
  background: rgba(24, 28, 67, .72);
  color: #fff;
}
.screen-annotation-layer {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  min-width: 0;
  min-height: 0;
  pointer-events: auto;
}
.screen-annotation-layer .whiteboard {
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: transparent;
}
.screen-annotation-layer .whiteboard__tools {
  position: absolute;
  z-index: 4;
  top: 10px;
  left: 50%;
  max-width: calc(100% - 24px);
  transform: translateX(-50%);
  border: 1px solid rgba(53, 56, 143, .28);
  border-radius: 17px;
  background: rgba(255, 253, 246, .94);
  box-shadow: 5px 6px 0 rgba(25, 30, 87, .16);
  backdrop-filter: blur(10px);
}
.screen-annotation-layer .whiteboard__surface {
  flex: 1;
  width: 100%;
  height: 100%;
}
.recording-template__screen {
  position: relative;
  overflow: hidden;
}
.recording-template__annotation {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.recording-template__annotation .whiteboard,
.recording-template__annotation .whiteboard__surface {
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: transparent !important;
}
.recording-template__annotation .whiteboard__zoom,
.recording-template__annotation .whiteboard__hint {
  display: none;
}
.room-controls button:disabled {
  opacity: .38;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .screen-annotation-layer .whiteboard__tools {
    top: 6px;
    left: 6px;
    right: 6px;
    max-width: none;
    transform: none;
  }
}
.screen-annotation-layer .whiteboard,
.recording-template__annotation .whiteboard {
  display: block;
  position: relative;
}
.screen-annotation-layer .whiteboard__surface,
.recording-template__annotation .whiteboard__surface {
  position: absolute;
  inset: 0;
}

.room-board-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  font-weight: 800;
}
.room-board-picker svg { width: 17px; height: 17px; }
.room-board-chooser {
  position: fixed;
  z-index: 160;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(18, 21, 61, .72);
  backdrop-filter: blur(6px);
}
.room-board-chooser__card {
  width: min(620px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  padding: 22px;
  border: 2px solid var(--line);
  border-radius: 28px 28px 9px 28px;
  color: var(--ink);
  background: var(--cream);
  box-shadow: 10px 11px 0 rgba(18, 21, 61, .27);
}
.room-board-chooser__card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.room-board-chooser__card > header strong { display: block; font-size: 1.15rem; }
.room-board-chooser__card > header button {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(48, 53, 111, .2);
  border-radius: 50%;
  color: var(--ink);
  background: var(--white);
  font-size: 1.35rem;
}
.room-board-chooser__new {
  width: 100%;
  margin-bottom: 12px;
  padding: 13px 16px;
  border: 2px solid var(--blue-900);
  border-radius: 14px;
  color: var(--blue-900);
  background: var(--lemon);
  font-weight: 900;
}
.room-board-chooser__list { display: grid; gap: 9px; }
.room-board-chooser__list > button {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 2px solid rgba(48, 53, 111, .16);
  border-radius: 15px;
  color: var(--ink);
  text-align: left;
  background: var(--white);
}
.room-board-chooser__list > button:hover,
.room-board-chooser__list > button.is-active { border-color: var(--blue-900); background: var(--blue-100); }
.room-board-chooser__list strong,
.room-board-chooser__list small { display: block; }
.room-board-chooser__list small { margin-top: 3px; color: var(--ink-soft); }
.room-board-chooser__list b { color: var(--blue-900); font-size: .7rem; }
.board-mini-pattern {
  width: 76px;
  height: 48px;
  display: block;
  border: 1px solid rgba(48, 53, 111, .18);
  border-radius: 9px;
  background-color: #fffdf6;
}
.board-mini-pattern--grid { background-image: linear-gradient(#dce5eb 1px, transparent 1px), linear-gradient(90deg, #dce5eb 1px, transparent 1px); background-size: 12px 12px; }
.board-mini-pattern--lined { background-image: linear-gradient(#dfe6ea 1px, transparent 1px); background-size: 100% 12px; }
.board-mini-pattern--dots { background-image: radial-gradient(#cfd8df 1px, transparent 1px); background-size: 10px 10px; }

.prejoin-device-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.prejoin-switch {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 2px solid rgba(48, 53, 111, .14);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(218, 229, 247, .48);
  font-size: .76rem;
  font-weight: 800;
}
.prejoin-switch input { width: 18px; height: 18px; accent-color: var(--blue-900); }
.microphone-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3e6ef;
}
.microphone-meter span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-300), var(--blue-900));
  transition: width .08s linear;
}
@media (max-width: 640px) {
  .prejoin-device-grid { grid-template-columns: 1fr; }
}

/* Teach.Room 1.0.1 — complete email confirmation flow */
.auth-confirmation-panel { display: grid; gap: 14px; margin-top: 22px; }
.auth-confirmation-panel > p { margin: 0; }
.auth-confirmation-icon { display: grid; place-items: center; width: 62px; height: 62px; border: 2px solid var(--line); border-radius: 18px 18px 6px 18px; background: var(--yellow); box-shadow: 5px 5px 0 rgba(48,53,111,.14); color: var(--blue-900); font-size: 1.8rem; }
.auth-email-pill { display: block; width: fit-content; max-width: 100%; padding: 9px 13px; overflow-wrap: anywhere; border: 1px solid rgba(48,53,111,.22); border-radius: 999px; background: var(--blue-100); color: var(--ink); }
.auth-inline-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.auth-inline-row .auth-text-button { margin-top: 12px; padding: 0; }
.auth-form-note { color: var(--muted); line-height: 1.45; }
.account-chip--warning { border-color: rgba(139,111,31,.25); color: #6f591c; background: var(--yellow); }
.account-email-status { display: grid; gap: 5px; margin-top: 18px; padding: 14px 16px; border: 2px solid var(--line-soft); border-radius: 18px 18px 6px 18px; }
.account-email-status span { color: var(--muted); font-size: .82rem; line-height: 1.45; }
.account-email-status .button { width: fit-content; margin-top: 8px; }
.account-email-status.is-verified { background: var(--blue-100); }
.account-email-status.is-pending { background: var(--yellow-soft, #fff7c7); }

/* Teach.Room 1.0.1 — resilient media and mobile connection states */
.prejoin-quality-hint,
.prejoin-browser-warning {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border: 2px solid rgba(48, 53, 111, .14);
  border-radius: 14px 14px 5px 14px;
  color: var(--ink);
  background: rgba(218, 229, 247, .5);
}
.prejoin-quality-hint strong { color: var(--blue-900); font-size: .78rem; }
.prejoin-quality-hint span { color: var(--ink-soft); font-size: .75rem; line-height: 1.4; }
.prejoin-browser-warning { border-color: rgba(155, 117, 31, .28); background: #fff4bf; font-size: .78rem; line-height: 1.45; }

.room-connection--excellent,
.room-connection--good { color: #d8f4e4; }
.room-connection--poor { color: #fff0aa; }
.room-connection--lost { color: #ffd7cd; }
.room-network-banner,
.room-audio-warning {
  position: relative;
  z-index: 80;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  color: #fff;
  background: #2f4f87;
  box-shadow: 0 4px 14px rgba(13, 18, 59, .18);
}
.room-network-banner--poor { color: #302b18; background: #f7dfa0; }
.room-network-banner--lost { background: #34416f; }
.room-network-banner > div { display: grid; gap: 2px; }
.room-network-banner strong { font-size: .82rem; }
.room-network-banner span { font-size: .72rem; line-height: 1.35; opacity: .9; }
.room-network-banner button {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  font-weight: 900;
}
.room-network-banner--poor button { color: var(--blue-900); border-color: rgba(48,53,111,.35); }
.room-audio-warning { min-height: 36px; padding-block: 7px; color: #26305f; background: #dce7fa; font-size: .74rem; }
.room-auto-quality,
.room-noise-toggle {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 9px;
  color: #fff;
  background: rgba(255,255,255,.08);
  font-size: .68rem;
  font-weight: 850;
}
.room-auto-quality { color: #fff0aa; }
.room-noise-toggle.is-on { color: #172154; background: #dce7fa; }
.room-noise-toggle:disabled { opacity: .55; }
.participant-quality {
  width: 8px;
  height: 8px;
  display: inline-block;
  flex: 0 0 auto;
  margin-left: 6px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
  vertical-align: middle;
  background: #a8afc6;
}
.participant-quality--excellent { background: #61c798; }
.participant-quality--good { background: #91d6ae; }
.participant-quality--poor { background: #e2b83d; }
.participant-quality--lost { background: #cb756f; }
.live-video-tile small { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.participant-list small { display: flex; align-items: center; gap: 4px; }

@media (max-width: 900px) {
  .room-header__status .room-auto-quality { display: none; }
  .room-header__status .room-noise-toggle { max-width: 112px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
}
@media (max-width: 640px) {
  .room-network-banner { align-items: flex-start; padding: 9px 11px; }
  .room-network-banner span { font-size: .68rem; }
  .room-header__status .room-noise-toggle { display: none; }
  .floating-videos .live-video-tile:nth-child(n+3) { display: none; }
}
.prejoin-audio-test { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.prejoin-audio-test button { padding: 7px 10px; border: 2px solid rgba(48,53,111,.18); border-radius: 10px; color: var(--blue-900); background: var(--white); font-size: .72rem; font-weight: 850; }
@media (max-width: 520px) { .prejoin-audio-test { grid-template-columns: 1fr; } .prejoin-audio-test button { width: 100%; } }
.mobile-camera-flip { display: none !important; }
@media (pointer: coarse), (max-width: 760px) { .mobile-camera-flip { display: inline-flex !important; } }

.page-loading {
  min-height: 45vh;
  display: grid;
  place-items: center;
  color: var(--blue-900);
  font-weight: 850;
}


/* Teach.Room 1.0.6 — stable auth layout and access diagnostics */
.auth-page {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 610px);
  overflow-x: hidden;
}
.auth-brand-panel { min-width: 0; isolation: isolate; }
.auth-brand-panel > * { position: relative; z-index: 2; }
.auth-brand-panel .brand { color: var(--blue-200); }
.auth-brand-panel .brand__copy strong,
.auth-brand-panel .brand__copy small { color: #fff; }
.auth-brand-panel .brand__copy strong span { color: var(--lemon); }
.auth-brand-panel h1 {
  width: min(100%, 12ch);
  max-width: 12ch;
  font-size: clamp(2.35rem, 4.15vw, 4.5rem);
  line-height: .94;
  letter-spacing: -.035em;
  overflow-wrap: break-word;
  text-wrap: balance;
}
.auth-brand-panel p { position: relative; z-index: 2; }
.auth-brand-art { z-index: 1; pointer-events: none; }
.auth-card { width: 100%; max-width: 610px; justify-self: end; }
.auth-page--single .auth-card { justify-self: center; }
.access-card form { margin-top: 22px; }
.auth-text-button:disabled { opacity: .55; cursor: wait; }

@media (max-width: 1120px) {
  .auth-page { grid-template-columns: minmax(0, 1fr) minmax(390px, 520px); gap: 24px; padding: 24px; }
  .auth-brand-panel { padding-inline: 34px; }
  .auth-brand-panel h1 { font-size: clamp(2.25rem, 4.8vw, 3.75rem); }
}

@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; max-width: 760px; margin-inline: auto; }
  .auth-card { max-width: none; justify-self: stretch; }
  .auth-brand-panel { min-height: 420px; }
  .auth-brand-panel h1 { width: min(100%, 14ch); max-width: 14ch; }
}

@media (max-width: 640px) {
  .auth-page { max-width: none; }
}

/* Teach.Room 1.0.7 — final authentication and access layout */
.auth-page,
.auth-page * { box-sizing: border-box; }

.auth-page {
  width: min(1480px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 44px);
  display: grid;
  grid-template-columns: minmax(430px, 1.08fr) minmax(440px, .92fr);
  gap: clamp(24px, 3vw, 46px);
  align-items: center;
  overflow-x: clip;
}

.auth-brand-panel,
.auth-card {
  width: 100%;
  min-width: 0;
  min-height: min(680px, calc(100svh - 48px));
  margin: 0;
}

.auth-brand-panel {
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: stretch;
  padding: clamp(32px, 4vw, 58px);
}
.auth-brand-panel > * { position: relative; z-index: 2; }
.auth-brand-panel .brand { color: var(--blue-200); }
.auth-brand-panel .brand__copy strong,
.auth-brand-panel .brand__copy small { color: #fff; }
.auth-brand-panel .brand__copy strong span { color: var(--lemon); }
.auth-brand-panel > div:not(.auth-brand-art) {
  min-width: 0;
  align-self: center;
}
.auth-brand-panel h1 {
  width: min(100%, 15ch);
  max-width: 15ch;
  margin: 12px 0 24px;
  font-size: clamp(2.55rem, 3.55vw, 3.95rem);
  line-height: .96;
  letter-spacing: -.038em;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}
.auth-brand-panel p {
  position: relative;
  z-index: 2;
  max-width: 590px;
  margin: 0;
  font-size: clamp(.92rem, 1vw, 1.05rem);
  line-height: 1.58;
}
.auth-brand-art { z-index: 1; pointer-events: none; }

.auth-card {
  max-width: 610px;
  justify-self: end;
  align-self: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 4vw, 56px);
  overflow: visible;
}
.auth-card h1,
.auth-card h2 {
  max-width: 100%;
  margin: 8px 0 18px;
  font-size: clamp(1.85rem, 2.35vw, 2.55rem);
  line-height: 1.02;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}
.auth-card__mobile-logo { display: none; margin-bottom: 24px; }
.auth-card form { margin-top: 20px; }
.auth-tabs { flex: 0 0 auto; }
.auth-text-button:disabled { opacity: .55; cursor: wait; }

.auth-page.auth-page--single {
  width: 100%;
  max-width: none;
  min-height: 100svh;
  padding: clamp(16px, 4vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 700px);
  place-content: center;
  overflow: hidden;
}
.auth-page.auth-page--single .auth-card {
  width: 100%;
  min-height: 0;
  max-width: 700px;
  justify-self: center;
  padding: clamp(28px, 4vw, 48px);
}
.access-card { gap: 18px; }
.access-card__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 2px solid rgba(48, 53, 111, .12);
}
.access-card__header .brand { min-width: 0; }
.access-card__header > div { min-width: 0; text-align: right; }
.access-card__header h1 {
  margin: 4px 0 0;
  font-size: clamp(1.65rem, 2.7vw, 2.35rem);
}
.access-card__header .eyebrow { margin-bottom: 2px; }
.access-card__intro {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
}
.access-card form { margin: 0; }
.access-card__secondary-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 2px;
}
.access-card__secondary-actions .auth-text-button { margin-top: 0; }
.access-diagnostic {
  display: grid;
  gap: 5px;
  padding: 13px 15px;
  border: 2px solid rgba(48, 53, 111, .14);
  border-radius: 14px;
  color: var(--ink-soft);
  background: var(--blue-100);
  font-size: .78rem;
  line-height: 1.45;
}
.access-diagnostic strong { color: var(--ink); font-size: .84rem; }
.access-diagnostic span { display: block; }
.access-diagnostic small { color: var(--ink-soft); overflow-wrap: anywhere; }
.access-diagnostic--ok {
  color: #315f48;
  border-color: rgba(62,132,98,.22);
  background: #e3f1e8;
  font-weight: 800;
}
.access-diagnostic--error { border-color: rgba(53,56,143,.24); background: #e7edfc; }
.access-diagnostic--loading { animation: diagnostic-pulse 1.15s ease-in-out infinite alternate; }
@keyframes diagnostic-pulse { to { opacity: .62; } }

@media (max-width: 1080px) {
  .auth-page {
    width: min(820px, 100%);
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }
  .auth-brand-panel,
  .auth-card { min-height: 0; }
  .auth-brand-panel { min-height: 390px; }
  .auth-brand-panel h1 {
    width: min(100%, 16ch);
    max-width: 16ch;
    font-size: clamp(2.35rem, 7vw, 3.8rem);
  }
  .auth-card { max-width: none; min-height: 590px; justify-self: stretch; }
}

@media (max-width: 640px) {
  .auth-page { width: 100%; min-height: 100svh; padding: 10px; }
  .auth-brand-panel { display: none; }
  .auth-card {
    min-height: calc(100svh - 20px);
    padding: 26px 18px;
    justify-content: flex-start;
  }
  .auth-card__mobile-logo { display: block; }
  .auth-page.auth-page--single { padding: 10px; overflow: visible; }
  .auth-page.auth-page--single .auth-card { min-height: calc(100svh - 20px); }
  .access-card__header { grid-template-columns: 1fr; align-items: start; gap: 16px; }
  .access-card__header > div { text-align: left; }
  .access-card__secondary-actions { align-items: flex-start; flex-direction: column; gap: 8px; }
}

@media (max-height: 760px) and (min-width: 1081px) {
  .auth-page { align-items: start; }
  .auth-brand-panel,
  .auth-card { min-height: 640px; }
}


/* Teach.Room 1.1.0 — whiteboard workflow, custom controls and responsive polish */
.custom-select, .date-picker { position: relative; min-width: 0; }
.custom-select__label, .date-picker__label { display: block; margin-bottom: 7px; color: var(--ink-soft); font-size: .76rem; font-weight: 900; }
.custom-select__button, .date-picker__button { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 15px; border: 2px solid rgba(48,53,111,.2); border-radius: 14px 14px 5px 14px; color: var(--ink); background: var(--white); font: inherit; text-align: left; box-shadow: 3px 4px 0 rgba(48,53,111,.06); }
.custom-select__button i, .date-picker__button i { font-style: normal; color: var(--blue-900); }
.custom-select__button:disabled { opacity: .5; cursor: not-allowed; }
.custom-select__menu { position: absolute; z-index: 360; top: calc(100% + 7px); left: 0; right: 0; max-height: 310px; overflow: auto; padding: 7px; border: 2px solid var(--line); border-radius: 16px 16px 6px 16px; background: #fffdf7; box-shadow: 8px 9px 0 rgba(28,31,75,.16); }
.custom-select__menu > button { width: 100%; min-height: 46px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 9px 11px; border: 0; border-radius: 10px; color: var(--ink); background: transparent; text-align: left; }
.custom-select__menu > button:hover, .custom-select__menu > button.is-selected { background: var(--blue-100); }
.custom-select__menu small { grid-column: 1; color: var(--ink-soft); font-size: .68rem; }
.custom-select__menu b { grid-column: 2; grid-row: 1 / 3; color: var(--blue-900); }
.custom-select--compact .custom-select__button { min-height: 38px; padding: 7px 10px; border-radius: 10px; font-size: .72rem; box-shadow: none; }
.custom-select--compact .custom-select__menu { min-width: 190px; right: 0; left: auto; }

.date-picker__calendar { position: absolute; z-index: 370; top: calc(100% + 8px); left: 0; width: min(330px, calc(100vw - 32px)); padding: 12px; border: 2px solid var(--line); border-radius: 20px 20px 7px 20px; background: #fffdf7; box-shadow: 9px 10px 0 rgba(28,31,75,.18); }
.date-picker__calendar header { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; gap: 8px; margin-bottom: 10px; }
.date-picker__calendar header strong { text-align: center; text-transform: capitalize; }
.date-picker__calendar header button, .date-picker__calendar footer button { min-height: 36px; border: 0; border-radius: 10px; color: var(--blue-900); background: var(--blue-100); font-weight: 900; }
.date-picker__weekdays, .date-picker__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.date-picker__weekdays span { padding: 4px 0; color: var(--ink-soft); font-size: .64rem; font-weight: 900; text-align: center; }
.date-picker__days button { aspect-ratio: 1; border: 0; border-radius: 50%; color: var(--ink); background: transparent; font: inherit; }
.date-picker__days button:hover { background: var(--blue-100); }
.date-picker__days button.is-selected { color: #fff; background: var(--blue-900); }
.date-picker__days button.is-today:not(.is-selected) { outline: 2px solid var(--lemon); outline-offset: -2px; }
.date-picker__days button.is-outside { opacity: .35; }
.date-picker__days button:disabled { opacity: .18; }
.date-picker__calendar footer { display: flex; justify-content: flex-end; margin-top: 8px; }
.date-picker__calendar footer button { padding: 6px 12px; }
.time-picker .custom-select__menu { max-height: 260px; }

.site-toast { position: fixed; z-index: 500; right: 20px; bottom: 22px; max-width: min(440px, calc(100vw - 32px)); display: flex; align-items: center; gap: 16px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 18px 18px 6px 18px; color: var(--ink); background: var(--blue-100); box-shadow: 8px 9px 0 rgba(28,31,75,.18); }
.site-toast span { font-weight: 800; }
.site-toast button { width: 30px; height: 30px; flex: 0 0 auto; border: 0; border-radius: 50%; color: var(--blue-900); background: rgba(255,255,255,.65); font-size: 1.15rem; }

/* The board is now a full-height canvas with a compact floating toolbar. */
.whiteboard { position: relative; height: 100%; display: block; min-height: 0; overflow: hidden; background: #fffdf6; }
.whiteboard__surface { height: 100%; min-height: 0; }
.whiteboard__floating-tools { position: absolute; z-index: 45; top: 12px; left: 12px; display: flex; align-items: flex-start; gap: 5px; padding: 6px; border: 2px solid rgba(31,35,84,.9); border-radius: 16px 16px 6px 16px; background: rgba(32,34,48,.94); box-shadow: 6px 7px 0 rgba(21,23,57,.18); backdrop-filter: blur(10px); }
.whiteboard__tool-row { display: flex; align-items: center; gap: 4px; }
.whiteboard__tool-row--secondary { padding-left: 5px; border-left: 1px solid rgba(255,255,255,.2); }
.whiteboard__floating-tools .tool-button, .whiteboard__tool-toggle { width: 39px; height: 39px; min-width: 39px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; color: #fff; background: transparent; box-shadow: none; }
.whiteboard__floating-tools .tool-button:hover, .whiteboard__tool-toggle:hover { background: rgba(255,255,255,.12); }
.whiteboard__floating-tools .tool-button.is-active { color: var(--blue-900); background: #6bd37f; }
.whiteboard__floating-tools .tool-button--danger:hover { color: #fff; background: #d75f66; }
.whiteboard__floating-tools svg { width: 20px; height: 20px; }
.whiteboard__tool-toggle { margin-right: 2px; color: var(--lemon); font-size: 1.15rem; }
.whiteboard--tools-collapsed .whiteboard__floating-tools { padding: 4px; }
.tool-popover-anchor { position: relative; }
.tool-caret { position: absolute; right: 2px; bottom: 1px; font-size: .55rem; font-style: normal; }
.tool-popover { position: absolute; z-index: 90; top: calc(100% + 9px); left: 0; min-width: 250px; padding: 12px; border: 2px solid var(--line); border-radius: 17px 17px 6px 17px; color: var(--ink); background: #fffdf7; box-shadow: 8px 9px 0 rgba(28,31,75,.18); }
.tool-popover > strong { display: block; margin: 6px 0 7px; color: var(--ink-soft); font-size: .69rem; text-transform: uppercase; }
.color-palette { display: grid; grid-template-columns: repeat(6, 30px); gap: 7px; }
.color-palette > button, .custom-color > span { width: 30px; height: 30px; border: 2px solid rgba(48,53,111,.25); border-radius: 50%; box-shadow: 2px 2px 0 rgba(48,53,111,.08); }
.color-palette > button.is-active, .custom-color.is-active > span { outline: 3px solid var(--lemon); outline-offset: 2px; }
.custom-color { position: relative; display: grid; place-items: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
.custom-color > span { position: relative; display: grid; place-items: center; }
.custom-color > span::after { content: ''; position: absolute; inset: 5px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(31,35,84,.35); }
.custom-color > span > i { width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(#ef5350,#ffca28,#66bb6a,#42a5f5,#7e57c2,#ec407a,#ef5350); }
.custom-color-panel { display: grid; gap: 10px; margin: 2px 0 10px; padding: 10px; border: 1px solid rgba(48,53,111,.16); border-radius: 12px; background: rgba(219,229,248,.55); }
.custom-color-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.custom-color-preview { width: 28px; height: 28px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(48,53,111,.25); }
.custom-color-spectrum { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.custom-color-spectrum button { aspect-ratio: 1; min-width: 0; padding: 0; border: 1px solid rgba(31,35,84,.2); border-radius: 6px; box-shadow: none; }
.custom-color-spectrum button.is-active { outline: 2px solid var(--ink); outline-offset: 1px; }
.custom-color-hex { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; color: var(--ink-soft); font-size: .68rem; font-weight: 900; }
.custom-color-hex input { width: 100%; min-height: 34px; padding: 6px 9px; border: 1px solid rgba(48,53,111,.22); border-radius: 8px; color: var(--ink); background: #fffdf7; font: inherit; text-transform: uppercase; }
.width-palette, .line-style-palette { display: flex; flex-wrap: wrap; gap: 6px; }
.width-palette button, .line-style-palette button, .tool-popover--background button { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid rgba(48,53,111,.18); border-radius: 9px; color: var(--ink); background: #fff; }
.width-palette button.is-active, .line-style-palette button.is-active, .tool-popover--background button.is-active { border-color: var(--blue-900); background: var(--blue-100); }
.width-palette i { width: 28px; border-radius: 999px; background: var(--blue-900); }
.line-sample { width: 36px; height: 2px; background: var(--blue-900); }
.line-sample--dashed { background: repeating-linear-gradient(90deg,var(--blue-900) 0 8px,transparent 8px 13px); }
.line-sample--dotted { background: repeating-linear-gradient(90deg,var(--blue-900) 0 2px,transparent 2px 7px); }
.tool-popover--eraser { min-width: 290px; }
.tool-popover--eraser > button { width: 100%; display: grid; grid-template-columns: 34px 1fr; gap: 9px; align-items: center; padding: 10px; border: 0; border-radius: 10px; color: var(--ink); background: transparent; text-align: left; }
.tool-popover--eraser > button:hover, .tool-popover--eraser > button.is-active { background: var(--blue-100); }
.tool-popover--eraser span { display: grid; gap: 2px; }
.tool-popover--eraser small { color: var(--ink-soft); }
.tool-popover--background { min-width: 180px; display: grid; gap: 5px; }
.background-swatch { width: 28px; height: 22px; border: 1px solid #cfd4e4; border-radius: 4px; background-color: #fffdf6; }
.background-swatch--grid { background-image: linear-gradient(#dce5eb 1px,transparent 1px),linear-gradient(90deg,#dce5eb 1px,transparent 1px); background-size: 8px 8px; }
.background-swatch--lined { background-image: linear-gradient(#dce5eb 1px,transparent 1px); background-size: 100% 7px; }
.background-swatch--dots { background-image: radial-gradient(#cfd8df 1px,transparent 1px); background-size: 7px 7px; }
.object-context-menu { position: absolute; z-index: 40; display: flex; gap: 4px; padding: 5px; border: 2px solid rgba(31,35,84,.85); border-radius: 12px; background: rgba(32,34,48,.95); box-shadow: 4px 5px 0 rgba(21,23,57,.16); transform: translateY(-100%); }
.object-context-menu button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; color: #fff; background: transparent; }
.object-context-menu button:hover { background: rgba(255,255,255,.13); }
.object-context-menu button.is-danger:hover { background: #d75f66; }
.object-context-menu svg { width: 18px; height: 18px; }
.whiteboard__zoom { z-index: 35; left: auto; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 2px; padding: 5px; border: 2px solid rgba(48,53,111,.2); border-radius: 14px; background: rgba(255,253,247,.94); box-shadow: 4px 5px 0 rgba(48,53,111,.08); }
.whiteboard__zoom button { min-width: 34px; height: 34px; border: 0; border-radius: 9px; color: var(--blue-900); background: transparent; }
.whiteboard__zoom button:hover { background: var(--blue-100); }
.whiteboard__zoom-value { min-width: 58px !important; font-weight: 900; }
.whiteboard__hint { right: 14px; bottom: 63px; }
.whiteboard__loading { position: absolute; inset: 0; z-index: 32; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--ink-soft); background: rgba(255,253,246,.86); pointer-events: none; }
.whiteboard__loading p { margin: 0; font-weight: 800; }

.board-preview { height: 175px; position: relative; overflow: hidden; background-color: #fffdf6; }
.board-preview canvas { width: 100%; height: 100%; display: block; }
.board-preview__empty { height: 100%; display: grid; place-items: center; align-content: center; gap: 8px; color: rgba(48,53,111,.48); }
.board-preview__empty svg { width: 35px; height: 35px; }
.board-preview__empty span { font-size: .72rem; font-weight: 800; }

.recordings-intro { background: #dbe5f8; }

.mobile-calendar-card { padding: 18px; background: #dbe5f8; }
.mobile-date-strip { display: flex; gap: 8px; padding: 4px 0 5px; overflow-x: auto; scroll-snap-type: x mandatory; }
.mobile-date-strip button { min-width: 58px; display: grid; place-items: center; gap: 3px; padding: 9px 7px; border: 2px solid rgba(48,53,111,.15); border-radius: 16px 16px 5px 16px; color: var(--ink-soft); background: #fffdf7; scroll-snap-align: start; }
.mobile-date-strip button span { font-size: .65rem; font-weight: 900; text-transform: capitalize; }
.mobile-date-strip button strong { font-size: 1.15rem; }
.mobile-date-strip button.is-today { border-color: #d3ad39; }
.mobile-date-strip button.is-active { color: #fff; background: var(--blue-900); }
.mobile-agenda-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 12px; }
.mobile-agenda-heading h2 { margin: 3px 0 0; font-size: 1.05rem; text-transform: capitalize; }
.mobile-calendar-empty { display: grid; justify-items: center; gap: 8px; padding: 28px 20px; border: 2px dashed rgba(48,53,111,.22); border-radius: 22px; color: var(--ink-soft); background: rgba(255,253,247,.7); text-align: center; }
.mobile-calendar-empty svg { width: 34px; height: 34px; color: var(--blue-700); }
.weekday-time-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(160px, .8fr); align-items: end; gap: 12px; }
.weekday-time-row > span { padding-bottom: 13px; font-weight: 800; }

@media (max-width: 760px) {
  .site-toast { left: 14px; right: 14px; bottom: 92px; }
  .custom-select__menu { position: fixed; z-index: 520; left: 16px; right: 16px; top: 50%; max-height: 62vh; transform: translateY(-50%); border-radius: 20px; box-shadow: 0 0 0 100vmax rgba(20,23,60,.58), 8px 9px 0 rgba(28,31,75,.18); }
  .custom-select__menu > button { min-height: 54px; font-size: .94rem; }
  .date-picker__calendar { position: fixed; z-index: 530; left: 16px; right: 16px; top: 50%; width: auto; transform: translateY(-50%); box-shadow: 0 0 0 100vmax rgba(20,23,60,.58), 8px 9px 0 rgba(28,31,75,.18); }
  .weekday-time-row { grid-template-columns: 1fr; gap: 3px; }
  .weekday-time-row > span { padding-bottom: 0; }
  .exception-adder { display: grid; grid-template-columns: 1fr; }

  .hero { min-height: 650px; display: block; overflow: hidden; }
  .hero-copy { position: relative; z-index: 4; max-width: none; padding: 30px 22px 300px; }
  .hero h1 { font-size: clamp(3.3rem, 17vw, 5rem); }
  .hero-summary { max-width: 90%; }
  .hero-actions { display: grid; gap: 10px; }
  .hero-illustration { position: absolute; z-index: 2; inset: auto -18% -2% -10%; height: 390px; min-height: 0; opacity: 1; }
  .hero::before { bottom: -285px; }

  .standalone-board > header { min-height: 62px; grid-template-columns: auto minmax(0,1fr) auto; gap: 7px; padding: 7px; }
  .standalone-board > header .button { min-width: 0; padding: 9px 10px; font-size: .72rem; }
  .standalone-board > header > div span { display: none; }
  .whiteboard__floating-tools { top: 8px; left: 8px; right: 8px; max-width: calc(100% - 16px); align-items: center; overflow-x: auto; border-radius: 14px; }
  .whiteboard__tool-row { flex: 0 0 auto; }
  .whiteboard__tool-row--secondary { border-left: 1px solid rgba(255,255,255,.2); }
  .whiteboard__floating-tools .tool-button, .whiteboard__tool-toggle { width: 36px; height: 36px; min-width: 36px; }
  .tool-popover { position: fixed; z-index: 540; left: 14px; right: 14px; top: 50%; width: auto; max-height: 70vh; overflow: auto; transform: translateY(-50%); box-shadow: 0 0 0 100vmax rgba(20,23,60,.58), 8px 9px 0 rgba(28,31,75,.18); }
  .object-context-menu { max-width: calc(100vw - 24px); overflow-x: auto; }
  .whiteboard__zoom { right: 10px; bottom: 10px; }
  .whiteboard__hint { left: 10px; right: auto; bottom: 57px; }
  .board-preview { height: 150px; }

  .calendar-mobile-list { padding-bottom: 8px; }
  .calendar-toolbar .segmented { width: 100%; }
  .calendar-toolbar .segmented button { flex: 1; }
  .calendar-navigation { grid-template-columns: 40px 1fr 40px; }
  .calendar-navigation .today-button { grid-column: 1 / -1; width: 100%; }
  .calendar-meaning { display: none; }
  .recordings-intro { background: #dbe5f8; }
}

@media (max-width: 430px) {
  .page-heading h1 { font-size: clamp(2.6rem, 15vw, 4rem); }
  .hero { min-height: 620px; border-radius: 28px 28px 28px 9px; }
  .hero-copy { padding-inline: 20px; padding-bottom: 290px; }
  .hero-date { font-size: .95rem; }
  .hero h1 { font-size: clamp(3rem, 16vw, 4.4rem); }
  .hero-summary { font-size: .95rem; }
  .hero-illustration { height: 350px; inset-inline: -25% -32%; }
  .mobile-nav { left: 7px; right: 7px; bottom: 7px; }
  .mobile-nav a { min-width: 0; padding-inline: 2px; }
  .boards-intro, .recordings-intro, .account-identity-card { border-radius: 22px 22px 7px 22px; }
  .recordings-intro { display: grid; grid-template-columns: 64px 1fr; }
  .recordings-intro h2 { font-size: 1rem; }
  .recordings-intro p { grid-column: 1 / -1; }
}

/* Teach.Room 1.1.0 final responsive pass */
.quick-access__item:disabled { opacity: .68; cursor: wait; }
.whiteboard__surface > canvas { cursor: crosshair; }
.whiteboard--tools-collapsed .whiteboard__surface > canvas { cursor: crosshair; }
.whiteboard__tool-row { max-width: min(100%, 660px); }
.whiteboard__floating-tools { max-width: calc(100% - 24px); }
.whiteboard__floating-tools::-webkit-scrollbar { height: 4px; }
.whiteboard__floating-tools::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(255,255,255,.35); }
.object-context-menu { max-width: calc(100% - 24px); }
.modal textarea { resize: vertical; }

@media (max-width: 760px) {
  .app-shell { padding-bottom: 104px; }
  .page { width: min(100% - 22px, 1240px); padding-top: 14px; }
  .topbar { min-height: 72px; padding: 10px 16px; }
  .topbar .logo__text { display: none; }
  .topbar .logo-mark { width: 48px; height: 48px; }
  .avatar { width: 50px; height: 50px; }

  .hero { min-height: 0; display: flex; flex-direction: column; margin: 4px 0 22px; overflow: hidden; }
  .hero-copy { position: relative; z-index: 4; max-width: none; padding: 27px 22px 0; }
  .hero-date-line { margin-bottom: 13px; }
  .hero h1 { margin-bottom: 18px; font-size: clamp(3.2rem, 16vw, 4.8rem); line-height: .82; }
  .hero h1 em { margin-top: 8px; font-size: .74em; line-height: .9; }
  .hero-summary { max-width: none; margin-bottom: 18px; font-size: .95rem; line-height: 1.35; }
  .hero-actions { position: relative; z-index: 7; display: grid; gap: 10px; }
  .hero-actions .button { width: 100%; min-height: 53px; justify-content: center; }
  .hero-illustration { position: relative; z-index: 2; inset: auto; width: 132%; height: 305px; min-height: 0; margin: -10px -16% -5px; opacity: 1; }
  .hero::before { display: none; }

  .dashboard-grid { gap: 18px; }
  .today-panel, .quick-access { min-width: 0; }
  .section-heading { align-items: flex-start; }
  .section-heading h2 { font-size: clamp(1.35rem, 7vw, 2rem); }

  .page-heading { align-items: flex-start; gap: 13px; margin-bottom: 18px; }
  .page-heading h1 { font-size: clamp(2.5rem, 13vw, 3.8rem); }
  .page-heading > .button { min-height: 44px; padding: 10px 13px; font-size: .72rem; }
  .section-toolbar { padding: 14px; }
  .library-toolbar { grid-template-columns: 1fr; }
  .library-toolbar .tabs, .library-toolbar .search, .library-toolbar .custom-select { width: 100%; }

  .mobile-calendar-card { padding: 15px; }
  .mobile-calendar-card .section-heading { margin-bottom: 12px; }
  .mobile-calendar-card .section-heading h2 { font-size: .95rem; line-height: 1.25; }
  .mobile-date-strip { margin-inline: -3px; padding-bottom: 8px; }
  .mobile-agenda-heading { align-items: flex-end; margin-top: 15px; }
  .mobile-agenda-heading h2 { max-width: 260px; font-size: .95rem; line-height: 1.25; }
  .mobile-calendar-empty { min-height: 205px; align-content: center; }

  .boards-intro, .recordings-intro, .account-identity-card { min-height: 0; display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 12px; padding: 18px; }
  .boards-intro > div:first-child { display: contents; }
  .boards-intro__stats { grid-column: 1 / -1; justify-content: flex-start; }
  .recordings-intro__icon { width: 58px; height: 58px; }
  .recordings-intro p { grid-column: 1 / -1; }
  .recordings-intro > svg, .boards-intro > svg { opacity: .12; }

  .standalone-board { height: 100dvh; min-height: 100dvh; }
  .standalone-board > header { min-height: 64px; grid-template-columns: auto minmax(0,1fr) auto; gap: 6px; padding: 7px 8px; }
  .standalone-board > header > div { min-width: 0; text-align: center; }
  .standalone-board > header > div strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .standalone-board > header .button { padding: 9px 8px; }
  .standalone-board > header .button--ghost { max-width: 94px; overflow: hidden; white-space: nowrap; }
  .whiteboard__floating-tools { top: 7px; left: 7px; right: 7px; max-width: calc(100% - 14px); padding: 4px; gap: 2px; overflow-x: auto; overflow-y: visible; align-items: center; }
  .whiteboard__tool-row { flex: 0 0 auto; gap: 2px; }
  .whiteboard__tool-row--secondary { padding-left: 3px; }
  .whiteboard__floating-tools .tool-button, .whiteboard__tool-toggle { width: 34px; height: 34px; min-width: 34px; border-radius: 8px; }
  .whiteboard__floating-tools svg { width: 18px; height: 18px; }
  .whiteboard__zoom { right: 8px; bottom: 8px; transform: scale(.92); transform-origin: right bottom; }
  .whiteboard__hint { left: 8px; bottom: 54px; max-width: 48%; font-size: .64rem; }
  .object-context-menu { left: 12px !important; right: auto; max-width: calc(100vw - 24px); }

  .modal-backdrop { padding: 10px; align-items: center; }
  .modal { width: min(100%, 620px); max-height: calc(100dvh - 20px); border-radius: 22px 22px 7px 22px; }
  .modal__header { padding: 16px 17px; }
  .modal__content { padding: 16px 17px calc(22px + env(safe-area-inset-bottom)); }
  .schedule-form { grid-template-columns: 1fr; }
  .schedule-form > * { grid-column: 1 !important; }
  .recurrence-editor { padding: 13px; }
  .weekday-picker { gap: 5px; }
  .weekday-picker button { width: 38px; height: 37px; }
  .modal-actions { position: sticky; bottom: 0; z-index: 5; margin: 16px -4px -4px; padding-top: 12px; background: linear-gradient(transparent, #fffdf7 22%); }
  .modal-actions .button { min-width: 0; flex: 1; }

  .recording-card { grid-template-columns: 1fr; }
  .recording-card > svg { display: none; }
  .recording-thumb { min-height: 160px; }
  .storage-pill { width: 100%; max-width: none; }
}

@media (max-width: 430px) {
  .hero { border-radius: 27px 27px 27px 8px; }
  .hero-copy { padding: 24px 18px 0; }
  .hero h1 { font-size: clamp(3rem, 15.5vw, 4.2rem); }
  .hero-illustration { width: 145%; height: 285px; margin-inline: -22.5%; }
  .page-heading { display: grid; grid-template-columns: 1fr; }
  .page-heading > .button { width: 100%; }
  .mobile-nav { border-radius: 20px; }
  .mobile-nav a { font-size: .58rem; }
  .mobile-nav a span { max-width: 74px; overflow: hidden; text-overflow: ellipsis; }
  .recordings-intro h2, .boards-intro h2 { font-size: .98rem; line-height: 1.05; }
  .recordings-intro p, .boards-intro p { font-size: .76rem; line-height: 1.35; }
}

@media (max-width: 370px) {
  .page { width: min(100% - 14px, 1240px); }
  .hero-copy { padding-inline: 15px; }
  .hero h1 { font-size: 2.85rem; }
  .mobile-nav { left: 4px; right: 4px; padding: 4px; }
  .mobile-nav a { font-size: .53rem; }
}

/* Teach.Room 1.1.1 — stable whiteboard menus and interaction targets */
.whiteboard__floating-tools {
  /* backdrop-filter creates a containing block for position: fixed children in
     several mobile browsers, which compressed tool popovers into the toolbar. */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.whiteboard__floating-tools.has-popover { overflow: visible; }

@media (max-width: 720px) {
  .whiteboard__floating-tools.has-popover { overflow: visible; }
  .whiteboard__floating-tools.has-popover .tool-popover {
    position: fixed;
    z-index: 1200;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: max(16px, env(safe-area-inset-bottom));
    width: auto;
    min-width: 0;
    max-width: none;
    max-height: min(76vh, 620px);
    overflow: auto;
    transform: none;
    border-radius: 20px 20px 8px 20px;
    box-shadow: 0 0 0 100vmax rgba(20,23,60,.58), 8px 9px 0 rgba(28,31,75,.18);
  }
  .tool-popover--eraser > button {
    grid-template-columns: 38px minmax(0, 1fr);
  }
  .tool-popover--eraser span,
  .tool-popover--eraser strong,
  .tool-popover--eraser small {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .tool-popover--style .color-palette,
  .tool-popover--style .custom-color-spectrum,
  .tool-popover--style .width-palette,
  .tool-popover--style .line-style-palette {
    max-width: 100%;
  }
}

/* Teach.Room 1.2.0 — rebuilt meeting room */
.room-page {
  --meeting-header-height: 58px;
  --meeting-controls-height: 88px;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-rows: var(--meeting-header-height) auto minmax(0, 1fr) var(--meeting-controls-height);
  overflow: hidden;
  color: #fff;
  background: #11142c;
}
.room-page > .room-network-banner,
.room-page > .room-audio-warning { grid-row: auto; }

.room-page > .room-header { grid-row: 1; }
.room-page > .room-network-banner { grid-row: 2; }
.room-page > .room-workspace { grid-row: 3; }
.room-page > .meeting-control-dock { grid-row: 4; }
.room-header {
  position: relative;
  z-index: 60;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: #282b6b;
  box-shadow: 0 3px 18px rgba(5,8,32,.18);
}
.room-header__identity { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.room-header__identity strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.room-header__identity span { flex: 0 0 auto; color: rgba(255,255,255,.55); font-size: .7rem; }
.room-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 13px;
  background: rgba(10,13,45,.35);
}
.room-view-switch button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 0;
  border-radius: 9px;
  color: rgba(255,255,255,.66);
  background: transparent;
  font-size: .7rem;
  font-weight: 850;
}
.room-view-switch button svg { width: 17px; height: 17px; }
.room-view-switch button:hover { color: #fff; background: rgba(255,255,255,.08); }
.room-view-switch button.is-active { color: #17204f; background: #fff0a9; box-shadow: 0 2px 0 rgba(0,0,0,.16); }
.room-header__status { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.room-connection-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.06);
  font-size: .65rem;
  font-weight: 800;
  white-space: nowrap;
}
.room-connection-pill i { width: 8px; height: 8px; border-radius: 50%; background: #69d396; box-shadow: 0 0 0 3px rgba(105,211,150,.12); }
.room-connection-pill.is-warning i { background: #f2c454; box-shadow: 0 0 0 3px rgba(242,196,84,.14); }
.room-connection-pill.is-lost i { background: #e88383; box-shadow: 0 0 0 3px rgba(232,131,131,.14); }
.room-clock { color: rgba(255,255,255,.58); font-variant-numeric: tabular-nums; font-size: .72rem; }
.recording-live-dot { color: #ffb0aa !important; font-size: .68rem !important; font-weight: 850; }
.room-workspace {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  background: #11142c;
}
.room-workspace.has-panel { grid-template-columns: minmax(0, 1fr) 320px; }
.meeting-stage-layout {
  min-width: 0;
  min-height: 0;
  display: grid;
  overflow: hidden;
  background: #11142c;
}
.meeting-stage-layout--video { grid-template-columns: minmax(0, 1fr); }
.meeting-stage-layout--board,
.meeting-stage-layout--screen { grid-template-columns: minmax(0, 1fr) 190px; }
.meeting-stage-main { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #f9f8f3; }
.meeting-video-grid {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 12px;
  padding: 12px;
  overflow: auto;
  background: #11142c;
}
.meeting-video-grid--1 { grid-template-columns: minmax(0, 1fr); }
.meeting-video-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.meeting-video-grid--3,
.meeting-video-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.meeting-video-grid--5,
.meeting-video-grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.meeting-participant-tile {
  position: relative;
  min-width: 0;
  min-height: 160px;
  overflow: hidden;
  border: 3px solid transparent;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(145deg, #333775, #242756);
  box-shadow: 0 8px 24px rgba(3,5,24,.18);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.meeting-participant-tile.is-speaking {
  border-color: #ffe575;
  box-shadow: 0 0 0 3px rgba(255,229,117,.2), 0 10px 28px rgba(3,5,24,.25);
}
.meeting-participant-tile__media { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.meeting-participant-tile__media video { width: 100%; height: 100%; object-fit: cover; background: #171a3d; }
.meeting-participant-tile__media video.is-mirrored { transform: scaleX(-1); }
.meeting-participant-avatar {
  width: clamp(76px, 12vw, 126px);
  height: clamp(76px, 12vw, 126px);
  display: grid;
  place-items: center;
  border: 3px solid rgba(255,255,255,.86);
  border-radius: 50%;
  color: #282b6b;
  background: #fff0a9;
  font-size: clamp(1.7rem, 4vw, 3.2rem);
  font-weight: 950;
  box-shadow: 7px 8px 0 rgba(13,16,56,.25);
}
.meeting-speaking-badge {
  position: absolute;
  z-index: 3;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #28240e;
  background: #ffe575;
  font-size: .63rem;
  font-weight: 900;
  box-shadow: 0 3px 10px rgba(0,0,0,.18);
}
.meeting-participant-tile__footer {
  position: absolute;
  z-index: 3;
  inset: auto 0 0;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: linear-gradient(transparent, rgba(12,14,45,.9) 40%);
}
.meeting-participant-tile__footer > div:first-child { min-width: 0; }
.meeting-participant-tile__footer strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
.meeting-participant-tile__footer small { display: block; margin-top: 1px; color: rgba(255,255,255,.62); font-size: .58rem; }
.meeting-media-indicators { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; }
.meeting-media-indicators > span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #d9f6e4;
  background: rgba(77,176,116,.28);
}
.meeting-media-indicators > span.is-disabled { color: #ffd7d2; background: rgba(188,76,80,.55); }
.meeting-media-indicators svg { width: 14px; height: 14px; stroke-width: 2.2; }
.meeting-participant-filmstrip {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-auto-rows: minmax(120px, 1fr);
  gap: 8px;
  padding: 8px;
  overflow-y: auto;
  border-left: 1px solid rgba(255,255,255,.1);
  background: #202354;
}
.meeting-participant-tile.is-compact { min-height: 120px; border-width: 2px; border-radius: 13px; box-shadow: none; }
.meeting-participant-tile.is-compact .meeting-participant-avatar { width: 54px; height: 54px; font-size: 1.25rem; box-shadow: 4px 4px 0 rgba(13,16,56,.25); }
.meeting-participant-tile.is-compact .meeting-speaking-badge { left: 7px; top: 7px; padding: 3px 6px; font-size: .5rem; }
.meeting-participant-tile.is-compact .meeting-participant-tile__footer { min-height: 43px; padding: 7px; }
.meeting-participant-tile.is-compact .meeting-participant-tile__footer strong { font-size: .62rem; }
.meeting-participant-tile.is-compact .meeting-participant-tile__footer small { display: none; }
.meeting-participant-tile.is-compact .meeting-media-indicators > span { width: 22px; height: 22px; }
.meeting-participant-tile.is-compact .meeting-media-indicators > span:nth-child(2),
.meeting-participant-tile.is-compact .participant-quality { display: none; }
.meeting-screen-stage { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; background: #101226; }
.meeting-screen-stage > video { width: 100%; height: 100%; object-fit: contain; background: #101226; }
.meeting-screen-empty { display: grid; place-items: center; gap: 10px; padding: 24px; color: rgba(255,255,255,.68); text-align: center; }
.meeting-screen-empty svg { width: 52px; height: 52px; }
.meeting-screen-empty strong { color: #fff; font-size: 1rem; }
.meeting-screen-empty span { font-size: .75rem; }
.room-panel {
  position: relative;
  z-index: 45;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr);
  overflow: hidden;
  border-left: 1px solid rgba(255,255,255,.12);
  background: #292c68;
  box-shadow: -8px 0 24px rgba(3,5,24,.15);
}
.room-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 0 15px; border-bottom: 1px solid rgba(255,255,255,.1); }
.room-panel > header button { width: 34px; height: 34px; border: 0; border-radius: 9px; color: #fff; background: rgba(255,255,255,.08); font-size: 1.2rem; }
.participant-list { min-height: 0; overflow-y: auto; padding: 9px; }
.participant-list > div:not(.participant-access) {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 2px solid transparent;
  border-radius: 13px;
}
.participant-list > div.is-speaking { border-color: rgba(255,229,117,.68); background: rgba(255,229,117,.08); }
.participant-list > div > span { width: 40px; height: 40px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.74); border-radius: 50%; color: #282b6b; background: #fff0a9; font-weight: 900; }
.participant-list strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; }
.participant-list small { display: flex; align-items: center; gap: 4px; margin-top: 2px; color: rgba(255,255,255,.55); font-size: .59rem; }
.participant-row-media { display: flex; align-items: center; gap: 4px; }
.participant-row-media > span { width: 25px !important; height: 25px !important; display: grid !important; place-items: center !important; border: 0 !important; border-radius: 7px !important; color: #d9f6e4 !important; background: rgba(77,176,116,.2) !important; }
.participant-row-media > span.is-off { color: #ffd0cc !important; background: rgba(188,76,80,.32) !important; }
.participant-row-media svg { width: 13px; height: 13px; }
.participant-actions { grid-column: 2 / -1; justify-self: end; display: flex !important; gap: 5px; margin-top: -3px; }
.participant-access { margin-bottom: 8px; }
.chat-panel { min-height: 0; }
.chat-messages { min-height: 0; overflow-y: auto; padding: 12px; }
.chat-messages > div:not(.chat-empty) { margin-bottom: 10px; padding: 9px 10px; border-radius: 11px 11px 11px 3px; background: rgba(255,255,255,.08); }
.chat-messages p { margin: 3px 0 0; color: rgba(255,255,255,.78); font-size: .7rem; line-height: 1.42; }
.meeting-control-dock {
  position: relative;
  z-index: 70;
  min-width: 0;
  min-height: var(--meeting-controls-height);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 9px 16px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,.11);
  background: #171a3a;
  box-shadow: 0 -8px 26px rgba(4,6,27,.24);
}
.meeting-control-dock__primary,
.meeting-control-dock__secondary { display: flex; align-items: center; gap: 8px; }
.meeting-control-dock__primary { justify-content: flex-start; }
.meeting-control-dock__secondary { justify-content: center; }
.meeting-control-button {
  min-width: 68px;
  min-height: 62px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 15px;
  color: rgba(255,255,255,.78);
  background: #292d62;
  box-shadow: 0 2px 0 rgba(0,0,0,.22);
}
.meeting-control-button:hover { color: #fff; background: #363a78; }
.meeting-control-button.is-active { color: #102d1c; border-color: #72dda0; background: #70d79a; }
.meeting-control-button.is-muted,
.meeting-control-button.is-danger { color: #fff; border-color: #bd5d63; background: #a64e57; }
.meeting-control-button:disabled { opacity: .42; cursor: not-allowed; }
.meeting-control-button__icon { width: 29px; height: 29px; display: grid; place-items: center; }
.meeting-control-button__icon svg { width: 23px; height: 23px; stroke-width: 2; }
.meeting-control-button__label { max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .56rem; font-weight: 800; }
.meeting-leave-button {
  justify-self: end;
  min-width: 112px;
  min-height: 52px;
  padding: 10px 15px;
  border: 1px solid #d4777c;
  border-radius: 14px;
  color: #fff;
  background: #a64e57;
  font-size: .76rem;
  font-weight: 900;
  box-shadow: 0 3px 0 rgba(70,18,25,.4);
}
.meeting-leave-button:hover { background: #b75a62; }
.meeting-more-menu {
  position: fixed;
  z-index: 100;
  left: 18px;
  bottom: calc(var(--meeting-controls-height) + 12px);
  width: min(360px, calc(100vw - 36px));
  max-height: min(560px, calc(100dvh - 150px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 20px;
  color: #fff;
  background: #25295f;
  box-shadow: 0 20px 50px rgba(2,4,25,.42);
}
.meeting-more-menu > header { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-bottom: 1px solid rgba(255,255,255,.1); }
.meeting-more-menu > header button { width: 32px; height: 32px; border: 0; border-radius: 9px; color: #fff; background: rgba(255,255,255,.08); font-size: 1.15rem; }
.meeting-more-menu > div { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 10px; overflow-y: auto; }
.meeting-more-menu > div > button {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  color: rgba(255,255,255,.8);
  background: rgba(255,255,255,.05);
  text-align: left;
}
.meeting-more-menu > div > button:hover,
.meeting-more-menu > div > button.is-active { color: #fff; border-color: rgba(255,240,169,.55); background: rgba(255,240,169,.12); }
.meeting-more-menu > div > button.is-recording { color: #ffd0cc; border-color: rgba(255,150,150,.42); }
.meeting-more-menu > div > button:disabled { opacity: .4; }
.meeting-more-menu svg { width: 21px; height: 21px; flex: 0 0 auto; }
.meeting-more-menu span { font-size: .68rem; font-weight: 800; }
.meeting-more-symbol { width: 21px; text-align: center; font-size: 1rem !important; }
.room-toast {
  position: fixed;
  z-index: 130;
  left: 50%;
  top: calc(var(--meeting-header-height) + 12px);
  max-width: min(520px, calc(100vw - 28px));
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  color: #fff;
  background: rgba(31,35,82,.95);
  box-shadow: 0 12px 35px rgba(2,4,25,.3);
  transform: translateX(-50%);
  font-size: .72rem;
  font-weight: 750;
  text-align: center;
  pointer-events: none;
}
.room-start-audio {
  position: fixed !important;
  z-index: 150 !important;
  left: 50% !important;
  top: 74px !important;
  width: auto !important;
  padding: 10px 15px !important;
  border: 0 !important;
  border-radius: 12px !important;
  color: #25295f !important;
  background: #fff0a9 !important;
  transform: translateX(-50%) !important;
  font-weight: 900 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.22) !important;
}
.room-network-banner { z-index: 75; min-height: 44px; padding: 8px 16px; background: #8e6d24; }
.room-network-banner--lost { background: #803f49; }
.room-audio-warning { z-index: 75; min-height: 38px; }
.screen-annotation-layer .whiteboard__tools { z-index: 15; }

@media (max-width: 1100px) {
  .room-header { grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr); }
  .room-header__identity span { display: none; }
  .meeting-control-button { min-width: 61px; }
  .meeting-control-button__label { max-width: 68px; }
  .meeting-stage-layout--board,
  .meeting-stage-layout--screen { grid-template-columns: minmax(0, 1fr) 165px; }
}

@media (max-width: 900px), (max-height: 610px) {
  .room-page {
    --meeting-header-height: 52px;
    --meeting-controls-height: 76px;
  }
  .room-header { grid-template-columns: minmax(0, 1fr) auto; padding: 0 12px; }
  .room-view-switch { display: none; }
  .room-header__status { gap: 6px; }
  .room-clock { display: none; }
  .room-workspace.has-panel { grid-template-columns: minmax(0, 1fr); }
  .room-panel {
    position: absolute;
    z-index: 90;
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    height: min(58dvh, 520px);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 18px 18px 8px 18px;
    box-shadow: 0 20px 60px rgba(2,4,25,.48);
  }
  .meeting-stage-layout--board,
  .meeting-stage-layout--screen {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 104px;
  }
  .meeting-participant-filmstrip {
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 190px);
    grid-template-rows: 1fr;
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 1px solid rgba(255,255,255,.1);
    border-left: 0;
  }
  .meeting-participant-tile.is-compact { min-height: 86px; height: 86px; }
  .meeting-video-grid { gap: 8px; padding: 8px; }
  .meeting-control-dock {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 6px 9px calc(6px + env(safe-area-inset-bottom));
  }
  .meeting-control-dock__secondary { display: none; }
  .meeting-control-dock__primary { min-width: 0; justify-content: space-around; gap: 5px; }
  .meeting-control-button {
    min-width: 55px;
    min-height: 58px;
    padding: 4px 5px;
    border-radius: 13px;
  }
  .meeting-control--desktop { display: none; }
  .meeting-control-button__icon { width: 26px; height: 26px; }
  .meeting-control-button__icon svg { width: 21px; height: 21px; }
  .meeting-control-button__label { max-width: 62px; font-size: .52rem; }
  .meeting-leave-button { min-width: 76px; min-height: 50px; padding: 8px 10px; font-size: .68rem; }
  .meeting-more-menu {
    left: 8px;
    right: 8px;
    bottom: calc(var(--meeting-controls-height) + 8px);
    width: auto;
    max-height: min(62dvh, 520px);
    border-radius: 18px 18px 8px 18px;
  }
}

@media (max-width: 640px) {
  .room-page {
    --meeting-header-height: 50px;
    --meeting-controls-height: 72px;
  }
  .room-header { padding: 0 10px; }
  .room-header__identity strong { font-size: .82rem; }
  .room-header__status .recording-live-dot { display: none; }
  .room-connection-pill { min-height: 27px; padding: 4px 7px; font-size: .57rem; }
  .room-connection-pill i { width: 7px; height: 7px; }
  .meeting-video-grid { grid-template-columns: 1fr !important; grid-auto-rows: minmax(220px, 1fr); }
  .meeting-participant-tile { min-height: 210px; border-radius: 14px; }
  .meeting-participant-avatar { width: 82px; height: 82px; font-size: 2rem; }
  .meeting-stage-layout--board,
  .meeting-stage-layout--screen { grid-template-rows: minmax(0, 1fr) 94px; }
  .meeting-participant-filmstrip { grid-auto-columns: minmax(132px, 155px); padding: 6px; }
  .meeting-participant-tile.is-compact { min-height: 80px; height: 80px; }
  .meeting-participant-tile.is-compact .meeting-participant-tile__footer { min-height: 38px; }
  .meeting-participant-tile.is-compact .meeting-media-indicators { display: none; }
  .meeting-control-dock { padding-inline: 6px; }
  .meeting-control-button { min-width: 50px; min-height: 55px; border-radius: 12px; }
  .meeting-control-button__label { max-width: 54px; font-size: .48rem; }
  .meeting-leave-button { min-width: 66px; padding-inline: 7px; }
  .meeting-more-menu > div { grid-template-columns: 1fr 1fr; }
  .room-network-banner { align-items: flex-start; padding: 8px 10px; }
  .room-network-banner span { font-size: .65rem; }
  .room-toast { top: 60px; font-size: .66rem; }
  .whiteboard__tools { min-height: 50px; }
}

@media (max-width: 390px) {
  .room-connection-pill { max-width: 105px; overflow: hidden; text-overflow: ellipsis; }
  .meeting-control-button { min-width: 46px; }
  .meeting-control-button__label { display: none; }
  .meeting-leave-button { min-width: 58px; font-size: .62rem; }
  .meeting-more-menu > div { grid-template-columns: 1fr; }
}

@media (orientation: landscape) and (max-height: 610px) {
  .room-page {
    --meeting-header-height: 46px;
    --meeting-controls-height: 68px;
  }
  .room-header__status { display: flex; }
  .meeting-stage-layout--board,
  .meeting-stage-layout--screen {
    grid-template-columns: minmax(0, 1fr) 150px;
    grid-template-rows: minmax(0, 1fr);
  }
  .meeting-participant-filmstrip {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-auto-rows: minmax(86px, 1fr);
    grid-template-rows: none;
    overflow-x: hidden;
    overflow-y: auto;
    border-top: 0;
    border-left: 1px solid rgba(255,255,255,.1);
  }
  .meeting-participant-tile.is-compact { min-height: 82px; height: auto; }
  .meeting-control-button { min-height: 50px; }
  .meeting-leave-button { min-height: 46px; }
}
.room-page .meeting-participant-tile.is-local video { transform: scaleX(-1); }

/* Teach.Room 1.2.0 — final meeting-room refinements */
.meeting-video-empty {
  min-height: 240px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 28px;
  border: 2px dashed rgba(255,255,255,.2);
  border-radius: 18px;
  color: rgba(255,255,255,.62);
  background: rgba(255,255,255,.035);
  text-align: center;
}
.meeting-video-empty svg { width: 48px; height: 48px; }
.meeting-video-empty strong { color: #fff; font-size: 1rem; }
.meeting-video-empty span { max-width: 330px; font-size: .72rem; line-height: 1.4; }
.room-page .whiteboard__floating-tools {
  background: rgba(28,31,58,.98);
  box-shadow: 0 8px 26px rgba(5,7,28,.28);
}
.room-page .whiteboard__zoom {
  box-shadow: 0 7px 22px rgba(5,7,28,.16);
}
.room-page .meeting-control-dock,
.room-page .room-header { isolation: isolate; }

@media (max-width: 640px) and (orientation: portrait) {
  .room-panel {
    left: 0;
    right: 0;
    bottom: 0;
    height: min(56dvh, 500px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 20px 20px 0 0;
  }
  .meeting-stage-layout--board,
  .meeting-stage-layout--screen { grid-template-rows: minmax(0, 1fr) 88px; }
  .meeting-participant-filmstrip { grid-auto-columns: minmax(126px, 146px); }
  .meeting-video-grid--1 .meeting-participant-tile { min-height: calc(100dvh - var(--meeting-header-height) - var(--meeting-controls-height) - 18px); }
  .room-page .whiteboard__floating-tools { max-width: calc(100% - 12px); left: 6px; right: 6px; top: 6px; }
}

@media (orientation: landscape) and (max-height: 610px) {
  .room-page {
    --meeting-header-height: 44px;
    --meeting-controls-height: 62px;
  }
  .room-header__identity strong { font-size: .76rem; }
  .room-connection-pill { min-height: 25px; font-size: .54rem; }
  .meeting-control-dock { padding-top: 4px; padding-bottom: calc(4px + env(safe-area-inset-bottom)); }
  .meeting-control-button { min-width: 50px; min-height: 48px; padding: 3px 5px; border-radius: 11px; }
  .meeting-control-button__icon { width: 23px; height: 23px; }
  .meeting-control-button__icon svg { width: 19px; height: 19px; }
  .meeting-control-button__label { font-size: .48rem; }
  .meeting-leave-button { min-width: 70px; min-height: 44px; }
  .room-panel {
    left: auto;
    right: 6px;
    top: 6px;
    bottom: 6px;
    width: min(315px, 44vw);
    height: auto;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 16px 16px 6px 16px;
  }
  .meeting-video-grid { padding: 7px; gap: 7px; }
  .meeting-participant-tile { min-height: 118px; border-radius: 13px; }
  .meeting-participant-tile__footer { min-height: 42px; padding: 6px 8px; }
  .meeting-participant-tile__footer strong { font-size: .64rem; }
  .meeting-media-indicators > span { width: 23px; height: 23px; }
  .room-page .whiteboard__floating-tools { top: 5px; left: 5px; right: 5px; max-width: calc(100% - 10px); padding: 4px; gap: 2px; }
  .room-page .whiteboard__floating-tools .tool-button,
  .room-page .whiteboard__tool-toggle { width: 32px; height: 32px; min-width: 32px; }
}

/* Teach.Room 1.3.0 — responsive workspace, recordings, live boards and audio */
.modal-backdrop {
  z-index: 1400;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(10px, 2vw, 22px);
  overscroll-behavior: contain;
}
.modal {
  display: flex;
  flex-direction: column;
  max-height: min(calc(100dvh - 2 * clamp(10px, 2vw, 22px)), 940px);
  overflow: hidden;
}
.modal__header { flex: 0 0 auto; }
.modal__content {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.modal__content img,
.modal__content video { max-width: 100%; }

.meeting-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(48,53,111,.14);
}
.meeting-manage-actions .button { flex: 1 1 180px; }
.meeting-edit-form { align-items: start; }
.meeting-edit-scope,
.meeting-delete-scope {
  padding: 13px;
  border: 1px solid rgba(48,53,111,.16);
  border-radius: 14px;
  background: rgba(219,229,248,.58);
}
.meeting-edit-scope > span,
.meeting-delete-scope > span { margin-bottom: 2px; }
.meeting-access-edit { padding: 13px; border-radius: 14px; background: rgba(255,240,169,.35); }

.recording-thumb--real { background: #171a3a; }
.recording-thumb--real::after { display: none; }
.recording-thumb--real > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.recording-thumb__placeholder,
.recording-player__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  color: rgba(255,255,255,.78);
  background:
    radial-gradient(circle at 25% 25%, rgba(159,185,236,.28), transparent 34%),
    linear-gradient(145deg, #343986, #202452);
  text-align: center;
}
.recording-thumb__placeholder span,
.recording-player__placeholder span { font-size: .72rem; font-weight: 850; }
.recording-thumb__placeholder small,
.recording-player__placeholder small { color: rgba(255,255,255,.58); font-size: .62rem; }
.recording-player__placeholder { min-height: 280px; }
.recording-player > video {
  width: 100%;
  height: 100%;
  max-height: min(70dvh, 760px);
  display: block;
  object-fit: contain;
  background: #111329;
}

.tool-button--style { gap: 6px; }
.tool-style-swatch {
  --tool-line-color: #30356f;
  --tool-fill-color: transparent;
  position: relative;
  width: 25px;
  height: 21px;
  flex: 0 0 auto;
  border: 3px solid var(--tool-line-color);
  border-radius: 6px;
  background: var(--tool-fill-color);
}
.tool-style-swatch::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: -7px;
  border-bottom: 2px solid var(--tool-line-color);
}
.tool-popover--style { min-width: 292px; max-width: min(360px, calc(100vw - 28px)); }
.fill-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(48,53,111,.14);
  border-radius: 11px;
  background: rgba(234,240,252,.72);
  font-size: .76rem;
  font-weight: 800;
}
.fill-toggle input { width: 18px; height: 18px; accent-color: var(--blue-900); }
.fill-color-row { display: grid; gap: 8px; }
.color-palette--fill { margin-bottom: 0; }
.fill-color-hex { grid-template-columns: auto minmax(0, 1fr) 24px; }
.fill-color-hex i {
  width: 24px;
  height: 24px;
  display: block;
  border: 2px solid rgba(48,53,111,.18);
  border-radius: 7px;
}
.custom-color-panel { max-height: min(390px, 54dvh); overflow: auto; }

.whiteboard-presence {
  position: absolute;
  z-index: 47;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  pointer-events: none;
}
.whiteboard-presence > span {
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  margin-left: -7px;
  padding: 0 8px;
  border: 2px solid #fffdf5;
  border-radius: 999px;
  color: #fff;
  background: var(--presence-color, #4652b5);
  box-shadow: 0 3px 9px rgba(30,34,80,.22);
  font-size: .58rem;
  font-weight: 900;
}
.whiteboard-cursor {
  position: absolute;
  z-index: 49;
  left: var(--cursor-x, 0px);
  top: var(--cursor-y, 0px);
  max-width: 180px;
  padding: 4px 8px 4px 17px;
  border-radius: 4px 9px 9px 9px;
  color: #fff;
  background: var(--cursor-color, #4652b5);
  box-shadow: 0 3px 9px rgba(30,34,80,.18);
  transform: translate(3px, 4px);
  font-size: .61rem;
  font-weight: 900;
  white-space: nowrap;
  pointer-events: none;
}
.whiteboard-cursor::before {
  content: "";
  position: absolute;
  left: -3px;
  top: -5px;
  width: 13px;
  height: 18px;
  background: var(--cursor-color, #4652b5);
  clip-path: polygon(0 0, 100% 64%, 54% 69%, 34% 100%);
}

.prejoin-output-settings,
.audio-settings {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 15px;
  border: 2px solid rgba(48,53,111,.15);
  border-radius: 17px 17px 6px 17px;
  background: rgba(234,240,252,.66);
}
.audio-settings { margin-top: 0; }
.audio-volume-field { display: grid; gap: 8px; }
.audio-volume-field > span { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-soft); font-size: .78rem; font-weight: 800; }
.audio-volume-field strong { color: var(--blue-900); }
.audio-volume-field input[type="range"],
.participant-volume input[type="range"] { width: 100%; accent-color: var(--blue-900); }
.audio-volume-field small { color: var(--ink-soft); font-size: .66rem; line-height: 1.4; }
.audio-settings__hint { margin: 0; color: var(--ink-soft); font-size: .72rem; line-height: 1.45; }
.prejoin-audio-test { justify-self: start; }

.participant-list > div:not(.participant-access) {
  grid-template-columns: 40px minmax(0, 1fr) auto;
}
.participant-volume {
  grid-column: 2 / -1;
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.participant-volume span { color: rgba(255,255,255,.7); font-size: .56rem; font-weight: 850; }
.participant-actions { grid-column: 2 / -1; }

@media (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr); }
  .dashboard-grid { grid-template-columns: minmax(0, 1.35fr) minmax(290px, .65fr); }
}

@media (max-width: 900px) {
  .hero {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) minmax(300px, .78fr);
    border-radius: 32px 32px 32px 10px;
  }
  .hero-copy { padding: 34px 20px 36px 34px; }
  .hero h1 { font-size: clamp(2.8rem, 8vw, 4.9rem); }
  .hero-illustration { min-height: 310px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .quick-access { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 24px; }
  .quick-access header { grid-column: 1 / -1; margin-bottom: 4px; }
  .quick-access__item { min-height: 78px; margin: 0; transform: none; }
}

@media (max-width: 760px) {
  .app-shell { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .page { width: 100%; max-width: 100%; padding: 18px 14px 38px; overflow-x: clip; }
  .hero {
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin: 4px 0 22px;
    overflow: hidden;
    border-radius: 25px 25px 25px 8px;
    box-shadow: 6px 7px 0 #d7def2;
  }
  .hero::before { width: 300px; height: 300px; left: -180px; bottom: -210px; }
  .hero::after { right: -48px; top: -60px; }
  .hero-copy { width: 100%; padding: 27px 20px 19px; }
  .hero-date { font-size: .84rem; }
  .hero h1 { max-width: 100%; margin-bottom: 13px; font-size: clamp(2.55rem, 14vw, 4.4rem); line-height: .83; overflow-wrap: anywhere; }
  .hero-summary { margin-bottom: 16px; font-size: .83rem; }
  .hero-actions { display: grid; grid-template-columns: 1fr; gap: 9px; }
  .hero-actions .button { width: 100%; min-width: 0; white-space: normal; }
  .hero-illustration {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 620 / 285;
    margin: 0;
    opacity: .98;
  }
  .hero-illustration svg { position: absolute; inset: -9% -7% -8% 0; width: 112%; height: 117%; }
  .dashboard-grid { width: 100%; min-width: 0; gap: 18px; }
  .today-panel { width: 100%; min-width: 0; min-height: 0; padding: 20px 15px 24px; }
  .today-panel .section-heading { align-items: start; gap: 10px; }
  .today-panel .section-heading h2 { font-size: 1.28rem; }
  .today-panel .text-button { flex: 0 0 auto; font-size: .78rem; }
  .quick-access {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 22px 16px 25px;
    border-radius: 8px 24px 24px 24px;
    box-shadow: 6px 7px 0 var(--blue-300);
  }
  .quick-access header { margin-bottom: 4px; }
  .quick-access h2 { font-size: 1.55rem; }
  .quick-access__item { width: 100%; min-width: 0; min-height: 72px; margin: 0; padding: 12px; transform: none; }
  .quick-access__item > span { width: 42px; height: 42px; }
  .quick-access__item strong { font-size: .9rem; overflow-wrap: anywhere; }
  .quick-access__item small { font-size: .67rem; }

  .modal-backdrop { place-items: stretch center; padding: 8px; }
  .modal {
    width: min(100%, 620px);
    max-height: calc(100dvh - 16px);
    margin: auto 0;
    border-radius: 22px 22px 7px 22px;
    box-shadow: 6px 7px 0 rgba(22,24,65,.28);
  }
  .modal__header { min-height: 70px; padding: 15px 16px 12px; }
  .modal__header h2 { min-width: 0; font-size: clamp(1.12rem, 6vw, 1.45rem); overflow-wrap: anywhere; }
  .modal__content { padding: 16px; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions > .button { flex: 1 1 140px; }
  .modal-actions--spread { display: flex; justify-content: space-between; }
  .modal-actions--spread > div { display: flex; flex-wrap: wrap; }
  .meeting-modal-lead { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .meeting-modal-time { font-size: 1.35rem; }
  .details-list > div { grid-template-columns: minmax(82px, .7fr) minmax(0, 1.4fr); gap: 12px; }
  .details-list > div > * { min-width: 0; overflow-wrap: anywhere; }
  .meeting-manage-actions { display: grid; grid-template-columns: 1fr; }
  .meeting-manage-actions .button { width: 100%; }
  .meeting-edit-scope .segmented,
  .meeting-delete-scope .segmented { width: 100%; display: grid; grid-template-columns: 1fr; }

  .recording-card { overflow: hidden; }
  .recording-thumb--real > img { object-position: center; }
  .recording-player__placeholder { min-height: 210px; }

  .tool-popover--style {
    position: fixed;
    z-index: 1500;
    top: auto;
    right: 12px;
    bottom: calc(68px + env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
    min-width: 0;
    max-width: none;
    max-height: min(62dvh, 430px);
    overflow: auto;
    padding: 11px;
    border-radius: 17px 17px 6px 17px;
  }
  .tool-popover--style .custom-color-panel { max-height: 230px; }
  .custom-color-panel { padding: 8px; }
  .custom-color-spectrum { min-height: 105px; }
  .whiteboard-presence { top: 58px; right: 7px; }
  .whiteboard-presence > span { min-width: 27px; height: 27px; font-size: .52rem; }
  .whiteboard-cursor { max-width: 130px; font-size: .54rem; }

  .prejoin-output-settings,
  .audio-settings { padding: 12px; }
  .prejoin-audio-test { width: 100%; }
  .participant-volume { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .page { padding-inline: 10px; }
  .hero { min-height: 0; }
  .hero-copy { padding: 24px 16px 17px; }
  .hero h1 { font-size: clamp(2.35rem, 16vw, 3.65rem); }
  .hero-illustration { aspect-ratio: 620 / 310; }
  .today-panel { padding-inline: 12px; }
  .meeting-card { min-width: 0; }
  .quick-access { padding-inline: 13px; }
  .modal-backdrop { padding: 5px; }
  .modal { max-height: calc(100dvh - 10px); }
  .modal__header { min-height: 64px; padding: 12px 13px 10px; }
  .modal__content { padding: 13px; }
  .meeting-modal-lead { grid-template-columns: 1fr; }
  .meeting-modal-time { font-size: 1.25rem; }
  .details-list > div { grid-template-columns: 1fr; gap: 3px; padding-block: 10px; }
  .details-list > div > :first-child { font-size: .67rem; }
  .meeting-edit-form { gap: 13px; }
  .segmented--form { width: 100%; overflow-x: auto; }
  .segmented--form button { min-width: max-content; }
  .recording-card { grid-template-columns: 96px minmax(0, 1fr); }
  .recording-thumb { height: 108px; }
  .recording-thumb__duration { right: 6px; bottom: 6px; }
  .recording-player__placeholder { min-height: 180px; }
  .tool-popover--style { right: 7px; left: 7px; bottom: calc(62px + env(safe-area-inset-bottom)); }
  .audio-volume-field > span { font-size: .72rem; }
}

@media (orientation: landscape) and (max-height: 610px) {
  .modal-backdrop { padding: 6px; }
  .modal { max-height: calc(100dvh - 12px); }
  .modal__header { min-height: 52px; padding: 8px 14px; }
  .modal__content { padding: 12px 15px; }
  .tool-popover--style {
    top: 48px;
    right: 8px;
    bottom: 8px;
    left: auto;
    width: min(350px, 48vw);
    max-height: none;
  }
}

/* 1.3.0 cursor layer correction: cursor coordinates are canvas-relative. */
.whiteboard-presence {
  inset: 0;
  top: 0;
  right: 0;
  display: block;
  overflow: hidden;
}
@media (max-width: 760px) {
  .whiteboard-presence { inset: 0; top: 0; right: 0; }
}


/* Teach.Room 1.3.2 — viewport-safe board popovers */
.whiteboard__floating-tools.has-popover .tool-popover--style {
  position: fixed;
  z-index: 1800;
  top: clamp(76px, 10dvh, 112px);
  right: max(12px, env(safe-area-inset-right));
  bottom: auto;
  left: auto;
  width: min(340px, calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  min-width: 0;
  max-width: none;
  max-height: min(70dvh, 620px);
  overflow: auto;
  overscroll-behavior: contain;
  transform: none;
}

@media (max-width: 720px), (max-height: 620px) {
  .whiteboard__floating-tools.has-popover .tool-popover--style {
    top: auto;
    right: max(10px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
    width: auto;
    max-height: min(68dvh, 440px);
  }
}

/* Teach.Room 2.0.0 — board-first workspace */
.board-home-hero { min-height: 440px; }
.board-home-illustration { position: relative; min-height: 360px; align-self: stretch; }
.board-home-illustration svg { width: 100%; height: 100%; overflow: visible; }
.hero-doodle__blob { fill: rgba(255, 241, 166, .76); stroke: none; }
.hero-doodle__line, .hero-doodle__accent, .hero-doodle__board rect, .hero-doodle__board path, .hero-doodle__board circle, .board-home-cursor-line {
  fill: none; stroke: var(--blue-900); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round;
}
.hero-doodle__board rect { fill: rgba(255, 253, 246, .96); }
.hero-doodle__board circle { fill: rgba(219, 229, 248, .8); }
.hero-doodle__accent { stroke: var(--peach); stroke-width: 8; }
.hero-doodle__formula { fill: var(--blue-900); font: italic 28px Georgia, serif; }
.hero-doodle__formula--small { font-size: 23px; }
.board-home-cursor-dot--one { fill: #e46b3f; }
.board-home-cursor-dot--two { fill: #2b8a67; }
.board-home-cursor-line--one { stroke: #e46b3f; stroke-width: 3; }
.board-home-cursor-line--two { stroke: #2b8a67; stroke-width: 3; }

.board-home-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 22px; margin-bottom: 30px; }
.board-home-card { min-width: 0; padding: 27px; border: 2px solid rgba(48, 53, 111, .22); border-radius: 27px 27px 8px 27px; background: var(--white); box-shadow: 6px 7px 0 rgba(48, 53, 111, .08); }
.board-home-card h2 { margin: 4px 0 10px; font-family: "Arial Black", "Trebuchet MS", sans-serif; font-size: clamp(1.35rem, 2.6vw, 2rem); line-height: 1.05; }
.board-home-card > p:not(.eyebrow) { max-width: 720px; margin: 0; color: var(--ink-soft); line-height: 1.62; }
.board-home-steps { display: grid; gap: 10px; margin-top: 22px; }
.board-home-steps span { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-weight: 800; }
.board-home-steps strong { width: 32px; height: 32px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 50%; color: var(--blue-900); background: var(--lemon); }
.board-home-card--recent { background: #edf2fc; }
.board-home-card--recent > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.board-home-card--recent > header h2 { margin-bottom: 0; }
.board-home-recent-list { display: grid; gap: 9px; }
.board-home-recent-list > button { width: 100%; min-width: 0; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 12px; border: 2px solid rgba(48, 53, 111, .14); border-radius: 16px 16px 5px 16px; color: var(--ink); background: rgba(255, 253, 246, .96); text-align: left; transition: transform .14s ease, border-color .14s ease; }
.board-home-recent-list > button:hover { transform: translateY(-2px); border-color: var(--blue-900); }
.board-home-recent-list span { min-width: 0; }
.board-home-recent-list strong, .board-home-recent-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-home-recent-list small { margin-top: 4px; color: var(--ink-soft); font-size: .67rem; }
.board-home-recent-list b { color: var(--blue-900); font-size: 1.15rem; }
.mini-board-background { width: 52px; height: 42px; display: block; border: 2px solid rgba(48, 53, 111, .22); border-radius: 10px 10px 3px 10px; background-color: #fffdf6; }
.mini-board-background--grid, .board-preview--grid { background-image: linear-gradient(#dde1ef 1px, transparent 1px), linear-gradient(90deg, #dde1ef 1px, transparent 1px); background-size: 12px 12px; }
.mini-board-background--lined, .board-preview--lined { background-image: linear-gradient(#dde1ef 1px, transparent 1px); background-size: 100% 13px; }
.mini-board-background--dots, .board-preview--dots { background-image: radial-gradient(#b8bfd8 1.2px, transparent 1.2px); background-size: 13px 13px; }

.boards-intro { justify-content: space-between; }
.boards-intro > div:first-child { min-width: 0; display: flex; align-items: center; gap: 18px; }
.boards-intro > div:first-child > svg { width: 50px; height: 50px; flex: 0 0 auto; }
.boards-intro__stats { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; }
.boards-intro__stats span { min-width: 94px; padding: 10px 13px; border: 2px solid rgba(48,53,111,.18); border-radius: 14px 14px 5px 14px; background: rgba(255,253,246,.72); color: var(--ink-soft); font-size: .68rem; font-weight: 800; }
.boards-intro__stats strong { display: block; color: var(--blue-900); font-size: 1.4rem; }
.board-preview--lightweight { position: relative; overflow: hidden; background-color: #fffdf6; }
.board-preview__sheet { position: absolute; inset: 16% 12%; border: 2px solid rgba(48,53,111,.18); border-radius: 14px 14px 4px 14px; background: rgba(255,253,246,.82); transform: rotate(-1.4deg); }
.board-preview__line { position: absolute; left: 12%; height: 3px; border-radius: 999px; background: #7f8fc3; }
.board-preview__line--one { top: 25%; width: 45%; }
.board-preview__line--two { top: 42%; width: 31%; }
.board-preview__curve { position: absolute; left: 17%; bottom: 17%; width: 56%; height: 35%; border-top: 4px solid var(--peach); border-radius: 50%; transform: rotate(8deg); }
.board-preview__formula { position: absolute; right: 13%; top: 18%; color: var(--blue-900); font: italic 1.3rem Georgia, serif; }
.boards-page-loader { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--ink-soft); }
.boards-page-loader p { margin: 0; font-weight: 800; }

/* A board operation is immediate locally. Saving status stays non-blocking and understated. */
.whiteboard__hint { z-index: 25; box-shadow: 0 2px 12px rgba(29,32,74,.08); transition: opacity .15s ease, background .15s ease; }
.whiteboard__hint--saving { color: #71591d; background: rgba(255, 241, 191, .92); }
.whiteboard__hint--online, .whiteboard__hint--saved { color: #3f715e; background: rgba(226, 240, 233, .93); }
.whiteboard__hint--offline { color: #934952; background: rgba(248, 223, 224, .94); }
.whiteboard__loading { backdrop-filter: blur(2px); }

/* There are only two destinations in 2.0. */
@media (max-width: 760px) {
  .mobile-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-home-hero { min-height: 0; }
  .board-home-illustration { width: 100%; min-height: 245px; aspect-ratio: 620 / 330; }
  .board-home-illustration svg { position: absolute; inset: -3% -5% -4% -3%; width: 108%; height: 108%; }
  .board-home-grid { grid-template-columns: 1fr; gap: 16px; }
  .board-home-card { padding: 20px 16px; border-radius: 22px 22px 7px 22px; }
  .board-home-card--recent > header { align-items: center; }
  .boards-intro { display: grid; gap: 16px; }
  .boards-intro > div:first-child { align-items: flex-start; }
  .boards-intro__stats { width: 100%; }
  .boards-intro__stats span { flex: 1 1 110px; }
}

@media (max-width: 480px) {
  .board-home-illustration { min-height: 205px; }
  .board-home-card--recent > header { display: grid; }
  .board-home-recent-list > button { grid-template-columns: 45px minmax(0, 1fr) auto; padding-inline: 9px; }
  .mini-board-background { width: 45px; height: 38px; }
  .standalone-board > header > div strong { font-size: .78rem; }
}

/* Teach.Room 2.1.0 — navigation, presence and compact board controls */
.hero-date { text-transform: none; }
.board-home-hero { overflow: hidden; }
.board-home-illustration { overflow: hidden; isolation: isolate; }
.board-home-illustration svg { display: block; overflow: hidden; }
.hero-doodle__board { transform-box: fill-box; transform-origin: center; }
.board-preview__image, .mini-board-preview { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; background: #fffdf6; }
.mini-board-preview { width: 52px; height: 42px; border: 2px solid rgba(48,53,111,.22); border-radius: 10px 10px 3px 10px; }

.whiteboard__mobile-more, .whiteboard__mobile-drawer { display: none; }

.whiteboard__presence { position: absolute; z-index: 62; top: 12px; right: 12px; }
.whiteboard__presence-button { min-height: 43px; display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 7px; border: 2px solid rgba(48,53,111,.22); border-radius: 16px 16px 6px 16px; color: var(--blue-900); background: rgba(255,253,247,.96); box-shadow: 5px 6px 0 rgba(48,53,111,.1); font: inherit; cursor: pointer; }
.whiteboard__presence-button > b { min-width: 18px; font-size: .78rem; }
.whiteboard__presence-avatars { display: flex; padding-left: 5px; }
.whiteboard__presence-avatars i { width: 29px; height: 29px; display: grid; place-items: center; margin-left: -5px; border: 2px solid #fffdf7; border-radius: 50%; color: #fff; font-size: .68rem; font-style: normal; font-weight: 900; box-shadow: 0 1px 3px rgba(25,29,77,.18); }
.whiteboard__presence-panel { position: absolute; top: calc(100% + 9px); right: 0; width: min(350px, calc(100vw - 24px)); max-height: min(68dvh, 520px); overflow: auto; padding: 10px; border: 2px solid var(--line); border-radius: 19px 19px 7px 19px; color: var(--ink); background: #fffdf7; box-shadow: 9px 10px 0 rgba(28,31,75,.16); }
.whiteboard__presence-panel > header, .whiteboard__minimap > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 3px 3px 9px; }
.whiteboard__presence-panel > header button, .whiteboard__minimap > header button { width: 30px; height: 30px; border: 0; border-radius: 50%; color: var(--blue-900); background: var(--blue-100); font-size: 1.1rem; }
.whiteboard__presence-list { display: grid; gap: 7px; }
.whiteboard__presence-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 6px; border: 1px solid rgba(48,53,111,.14); border-radius: 13px 13px 4px 13px; background: rgba(237,242,252,.58); }
.whiteboard__participant-focus { min-width: 0; display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: center; gap: 9px; padding: 2px; border: 0; color: var(--ink); background: transparent; text-align: left; }
.whiteboard__participant-focus > i { width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; color: #fff; font-style: normal; font-weight: 900; }
.whiteboard__participant-focus > span { min-width: 0; }
.whiteboard__participant-focus strong, .whiteboard__participant-focus small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whiteboard__participant-focus small { margin-top: 3px; color: var(--ink-soft); font-size: .64rem; }
.whiteboard__summon { min-height: 34px; padding: 7px 9px; border: 1px solid rgba(48,53,111,.2); border-radius: 9px; color: var(--blue-900); background: var(--lemon); font-size: .66rem; font-weight: 900; }
.whiteboard__presence-note { display: block; margin: 9px 4px 2px; color: var(--ink-soft); font-size: .65rem; }

.whiteboard__navigation { position: absolute; z-index: 58; right: 14px; bottom: 14px; display: grid; justify-items: end; gap: 9px; pointer-events: none; }
.whiteboard__navigation > * { pointer-events: auto; }
.whiteboard__navigation-row { display: flex; align-items: center; gap: 7px; }
.whiteboard__minimap-toggle { width: 43px; height: 43px; border: 2px solid rgba(48,53,111,.2); border-radius: 14px 14px 5px 14px; color: var(--blue-900); background: rgba(255,253,247,.96); box-shadow: 4px 5px 0 rgba(48,53,111,.08); font-size: 1.2rem; font-weight: 900; }
.whiteboard__minimap-toggle.is-active { background: var(--lemon); }
.whiteboard__navigation .whiteboard__zoom { position: static; inset: auto; display: flex; transform: none; }
.whiteboard__minimap { width: min(340px, calc(100vw - 28px)); padding: 9px; border: 2px solid var(--line); border-radius: 18px 18px 6px 18px; color: var(--ink); background: rgba(255,253,247,.98); box-shadow: 8px 9px 0 rgba(28,31,75,.15); }
.whiteboard__minimap svg { width: 100%; height: 190px; display: block; overflow: hidden; border: 1px solid rgba(48,53,111,.18); border-radius: 11px; background: #f8f7f1; cursor: crosshair; touch-action: none; }
.whiteboard__minimap > small { display: block; padding: 7px 3px 1px; color: var(--ink-soft); font-size: .64rem; }
.minimap__background { fill: #fffdf6; }
.minimap__object { opacity: .48; }
.minimap__viewport { fill: rgba(255,241,166,.18); stroke: var(--blue-900); stroke-width: 4; vector-effect: non-scaling-stroke; }
.minimap__remote-viewport { fill: transparent; stroke-width: 4; stroke-dasharray: 9 6; vector-effect: non-scaling-stroke; }

.whiteboard__hint { right: auto; left: 14px; bottom: 14px; max-width: min(310px, calc(100% - 270px)); }

@media (max-width: 920px) {
  .whiteboard__presence { top: 62px; right: 9px; }
  .whiteboard__presence-button { min-height: 39px; padding-block: 3px; }
}

@media (max-width: 760px) {
  .board-home-illustration svg { position: static; inset: auto; width: 100%; height: 100%; }
  .hero-doodle__formula { font-size: 25px; }
  .hero-doodle__formula--small { font-size: 20px; }
  .mini-board-preview { width: 45px; height: 38px; }

  .whiteboard__floating-tools {
    top: 7px; left: 7px; right: auto; width: auto; max-width: calc(100% - 14px);
    align-items: center; gap: 2px; padding: 4px; overflow: visible; border-radius: 14px;
  }
  .whiteboard__floating-tools .whiteboard__desktop-extra { display: none !important; }
  .whiteboard__floating-tools .whiteboard__mobile-more { display: grid; font-weight: 900; letter-spacing: 1px; }
  .whiteboard__floating-tools .whiteboard__tool-row { gap: 2px; }
  .whiteboard__floating-tools .tool-button, .whiteboard__tool-toggle { width: 35px; min-width: 35px; height: 35px; }
  .whiteboard__floating-tools .tool-button--style { width: 40px; min-width: 40px; }
  .whiteboard__mobile-drawer {
    position: fixed; z-index: 1700; top: 56px; right: 8px; left: 8px;
    max-height: min(66dvh, 470px); overflow: auto; overscroll-behavior: contain;
    display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 7px;
    padding: 10px; border: 2px solid var(--line); border-radius: 17px 17px 6px 17px;
    color: var(--ink); background: rgba(255,253,247,.98); box-shadow: 8px 9px 0 rgba(28,31,75,.18);
  }
  .whiteboard__mobile-drawer > .tool-button { width: 100%; min-width: 0; height: 62px; display: grid; place-items: center; align-content: center; gap: 4px; padding: 5px 2px; border: 1px solid rgba(48,53,111,.15); color: var(--blue-900); background: #edf2fc; }
  .whiteboard__mobile-drawer > .tool-button span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: .58rem; font-weight: 900; white-space: nowrap; }
  .whiteboard__mobile-drawer > .tool-button.is-active { background: #91dfa0; }
  .whiteboard__mobile-drawer > .tool-button--danger { color: #a23f49; background: #fbe9e8; }
  .whiteboard__mobile-backgrounds { grid-column: 1 / -1; display: grid; grid-template-columns: auto repeat(4, minmax(0,1fr)); align-items: center; gap: 6px; padding: 7px; border: 1px solid rgba(48,53,111,.14); border-radius: 12px; background: #f8f7f1; }
  .whiteboard__mobile-backgrounds > span { display: flex; align-items: center; gap: 5px; color: var(--ink-soft); font-size: .64rem; font-weight: 900; }
  .whiteboard__mobile-backgrounds > span svg { width: 17px; height: 17px; }
  .whiteboard__mobile-backgrounds > button { min-width: 0; display: grid; justify-items: center; gap: 3px; padding: 5px 2px; border: 1px solid transparent; border-radius: 8px; color: var(--ink-soft); background: transparent; }
  .whiteboard__mobile-backgrounds > button.is-active { border-color: var(--blue-900); background: var(--blue-100); }
  .whiteboard__mobile-backgrounds small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: .55rem; white-space: nowrap; }
  .whiteboard__presence { top: 53px; right: 7px; }
  .whiteboard__presence-panel { position: fixed; top: 100px; right: 8px; left: 8px; width: auto; max-height: min(65dvh, 480px); }
  .whiteboard__presence-avatars i { width: 26px; height: 26px; }
  .whiteboard__navigation { right: 8px; bottom: 8px; }
  .whiteboard__minimap { width: min(330px, calc(100vw - 16px)); }
  .whiteboard__minimap svg { height: min(190px, 30dvh); }
  .whiteboard__navigation .whiteboard__zoom { padding: 3px; }
  .whiteboard__navigation .whiteboard__zoom button { min-width: 31px; height: 31px; }
  .whiteboard__navigation .whiteboard__zoom-value { min-width: 49px !important; }
  .whiteboard__minimap-toggle { width: 39px; height: 39px; }
  .whiteboard__hint { left: 8px; bottom: 8px; max-width: calc(100% - 205px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 410px) {
  .whiteboard__floating-tools .tool-button, .whiteboard__tool-toggle { width: 32px; min-width: 32px; height: 33px; }
  .whiteboard__floating-tools .tool-button--style { width: 37px; min-width: 37px; }
  .whiteboard__mobile-drawer { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .whiteboard__mobile-backgrounds { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .whiteboard__mobile-backgrounds > span { grid-column: 1 / -1; }
  .whiteboard__presence-button > b { display: none; }
  .whiteboard__hint { display: none; }
}

/* Teach.Room 2.1.1 — polished mobile sheets and viewport-preserving controls */
.tool-style-swatch {
  color: var(--blue-900);
  border-color: currentColor;
  background-clip: padding-box;
  box-shadow: 0 0 0 2px rgba(255,255,255,.74);
}
.tool-style-swatch::after { border-bottom-color: currentColor; }
.mobile-sheet-grabber { display: none; }
.whiteboard__mobile-tool-section,
.whiteboard__mobile-drawer-note,
.whiteboard__mobile-drawer-head { display: none; }

@media (max-width: 760px) {
  .whiteboard__floating-tools .tool-button--style {
    width: 44px;
    min-width: 44px;
    padding-inline: 3px;
  }
  .whiteboard__floating-tools .tool-button--style .tool-style-swatch {
    width: 24px;
    height: 20px;
    border-width: 3px;
    box-shadow: 0 0 0 2px rgba(255,255,255,.88), 0 2px 4px rgba(15,19,55,.22);
  }
  .whiteboard__floating-tools .tool-button--style .tool-caret { margin-left: -3px; }

  .mobile-sheet-grabber {
    min-height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: none;
    user-select: none;
  }
  .mobile-sheet-grabber > span {
    width: 46px;
    height: 5px;
    display: block;
    border-radius: 999px;
    background: rgba(48,53,111,.24);
  }

  .whiteboard__floating-tools.has-popover .tool-popover--style {
    padding-top: 4px;
    border-radius: 23px 23px 8px 23px;
  }
  .tool-popover--style > .mobile-sheet-grabber {
    position: sticky;
    z-index: 3;
    top: -4px;
    margin: -1px -4px 5px;
    border-radius: 18px 18px 0 0;
    background: rgba(255,253,247,.97);
  }

  .whiteboard__mobile-drawer {
    top: auto;
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    max-height: min(76dvh, 610px);
    display: block;
    padding: 0 12px 12px;
    overflow: auto;
    border: 2px solid rgba(48,53,111,.24);
    border-radius: 24px 24px 8px 24px;
    background: rgba(255,253,247,.985);
    box-shadow: 0 0 0 100vmax rgba(20,23,60,.36), 8px 10px 0 rgba(28,31,75,.17);
    overscroll-behavior: contain;
  }
  .whiteboard__mobile-drawer-head {
    position: sticky;
    z-index: 4;
    top: 0;
    display: grid;
    grid-template-columns: 40px minmax(0,1fr) 36px;
    align-items: center;
    gap: 7px;
    min-height: 58px;
    margin: 0 -12px 8px;
    padding: 0 10px;
    border-bottom: 1px solid rgba(48,53,111,.12);
    border-radius: 22px 22px 0 0;
    background: rgba(255,253,247,.98);
    touch-action: none;
  }
  .whiteboard__mobile-drawer-head .mobile-sheet-grabber { min-height: 40px; }
  .whiteboard__mobile-drawer-head .mobile-sheet-grabber > span { width: 32px; height: 4px; }
  .whiteboard__mobile-drawer-head strong {
    color: var(--blue-900);
    font-size: .86rem;
    text-align: center;
  }
  .whiteboard__mobile-drawer-head > button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: var(--blue-900);
    background: var(--blue-100);
    font-size: 1.15rem;
    line-height: 1;
  }

  .whiteboard__mobile-tool-section {
    display: grid;
    gap: 7px;
    margin-top: 10px;
  }
  .whiteboard__mobile-tool-section h4 {
    margin: 0 3px;
    color: var(--ink-soft);
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .045em;
    text-transform: uppercase;
  }
  .whiteboard__mobile-tool-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    gap: 7px;
  }
  .whiteboard__mobile-tool-grid > .tool-button {
    width: 100%;
    min-width: 0;
    height: 66px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 5px;
    padding: 7px 3px;
    border: 1px solid rgba(48,53,111,.14);
    border-radius: 14px 14px 5px 14px;
    color: var(--blue-900);
    background: linear-gradient(180deg, #f6f8fd 0%, #eaf0fb 100%);
    box-shadow: 0 2px 0 rgba(48,53,111,.07);
  }
  .whiteboard__mobile-tool-grid > .tool-button svg { width: 21px; height: 21px; }
  .whiteboard__mobile-tool-grid > .tool-button span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--ink);
    font-size: .59rem;
    font-weight: 850;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .whiteboard__mobile-tool-grid > .tool-button.is-active {
    border-color: rgba(43,138,103,.28);
    background: linear-gradient(180deg, #b5edbf 0%, #8cdda0 100%);
  }
  .whiteboard__mobile-tool-grid > .tool-button--danger {
    color: #a23f49;
    background: linear-gradient(180deg, #fff5f3 0%, #fbe5e3 100%);
  }

  .whiteboard__mobile-backgrounds {
    grid-column: auto;
    grid-template-columns: auto repeat(4, minmax(0,1fr));
    margin-top: 12px;
    padding: 9px;
    border-radius: 14px 14px 5px 14px;
    background: #f8f7f1;
  }
  .whiteboard__mobile-backgrounds > span { font-size: .62rem; }
  .whiteboard__mobile-drawer-note {
    display: block;
    margin: 9px 3px 0;
    color: var(--ink-soft);
    font-size: .58rem;
    line-height: 1.35;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .whiteboard__floating-tools .tool-button--style { width: 41px; min-width: 41px; }
  .whiteboard__mobile-tool-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .whiteboard__mobile-backgrounds { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .whiteboard__mobile-backgrounds > span { grid-column: 1 / -1; }
}


/* Teach.Room 2.1.2 — family logo and quiet resume */

/* Teach.Room 2.2.1 — teaching tools, shapes, interactives and export */
.tool-popover--shapes {
  width: min(620px, calc(100vw - 34px));
  max-height: min(72vh, 650px);
  overflow: auto;
  padding: 16px;
  display: grid;
  gap: 18px;
}
.tool-popover--shapes section { display: grid; gap: 10px; }
.shape-library-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(104px, 1fr));
  gap: 8px;
}
.shape-library-grid > button {
  border: 1px solid rgba(53,56,143,.13);
  border-radius: 13px;
  background: #fffdf8;
  color: var(--ink);
  min-height: 78px;
  padding: 9px 7px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  font: inherit;
  cursor: pointer;
}
.shape-library-grid > button:hover { background: var(--blue-100); border-color: rgba(53,56,143,.25); }
.shape-library-grid > button span { font-size: 12px; line-height: 1.2; text-align: center; }
.shape-preview, .solid-preview {
  width: 42px;
  height: 30px;
  display: block;
  position: relative;
  color: var(--indigo);
}
.shape-preview::before, .solid-preview::before, .solid-preview::after {
  content: '';
  position: absolute;
  inset: 2px;
  border: 2px solid currentColor;
  box-sizing: border-box;
}
.shape-preview--triangle::before { clip-path: polygon(50% 0,100% 100%,0 100%); }
.shape-preview--right-triangle::before { clip-path: polygon(0 0,100% 100%,0 100%); }
.shape-preview--parallelogram::before { transform: skewX(-18deg) scaleX(.8); }
.shape-preview--rhombus::before { transform: rotate(45deg) scale(.63); }
.shape-preview--trapezoid::before { clip-path: polygon(20% 0,80% 0,100% 100%,0 100%); }
.shape-preview--pentagon::before { clip-path: polygon(50% 0,100% 38%,82% 100%,18% 100%,0 38%); }
.shape-preview--hexagon::before { clip-path: polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%); }
.solid-preview::before { inset: 6px 9px 2px 1px; }
.solid-preview::after { inset: 1px 1px 7px 9px; border-style: dashed; opacity: .7; }
.solid-preview--cylinder::before, .solid-preview--cone::before, .solid-preview--truncated-cone::before, .solid-preview--sphere::before { border-radius: 50%; inset: 1px 4px; }
.solid-preview--cone::after { border: 0; border-left: 2px solid currentColor; border-right: 2px solid currentColor; transform: perspective(30px) rotateX(-18deg); inset: 4px 8px 2px; }
.solid-preview--sphere::after { border-radius: 50%; inset: 10px 3px; }

.tool-popover--interactive {
  min-width: 320px;
  width: min(360px, calc(100vw - 30px));
  padding: 12px;
  display: grid;
  gap: 6px;
}
.tool-popover--interactive > strong { padding: 4px 7px 8px; }
.tool-popover--interactive > button, .interactive-library > button {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  padding: 10px;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}
.tool-popover--interactive > button:hover, .interactive-library > button:hover { background: var(--blue-100); }
.tool-popover--interactive svg, .interactive-library svg { width: 24px; height: 24px; color: var(--indigo); }
.tool-popover--interactive span, .interactive-library span { display: grid; gap: 2px; }
.tool-popover--interactive small, .interactive-library small { color: var(--ink-soft); line-height: 1.25; }

.mobile-library {
  margin: 4px 12px 10px;
  border: 1px solid rgba(53,56,143,.12);
  border-radius: 15px;
  background: rgba(255,255,255,.72);
  overflow: hidden;
}
.mobile-library summary {
  list-style: none;
  min-height: 48px;
  padding: 10px 13px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
}
.mobile-library summary::-webkit-details-marker { display: none; }
.mobile-library summary svg { width: 22px; height: 22px; color: var(--indigo); }
.mobile-library[open] summary span { transform: rotate(180deg); }
.mobile-library__body { padding: 0 10px 12px; display: grid; gap: 8px; }
.mobile-library__body > strong { font-size: 12px; color: var(--ink-soft); padding: 4px 3px 0; }
.mobile-library--interactive .interactive-library { padding: 0 8px 10px; display: grid; gap: 2px; }

.export-format-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.export-format-grid > button {
  min-height: 84px;
  border: 1px solid rgba(53,56,143,.14);
  border-radius: 15px;
  background: #fffdf8;
  color: var(--ink);
  padding: 12px;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}
.export-format-grid > button:hover { background: var(--blue-100); }
.export-format-grid > button:disabled { opacity: .55; cursor: wait; }
.export-format-grid svg { width: 27px; height: 27px; color: var(--indigo); }
.export-format-grid span { display: grid; gap: 3px; }
.export-format-grid small { color: var(--ink-soft); line-height: 1.25; }
.export-progress { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px 0 0; }
.modal-lead { color: var(--ink-soft); margin: 0 0 14px; }

@media (max-width: 760px) {
  .whiteboard__tool-row { gap: 3px; }
  .whiteboard__tool-row > .tool-button, .whiteboard__tool-row > .tool-popover-anchor > .tool-button { width: 43px; min-width: 43px; height: 43px; }
  .shape-library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shape-library-grid > button { min-height: 72px; padding: 7px 4px; }
  .shape-library-grid > button span { font-size: 10px; }
  .whiteboard__mobile-drawer { max-height: min(74dvh, 690px); overflow-y: auto; overscroll-behavior: contain; }
  .export-format-grid { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .whiteboard__tool-row > .tool-button, .whiteboard__tool-row > .tool-popover-anchor > .tool-button { width: 39px; min-width: 39px; height: 40px; }
  .whiteboard__tool-row svg { width: 21px; height: 21px; }
  .shape-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.tool-popover--shapes section > strong { display: flex; align-items: center; gap: 7px; }
.tool-popover--shapes section > strong svg { width: 20px; height: 20px; color: var(--indigo); }
.shape-library-grid--basic > button { min-height: 62px; }
.shape-library-grid--basic svg { width: 29px; height: 29px; color: var(--indigo); }

/* Teach.Room 2.3.0 — reliable editing controls and compact board tools */
.whiteboard__mobile-more { display: none !important; }

.tool-style-swatch {
  color: inherit;
  border-color: currentColor;
  background-clip: padding-box;
  overflow: visible;
}
.tool-style-swatch > i {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: -7px;
  height: 3px;
  display: block;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(20,24,68,.25);
}
.tool-style-swatch::after { display: none; }

.text-font-field {
  display: grid;
  gap: 7px;
}
.text-font-field select {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(53,56,143,.2);
  border-radius: 11px;
  padding: 7px 10px;
  color: var(--ink);
  background: #fffdf8;
  font: inherit;
}

.shape-preview-svg {
  width: 52px;
  height: 39px;
  display: block;
  color: var(--indigo);
  overflow: visible;
}
.shape-library-grid > button.is-active {
  border-color: rgba(43,138,103,.42);
  background: linear-gradient(180deg, #d8f5df 0%, #b9ebc5 100%);
  box-shadow: inset 0 0 0 1px rgba(43,138,103,.12);
}

.whiteboard__presence { top: 78px; }
.whiteboard__presence-panel { z-index: 1900; }

.whiteboard__text-editor-card {
  position: absolute;
  z-index: 121;
  width: clamp(230px, 36vw, 470px);
  display: grid;
  overflow: hidden;
  border: 2px solid #416bc4;
  border-radius: 15px 15px 5px 15px;
  background: rgba(255,253,247,.985);
  box-shadow: 7px 8px 0 rgba(48,53,111,.14);
  transform-origin: left top;
}
.whiteboard__text-editor-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px 6px;
  border-bottom: 1px solid rgba(53,56,143,.12);
  color: var(--blue-900);
  background: rgba(238,242,255,.82);
}
.whiteboard__text-editor-head strong { font-size: .74rem; }
.whiteboard__text-editor-head small { color: var(--ink-soft); font-size: .58rem; white-space: nowrap; }
.whiteboard__inline-text-editor {
  position: static;
  z-index: auto;
  width: 100%;
  min-height: 86px;
  max-height: min(34dvh, 300px);
  resize: vertical;
  overflow: auto;
  margin: 0;
  padding: 10px 11px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
}
.whiteboard__text-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding: 7px 9px 9px;
  border-top: 1px solid rgba(53,56,143,.1);
}
.whiteboard__text-editor-actions button {
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid rgba(53,56,143,.18);
  border-radius: 10px;
  color: var(--blue-900);
  background: #fff;
  font: inherit;
  font-size: .69rem;
  font-weight: 850;
}
.whiteboard__text-editor-actions button.is-primary { color: #fff; border-color: var(--blue-900); background: var(--blue-900); }

.board-editor-title {
  min-width: 0;
  max-width: min(58vw, 620px);
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  padding: 5px 8px;
  border-radius: 11px;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.board-editor-title:hover { background: rgba(237,242,252,.8); }
.board-editor-title > span { min-width: 0; display: grid; gap: 2px; }
.board-editor-title strong,
.board-editor-title small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-editor-title small { color: var(--ink-soft); font-size: .65rem; }
.board-editor-title > i { flex: 0 0 auto; color: var(--indigo); font-style: normal; font-size: 1rem; }

@media (max-width: 920px) {
  .whiteboard__presence { top: 76px; }
}

@media (max-width: 760px) {
  .whiteboard__floating-tools .whiteboard__mobile-more { display: grid !important; }
  .whiteboard__presence { top: 64px; }
  .whiteboard__presence-panel { top: 114px; }
  .whiteboard__floating-tools .tool-button--style .tool-style-swatch {
    width: 25px;
    height: 21px;
    border-width: 4px;
  }
  .tool-style-swatch > i { left: 2px; right: 2px; bottom: -7px; height: 4px; }
  .shape-preview-svg { width: 48px; height: 36px; }
  .whiteboard__text-editor-card {
    position: fixed !important;
    z-index: 1895 !important;
    top: auto !important;
    right: 8px !important;
    bottom: max(64px, calc(env(safe-area-inset-bottom) + 64px)) !important;
    left: 8px !important;
    width: auto !important;
    max-width: none;
    transform: none !important;
    border-radius: 16px 16px 6px 16px;
    box-shadow: 0 -5px 22px rgba(28,31,75,.12), 5px 6px 0 rgba(28,31,75,.1);
  }
  .whiteboard__text-editor-head { min-height: 30px; padding: 5px 9px; }
  .whiteboard__text-editor-head small { display: none; }
  .whiteboard__inline-text-editor {
    min-height: 78px;
    max-height: min(25dvh, 180px);
    resize: none;
    padding: 8px 10px;
  }
  .whiteboard__text-editor-actions { padding: 6px 8px 8px; }
  .board-editor-title { max-width: 48vw; padding-inline: 4px; }
  .board-editor-title > i { display: none; }
}

@media (max-width: 410px) {
  .whiteboard__presence { top: 61px; }
  .whiteboard__presence-panel { top: 108px; }
}

/* Teach.Room 2.3.0 — final mobile visibility and geometry-library polish */
.tool-style-swatch {
  width: 27px;
  height: 25px;
  position: relative;
  display: block;
  flex: 0 0 auto;
  border: 2px solid rgba(255,255,255,.96) !important;
  border-radius: 8px;
  background-clip: border-box;
  box-shadow: 0 0 0 1px rgba(22,27,67,.32), 0 2px 4px rgba(15,19,55,.24);
  overflow: visible;
}
.tool-style-swatch > i {
  position: absolute;
  right: -5px;
  bottom: -5px;
  left: auto;
  width: 11px;
  height: 11px;
  display: block;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(22,27,67,.3), 0 1px 2px rgba(20,24,68,.2);
}
.tool-style-swatch::after { display: none !important; }

.shape-library-grid > button {
  min-width: 0;
  grid-template-rows: 42px auto;
  overflow: visible;
}
.shape-library-grid > button .shape-preview-svg {
  align-self: center;
  justify-self: center;
  max-width: 100%;
  overflow: visible;
}
.shape-library-grid > button span {
  width: 100%;
  overflow-wrap: anywhere;
}

/* Keep presence controls clearly below the drawing toolbar on every viewport. */
.whiteboard__presence { top: 84px; }

@media (max-width: 920px) {
  .whiteboard__presence { top: 78px; }
}

@media (max-width: 760px) {
  .whiteboard__presence { top: 72px; right: 8px; }
  .whiteboard__presence-panel { top: 124px; }
  .whiteboard__floating-tools .tool-button--style .tool-style-swatch {
    width: 27px;
    height: 25px;
    border-width: 2px !important;
  }
  .tool-style-swatch > i {
    right: -5px;
    bottom: -5px;
    left: auto;
    width: 11px;
    height: 11px;
  }
  .shape-library-grid > button { grid-template-rows: 40px auto; min-height: 82px; }
}

@media (max-width: 410px) {
  .whiteboard__presence { top: 69px; }
  .whiteboard__presence-panel { top: 119px; }
}

/* Keep the editable board title visible despite legacy mobile header rules. */
.standalone-board > header .board-editor-title > span {
  display: grid !important;
  min-width: 0;
}
@media (max-width: 760px) {
  .standalone-board > header .board-editor-title small { display: none; }
}

/* Teach.Room 2.3.1 — explicit mobile color indicator, text formatting and corrected overlays */
.tool-color-indicator {
  position: relative;
  width: 28px;
  height: 25px;
  display: block;
  flex: 0 0 28px;
}
.tool-color-indicator__main {
  position: absolute;
  inset: 1px 4px 5px 1px;
  display: block;
  border: 2px solid #fff;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(18,23,65,.42), 0 2px 4px rgba(10,14,48,.28);
}
.tool-color-indicator__fill {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 11px;
  height: 11px;
  display: block;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(18,23,65,.42);
}
.whiteboard__floating-tools .tool-button--style {
  width: 46px;
  min-width: 46px;
  overflow: visible;
}

.whiteboard__text-format-bar {
  position: absolute;
  z-index: 63;
  top: 76px;
  left: 14px;
  max-width: min(430px, calc(100% - 28px));
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border: 2px solid rgba(48,53,111,.2);
  border-radius: 15px 15px 5px 15px;
  color: var(--ink);
  background: rgba(255,253,247,.97);
  box-shadow: 6px 7px 0 rgba(28,31,75,.13);
  backdrop-filter: blur(8px);
}
.whiteboard__text-format-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--blue-900);
  font: 900 1rem/1 Georgia, serif;
}
.whiteboard__text-format-bar label {
  min-width: 0;
  flex: 1 1 230px;
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr);
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: .68rem;
  font-weight: 900;
}
.whiteboard__text-format-bar select {
  width: 100%;
  min-height: 34px;
  min-width: 0;
  padding: 5px 28px 5px 9px;
  border: 1px solid rgba(53,56,143,.22);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font-family: inherit;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.2;
}
.whiteboard__text-color-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid rgba(53,56,143,.18);
  border-radius: 9px;
  color: var(--ink-soft);
  background: var(--blue-100);
  font-family: inherit;
  font-size: .68rem;
  font-weight: 800;
  line-height: 1;
}
.whiteboard__text-color-button i {
  width: 17px;
  height: 17px;
  display: block;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(31,35,84,.34);
}
.whiteboard--text-format-visible .whiteboard__presence { top: 136px; }

@media (max-width: 760px) {
  .whiteboard__floating-tools .tool-button--style {
    width: 46px !important;
    min-width: 46px !important;
    padding-inline: 2px;
  }
  .tool-color-indicator { width: 28px; height: 25px; flex-basis: 28px; }
  .whiteboard__text-format-bar {
    top: 68px;
    left: 8px;
    right: 8px;
    max-width: none;
    min-height: 45px;
    gap: 6px;
    padding: 5px 7px;
  }
  .whiteboard__text-format-icon { width: 29px; height: 29px; flex-basis: 29px; }
  .whiteboard__text-format-bar label {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 5px;
    font-size: .62rem;
  }
  .whiteboard__text-format-bar select { min-height: 32px; font-size: .7rem; }
  .whiteboard__text-color-button { width: 34px; min-width: 34px; padding: 4px; justify-content: center; }
  .whiteboard__text-color-button span { display: none; }
  .whiteboard--text-format-visible .whiteboard__presence { top: 122px; }
  .whiteboard--text-format-visible .whiteboard__presence-panel { top: 170px; }
}

@media (max-width: 390px) {
  .whiteboard__floating-tools .tool-button--style {
    width: 42px !important;
    min-width: 42px !important;
  }
  .tool-color-indicator { transform: scale(.92); }
  .whiteboard__text-format-bar label > span { display: none; }
}

@media (max-width: 340px) {
  .whiteboard__tool-row > .tool-button,
  .whiteboard__tool-row > .tool-popover-anchor > .tool-button {
    width: 35px;
    min-width: 35px;
  }
  .whiteboard__floating-tools .tool-button--style {
    width: 39px !important;
    min-width: 39px !important;
  }
  .tool-color-indicator { transform: scale(.84); }
}

/* Teach.Room 2.3.2 — mobile-safe current-color control.
   The selected color is painted on the button itself instead of relying on
   nested empty elements that some mobile Chromium builds failed to render. */
.tool-color-button-glyph {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.96);
  border-radius: 7px;
  color: #fff;
  background: rgba(24,28,74,.28);
  box-shadow: 0 1px 3px rgba(13,17,52,.28);
  font-size: .72rem;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,.55);
}
.whiteboard__floating-tools .tool-button--style {
  background-clip: border-box !important;
  overflow: visible;
}
.whiteboard__floating-tools .tool-button--style:hover {
  filter: brightness(1.06);
}
@media (max-width: 760px) {
  .whiteboard__floating-tools .tool-button--style {
    width: 44px !important;
    min-width: 44px !important;
  }
  .tool-color-button-glyph { width: 22px; height: 22px; }
}
@media (max-width: 390px) {
  .whiteboard__floating-tools .tool-button--style {
    width: 41px !important;
    min-width: 41px !important;
  }
  .tool-color-button-glyph { width: 20px; height: 20px; }
}

/* Teach.Room 2.4.0 — owner-only board stress test. Loaded only with ?dev-test=1. */
.dev-stress-panel {
  position: absolute;
  z-index: 80;
  left: 14px;
  bottom: 52px;
  width: min(360px, calc(100vw - 28px));
  padding: 12px;
  border: 2px solid rgba(53,56,143,.32);
  border-radius: 18px 18px 6px 18px;
  background: rgba(255,253,247,.985);
  box-shadow: 8px 9px 0 rgba(28,31,75,.16);
  color: var(--ink);
  font-size: .76rem;
}
.dev-stress-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dev-stress-panel > header div { display: grid; gap: 1px; }
.dev-stress-panel > header strong { color: var(--blue-900); font-size: .88rem; }
.dev-stress-panel > header small { color: var(--ink-soft); font-size: .63rem; }
.dev-stress-panel > header button { width: 28px; height: 28px; border: 0; border-radius: 9px; background: rgba(53,56,143,.08); color: var(--blue-900); font: inherit; font-size: 1rem; cursor: pointer; }
.dev-stress-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dev-stress-grid label { display: grid; gap: 4px; color: var(--ink-soft); font-size: .62rem; font-weight: 800; }
.dev-stress-grid select { min-width: 0; height: 34px; padding: 0 8px; border: 1.5px solid var(--line); border-radius: 10px; background: #fffdf7; color: var(--ink); font: inherit; }
.dev-stress-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }
.dev-stress-modes button { display: grid; gap: 2px; padding: 8px; border: 1.5px solid var(--line); border-radius: 12px; text-align: left; background: #fffdf7; color: var(--ink); font: inherit; cursor: pointer; }
.dev-stress-modes button.is-active { border-color: var(--blue-500); background: rgba(65,107,196,.1); box-shadow: inset 0 0 0 1px rgba(65,107,196,.15); }
.dev-stress-modes small { color: var(--ink-soft); font-size: .58rem; line-height: 1.25; }
.dev-stress-actions { display: flex; gap: 7px; margin-top: 10px; }
.dev-stress-actions .button { min-height: 34px; padding: 7px 10px; font-size: .66rem; }
.dev-stress-report { display: grid; gap: 7px; margin-top: 10px; padding: 9px; border-radius: 12px; background: rgba(65,107,196,.08); }
.dev-stress-report > strong { color: var(--blue-900); }
.dev-stress-report dl { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px; margin: 0; }
.dev-stress-report dl div { display: flex; justify-content: space-between; gap: 7px; }
.dev-stress-report dt { color: var(--ink-soft); }
.dev-stress-report dd { margin: 0; font-weight: 900; }
.dev-stress-report > button { justify-self: start; padding: 0; border: 0; background: transparent; color: var(--blue-600); font: inherit; font-weight: 900; cursor: pointer; }
.dev-stress-error { margin: 9px 0 0; color: #b23a4c; font-weight: 800; }
.dev-stress-note { margin: 9px 0 0; color: var(--ink-soft); font-size: .59rem; line-height: 1.35; }
.dev-stress-launcher, .dev-stress-loading { position: absolute; z-index: 80; left: 14px; bottom: 52px; min-width: 46px; height: 34px; border: 2px solid rgba(53,56,143,.28); border-radius: 11px 11px 4px 11px; background: rgba(255,253,247,.97); color: var(--blue-900); box-shadow: 4px 5px 0 rgba(28,31,75,.12); font: inherit; font-size: .65rem; font-weight: 950; cursor: pointer; }
.dev-stress-loading { display: grid; place-items: center; }
@media (max-width: 640px) {
  .dev-stress-panel { left: 8px; bottom: 74px; width: calc(100vw - 16px); max-height: min(72vh, 560px); overflow: auto; border-radius: 17px 17px 5px 17px; }
  .dev-stress-launcher, .dev-stress-loading { left: 8px; bottom: 74px; }
}

/* Teach.Room 2.5.0 — mobile landscape polish, layered sheets and compact board header. */
.whiteboard__mobile-primary { display: none !important; }
.whiteboard__presence { transition: top .22s ease, right .22s ease; }
.whiteboard--tools-collapsed .whiteboard__presence { top: 12px; }
.whiteboard--mobile-drawer-open .whiteboard__floating-tools { z-index: 1800; }
.whiteboard--mobile-drawer-open .whiteboard__navigation { z-index: 30; }

.board-editor-title strong {
  color: var(--blue-900);
  font-size: 1.02rem;
  line-height: 1.15;
  letter-spacing: -.01em;
}
.standalone-board > header .button {
  min-height: 40px;
  padding: 8px 14px;
  font-size: .78rem;
}

@media (max-width: 760px) {
  .whiteboard__floating-tools .whiteboard__mobile-primary { display: grid !important; }
  .whiteboard--tools-collapsed .whiteboard__presence { top: 8px; }
  .whiteboard--tools-collapsed .whiteboard__presence-panel { top: 58px; }
  .whiteboard--tools-collapsed.whiteboard--text-format-visible .whiteboard__presence { top: 68px; }
  .standalone-board > header .button {
    min-height: 36px;
    padding: 7px 9px;
    font-size: .69rem;
  }
  .board-editor-title strong { font-size: .9rem; }
  .board-editor-title { max-width: 52vw; }
}

@media (max-width: 1024px) and (orientation: landscape) and (max-height: 600px) {
  .standalone-board {
    grid-template-rows: 48px minmax(0, 1fr);
  }
  .standalone-board > header {
    min-height: 48px;
    gap: 7px;
    padding: 3px 8px;
  }
  .standalone-board > header .button {
    min-height: 34px;
    padding: 5px 9px;
    font-size: .66rem;
  }
  .standalone-board > header .board-editor-title {
    max-width: 48vw;
    padding: 2px 5px;
  }
  .standalone-board > header .board-editor-title strong { font-size: .84rem; }
  .standalone-board > header .board-editor-title small { display: none; }
  .shared-board > header .brand__mark { width: 32px; height: 32px; }
  .shared-board > header > div span { display: none; }

  .whiteboard__floating-tools {
    top: 5px;
    left: 6px;
    max-width: calc(100% - 12px);
    padding: 3px;
    gap: 1px;
  }
  .whiteboard__floating-tools .tool-button,
  .whiteboard__tool-toggle,
  .whiteboard__tool-row > .tool-button,
  .whiteboard__tool-row > .tool-popover-anchor > .tool-button {
    width: 32px;
    min-width: 32px;
    height: 32px;
  }
  .whiteboard__floating-tools .tool-button--style {
    width: 38px !important;
    min-width: 38px !important;
  }
  .whiteboard__floating-tools svg { width: 18px; height: 18px; }
  .whiteboard__presence { top: 47px; right: 7px; }
  .whiteboard--tools-collapsed .whiteboard__presence { top: 6px; }
  .whiteboard__presence-button { min-height: 34px; padding: 2px 7px 2px 5px; }
  .whiteboard__presence-avatars i { width: 24px; height: 24px; }
  .whiteboard__presence-panel { top: 88px; max-height: calc(100dvh - 96px); }
  .whiteboard--tools-collapsed .whiteboard__presence-panel { top: 47px; }
  .whiteboard__navigation { right: 6px; bottom: 6px; gap: 5px; }
  .whiteboard__navigation .whiteboard__zoom { padding: 2px; }
  .whiteboard__navigation .whiteboard__zoom button { min-width: 29px; height: 29px; }
  .whiteboard__navigation .whiteboard__zoom-value { min-width: 45px !important; }
  .whiteboard__minimap-toggle { width: 35px; height: 35px; }
  .whiteboard__mobile-drawer {
    right: 6px;
    bottom: 6px;
    left: 6px;
    max-height: calc(100dvh - 12px);
  }
  .whiteboard__mobile-drawer-head { min-height: 48px; }
  .whiteboard__mobile-tool-grid > .tool-button { height: 58px; }
}

@media (min-width: 761px) and (max-width: 1024px) and (orientation: landscape) and (max-height: 600px) {
  .whiteboard__floating-tools .whiteboard__desktop-extra { display: none !important; }
  .whiteboard__floating-tools .whiteboard__mobile-more,
  .whiteboard__floating-tools .whiteboard__mobile-primary { display: grid !important; }
  .whiteboard__mobile-drawer {
    position: fixed;
    z-index: 1700;
    right: 6px;
    bottom: 6px;
    left: 6px;
    max-height: calc(100dvh - 12px);
    display: block;
    padding: 0 12px 12px;
    overflow: auto;
    border: 2px solid rgba(48,53,111,.24);
    border-radius: 22px 22px 8px 22px;
    color: var(--ink);
    background: rgba(255,253,247,.99);
    box-shadow: 0 0 0 100vmax rgba(20,23,60,.36), 8px 10px 0 rgba(28,31,75,.17);
    overscroll-behavior: contain;
  }
  .whiteboard__mobile-drawer-head {
    position: sticky;
    z-index: 4;
    top: 0;
    min-height: 48px;
    display: grid;
    grid-template-columns: 40px minmax(0,1fr) 36px;
    align-items: center;
    gap: 7px;
    margin: 0 -12px 8px;
    padding: 0 10px;
    border-bottom: 1px solid rgba(48,53,111,.12);
    border-radius: 20px 20px 0 0;
    background: rgba(255,253,247,.98);
  }
  .whiteboard__mobile-drawer-head .mobile-sheet-grabber { min-height: 36px; display: flex; align-items: center; justify-content: center; }
  .whiteboard__mobile-drawer-head .mobile-sheet-grabber > span { width: 32px; height: 4px; display: block; border-radius: 999px; background: rgba(48,53,111,.24); }
  .whiteboard__mobile-drawer-head strong { color: var(--blue-900); font-size: .82rem; text-align: center; }
  .whiteboard__mobile-drawer-head > button { width: 32px; height: 32px; border: 0; border-radius: 50%; color: var(--blue-900); background: var(--blue-100); font-size: 1.05rem; }
  .whiteboard__mobile-tool-section { display: grid; gap: 7px; margin-top: 8px; }
  .whiteboard__mobile-tool-section h4 { margin: 0 3px; color: var(--ink-soft); font-size: .6rem; font-weight: 900; letter-spacing: .045em; text-transform: uppercase; }
  .whiteboard__mobile-tool-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 6px; }
  .whiteboard__mobile-tool-grid > .tool-button { width: 100%; min-width: 0; height: 54px; display: grid; place-items: center; align-content: center; gap: 3px; padding: 5px 2px; border: 1px solid rgba(48,53,111,.14); border-radius: 12px 12px 4px 12px; color: var(--blue-900); background: linear-gradient(180deg,#f6f8fd 0%,#eaf0fb 100%); }
  .whiteboard__mobile-tool-grid > .tool-button span { display: block; max-width: 100%; overflow: hidden; color: var(--ink); font-size: .54rem; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
  .whiteboard__mobile-tool-grid > .tool-button.is-active { background: linear-gradient(180deg,#b5edbf 0%,#8cdda0 100%); }
  .whiteboard__mobile-backgrounds { margin-top: 9px; }
  .whiteboard__mobile-drawer-note { display: block; margin: 7px 3px 0; color: var(--ink-soft); font-size: .56rem; text-align: center; }
}

/* Teach.Room 2.7.0 — Teach.Shelf integration and editor polish. */
.auth-brand-copy {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 8px;
  max-width: 650px;
}
.auth-shared-account-note {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-top: 4px;
  padding: 6px 11px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.09);
  font-size: .7rem;
  font-weight: 850;
}
.auth-brand-art--board {
  right: 24px;
  bottom: 18px;
  width: min(42%, 390px);
  height: auto;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  transform: none;
  opacity: .92;
}
.auth-brand-art--board svg { width: 100%; height: auto; overflow: visible; }
.auth-brand-art--board rect,
.auth-brand-art--board path,
.auth-brand-art--board circle {
  fill: none;
  stroke: rgba(200,219,255,.82);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.auth-brand-art--board rect { stroke-width: 5; opacity: .64; }
.auth-brand-art--board circle { fill: var(--lemon); stroke: var(--blue-200); stroke-width: 4; }

@media (min-width: 1081px) {
  .auth-page {
    width: 100%;
    min-height: 100svh;
    height: 100svh;
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
    align-items: center;
    gap: clamp(18px, 3vw, 42px);
    padding: clamp(12px, 2.2vh, 22px) clamp(18px, 3vw, 44px);
    overflow: hidden;
  }
  .auth-brand-panel,
  .auth-card {
    min-height: 0 !important;
    max-height: calc(100svh - 24px);
  }
  .auth-brand-panel {
    height: min(660px, calc(100svh - 24px));
    align-content: start;
    padding: clamp(24px, 3.2vh, 34px) clamp(28px, 4vw, 52px);
    border-radius: 32px 32px 10px 32px;
  }
  .auth-brand-panel .logo { transform: scale(.9); transform-origin: left top; }
  .auth-brand-copy { margin-top: clamp(38px, 6vh, 72px); }
  .auth-brand-panel h1 {
    width: min(100%, 13ch);
    max-width: 13ch;
    margin: 2px 0 8px;
    font-size: clamp(2rem, 4.1vw, 4.15rem);
    line-height: .96;
  }
  .auth-brand-panel p {
    max-width: 570px;
    margin: 0;
    font-size: clamp(.78rem, 1vw, .94rem);
    line-height: 1.45;
  }
  .auth-card {
    width: min(100%, 560px);
    max-width: 560px;
    padding: clamp(24px, 3.6vh, 38px) clamp(26px, 3vw, 42px);
    border-radius: 30px 30px 9px 30px;
    overflow: auto;
    scrollbar-width: thin;
  }
  .auth-card h1,
  .auth-card h2 {
    margin: 6px 0 12px;
    font-size: clamp(1.7rem, 2.5vw, 2.55rem);
  }
  .auth-card form { gap: 10px; margin-top: 16px; }
  .auth-card .field { gap: 5px; }
  .auth-card .field input { min-height: 42px; }
  .auth-card .button--large { min-height: 42px; }
  .auth-tabs { margin-bottom: 18px; }
  .auth-inline-row { margin-top: 10px; }
}

@media (max-width: 1080px) {
  .auth-brand-art--board { right: 22px; bottom: 10px; width: min(48%, 330px); }
}

/* The native browser color selector supplies the full gamut; the visible round
   swatch remains stable across Chromium desktop, Android and installed PWAs. */
.custom-color-wheel {
  position: relative;
  min-height: 64px;
  display: grid;
  grid-template-columns: 56px minmax(0,1fr);
  align-items: center;
  gap: 12px;
  padding: 7px;
  border: 1px solid rgba(48,53,111,.15);
  border-radius: 14px;
  background: rgba(255,253,247,.78);
  cursor: pointer;
}
.custom-color-wheel input[type="color"] {
  position: absolute;
  left: 7px;
  top: 7px;
  width: 56px;
  height: 50px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}
.custom-color-wheel > span {
  width: 50px;
  height: 50px;
  display: block;
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(48,53,111,.32), 0 4px 8px rgba(30,34,75,.16);
}
.custom-color-wheel small { color: var(--ink-soft); font-size: .68rem; line-height: 1.35; }
.fill-native-color {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  cursor: pointer;
}
.fill-native-color input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.fill-native-color i { width: 30px; height: 30px; display: block; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(48,53,111,.34); }

.update-toast > div { display: grid; gap: 3px; }
.update-toast > div strong,
.update-toast > div span { display: block; }

@media (max-width: 760px) {
  /* Keep all frequent mobile actions — select, pan, pen, undo, redo, color,
     eraser and more — on one row without horizontal scrolling. */
  .whiteboard__floating-tools {
    gap: 1px;
    padding: 4px 3px;
  }
  .whiteboard__tool-row { gap: 1px !important; }
  .whiteboard__floating-tools .tool-button,
  .whiteboard__tool-toggle,
  .whiteboard__tool-row > .tool-button,
  .whiteboard__tool-row > .tool-popover-anchor > .tool-button {
    width: 32px;
    min-width: 32px;
    height: 34px;
    border-radius: 8px;
  }
  .whiteboard__floating-tools .tool-button--style {
    width: 35px !important;
    min-width: 35px !important;
  }
  .whiteboard__floating-tools svg { width: 18px; height: 18px; }
  .tool-color-button-glyph { width: 18px; height: 18px; font-size: .58rem; }
  .tool-caret { font-size: .55rem; }
}

@media (max-width: 420px) {
  .whiteboard__floating-tools {
    left: 5px;
    right: 5px;
    max-width: calc(100% - 10px);
  }
  .whiteboard__floating-tools .tool-button,
  .whiteboard__tool-toggle,
  .whiteboard__tool-row > .tool-button,
  .whiteboard__tool-row > .tool-popover-anchor > .tool-button {
    width: 30px;
    min-width: 30px;
    height: 32px;
  }
  .whiteboard__floating-tools .tool-button--style {
    width: 33px !important;
    min-width: 33px !important;
  }
  .whiteboard__floating-tools svg { width: 17px; height: 17px; }

  /* On portrait phones the icon and eyebrow share the first line, while the
     title and explanation use the full card width instead of a narrow column. */
  .boards-intro {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 16px !important;
  }
  .boards-intro > div:first-child {
    width: 100%;
    display: grid !important;
    grid-template-columns: 46px minmax(0,1fr);
    grid-template-rows: auto auto auto;
    align-items: center !important;
    gap: 8px 10px !important;
  }
  .boards-intro > div:first-child > svg {
    grid-column: 1;
    grid-row: 1;
    width: 44px;
    height: 44px;
    padding: 9px;
  }
  .boards-intro > div:first-child > div { display: contents; }
  .boards-intro > div:first-child .eyebrow { grid-column: 2; grid-row: 1; align-self: center; margin: 0; }
  .boards-intro h2 {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
    margin: 2px 0 0;
    font-size: 1rem;
    line-height: 1.08;
    overflow-wrap: normal;
    word-break: normal;
  }
  .boards-intro p {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    max-width: none;
    font-size: .78rem;
    line-height: 1.42;
  }
  .boards-intro__stats {
    width: 100%;
    grid-column: 1 !important;
    margin: 0;
    gap: 8px;
  }
  .boards-intro__stats span { min-width: 0; flex: 1 1 0; }
}

/* Teach.Shelf integration and archive — 2.7.0 */
.integration-settings-card { grid-column: 1 / -1; }
.integration-settings-card header { align-items: flex-start; }
.integration-settings-actions, .board-editor-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.integration-benefits { margin: 4px 0 14px; padding-left: 20px; color: var(--muted); line-height: 1.65; }
.integration-loading { min-height: 160px; display: grid; place-items: center; align-content: center; gap: 12px; }
.integration-target-row, .integration-tag-grid, .interactive-style-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.integration-lessons { border: 1px solid var(--line); border-radius: 18px; padding: 12px; margin: 14px 0; }
.integration-lessons legend { padding: 0 8px; font-weight: 800; }
.integration-lesson-list { display: grid; gap: 7px; max-height: 280px; overflow: auto; padding-right: 4px; }
.integration-lesson-list label { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 13px; background: rgba(238,241,255,.55); cursor: pointer; }
.integration-lesson-list label span { display: grid; gap: 2px; }
.integration-lesson-list small { color: var(--muted); }
.board-card--archived { opacity: .78; }
.board-card--archived .board-preview { filter: grayscale(.18); }
.shelf-export-panel { margin-top: 14px; padding: 13px; border: 1px solid rgba(53,56,143,.18); border-radius: 18px; background: rgba(238,241,255,.62); display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; }
.shelf-export-panel > div { display: grid; gap: 2px; }
.shelf-export-panel small { color: var(--muted); }
.shelf-export-form { display: grid; gap: 12px; }
.interactive-style-grid .field--full { grid-column: 1 / -1; }
.color-field input[type="color"] { width: 100%; min-height: 44px; padding: 4px; border-radius: 12px; }
@media (max-width: 720px) {
  .integration-target-row, .integration-tag-grid, .interactive-style-grid { grid-template-columns: 1fr; }
  .interactive-style-grid .field--full { grid-column: auto; }
  .shelf-export-panel { grid-template-columns: 1fr; }
  .board-editor-actions { justify-content: flex-end; }
}

/* Teach.Room 2.7.1 — integrated menus, palette controls and inset scrolling */
.board-shelf-menu { position: relative; }
.board-shelf-menu > .button { display: inline-flex; align-items: center; gap: 6px; }
.board-shelf-menu > .button > span { display: inline !important; margin: 0 !important; font-size: .75rem; }
.board-shelf-menu__popover {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 8px);
  right: 0;
  width: min(290px, calc(100vw - 20px));
  padding: 7px;
  display: grid;
  gap: 5px;
  border: 1px solid rgba(48,53,111,.2);
  border-radius: 17px 17px 6px 17px;
  background: #fffdf7;
  box-shadow: 7px 9px 0 rgba(30,34,75,.15), 0 18px 38px rgba(30,34,75,.18);
  text-align: left;
}
.board-shelf-menu__popover button,
.shelf-header-export-options button {
  width: 100%;
  padding: 12px 13px;
  display: grid;
  gap: 3px;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.board-shelf-menu__popover button:hover,
.board-shelf-menu__popover button:focus-visible,
.shelf-header-export-options button:hover,
.shelf-header-export-options button:focus-visible { background: rgba(225,231,255,.72); outline: none; }
.board-shelf-menu__popover strong,
.board-shelf-menu__popover small,
.shelf-header-export-options strong,
.shelf-header-export-options small { display: block; }
.board-shelf-menu__popover small,
.shelf-header-export-options small { color: var(--muted); line-height: 1.35; }
.shelf-header-export-options { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.shelf-header-export-options button { min-height: 84px; border: 1px solid rgba(48,53,111,.16); background: rgba(238,241,255,.46); }

.interactive-color-picker { grid-column: 1 / -1; }
.interactive-color-palette {
  display: grid;
  grid-template-columns: repeat(7, minmax(34px, 1fr));
  gap: 7px;
  align-items: stretch;
}
.interactive-color-palette > button {
  min-width: 0;
  aspect-ratio: 1;
  border: 3px solid #fff;
  border-radius: 11px;
  box-shadow: 0 0 0 1px rgba(48,53,111,.23);
  cursor: pointer;
}
.interactive-color-palette > button.is-active { box-shadow: 0 0 0 3px var(--blue-700), 0 4px 10px rgba(30,34,75,.18); }
.interactive-color-wheel {
  position: relative;
  min-width: 0;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(48,53,111,.2);
  border-radius: 11px;
  background: rgba(255,253,247,.85);
  cursor: pointer;
}
.interactive-color-wheel input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.interactive-color-wheel i {
  width: 25px;
  height: 25px;
  display: block;
  border: 2px solid #fff;
  border-radius: 50%;
  background: conic-gradient(#e94343, #f3ce39, #40b968, #3d83ef, #8a4edb, #e94343);
  box-shadow: 0 0 0 1px rgba(48,53,111,.25);
}
.interactive-color-wheel small { font-size: .56rem; color: var(--muted); }

/* Scrollbars visually belong to the card instead of looking like a system rail. */
.modal__content,
.integration-lesson-list,
.custom-select__menu,
.custom-color-panel,
.tool-popover,
.whiteboard__presence-panel,
.whiteboard__minimap,
.auth-card,
.whiteboard__floating-tools {
  scrollbar-width: thin;
  scrollbar-color: rgba(53,56,143,.48) transparent;
  scrollbar-gutter: stable;
}
.modal__content::-webkit-scrollbar,
.integration-lesson-list::-webkit-scrollbar,
.custom-select__menu::-webkit-scrollbar,
.custom-color-panel::-webkit-scrollbar,
.tool-popover::-webkit-scrollbar,
.whiteboard__presence-panel::-webkit-scrollbar,
.whiteboard__minimap::-webkit-scrollbar,
.auth-card::-webkit-scrollbar,
.whiteboard__floating-tools::-webkit-scrollbar { width: 10px; height: 8px; }
.modal__content::-webkit-scrollbar-track,
.integration-lesson-list::-webkit-scrollbar-track,
.custom-select__menu::-webkit-scrollbar-track,
.custom-color-panel::-webkit-scrollbar-track,
.tool-popover::-webkit-scrollbar-track,
.whiteboard__presence-panel::-webkit-scrollbar-track,
.whiteboard__minimap::-webkit-scrollbar-track,
.auth-card::-webkit-scrollbar-track,
.whiteboard__floating-tools::-webkit-scrollbar-track { background: transparent; }
.modal__content::-webkit-scrollbar-thumb,
.integration-lesson-list::-webkit-scrollbar-thumb,
.custom-select__menu::-webkit-scrollbar-thumb,
.custom-color-panel::-webkit-scrollbar-thumb,
.tool-popover::-webkit-scrollbar-thumb,
.whiteboard__presence-panel::-webkit-scrollbar-thumb,
.whiteboard__minimap::-webkit-scrollbar-thumb,
.auth-card::-webkit-scrollbar-thumb,
.whiteboard__floating-tools::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(53,56,143,.48);
  background-clip: padding-box;
}
.modal__content::-webkit-scrollbar-thumb:hover,
.integration-lesson-list::-webkit-scrollbar-thumb:hover,
.custom-select__menu::-webkit-scrollbar-thumb:hover,
.tool-popover::-webkit-scrollbar-thumb:hover { background-color: rgba(53,56,143,.7); }

.standalone-board { height: 100dvh; min-height: 100dvh; }
@media (orientation: landscape) and (pointer: coarse) {
  html, body, #root { width: 100%; height: 100%; overflow: hidden; }
  .standalone-board { height: 100dvh; min-height: 100dvh; }
}
@media (max-width: 720px) {
  .interactive-color-palette { grid-template-columns: repeat(5, minmax(34px, 1fr)); }
  .shelf-header-export-options { grid-template-columns: 1fr; }
  .board-shelf-menu__popover { position: fixed; top: 62px; right: 8px; }
}

/* Teach.Room 2.8.0 — polls, text editing and mobile editor ergonomics. */
.whiteboard__text-font-control { flex: 1 1 220px !important; }
.whiteboard__text-size-control { flex: 0 0 112px !important; }
.whiteboard__text-color-anchor { position: relative; flex: 0 0 auto; }
.whiteboard__text-color-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  right: 0;
  width: min(292px, calc(100vw - 24px));
  padding: 9px;
  border: 1px solid rgba(48,53,111,.2);
  border-radius: 15px 15px 5px 15px;
  background: rgba(255,253,247,.99);
  box-shadow: 5px 7px 0 rgba(28,31,75,.13), 0 14px 34px rgba(28,31,75,.14);
}
.whiteboard__text-color-popover .color-palette { display: grid; grid-template-columns: repeat(7, minmax(28px, 1fr)); gap: 7px; }
.whiteboard__text-color-popover .color-palette > button,
.whiteboard__text-color-popover .fill-native-color {
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  min-height: 30px;
  border-radius: 9px;
}

.poll-config { display: grid; gap: 12px; }
.poll-config__toggles { display: grid; gap: 8px; }
.poll-config__toggles label,
.poll-correct-options label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--ink);
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.35;
}
.poll-config__toggles input,
.poll-correct-options input { margin-top: 2px; accent-color: var(--blue-900); }
.poll-correct-options {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(48,53,111,.13);
  border-radius: 13px;
  background: rgba(237,242,252,.48);
}
.poll-correct-options > strong { color: var(--ink-soft); font-size: .7rem; }
.poll-vote { display: grid; gap: 12px; }
.poll-vote__hint { margin: -3px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.poll-vote__options { display: grid; gap: 8px; }
.poll-vote__options > label {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 9px 11px;
  overflow: hidden;
  border: 1px solid rgba(48,53,111,.16);
  border-radius: 13px 13px 5px 13px;
  background: rgba(246,248,253,.92);
  cursor: pointer;
}
.poll-vote__options > label::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0 auto 0 0;
  width: var(--poll-result, 0%);
  background: rgba(117,132,226,.13);
  pointer-events: none;
}
.poll-vote__options input,
.poll-vote__options span,
.poll-vote__options small { position: relative; z-index: 1; }
.poll-vote__options input { accent-color: var(--blue-900); }
.poll-vote__options span { min-width: 0; overflow-wrap: anywhere; }
.poll-vote__answer { display: flex; min-width: 0; align-items: baseline; flex-wrap: wrap; column-gap: 9px; row-gap: 2px; }
.poll-vote__answer strong { min-width: 0; font-weight: 800; overflow-wrap: anywhere; }
.poll-vote__options small { color: rgba(93,101,132,.72); font-size: .68rem; font-weight: 600; white-space: nowrap; }
.poll-vote__options > label.is-selected { border-color: rgba(53,56,143,.58); background: rgba(225,231,255,.76); }
.poll-vote__summary { color: var(--ink-soft); font-size: .75rem; }
.poll-vote__cancel { margin-right: auto; }

.root-error {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--ink);
  background: var(--paper, #fffdf7);
}
.root-error > section {
  width: min(520px, 100%);
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 2px solid rgba(48,53,111,.18);
  border-radius: 24px 24px 8px 24px;
  background: #fff;
  box-shadow: 8px 10px 0 rgba(28,31,75,.12);
}
.root-error strong { color: var(--blue-900); font-size: 1.12rem; }
.root-error p { margin: 0; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.root-error div { display: flex; flex-wrap: wrap; gap: 8px; }
.root-error button {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid rgba(48,53,111,.18);
  border-radius: 12px;
  color: var(--blue-900);
  background: var(--blue-100);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

@media (max-width: 760px) {
  /* Seven tiny columns made the extended tool sheet effectively unreadable. */
  .whiteboard__mobile-tool-grid { grid-template-columns: repeat(4, minmax(0,1fr)) !important; gap: 8px !important; }
  .whiteboard__mobile-tool-grid > .tool-button {
    min-height: 66px !important;
    height: auto !important;
    padding: 7px 4px !important;
    gap: 4px !important;
  }
  .whiteboard__mobile-tool-grid > .tool-button svg { width: 22px; height: 22px; }
  .whiteboard__mobile-tool-grid > .tool-button span {
    display: -webkit-box !important;
    max-width: 100%;
    overflow: hidden;
    font-size: .62rem !important;
    line-height: 1.12;
    text-align: center;
    text-overflow: ellipsis;
    white-space: normal !important;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .mobile-library { margin-inline: 0; }
  .mobile-library summary { min-height: 52px; padding-inline: 12px; }

  /* Text controls stay above the software keyboard instead of fighting the board header. */
  .whiteboard__text-format-bar {
    position: fixed !important;
    z-index: 1900 !important;
    top: auto !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none !important;
    min-height: 48px;
    display: grid !important;
    grid-template-columns: 30px minmax(0,1fr) 72px 38px;
    gap: 6px;
    padding: 6px 7px;
    border-radius: 16px 16px 5px 16px;
    box-shadow: 0 -5px 24px rgba(28,31,75,.14), 5px 6px 0 rgba(28,31,75,.11);
  }
  .whiteboard__text-format-icon { width: 30px; height: 30px; }
  .whiteboard__text-format-bar label {
    display: block !important;
    min-width: 0 !important;
    flex: none !important;
  }
  .whiteboard__text-format-bar label > span { display: none !important; }
  .whiteboard__text-font-control,
  .whiteboard__text-size-control { flex: none !important; }
  .whiteboard__text-format-bar select {
    min-height: 34px !important;
    padding: 5px 24px 5px 7px;
    font-size: .72rem !important;
  }
  .whiteboard__text-color-anchor { min-width: 0; }
  .whiteboard__text-color-button { width: 36px; min-width: 36px; min-height: 34px; padding: 4px; }
  .whiteboard__text-color-button i { width: 18px; height: 18px; }
  .whiteboard__text-color-popover {
    top: auto;
    right: -2px;
    bottom: calc(100% + 8px);
    width: min(292px, calc(100vw - 16px));
  }
  .whiteboard--text-format-visible .whiteboard__presence,
  .whiteboard--text-format-visible .whiteboard__presence-panel { top: revert; }

  .poll-config__toggles { gap: 10px; }
  .poll-vote__options > label { grid-template-columns: 22px minmax(0,1fr); }
  .poll-vote__answer { grid-column: 2; align-items: baseline; column-gap: 8px; }
  .poll-vote__options small { justify-self: start; }
}

@media (max-width: 370px) {
  .whiteboard__mobile-tool-grid { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
  .whiteboard__text-format-bar { grid-template-columns: 28px minmax(0,1fr) 64px 36px; }
}

/* Teach.Room 2.8.1 — editable interactives, direct Shelf linking and resilient mobile tools. */
.form-slow-note,
.interactive-edit-note {
  padding: 9px 11px;
  border: 1px solid rgba(53,56,143,.16);
  border-radius: 12px 12px 4px 12px;
  color: var(--ink-soft);
  background: rgba(238,241,255,.62);
  font-size: .72rem;
  line-height: 1.45;
}
.board-shelf-link-direct { display: inline-flex; align-items: center; gap: 7px; }
.board-shelf-link-direct b {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue-900);
  font-size: .62rem;
}
.board-shelf-link-direct__mobile { display: none; }

@media (max-width: 760px) {
  .board-shelf-link-direct__desktop { display: none; }
  .board-shelf-link-direct__mobile { display: inline; }
  .board-editor-actions { gap: 5px; flex-wrap: nowrap; }
  .board-editor-actions .button { min-width: 0; }
  .board-shelf-link-direct { max-width: 74px !important; }

  /* Explicit stretch rules avoid inherited inline/flex button sizing on mobile browsers. */
  .whiteboard__mobile-drawer .whiteboard__mobile-tool-grid {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    justify-items: stretch !important;
    align-items: stretch !important;
    gap: 9px !important;
  }
  .whiteboard__mobile-drawer .whiteboard__mobile-tool-grid > button.tool-button {
    box-sizing: border-box !important;
    inline-size: 100% !important;
    width: 100% !important;
    max-inline-size: none !important;
    max-width: none !important;
    min-inline-size: 0 !important;
    min-width: 0 !important;
    min-height: 72px !important;
    height: auto !important;
    justify-self: stretch !important;
    align-self: stretch !important;
    place-items: center !important;
    align-content: center !important;
    padding: 8px 6px !important;
  }
  .whiteboard__mobile-drawer .whiteboard__mobile-tool-grid > button.tool-button svg {
    width: 24px !important;
    height: 24px !important;
    flex: 0 0 auto;
  }
  .whiteboard__mobile-drawer .whiteboard__mobile-tool-grid > button.tool-button span {
    width: 100%;
    display: block !important;
    overflow: visible !important;
    font-size: .66rem !important;
    line-height: 1.15 !important;
    text-align: center;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    -webkit-line-clamp: unset !important;
  }
}

@media (max-width: 340px) {
  .whiteboard__mobile-drawer .whiteboard__mobile-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Teach.Room 2.8.2 — viewport-stable image/PDF insertion is implemented in LocalWhiteboard. */

/* Teach.Room 2.8.3 — compact mobile toolbar and a single Teach.Shelf entry point. */
.board-shelf-menu__count {
  min-width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  margin-left: 1px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue-900);
  font-size: .58rem;
  line-height: 1;
}

@media (max-width: 760px) {
  /* Earlier mobile rules set both left and right, which made the dark toolbar
     occupy almost the whole viewport even when its controls needed much less room. */
  .whiteboard__floating-tools {
    right: auto !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: calc(100% - 14px) !important;
    justify-content: flex-start !important;
    flex: 0 0 auto !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-gutter: auto !important;
  }
  .whiteboard__floating-tools.has-popover { overflow: visible !important; }
  .whiteboard--tools-collapsed .whiteboard__floating-tools {
    right: auto !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: calc(100% - 14px) !important;
  }
  .whiteboard__floating-tools .whiteboard__tool-row {
    width: auto !important;
    min-width: max-content !important;
    flex: 0 0 auto !important;
  }
  .board-editor-actions { gap: 6px; }
  .board-shelf-menu > .button { padding-inline: 8px !important; }
  .board-shelf-menu__count { min-width: 17px; height: 17px; padding-inline: 4px; font-size: .54rem; }
}

@media (max-width: 420px) {
  .whiteboard__floating-tools {
    right: auto !important;
    width: max-content !important;
    max-width: calc(100% - 10px) !important;
  }
  .whiteboard--tools-collapsed .whiteboard__floating-tools {
    max-width: calc(100% - 10px) !important;
  }
}


/* Teach.Room 2.8.6 — safer image rendering and clearer direct interaction. */
.object-context-menu button[title="Редактировать текст"] { font-size: 1.02rem; font-weight: 900; }
@media (max-width: 760px) {
  .poll-vote__hint { font-size: .79rem; }
  .whiteboard__text-editor-actions button { min-height: 36px; padding-inline: 14px; }
}
.legal-consent-card{max-width:680px}.legal-consent-links{display:grid;gap:8px;margin:18px 0}.legal-consent-links a{font-weight:650;color:var(--accent,#35388f);text-underline-offset:3px}.legal-check{display:flex;align-items:flex-start;gap:12px;margin:14px 0;line-height:1.45}.legal-check input{width:18px;height:18px;margin-top:3px;flex:0 0 auto}
