:root {
  --bg:#eef3f8; --panel:#fff; --ink:#16243a; --muted:#68768a; --line:#d7e0ea;
  --accent:#2874f0; --accent-dark:#185bc8; --danger:#bd3838; --success:#1d7d56;
  --shadow:0 12px 34px rgba(20,34,54,.12);
}
*{box-sizing:border-box} html,body{margin:0;min-height:100%} body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--ink);overscroll-behavior:none} button,input,select{font:inherit} button{cursor:pointer}.hidden{display:none!important}
.btn{border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:10px;padding:9px 13px;font-weight:800;text-decoration:none;white-space:nowrap}.btn:hover{background:#f6f8fb}.btn.primary{background:var(--accent);color:#fff;border-color:var(--accent)}.btn.primary:hover{background:var(--accent-dark)}.btn.danger{color:var(--danger)}.btn.small{padding:7px 10px;font-size:14px}.btn:disabled{opacity:.4;cursor:default}
.center-card{width:min(560px,calc(100vw - 32px));margin:8vh auto;background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);padding:34px;text-align:center}.center-card h1{margin:12px 0 10px}.center-card p{color:var(--muted);line-height:1.5}.login-logo,.join-logo{display:block;width:min(470px,100%);height:auto;margin:0 auto 26px}.waiting-logo{display:block;width:min(380px,90%);margin:0 auto 16px}.form-row{display:flex;gap:10px;margin-top:20px}.form-row input{flex:1;min-width:0;border:1px solid var(--line);border-radius:10px;padding:11px 12px}
.lobby-page{min-height:100vh}.lobby-sticky{position:sticky;top:0;z-index:20;background:#fff;border-bottom:1px solid var(--line);box-shadow:0 5px 18px rgba(20,34,54,.07);padding:10px 20px 12px}.lobby-logo{display:block;width:min(570px,74vw);max-height:150px;object-fit:contain;margin:0 auto}.lobby-controls{max-width:1080px;margin:2px auto 0;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:24px}.lobby-control-buttons{display:flex;gap:8px}.lobby-content{max-width:1080px;margin:0 auto;padding:24px 18px 60px}.board-list{display:flex;flex-direction:column;gap:12px}.board-card{display:flex;align-items:center;justify-content:space-between;gap:20px;background:#fff;border:1px solid var(--line);border-radius:15px;padding:18px 20px;box-shadow:0 4px 16px rgba(20,34,54,.05)}.board-card-info{min-width:0}.board-card h3{margin:0 0 5px;font-size:20px}.board-card p{margin:0;color:var(--muted);font-size:14px}.board-card-actions{display:flex;gap:7px;flex:0 0 auto}.empty-state{background:#fff;border:1px dashed #bcc9d7;border-radius:16px;padding:46px;text-align:center;color:var(--muted);display:flex;flex-direction:column;gap:8px}.empty-state strong{font-size:22px;color:var(--ink)}
.board-shell{height:100dvh;display:grid;grid-template-rows:auto auto minmax(0,1fr) 58px;overflow:hidden}.board-header{background:#fff;border-bottom:1px solid var(--line);padding:7px 12px;display:grid;grid-template-columns:minmax(330px,1fr) auto;gap:12px;align-items:center}.board-header-left{display:flex;align-items:center;gap:8px;min-width:0}.board-logo{width:205px;max-height:72px;object-fit:contain;flex:0 0 auto}.board-name{font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:230px}.live-pill{background:#e8f8f0;color:var(--success);border:1px solid #c6e9da;border-radius:999px;padding:4px 8px;font-size:12px;font-weight:900;letter-spacing:.04em}.board-header-right{display:flex;flex-direction:column;align-items:flex-end;gap:5px;min-width:0}.connection-row{height:26px;display:flex;align-items:center;justify-content:flex-end;gap:7px;width:100%}.status-text{color:var(--muted);font-size:14px}.board-toolbar,.student-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:5px;white-space:nowrap}.tool-btn{border:1px solid var(--line);background:#fff;border-radius:8px;padding:7px 9px;font-weight:800;font-size:13px}.tool-btn.active{background:#e9f1ff;border-color:#94b7f6;color:#174fae}.color-input{width:34px;height:32px;border:1px solid var(--line);border-radius:8px;padding:2px;background:#fff}.width-select{border:1px solid var(--line);border-radius:8px;padding:6px;background:#fff;font-size:13px}
.waiting-banner{background:#fff5ca;border-bottom:1px solid #e6d17b;padding:7px 12px;display:flex;flex-wrap:wrap;gap:7px;align-items:center}.waiting-person{display:flex;align-items:center;gap:6px;background:#fff;border:1px solid #eadb9a;padding:5px 7px;border-radius:9px}.canvas-wrap{position:relative;min-height:0;background:#dfe6ee;padding:8px}.canvas-card{position:absolute;inset:8px;background:#fff;border:1px solid #cbd5df;box-shadow:0 4px 18px rgba(23,34,52,.08);overflow:hidden}#boardCanvas{width:100%;height:100%;display:block;touch-action:none}.readonly-note{position:absolute;top:8px;left:50%;transform:translateX(-50%);background:rgba(22,36,58,.82);color:#fff;padding:5px 10px;border-radius:999px;font-size:12px;pointer-events:none}.pagebar{background:#fff;border-top:1px solid var(--line);display:flex;align-items:center;gap:7px;padding:8px 11px;overflow-x:auto}.page-buttons{display:flex;gap:5px}.page-btn{min-width:40px;height:36px;border:1px solid var(--line);background:#fff;border-radius:8px;font-weight:900}.page-btn.active{background:var(--ink);color:#fff;border-color:var(--ink)}.page-spacer{flex:1}
.student-board-shell{height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}.student-header{background:#fff;border-bottom:1px solid var(--line);padding:7px 12px;display:flex;align-items:center;justify-content:space-between;gap:14px}.student-header-left{display:flex;align-items:center;gap:8px;min-width:0}.student-board-logo{width:190px;max-height:68px;object-fit:contain}.student-control-note{margin-right:4px}
.modal{position:fixed;inset:0;z-index:50;background:rgba(14,26,43,.58);display:grid;place-items:center;padding:18px}.modal-card{position:relative;width:min(500px,100%);max-height:calc(100dvh - 36px);overflow:auto;background:#fff;border-radius:20px;padding:26px;text-align:center;box-shadow:0 20px 60px rgba(0,0,0,.26)}.modal-card h2{margin:0 38px 6px;font-size:25px}.modal-close{position:absolute;right:12px;top:10px;border:0;background:transparent;color:var(--muted);font-size:30px;line-height:1}.invite-helper{margin:4px auto 10px;color:var(--muted);line-height:1.4}.invite-code-line{font-size:14px;color:var(--muted);margin-bottom:8px}.invite-code-line strong{color:var(--ink);font-size:17px;letter-spacing:.12em}.invite-qr{display:block;width:min(280px,75vw);height:auto;margin:8px auto 14px;border:1px solid var(--line);border-radius:12px}.invite-link-row{display:flex;gap:8px;margin-bottom:8px}.invite-url{flex:1;min-width:0;border:1px solid var(--line);border-radius:9px;padding:9px 10px;background:#f8fafc;color:var(--ink);font-size:13px}.toast{position:fixed;right:16px;bottom:74px;background:#172234;color:#fff;border-radius:10px;padding:10px 13px;box-shadow:var(--shadow);z-index:70}.error{color:var(--danger)!important}
@media(max-width:1100px){.board-header{grid-template-columns:minmax(300px,1fr) auto}.board-logo{width:165px}.board-name{max-width:150px}.tool-btn{padding:6px 7px;font-size:12px}.width-select{max-width:92px}.student-board-logo{width:150px}.student-toolbar .status-text{display:none}}
@media(max-width:850px){.board-header{grid-template-columns:1fr;gap:4px}.board-header-right{align-items:stretch}.connection-row{justify-content:flex-end}.board-toolbar{justify-content:flex-start;overflow-x:auto}.board-logo{width:150px}.student-header{align-items:flex-start;flex-direction:column;gap:4px}.student-toolbar{width:100%;justify-content:flex-start;overflow-x:auto}.lobby-logo{width:min(500px,92vw)}.lobby-controls{font-size:20px}.board-card{align-items:flex-start;flex-direction:column}.board-card-actions{width:100%}.board-card-actions .btn{flex:1}}
@media(max-width:600px){.center-card{margin:4vh auto;padding:24px 18px}.form-row{flex-direction:column}.lobby-sticky{padding:8px 10px 10px}.lobby-controls{align-items:stretch;flex-direction:column;gap:7px}.lobby-control-buttons .btn{flex:1}.board-logo{width:125px}.board-name{max-width:110px}.invite-link-row{flex-direction:column}}

/* ============================================================
   ZoodleBoard canvas layout repair
   Keep header/footer fixed to their content and force the
   whiteboard canvas to consume every remaining viewport pixel.
   ============================================================ */

html,
body {
  width: 100%;
  height: 100%;
}

.board-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.board-header {
  flex: 0 0 auto;
}

.waiting-banner {
  flex: 0 0 auto;
}

.canvas-wrap {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.canvas-card {
  position: absolute;
  inset: 8px;
}

#boardCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  pointer-events: auto;
}

.pagebar {
  flex: 0 0 58px;
  min-height: 58px;
  width: 100%;
}

.student-board-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.student-header {
  flex: 0 0 auto;
}

.student-board-shell .canvas-wrap {
  flex: 1 1 0;
  min-height: 0;
}


/* ============================================================
   Join request footer
   ============================================================ */
.join-request-slot {
  min-width: 0;
  flex: 0 1 380px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  overflow: hidden;
}

.join-request-message {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.join-action {
  flex: 0 0 auto;
  padding: 5px 8px !important;
}

.join-message-card {
  width: min(440px, 100%);
}

.join-message-card p {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.45;
  margin: 18px 0 22px;
}

@media (max-width: 900px) {
  .join-request-slot {
    flex: 0 0 auto;
    min-width: 290px;
  }
}


/* ZoodleBug family navigation - integration test */
.zoodlebug-home-link {
  color: #315a88;
  font-weight: 800;
  text-decoration: none;
}

.zoodlebug-home-link:hover,
.zoodlebug-home-link:focus-visible {
  text-decoration: underline;
}

.lobby-home-link {
  display: block;
  width: fit-content;
  margin: -6px auto 6px;
  font-size: 14px;
}

.board-home-link {
  margin-right: 12px;
  font-size: 12px;
  white-space: nowrap;
}

#newBoardBtn,
#logoutBtn {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}


/* Preview tune: larger lobby logo + more gap + bug emoji home link */
.lobby-logo {
  width: min(760px, 92vw);
  max-width: 92vw;
  height: auto;
}

.lobby-home-link {
  display: block;
  width: fit-content;
  margin: 16px auto 10px;
  font-size: 16px;
}

.board-home-link {
  font-size: 13px;
}


/* ZoodleBoard iPad selection guard */
.board-shell,
.board-shell *,
.student-board-shell,
.student-board-shell * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  caret-color: transparent;
}

.board-shell img,
.student-board-shell img {
  -webkit-user-drag: none;
}

.board-shell input,
.board-shell select,
.student-board-shell input,
.student-board-shell select {
  caret-color: auto;
}


/* Lobby recommended stylus link */
.lobby-title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.recommended-stylus-link {
  font-size: 0.5em;
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
  white-space: nowrap;
}


/* Public account authentication screens */
.auth-card {
  width: min(560px, calc(100vw - 32px));
  max-width: 560px;
  padding: 34px 38px 36px;
}

.auth-card .login-logo {
  display: block;
  width: min(430px, 92%);
  height: auto;
  margin: 0 auto 18px;
}

.auth-title {
  margin: 2px 0 8px;
  text-align: center;
  font-size: 28px;
  line-height: 1.15;
  color: var(--ink);
}

.auth-subtitle {
  margin: 0 auto 22px;
  text-align: center;
  color: var(--muted);
  line-height: 1.45;
}

.auth-main-btn {
  width: 100%;
  min-height: 46px;
  font-size: 16px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-form {
  display: grid;
  gap: 17px;
}

.auth-field {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.auth-field input {
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  border: 2px solid #9aa9bd;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.auth-field input:focus {
  outline: 3px solid rgba(49, 90, 136, 0.18);
  border-color: var(--accent);
}

.auth-navigation {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 22px;
}

.auth-text-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 5px 2px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.auth-back-link {
  display: block;
  margin: 23px auto 0;
}

.auth-error,
.auth-message {
  min-height: 20px;
  margin: 16px 0 0;
  text-align: center;
  line-height: 1.35;
}

.auth-message {
  color: #166534;
  font-weight: 800;
}

.auth-help-box {
  display: grid;
  gap: 7px;
  margin: 18px 0 24px;
  padding: 15px 17px;
  border-radius: 12px;
  background: #eef5fb;
  color: var(--ink);
  line-height: 1.4;
}

@media (max-width: 600px) {
  .auth-card {
    padding: 26px 22px 30px;
  }

  .auth-title {
    font-size: 24px;
  }
}

/* Live-connection indicator. Visible only while a device is repairing a
   dropped connection, so nobody has to guess why writing stopped appearing. */
.connection-indicator {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  padding: 7px 14px;
  border-radius: 999px;
  background: #b45309;
  color: #fff;
  font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
  pointer-events: none;
}

.connection-indicator.is-offline {
  background: #b91c1c;
}

.connection-indicator.hidden {
  display: none;
}

/* ============================================================
   Manipulatives
   The "+ Ten-Frame" button is an add action, not a drawing tool,
   so it never joins the .active tool group and reads a little
   differently from Pen / Erase / Highlight.
   ============================================================ */

.tool-btn.manipulative-btn {
  background: #f1f5ff;
  border-color: #b9c9f3;
  color: #1f3f8f;
}

.tool-btn.manipulative-btn:active {
  background: #dde7fd;
}

/* ============================================================
   Freeze student
   The teacher's button flips one flag; the student's board reads
   it and locks itself. The teacher's own board is never touched.
   ============================================================ */

.btn.freeze-btn.active {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.frozen-banner {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1e293b;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .28);
  pointer-events: none;
}

.frozen-banner::before {
  content: "\270B";
  font-size: 17px;
}

.frozen-banner.hidden {
  display: none;
}

.student-toolbar .tool-btn:disabled,
.student-toolbar .color-input:disabled,
.student-toolbar .width-select:disabled {
  opacity: .45;
}

/* ============================================================
   Manipulatives: names on the left, pieces in a flyout
   Two separate cards. The names column stays put; choosing one
   pops its pieces out to the right, the way a pen tool opens
   its pen choices. Separate columns means adding a new
   manipulative never squeezes the list of pieces.
   ============================================================ */

.manip-panel {
  position: absolute;
  top: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 6;
  display: flex;
  /* On the right edge, with the pieces tray opening to its left: new pieces
     land from the top-left, so nothing arrives hidden under the menu. */
  flex-direction: row-reverse;
  align-items: flex-start;
  gap: 6px;
  /* The container spans the board's height so the flyout has room, but only
     its two cards should catch taps - the space between and below them is
     still board. */
  pointer-events: none;
}

.manip-panel.hidden {
  display: none;
}

.manip-panel > * {
  pointer-events: auto;
}

.manip-cats,
.manip-flyout {
  max-height: 100%;
  overflow-y: auto;
  background: rgba(255, 255, 255, .98);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .18);
}

.manip-cats {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 112px;
  padding: 24px 7px 7px;
}

.manip-cat {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  font-size: 11.5px;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.manip-cat.active {
  background: #e9f1ff;
  border-color: #94b7f6;
  color: #174fae;
}

.manip-close {
  position: absolute;
  top: 2px;
  right: 5px;
  width: 22px;
  height: 22px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

/* One narrow column running the board's height. A wider tray with two
   columns fits the same pieces in less height, but height beside the
   board is free and width is not - every pixel across is whiteboard
   the teacher cannot draw on. */
.manip-flyout {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 3px;
  /* Wide enough for the longest name beside its picture - "Rekenrek" and
     "Counters" were being cut off mid-letter at 100px. */
  width: 152px;
  padding: 7px;
}

.manip-flyout.hidden {
  display: none;
}

.manip-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 30px;
  padding: 4px 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.manip-item:active {
  background: #eef2f7;
  transform: translateY(1px);
}

.manip-art {
  display: block;
  line-height: 0;
  flex: 0 0 auto;
}

.manip-item-label {
  min-width: 0;            /* or it refuses to shrink and overflows the chip */
  font-weight: 900;
  font-size: 12px;
  color: #172033;
  line-height: 1.15;
  text-align: right;
  overflow-wrap: break-word;
  margin-left: auto;
}

@media (max-width: 600px) {
  .manip-cats { width: 100px; }
  .manip-flyout { width: 128px; }
}

/* ============================================================
   Taking delivery of a problem from another app
   ============================================================ */

.receive-problem {
  width: 100%;
  margin: 0 0 16px;
  padding: 12px 14px;
  text-align: left;
  background: #f6f9fe;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.receive-problem-title {
  margin-bottom: 6px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--muted);
}

.receive-problem-text {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  color: #172033;
}

.receive-problem-answer {
  margin-top: 10px;
  padding: 7px 9px;
  background: #fff7e6;
  border: 1px solid #e6c67a;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  color: #8a5a10;
}

.receive-problem-figure {
  margin-top: 10px;
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
}

.receive-boards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-height: 46vh;
  overflow-y: auto;
  margin-bottom: 14px;
}

.receive-board {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}

.receive-board:hover { background: #eef4ff; border-color: #94b7f6; }
.receive-board:disabled { opacity: .5; cursor: default; }

.receive-board-name {
  font-weight: 800;
  font-size: 14px;
  color: #172033;
}

.receive-board-code {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
}

/* ============================================================
   The board menu
   Right-click, or two taps on a tablet. Kept deliberately
   short: the things you reach for mid-lesson and nothing else.
   ============================================================ */

.board-menu {
  position: absolute;
  z-index: 10;
  min-width: 168px;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .26);
}

.board-menu.hidden { display: none; }

.board-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.board-menu-item:hover,
.board-menu-item:active { background: #eef2f7; }

.board-menu-label {
  font-weight: 800;
  font-size: 13px;
  color: #172033;
}

.board-menu-hint {
  font-weight: 700;
  font-size: 11px;
  color: var(--muted);
}

.board-menu-rule {
  height: 1px;
  margin: 4px 6px;
  background: var(--line);
}

/* ============================================================
   The number pad
   Our own buttons rather than the system keyboard: on iPad the
   keyboard stole focus and closed the field after one digit.
   Targets are sized to be hit with a finger mid-lesson.
   ============================================================ */

.number-pad {
  position: absolute;
  z-index: 9;
  width: 164px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .26);
}

.number-pad.hidden {
  display: none;
}

.pad-display {
  margin-bottom: 6px;
  padding: 5px 9px;
  /* Always one line the same height, so the keys below never move. */
  height: 34px;
  white-space: nowrap;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 22px;
  font-weight: 900;
  text-align: right;
  color: #172033;
  line-height: 1.1;
}

.pad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.pad-key {
  height: 38px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 17px;
  font-weight: 800;
  color: #172033;
  cursor: pointer;
}

.pad-key:active {
  background: #e9f1ff;
}

.pad-key.pad-soft {
  background: #f1f5f9;
  font-size: 16px;
  color: #475569;
}

.pad-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}

.pad-cancel,
.pad-ok {
  height: 40px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.pad-cancel {
  background: #fff;
  border: 1px solid var(--line);
  color: #475569;
}

.pad-ok {
  background: #2563eb;
  border: 1px solid #1d4ed8;
  color: #fff;
}

/* ============================================================
   Erase mode: the board says so
   A red wash over the whole board area while the eraser is
   selected. Local to one device - the other person has no
   reason to see it - and pointer-events: none so it changes
   nothing about how the board behaves.
   ============================================================ */

.erase-tint {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: rgba(214, 40, 40, .075);
  box-shadow: inset 0 0 0 4px rgba(214, 40, 40, .5);
}

.erase-tint.hidden {
  display: none;
}

.erase-tint-badge {
  position: absolute;
  top: 10px;
  left: 12px;
  padding: 4px 11px;
  background: #d62828;
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: 0 3px 10px rgba(214, 40, 40, .35);
}

/* A tray item with no picture gives its whole width to the label. */
.manip-item.manip-item-wide {
  justify-content: center;
}

.manip-item.manip-item-wide .manip-item-label {
  margin-left: 0;
}

/* ZoodleBug Pro ribbon across the top-right corner of the home page card */
.auth-card {
  position: relative;
  overflow: hidden;
}

.pro-ribbon {
  position: absolute;
  top: 36px;
  right: -60px;
  width: 240px;
  padding: 7px 0;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #f59e0b, #e8590c);
  box-shadow: 0 3px 10px rgba(20, 34, 54, 0.22);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

@media (max-width: 600px) {
  .pro-ribbon {
    top: 30px;
    right: -66px;
    width: 230px;
    padding: 5px 0;
    font-size: 11px;
  }
}

/* Educator verification screens */
.auth-field select,
.auth-field textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  border: 2px solid #9aa9bd;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.auth-field textarea {
  resize: vertical;
}

.auth-field select:focus,
.auth-field textarea:focus {
  outline: 3px solid rgba(49, 90, 136, 0.18);
  border-color: var(--accent);
}

.access-signed-in {
  margin: 26px 0 0;
  font-size: 14px;
}

.access-signed-in + .auth-text-link {
  display: block;
  margin: 4px auto 0;
}

/* Tim's educator approval page */
.educators-content h2 {
  margin: 22px 0 10px;
  font-size: 18px;
  color: var(--ink);
}

.educators-content h2:first-child {
  margin-top: 4px;
}

.educator-list {
  display: grid;
  gap: 10px;
}

.educator-card .board-card-info p {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.educator-empty {
  margin: 0;
  color: var(--muted);
}

/* Send to ZoodleBoard download page */
.chrome-help {
  text-align: left;
}

.chrome-help .auth-title,
.chrome-help .auth-subtitle,
.chrome-help .auth-back-link {
  text-align: center;
}

.chrome-warning {
  margin: 0 0 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff4e5;
  color: #7a3e00;
  line-height: 1.4;
}

.chrome-part {
  margin: 30px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 22px;
  color: var(--ink);
}

.chrome-part span {
  margin-left: 6px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.chrome-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.chrome-steps > li {
  position: relative;
  counter-increment: step;
  padding: 0 0 20px 50px;
  color: var(--ink);
  line-height: 1.5;
}

.chrome-steps > li::before {
  content: counter(step);
  position: absolute;
  top: -2px;
  left: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.chrome-steps h3 {
  margin: 2px 0 6px;
  font-size: 18px;
}

.chrome-steps p {
  margin: 0 0 8px;
  color: var(--ink);
}

.chrome-help .chrome-see {
  padding: 8px 12px;
  border-radius: 10px;
  background: #e9f7ef;
  color: #14532d;
  font-size: 15px;
}

.chrome-see::before {
  content: "\2713  ";
  font-weight: 900;
}

.chrome-help .auth-main-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}

.chrome-copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
}

.chrome-copy-row code {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 2px solid #9aa9bd;
  border-radius: 10px;
  background: #f6f9fc;
  font-size: 16px;
}

.chrome-help kbd {
  display: inline-block;
  min-width: 1.2em;
  padding: 1px 7px;
  border: 1px solid #b8c4d2;
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.chrome-glyph {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
  fill: #5f6368;
}

.chrome-inline-icon {
  vertical-align: -3px;
  border-radius: 3px;
}

.is-mac .for-win,
.is-win .for-mac {
  display: none;
}

.chrome-faq {
  margin: 0;
}

.chrome-faq dt {
  margin-top: 14px;
  font-weight: 800;
  color: var(--ink);
}

.chrome-faq dd {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

/* Home page link to the Chrome button */
.chrome-button-promo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #eef5fb;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
}

.chrome-button-promo:hover {
  border-color: var(--accent);
}

.chrome-button-promo img {
  flex: 0 0 auto;
}

.chrome-button-promo strong {
  color: var(--accent);
}

/* Privacy policy page */
.privacy-page h2 {
  margin: 26px 0 8px;
  font-size: 19px;
  color: var(--ink);
}

.privacy-page p,
.privacy-page li {
  color: var(--ink);
  line-height: 1.5;
}

.privacy-page ul {
  margin: 0;
  padding-left: 20px;
}

.privacy-page li + li {
  margin-top: 8px;
}

.auth-text-link.privacy-link {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

/* Quick switch between drawing and Select, bottom left of the board */
.quick-tool-btn {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 6px 18px rgba(22, 36, 58, .3);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.quick-tool-btn:active {
  transform: scale(.94);
}

.quick-tool-btn[data-next="draw"] {
  background: var(--accent);
}

.quick-tool-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.quick-tool-btn[data-next="select"] .quick-tool-draw,
.quick-tool-btn[data-next="draw"] .quick-tool-select {
  display: none;
}

/* No zooming: scrolling and drawing still work, pinch and double-tap zoom
   do not (see no-zoom.js for the rest). */
html {
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Room in the toolbar for Add-Ons: every button a little slimmer. */
.board-toolbar .tool-btn,
.student-toolbar .tool-btn {
  padding: 6px 7px;
}

.board-toolbar,
.student-toolbar {
  gap: 4px;
}

@media (max-width: 1100px) {
  .board-toolbar .tool-btn,
  .student-toolbar .tool-btn {
    padding: 5px 5px;
    font-size: 11.5px;
  }

  .board-toolbar,
  .student-toolbar {
    gap: 3px;
  }

  .board-toolbar .width-select {
    max-width: 76px;
    padding: 5px 3px;
  }

  .board-toolbar .color-input {
    width: 30px;
  }

  .board-logo {
    width: 140px;
  }
}

/* The official ZoodleBug face on the ZoodleBug Home link, the same picture
   every ZoodleBug game uses (zoodlebug-platform: /assets/zoodlebug-home-icon.png). */
.zoodlebug-home-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.lobby-home-link {
  display: flex;
}

.zoodlebug-home-icon {
  width: 1.4em;
  height: 1.4em;
  object-fit: contain;
  flex: 0 0 auto;
}
.pad-extra{margin-top:6px}.pad-extra .pad-key{height:33px}

/* Free ZoodleBoard (Tim, 17 Oct 2026) */
.free-plan-note{max-width:760px;margin:0 auto 14px;padding:10px 14px;border-radius:12px;background:#fff7d6;border:2px solid #f5c542;color:#4a3500;font-weight:600;text-align:center}
.free-plan-note a{color:#7a3e00;font-weight:800}
.free-plan-note.hidden{display:none}
.manipulative-btn.needs-pro::after{content:"PRO";margin-left:6px;padding:1px 6px;border-radius:999px;background:linear-gradient(135deg,#ffd75e,#f5a623);color:#5a3500;font-size:.68em;font-weight:900;letter-spacing:.05em;vertical-align:middle}
/* Send to Join Button in the Invite box (a big gold button, as on ZoodleBug). */
.send-join-btn{display:flex;align-items:center;gap:10px;width:100%;margin-top:14px;padding:12px 14px;border:0;border-radius:14px;background:linear-gradient(135deg,#ffcf3f,#ff9a1f);color:#2a1600;text-align:left;cursor:pointer;box-shadow:0 3px 10px rgba(255,154,31,.35)}
.send-join-btn:hover{filter:brightness(1.04)}
.send-join-ico{font-size:24px;flex:0 0 auto}
.send-join-txt{display:flex;flex-direction:column;flex:1;min-width:0}
.send-join-txt b{font-size:17px}
.send-join-txt small{font-size:13px;opacity:.85}
.pro-tag{flex:0 0 auto;background:#12325e;color:#fff;font-size:11px;font-weight:900;letter-spacing:.06em;padding:3px 7px;border-radius:7px}
/* ZoodleBoard Class: Lessons and the Library in the lobby; a library board in the editor. */
/* ZoodleBoard Class is its own app (/class): its lobby has only this section; ZoodleBoard's lobby never shows it. */
html:not(.class-app) #classSection{display:none}
html.class-app #boardList,
html.class-app #newBoardBtn,
html.class-app #freePlanNote{display:none!important}
.class-section h3{font-size:20px}
.class-badge{display:none;width:max-content;margin:-6px auto 4px;background:linear-gradient(135deg,#ffcf3f,#ff9a1f);color:#2a1600;font-weight:900;letter-spacing:.3em;padding:4px 14px 4px 18px;border-radius:999px;font-size:18px}
html.class-app .class-badge{display:block}
.class-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:18px 0 10px}
.class-head h3{margin:0;font-size:20px}
.class-head-buttons{display:flex;gap:8px}
.class-hint{margin:-4px 0 12px;color:var(--muted);font-size:14px}
.class-empty{padding:24px}
.lesson-card{border-left:6px solid #ffb52b}
.library-list{display:flex;flex-direction:column;gap:10px}
.folder{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.folder-head{display:flex;align-items:center;gap:10px;padding:10px 12px;background:#f7f9fc}
.folder-toggle{flex:1;min-width:0;text-align:left;border:0;background:none;font:800 17px system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);cursor:pointer;padding:4px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.folder-count{background:#e6edf6;border-radius:999px;padding:1px 9px;font-size:13px;font-weight:800;color:var(--muted)}
.folder-actions,.library-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.folder-boards{display:flex;flex-direction:column;gap:6px;padding:8px 12px 12px}
.folder-boards.loose{padding:0}
.folder-label{margin:10px 0 4px;font-size:13px;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.folder-empty{margin:4px 0;color:var(--muted);font-size:14px}
.library-row,.lesson-row{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fff;border:1px solid var(--line);border-radius:11px;padding:8px 10px}
.library-name{font-weight:700;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.library-move{border:1px solid var(--line);border-radius:8px;padding:5px 6px;font-size:13px;background:#fff;max-width:150px}
.lesson-num{flex:0 0 auto;width:26px;height:26px;border-radius:50%;background:#ffb52b;color:#2a1600;font-weight:900;display:grid;place-items:center;font-size:13px}
.lesson-modal-card{width:min(620px,100%);text-align:left}
.lesson-modal-card h2{text-align:center}
.lesson-name-input{width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:10px;padding:10px 12px;font-size:17px;margin:6px 0 4px}
.lesson-chosen,.lesson-pick{display:flex;flex-direction:column;gap:6px}
.lesson-pick{max-height:260px;overflow:auto}
.lesson-modal-buttons{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
.lesson-pill{display:none;background:#fff4d6;color:#7a4b00;border:1px solid #ffb52b;border-radius:999px;padding:2px 9px;font-size:12px;font-weight:900;letter-spacing:.05em}
.board-shell.lesson-mode .lesson-pill{display:inline-block}
.board-shell.lesson-mode .live-pill,
.board-shell.lesson-mode .connection-row,
.board-shell.lesson-mode #joinRequestSlot,
.board-shell.lesson-mode #freezeBtn,
.board-shell.lesson-mode #prevPageBtn,
.board-shell.lesson-mode #nextPageBtn,
.board-shell.lesson-mode #pageButtons,
.board-shell.lesson-mode #addPageBtn,
.board-shell.lesson-mode #deletePageBtn,
.board-shell.lesson-mode #pageLabel{display:none!important}
/* ZoodleBoard Class: setup pop-up and the teacher's class screen. */
.class-setup-card{width:min(640px,100%);text-align:left}
.class-setup-card h2{text-align:center}
.setup-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0}
.setup-row select{border:1px solid var(--line);border-radius:8px;padding:6px 10px;font-size:16px}
.setup-check{display:flex;align-items:center;gap:8px;margin:10px 0}
.setup-check input,.setup-grid input{width:18px;height:18px}
.setup-group{border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin:12px 0}
.setup-group-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.setup-group-head span{display:flex;gap:6px}
.setup-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:6px}
.setup-grid label{display:flex;align-items:center;gap:8px;font-size:15px}
.class-view{position:fixed;inset:0;z-index:30;background:#eef3fb;display:flex;flex-direction:column}
.class-view-head{display:flex;align-items:center;gap:14px;padding:8px 16px;background:#fff;border-bottom:1px solid var(--line)}
.class-view-title{display:flex;align-items:center;gap:8px;font-size:20px;min-width:0;flex:1}
.class-view-title strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.class-badge-small{background:linear-gradient(135deg,#ffcf3f,#ff9a1f);color:#2a1600;font-weight:900;letter-spacing:.2em;padding:2px 10px;border-radius:999px;font-size:12px}
.class-round-status{font-weight:800;color:#1f7a33}
.class-view-body{flex:1;min-height:0;display:grid;grid-template-columns:300px 1fr;gap:16px;padding:16px}
.class-join-panel{background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px;overflow:auto;display:flex;flex-direction:column;gap:6px;text-align:center}
.class-code{font-size:40px;font-weight:900;letter-spacing:.12em;color:var(--ink)}
.class-qr{width:180px;height:180px;margin:0 auto;border:1px solid var(--line);border-radius:10px}
.class-join-url{font-size:13px;color:var(--muted);word-break:break-all;margin:0}
.class-students{display:flex;flex-direction:column;gap:5px;text-align:left}
.class-student{display:flex;align-items:center;justify-content:space-between;gap:6px;border:1px solid var(--line);border-radius:9px;padding:5px 8px;font-weight:700}
.class-student button{border:0;background:none;color:var(--danger);font-size:18px;cursor:pointer}
.class-main{min-width:0;display:flex;flex-direction:column;gap:8px;overflow:auto}
.class-queue-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.class-queue-head select{border:1px solid var(--line);border-radius:9px;padding:7px 10px;font-size:14px;max-width:100%}
.class-queue{display:flex;gap:8px;flex-wrap:wrap}
.class-queue-item{display:flex;align-items:center;gap:8px;background:#fff;border:2px solid var(--line);border-radius:12px;padding:8px 10px}
.class-queue-item.current{border-color:#2f9e44;background:#eefbf1}
.class-queue-item.done{opacity:.6}
.class-preview-wrap{flex:1;min-height:260px;background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden;position:relative}
.class-preview{position:absolute;inset:0;width:100%;height:100%}
@media(max-width:850px){.class-view-body{grid-template-columns:1fr}}
/* ZoodleBoard Class, the student's join form. */
.class-join-form{display:flex;flex-direction:column;gap:10px;margin-top:10px}
.class-join-form input{border:1px solid var(--line);border-radius:10px;padding:12px;font-size:18px;text-align:center}
#classCodeInput{letter-spacing:.2em;text-transform:uppercase;font-weight:800}
.class-student-pagebar{justify-content:center}
.student-board-shell.has-pages{grid-template-rows:auto minmax(0,1fr) auto}
/* The ZoodleBoard Class logo (tall, unlike ZoodleBoard's wide one). */
html.class-app #lobbyView .lobby-logo{width:auto;height:170px;max-height:170px}
.class-view-logo{height:56px;width:auto}
.class-join-logo{display:block;width:min(240px,60vw);height:auto;margin:0 auto 6px}
.class-student-logo{height:44px;width:auto}
/* ZoodleBoard Class part 3: turned in, timer, the grid and full screen. */
.muted-note{display:block;font-size:12px;color:var(--muted);font-weight:400}
.class-round-bar{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px 14px}
.class-turned-in{font-weight:900;font-size:18px}
.class-timer{font-weight:900;font-size:18px;background:#fff4d6;border:1px solid #ffb52b;border-radius:999px;padding:3px 12px;color:#7a4b00}
.class-timer.low{background:#ffe2e2;border-color:#e11d48;color:#9b1c1c}
.class-grid-view,.class-full-view{position:fixed;inset:0;z-index:40;background:#eef3fb;display:flex;flex-direction:column}
.class-full-view{z-index:45}
.class-grid-tiles{flex:1;overflow:auto;padding:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px;align-content:start}
.class-tile{background:#fff;border:2px solid var(--line);border-radius:14px;overflow:hidden;cursor:pointer;display:flex;flex-direction:column}
.class-tile:hover{border-color:#2563eb}
.class-tile-stage{position:relative;aspect-ratio:16/9;background:#fff}
.class-tile-stage canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.class-tile-label{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px 10px;font-weight:800;border-top:1px solid var(--line)}
.class-tile-name{border:0;background:none;font:inherit;color:var(--ink);cursor:pointer;padding:0}
.class-tile-state{font-size:12px;font-weight:800;border-radius:999px;padding:2px 8px}
.class-tile-state.in{background:#dcfce7;color:#166534}
.class-tile-state.late{background:#fef3c7;color:#92400e}
.class-tile-empty{position:absolute;inset:0;display:grid;place-items:center;color:var(--muted);font-weight:700}
.class-full-stage{flex:1;position:relative;margin:10px;background:#dfe6ee;border-radius:12px;overflow:hidden}
.class-full-stage canvas{position:absolute;inset:0;width:100%;height:100%}
.class-full-ink{touch-action:none;cursor:crosshair}
.class-full-hint{font-size:12px;color:var(--muted);max-width:220px}
.turned-in-banner{position:absolute;left:50%;top:14px;transform:translateX(-50%);z-index:6;background:#166534;color:#fff;font-weight:900;padding:8px 16px;border-radius:999px;box-shadow:0 6px 18px rgba(0,0,0,.18)}
.submit-btn{background:#16a34a!important;color:#fff!important;border-color:#15803d!important;font-weight:900}
.student-timer{font-weight:900;background:#fff4d6;border:1px solid #ffb52b;border-radius:999px;padding:3px 10px;color:#7a4b00}
/* Self-assessment: the student's pop-up, and the scores in the corner of a board. */
.self-card{width:min(440px,100%)}
.self-label{margin:14px 0 6px;font-size:18px}
.self-scale{display:flex;justify-content:center;gap:8px}
.self-scale button{width:52px;height:52px;border-radius:50%;border:2px solid var(--line);background:#fff;font:900 22px system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);cursor:pointer}
.self-scale button.on{background:#2563eb;border-color:#1d4ed8;color:#fff}
.self-card #selfDoneBtn{margin-top:18px;min-width:140px}
.self-badge{position:absolute;top:6px;right:6px;z-index:2;background:rgba(255,255,255,.94);border:1px solid #94a3b8;border-radius:8px;padding:2px 7px;font:800 13px system-ui,-apple-system,"Segoe UI",sans-serif;color:#172033;pointer-events:none;text-align:right}
.self-badge small{display:block;font-weight:600;font-size:10px;color:#64748b}
.class-full-stage .self-badge{top:12px;right:12px;font-size:20px;padding:4px 12px;z-index:3}
.class-full-stage .self-badge small{font-size:12px}
/* ZoodleBoard Class: Eyes Up, Spotlight, quick sends, the draw-a-board screen, How it works. */
.eyes-btn.active{background:#7c3aed;border-color:#6d28d9;color:#fff}
.spot-btn.active{background:#f59e0b;border-color:#d97706;color:#1f1300}
.class-quick-sends{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.eyes-overlay{position:absolute;inset:0;z-index:20;background:#5b2a9e;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;font-size:40px;text-align:center}
.eyes-overlay span{font-size:96px}
.spot-overlay{position:absolute;inset:0;z-index:18;background:#fff8e6;display:flex;flex-direction:column}
.spot-head{padding:8px 12px;font-weight:900;font-size:20px;text-align:center;color:#7a4b00;background:#ffe7a8}
.spot-stage{position:relative;flex:1;margin:8px}
.spot-stage canvas{position:absolute;inset:0;width:100%;height:100%}
.draft-toolbar{flex:1;justify-content:center}
.draft-wrap{flex:1;width:auto;margin:0 10px 10px;border-radius:12px}
.class-help-card{width:min(620px,100%);text-align:left}
.class-help-card h2{text-align:center}
.class-help-card li{margin:8px 0;line-height:1.45}
.class-tile-state.working{background:#e0e7ff;color:#3730a3}
#classDraftCanvas{width:100%;height:100%;display:block;touch-action:none}
/* The ZoodleBoard logo is tall, not wide (Tim, 23 Oct 2026): sized by height wherever it shows.
   The top of a board keeps the old wide logo (ZoodleBoard_Logo_Wide.webp), which suits that strip. */
.login-logo,.join-logo,.auth-card .login-logo{width:auto;height:min(240px,30vh);max-width:80%;margin-left:auto;margin-right:auto}
.waiting-logo{width:auto;height:min(200px,26vh);max-width:70%}
.lobby-logo{width:auto;height:170px;max-height:170px}
@media(max-width:600px){.lobby-logo{height:130px;max-height:130px}}
.class-home-btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;margin-top:14px;padding:12px 22px;font-size:20px;text-decoration:none}
.class-home-btn img{border-radius:50%;background:#fff}

/* ZoodleBoard Class lobby (Tim, 28 Oct 2026): Quick Start first, then lessons, library, past classes. */
.class-quick{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;margin:6px 0 22px;padding:22px 26px;border-radius:18px;background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff;box-shadow:0 10px 26px rgba(37,99,235,.25)}
.class-quick h2{margin:0 0 4px;font-size:26px}
.class-quick p{margin:0;color:#e0e7ff;font-size:16px}
.class-quick-steps{list-style:none;display:flex;flex-wrap:wrap;gap:8px 18px;margin:12px 0 0;padding:0;font-size:14px;color:#eef2ff}
.class-quick-steps b{display:inline-grid;place-items:center;width:22px;height:22px;margin-right:6px;border-radius:50%;background:rgba(255,255,255,.22);font-size:13px}
.class-quick-btn{font-size:22px;padding:16px 30px;border-radius:14px;background:#fff!important;color:#1d4ed8!important;border:0;box-shadow:0 6px 16px rgba(15,23,42,.18);font-weight:900}
.class-quick-btn:hover{transform:translateY(-1px)}
.class-panel{background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px 18px 18px;margin:0 0 18px;box-shadow:0 4px 16px rgba(20,34,54,.05)}
.class-panel .class-head{margin-top:0}
.class-panel .class-head h3{margin:0}
.class-panel .class-head .class-hint{margin:2px 0 0}
.class-panel .board-card{box-shadow:none}
/* A Quick Start class has no lesson boards: the two ways to send a board take their place, large. */
.class-view.quick-class .class-queue,.class-view.quick-class #classAddFromLibrary{display:none}
.class-view.quick-class .class-queue-head{flex-direction:column;align-items:stretch;gap:10px}
.class-view.quick-class .class-quick-sends{display:flex;gap:12px;flex-wrap:wrap}
.class-view.quick-class .class-quick-sends .btn{font-size:18px;padding:14px 22px;flex:1 1 220px}
.class-view.quick-class #classBlankBtn{background:#2563eb;color:#fff;border-color:#2563eb}
.class-quick-tip{display:none;margin:14px 0 0;color:#475569;font-size:15px;line-height:1.5}
.class-view.quick-class .class-quick-tip{display:block}
.class-view.quick-class.has-round .class-quick-tip{display:none}

/* "ZoodleBoard was updated" note for teachers (update-check.js). */
.update-note {
  position: fixed;
  bottom: 76px;                /* above the page bar, never over the toolbar */
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 8px 10px 8px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  font-weight: 700;
  color: var(--ink);
}

/* Quick Class: the next board in two steps (Tim, 11 Nov 2026). */
.class-view.quick-class .class-queue-head{display:none}
.class-quick-setup{border:2px solid #c7d2fe;background:#f8faff;border-radius:16px;padding:16px 18px;margin:0 0 14px}
.class-quick-setup-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.class-quick-setup h3{margin:0;font-size:22px}
.class-quick-step{margin:14px 0 8px;font-weight:800;font-size:16px;display:flex;align-items:center;gap:8px}
.class-quick-step b{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#2563eb;color:#fff;font-size:13px}
.class-tools-all{display:flex;align-items:center;gap:10px;font-weight:800;font-size:16px;padding:10px 12px;border-radius:10px;background:#fff;border:1px solid var(--line);cursor:pointer}
.class-tools-all input{width:20px;height:20px}
.class-tool-lists{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
.class-tool-lists .setup-group{background:#fff;margin:10px 0 0}
@media (max-width:820px){.class-tool-lists{grid-template-columns:1fr}}
.class-quick-go{display:flex;gap:12px;flex-wrap:wrap}
.class-quick-go .btn{flex:1 1 230px;font-size:19px;padding:16px 22px;border-radius:14px}
.class-new-board-btn{background:#16a34a;color:#fff;border-color:#16a34a}
.class-new-board-btn:hover{background:#15803d}
.class-turned-in.all-in{color:#15803d}
.class-history{margin-top:18px}
.class-history-list{display:flex;flex-direction:column;gap:6px}
.class-history-item{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:#fff}
.class-history-item.current{border-color:#93c5fd;background:#eff6ff}
.class-history-item .library-name{flex:1 1 140px;font-weight:700}
.class-history-state{color:#475569;font-size:14px}
.class-quick-sendto{margin:12px 0 0;color:#475569;font-size:14px}

/* The lobby header in one row (Tim, 11 Nov 2026): logo on the left, a little larger;
   the title and links in the middle; ZoodleBug Home and the buttons on the right. */
.lobby-sticky{display:flex;align-items:center;gap:24px;padding:6px 28px}
#lobbyView .lobby-logo,html.class-app #lobbyView .lobby-logo{height:190px;max-height:190px;width:auto;max-width:none;margin:0;flex:0 0 auto}
#lobbyView .lobby-controls{flex:1 1 auto;max-width:none;margin:0;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
#lobbyView .lobby-title-row{flex:1 1 auto;justify-content:center}
#lobbyView .lobby-control-buttons{align-items:center;flex-wrap:wrap;justify-content:flex-end}
#lobbyView .lobby-control-buttons .lobby-home-link{display:inline-flex;align-items:center;gap:6px;margin:0 8px 0 0;width:auto}
@media(max-width:820px){
  .lobby-sticky{flex-wrap:wrap;justify-content:center;gap:8px;padding:6px 14px}
  #lobbyView .lobby-logo,html.class-app #lobbyView .lobby-logo{height:110px;max-height:110px}
  #lobbyView .lobby-controls{justify-content:center}
}
#lobbyView .lobby-control-buttons .btn{font-size:16px;padding:9px 14px}
.chrome-shot{display:block;width:100%;height:auto;margin:10px 0 4px;border:1px solid var(--line);border-radius:12px;box-shadow:0 4px 14px rgba(20,34,54,.08)}
.chrome-tip{color:var(--muted);font-size:15px;margin:6px 0 18px}
.class-quick-name{width:100%;max-width:520px;font-size:17px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff}
.class-quick-optional{font-weight:600;color:var(--muted);font-size:14px}
/* Boards this class: about three rows, then it scrolls (Tim, 11 Nov 2026). */
.class-history-list{max-height:180px;overflow-y:auto;padding-right:4px;overscroll-behavior:contain}
.class-history-name{flex:1 1 160px;min-width:0;font-weight:700;font-size:16px;border:1px solid transparent;border-radius:8px;padding:5px 8px;background:transparent;color:var(--ink);font-family:inherit}
.class-history-name:hover{border-color:var(--line)}
.class-history-name:focus{border-color:#93c5fd;background:#fff;outline:none}
/* "Disable manipulatives/add-ons from showing answers" under the tool lists (ZoodleBoard Class, Tim 11 Nov 2026). */
.class-no-answers{display:flex;align-items:center;gap:10px;font-weight:800;font-size:15px;padding:10px 12px;margin:10px 0;border-radius:10px;background:#fff7e6;border:1px solid #f2c879;cursor:pointer}
.class-no-answers input{width:20px;height:20px;flex:none}

/* ---- ZoodleBoard Class Display (Tim, 12 Nov 2026) ------------------------------------
   The teacher's controls (class screen, See Work, full screen) and the projector window
   (class-display.html). */
.display-btn.active{background:#1d4ed8;color:#fff;border-color:#1d4ed8}
.display-show-btn{background:#eef4ff;border-color:#9db9ea;color:#1f3f8f;font-weight:800}
.display-show-btn.active{background:#16a34a;border-color:#15803d;color:#fff}
.display-show-btn:disabled{opacity:.55;cursor:default}
.class-preview-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.class-tile-pick{display:flex;align-items:center;gap:4px;font-size:12px;font-weight:800;color:#475569;cursor:pointer}
.class-tile-pick input{width:18px;height:18px}
.class-tile.picked{border-color:#16a34a;box-shadow:0 0 0 2px #16a34a inset}
.display-bar{display:flex;align-items:center;gap:10px;margin:10px 16px 0;padding:6px 10px 6px 14px;
  background:#fff;border:2px solid #cbd5e1;border-radius:12px;font-weight:800}
.display-bar.showing{border-color:#16a34a;background:#f0fdf4}
.display-bar-ico{font-size:20px}
.display-bar-text{font-size:14px;color:#172033;flex:1}
.display-pill{font-size:13px;font-weight:800;color:#475569;max-width:32vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.display-pill.showing{color:#15803d}

.cd-body{margin:0;background:#eef3fb;height:100vh;overflow:hidden;font-family:system-ui,-apple-system,"Segoe UI",sans-serif}
.cd-start{position:fixed;top:10px;left:50%;transform:translateX(-50%);z-index:5;display:flex;align-items:center;gap:14px;
  background:#fff;border:2px solid #9db9ea;border-radius:14px;padding:10px 14px;box-shadow:0 6px 24px rgba(15,23,42,.18);max-width:min(900px,calc(100vw - 20px))}
.cd-start p{margin:0;font-size:15px;color:#172033}
.cd-join,.cd-rest{height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2vh;text-align:center;padding:2vh}
.cd-logo{height:16vh;max-width:60vw;object-fit:contain}
.cd-join-line{margin:0;font-size:4vh;font-weight:800;color:#475569}
.cd-join-row{display:flex;align-items:center;gap:5vw}
.cd-qr{width:42vh;height:42vh;image-rendering:pixelated;background:#fff;border-radius:2vh;padding:1vh}
.cd-code{font-size:16vh;font-weight:900;letter-spacing:.08em;color:#172033;line-height:1}
.cd-url{font-size:3.4vh;font-weight:700;color:#1f3f8f;margin:2vh 0 0}
.cd-lesson{font-size:9vh;margin:0;color:#172033}
.cd-board{font-size:5vh;margin:0;color:#334155;font-weight:700}
.cd-small-code{position:fixed;right:2vw;bottom:2vh;margin:0;font-size:3vh;color:#475569}
.cd-show{height:100vh;padding:1.2vh;box-sizing:border-box}
.cd-tiles{height:100%;display:grid;gap:1.2vh}
.cd-tiles-1{grid-template-columns:1fr}
.cd-tiles-2{grid-template-columns:1fr 1fr}
.cd-tiles-3{grid-template-columns:1fr 1fr 1fr}
.cd-tiles-4{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}
.cd-tile{display:flex;flex-direction:column;min-height:0;background:#fff;border-radius:1.2vh;overflow:hidden;border:2px solid #cbd5e1}
.cd-stage{position:relative;flex:1;min-height:0}
.cd-stage canvas{position:absolute;inset:0;width:100%;height:100%}
.cd-ink{pointer-events:none}
.cd-label{padding:.6vh 1vw;font-size:3vh;font-weight:800;color:#172033;border-top:1px solid #e2e8f0;text-align:center}
.class-full-view .class-view-title{flex-shrink:0}

/* ---- Text Box add-on (Tim, 12 Nov 2026): textbox-ui.js and board-canvas.js ---------- */
.tb-modal{z-index:200}
.tb-card{max-width:620px;width:calc(100vw - 32px)}
.tb-title{margin:0 0 10px}
.tb-text{width:100%;box-sizing:border-box;min-height:180px;resize:vertical;font:600 22px/1.3 system-ui,-apple-system,"Segoe UI",sans-serif;
  padding:12px;border:2px solid #cbd5e1;border-radius:12px;outline:none}
.tb-text:focus{border-color:#2563eb}
.tb-colors{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:10px 0}
.tb-color{width:28px;height:28px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #94a3b8;cursor:pointer;padding:0}
.tb-color.on{box-shadow:0 0 0 3px #172033}
.tb-custom{width:34px;height:30px;padding:0;border:1px solid #cbd5e1;border-radius:8px;background:#fff;cursor:pointer}
.tb-buttons{justify-content:flex-end}
.tb-inline{position:fixed;z-index:150;display:flex;flex-direction:column;align-items:flex-start}
.tb-inline-bar,.tb-bar{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #cbd5e1;border-radius:12px;
  padding:4px 8px;box-shadow:0 6px 20px rgba(15,23,42,.18)}
.tb-inline-bar .tb-colors,.tb-bar .tb-colors{margin:0;flex-wrap:nowrap}
.tb-inline-bar .tb-color,.tb-bar .tb-color{width:22px;height:22px}
.tb-inline-text{box-sizing:border-box;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;font-weight:600;
  background:rgba(255,255,255,.92);border:2px dashed #2563eb;border-radius:6px;outline:none;resize:none;overflow:hidden;margin-top:6px}
.tb-bar{position:fixed;z-index:120}
.tb-bar.hidden{display:none}
/* Text Box letter size "- 40 +" (Tim, 12 Nov 2026) */
.tb-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:10px 0}
.tb-tools .tb-colors{margin:0}
.tb-size-row{display:flex;align-items:center;gap:8px}
.tb-size-label{font-weight:800;color:#475569;font-size:14px}
.tb-size{display:inline-flex;align-items:center;border:1px solid #cbd5e1;border-radius:10px;overflow:hidden;background:#fff}
.tb-size-btn{border:0;background:#f1f5f9;width:32px;height:32px;font-size:20px;font-weight:800;line-height:1;color:#172033;padding:0}
.tb-size-btn:hover{background:#e2e8f0}
.tb-size-num{width:44px;height:32px;border:0;border-left:1px solid #cbd5e1;border-right:1px solid #cbd5e1;text-align:center;font-weight:800;font-size:15px;outline:none}
.tb-bar .tb-size-btn{width:28px;height:28px}
.tb-bar .tb-size-num{height:28px;width:40px}
/* Past Classes: the name can be typed over (Tim, 12 Nov 2026) */
.past-class-row .past-class-name{flex:1 1 180px}
.past-class-when{color:var(--muted);font-size:13px;white-space:nowrap}

/* ZoodleBoard Class lobby header (Tim, 12 Nov 2026): the big "ZoodleBoard Class! Show your work."
   banner in the middle, the two links small under it, ZoodleBug Home small in the top-left corner.
   The header scrolls away with the page rather than staying on top. */
html.class-app #lobbyView .lobby-sticky{position:relative;display:block;text-align:center;padding:10px 16px 8px}
html.class-app #lobbyView .lobby-logo{display:block;width:auto;height:auto;max-width:min(720px,92vw);max-height:240px;margin:0 auto}
html.class-app #lobbyView .lobby-controls{display:block;margin:2px 0 0}
html.class-app #lobbyView #lobbyTitle{display:none}
html.class-app #lobbyView .lobby-title-row{justify-content:center;align-items:center;gap:18px;flex-wrap:wrap}
html.class-app #lobbyView .lobby-title-row a{font-size:13px}
html.class-app #lobbyView .lobby-control-buttons{display:block}
html.class-app #lobbyView .lobby-control-buttons .lobby-home-link{position:absolute;top:10px;left:14px;margin:0;font-size:13px;gap:5px}
html.class-app #lobbyView .lobby-control-buttons .lobby-home-link .zoodlebug-home-icon{width:20px;height:20px}
@media(max-width:600px){
  html.class-app #lobbyView .lobby-sticky{padding-top:34px}
  html.class-app #lobbyView .lobby-control-buttons .lobby-home-link{top:8px;left:10px}
}
/* "Delete this page?" beside the Delete Page button (Tim, 12 Nov 2026): Return deletes, Escape cancels. */
.near-confirm{position:fixed;z-index:90;background:#fff;border:1px solid #fca5a5;border-radius:12px;padding:10px 12px;
  box-shadow:0 10px 30px rgba(15,23,42,.22);max-width:300px}
.near-confirm p{margin:0 0 8px;font-weight:700;font-size:14px;color:#172033}
.near-confirm-buttons{display:flex;gap:8px;justify-content:flex-end}
.btn.danger-solid{background:#dc2626;border-color:#dc2626;color:#fff}
.btn.danger-solid:focus-visible{outline:3px solid #fca5a5;outline-offset:2px}
