/* Live boards: Google-Docs-style title bar, save status, boards menu, Share
   button + dialog (incl. downloads), presence, and view-only mode.
   See live-doc.js / share-dialog.js / live-sync.js. Icons: ui-icons.js. */

:root {
  --doc-blue: #0b57d0;
  --doc-blue-soft: #c2e7ff;
  --doc-blue-tint: #e8f0fe;
  --doc-ink: #1f1f1f;
  --doc-muted: #5f6368;
  --doc-line: #dadce0;
  --doc-hover: #f1f3f4;
  --doc-font: "Google Sans", Rubik, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --doc-shadow: 0 1px 3px rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
}

.st-icon { flex-shrink: 0; display: block; }

/* ── Title bar (top left) ─────────────────────────────────────────────── */
#doc-header {
  position: relative;
  z-index: 60;
  font-family: var(--doc-font);
}

#doc-header[hidden] { display: none; }

.doc-title-row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.doc-title {
  font: inherit;
  font-size: 18px;
  line-height: 24px;
  color: var(--doc-ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: -7px;
  min-width: 60px;
  max-width: 420px;
  field-sizing: content; /* grows with the text where supported */
}

.doc-title:hover:not([readonly]) { border-color: var(--doc-line); }
.doc-title:focus { outline: none; border-color: var(--doc-blue); background: #fff; box-shadow: 0 0 0 1px var(--doc-blue); }
.doc-title[readonly] { cursor: default; }

.doc-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--doc-muted);
  cursor: pointer;
}

.doc-menu-btn:hover { background: var(--doc-hover); color: var(--doc-ink); }
.doc-menu-btn[hidden] { display: none; }

.doc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--doc-muted);
  background: var(--doc-hover);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.doc-badge[hidden] { display: none; }

.doc-signin,
.doc-status button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--doc-blue);
  font-weight: 600;
  cursor: pointer;
}

.doc-status button { margin-left: 10px; }
.doc-signin:hover,
.doc-status button:hover { text-decoration: underline; }

/* Save status: icon + short text */
.doc-status {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 18px;
  font-size: 12px;
  color: var(--doc-muted);
}

.doc-status-offline,
.doc-status-error { color: #b3261e; }
.doc-status-conflict { color: #8a5a00; }
.doc-status-saving .st-icon { animation: doc-spin 1s linear infinite; }

@keyframes doc-spin { to { transform: rotate(-360deg); } }

@media (prefers-reduced-motion: reduce) {
  .doc-status-saving .st-icon { animation: none; }
}

/* Old save / export UI is replaced: autosave, and downloads live in Share */
body.live-doc-on #loaded_lesson_name,
body.live-doc-on #save-quick,
body.live-doc-on #creator,
body.live-doc-on #save-button,
body.live-doc-on #export { display: none !important; }

/* ── Boards menu ──────────────────────────────────────────────────────── */
.doc-menu {
  position: absolute;
  top: 34px;
  left: -8px;
  width: 340px;
  max-width: calc(100vw - 24px);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--doc-shadow);
  padding: 8px 0;
  z-index: 1000;
}

.doc-menu[hidden] { display: none; }

.doc-menu-new {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 8px 4px;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--doc-ink);
  text-align: left;
  cursor: pointer;
}

.doc-menu-new .st-icon { color: var(--doc-blue); }
.doc-menu-new:hover { background: var(--doc-hover); }

.doc-menu-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 12px 6px;
  padding: 0 10px;
  height: 36px;
  border-radius: 8px;
  background: var(--doc-hover);
  color: var(--doc-muted);
}

.doc-menu-search[hidden] { display: none; }

.doc-menu-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  outline: none;
  font: inherit;
  font-size: 14px;
  color: var(--doc-ink);
}

.doc-menu-list { overflow-y: auto; }

.doc-menu-label {
  padding: 12px 20px 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--doc-muted);
}

.doc-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 8px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--doc-ink);
  text-decoration: none;
}

.doc-menu-item:hover { background: var(--doc-hover); }
.doc-menu-item.current { background: var(--doc-blue-tint); }

.doc-menu-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--doc-blue-tint);
  color: var(--doc-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-menu-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.doc-menu-title,
.doc-menu-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-menu-title { font-size: 14px; font-weight: 500; }
.doc-menu-meta { font-size: 12px; color: var(--doc-muted); }
.doc-menu-check { color: var(--doc-blue); }

.doc-menu-sep {
  height: 1px;
  margin: 6px 0;
  background: var(--doc-line);
}

.doc-menu-library {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 8px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--doc-ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.doc-menu-library .st-icon { color: var(--doc-blue); }
.doc-menu-library:hover { background: var(--doc-hover); }
.doc-menu-hint { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--doc-muted); }

.doc-menu-empty {
  padding: 12px 20px;
  font-size: 13px;
  color: var(--doc-muted);
}

/* ── Share button (top right) ────────────────────────────────────────── */
#doc-share-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 18px 0 14px;
  margin-right: 8px;
  border: none;
  border-radius: 999px;
  background: var(--doc-blue-soft);
  color: #001d35;
  font-family: var(--doc-font);
  font-size: 14px;
  font-weight: 600;
  vertical-align: middle;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

#doc-share-button:hover { box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15); }
#doc-share-button[hidden] { display: none; }

/* ── Share dialog ────────────────────────────────────────────────────── */
.share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(32, 33, 36, 0.6);
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-dialog {
  width: 520px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--doc-shadow);
  padding: 24px;
  font-family: var(--doc-font);
  color: var(--doc-ink);
}

.share-loading { color: var(--doc-muted); }

.share-title {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-add {
  display: flex;
  gap: 8px;
}

.share-emails-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #747775;
  border-radius: 6px;
  color: var(--doc-muted);
}

.share-emails-wrap:focus-within { border-color: var(--doc-blue); box-shadow: 0 0 0 1px var(--doc-blue); }

.share-emails {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--doc-ink);
}

.share-dialog select {
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--doc-line);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: var(--doc-ink);
  cursor: pointer;
}

.share-dialog select:disabled { color: var(--doc-muted); cursor: default; }
.share-add .share-add-role { height: 44px; }

.share-add-btn,
.share-done {
  height: 40px;
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  background: var(--doc-blue);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.share-add-btn { height: 44px; }
.share-add-btn:hover,
.share-done:hover { background: #0842a0; }

.share-error {
  margin-top: 8px;
  font-size: 13px;
  color: #b3261e;
}

.share-error[hidden] { display: none; }

.share-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 8px;
  font-size: 15px;
  font-weight: 500;
}

.share-note {
  margin: 4px 0 8px;
  color: var(--doc-muted);
  font-size: 14px;
  line-height: 1.5;
}

.share-person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.share-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #7cacf8;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.share-person-main { flex: 1; min-width: 0; }

.share-person-name {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-person-email {
  font-size: 12px;
  color: var(--doc-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-role-fixed {
  font-size: 14px;
  color: var(--doc-muted);
  padding-right: 8px;
}

.share-general {
  display: flex;
  align-items: center;
  gap: 12px;
}

.share-general-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-general-icon.locked { background: #e3e3e3; color: #444746; }
.share-general-icon.open { background: #c4eed0; color: #0f5223; }

.share-general + .share-section-label { margin-top: 18px; }

.share-general-main { flex: 1; min-width: 0; }
.share-general-main select { border-color: transparent; padding-left: 0; font-weight: 500; }
.share-general-main select:hover:not(:disabled) { background: var(--doc-hover); }

.share-general-desc {
  font-size: 12px;
  color: var(--doc-muted);
}

.share-divider {
  height: 1px;
  margin: 22px -24px 0;
  background: var(--doc-line);
}

.share-premium {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fef7e0;
  color: #8a5a00;
  font-size: 11px;
  font-weight: 600;
}

.share-downloads {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.share-download {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--doc-line);
  border-radius: 8px;
  background: #fff;
  color: var(--doc-ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.share-download .st-icon { color: var(--doc-muted); }
.share-download:hover { background: var(--doc-hover); border-color: #c4c7c5; }

.share-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}

.share-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px 0 16px;
  border: 1px solid #747775;
  border-radius: 999px;
  background: #fff;
  color: var(--doc-blue);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.share-copy:hover { background: #f6fafe; }
.share-copy.copied { color: #188038; border-color: #188038; }

/* ── View-only mode ──────────────────────────────────────────────────── */
body.doc-readonly #NavBar,
body.doc-readonly .menu-container,
body.doc-readonly #drawingmenu,
body.doc-readonly #undo-redo,
body.doc-readonly #onboarding-checklist { display: none !important; }

body.doc-readonly #cropContainer { cursor: default; }

/* "Sign in" / "You need access" page for boards that can't be opened */
.doc-gate {
  position: fixed;
  inset: 0;
  z-index: 10003;
  background: rgba(248, 249, 250, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--doc-font);
}

.doc-gate-card {
  width: 420px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--doc-shadow);
  padding: 32px;
  text-align: center;
}

.doc-gate-card h2 { margin: 0 0 8px; font-weight: 400; font-size: 24px; color: var(--doc-ink); }
.doc-gate-card p { color: var(--doc-muted); line-height: 1.5; margin: 0 0 20px; }
.doc-gate-card a { display: block; margin-top: 14px; color: var(--doc-blue); text-decoration: none; font-size: 14px; }

.doc-gate-primary {
  height: 40px;
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  background: var(--doc-blue);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
a.doc-gate-primary { display: inline-flex; align-items: center; text-decoration: none; }

/* ── Live co-editing: who's here + cursors (live-sync.js) ─────────────── */
#doc-people {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  vertical-align: middle;
}

#doc-people[hidden] { display: none; }

.doc-avatar {
  width: 32px;
  height: 32px;
  margin-left: -6px;
  border-radius: 50%;
  border: 2px solid #fff;
  color: #fff;
  font-family: var(--doc-font);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3);
  cursor: default;
}

.doc-avatar:first-child { margin-left: 0; }
.doc-avatar-more { background: #5f6368; font-size: 12px; }

.live-cursor {
  position: absolute;
  z-index: 5000;
  pointer-events: none;
  transform: scale(var(--inv, 1));
  transform-origin: 0 0;
  transition: left 0.08s linear, top 0.08s linear, opacity 0.4s ease;
}

.live-cursor.idle { opacity: 0; }

.live-cursor-name {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  font-family: var(--doc-font);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* "Saved" opens the version history (like Docs' "Last edit was…"). */
.doc-status-link { cursor: pointer; border-radius: 4px; }
.doc-status-link:hover span { text-decoration: underline; }

.doc-menu-history {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 8px;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--doc-ink);
  text-align: left;
  cursor: pointer;
}
.doc-menu-history .st-icon { color: var(--doc-blue); }
.doc-menu-history:hover { background: var(--doc-hover); }

/* ── Version history (version-history.js) ────────────────────────────── */
#vh-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 100vw;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: var(--doc-shadow);
  font-family: var(--doc-font);
  color: var(--doc-ink);
}

.vh-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px 10px 20px;
  border-bottom: 1px solid var(--doc-line);
}
.vh-head h2 { margin: 0; font-size: 18px; font-weight: 400; }

.vh-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--doc-muted);
  cursor: pointer;
}
.vh-icon-btn:hover { background: var(--doc-hover); color: var(--doc-ink); }
.vh-icon-btn:focus-visible { outline: 2px solid var(--doc-blue); outline-offset: 1px; }

.vh-list { flex: 1; overflow-y: auto; padding: 4px 0 12px; }
.vh-empty { padding: 20px; font-size: 14px; color: var(--doc-muted); }

.vh-day {
  padding: 14px 20px 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--doc-muted);
}

.vh-item {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 8px 10px 20px;
  cursor: pointer;
  border-left: 4px solid transparent;
  outline: none;
}
.vh-item:hover { background: var(--doc-hover); }
.vh-item:focus-visible { background: var(--doc-hover); box-shadow: inset 0 0 0 2px var(--doc-blue); }
.vh-item.selected { background: var(--doc-blue-tint); border-left-color: var(--doc-blue); }
.vh-item-main { flex: 1; min-width: 0; }
.vh-item-title { font-size: 14px; font-weight: 500; line-height: 20px; overflow-wrap: anywhere; }
.vh-item-time { font-size: 12px; color: var(--doc-muted); line-height: 18px; }
.vh-item-note { font-size: 12px; font-style: italic; color: var(--doc-muted); line-height: 18px; }
.vh-editors { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.vh-editor { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--doc-muted); min-width: 0; }
.vh-editor > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vh-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.vh-item .vh-more { width: 32px; height: 32px; margin-top: -4px; opacity: 0; }
.vh-item:hover .vh-more,
.vh-item.selected .vh-more,
.vh-item:focus-within .vh-more { opacity: 1; }

.vh-name-input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 3px 6px;
  margin: -3px 0 0 -7px;
  border: 1px solid var(--doc-blue);
  border-radius: 4px;
  outline: none;
  box-shadow: 0 0 0 1px var(--doc-blue);
  background: #fff;
  color: var(--doc-ink);
}

.vh-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--doc-line);
  font-size: 14px;
  cursor: pointer;
}
.vh-filter input { width: 16px; height: 16px; margin: 0; accent-color: var(--doc-blue); cursor: pointer; }

/* The bar at the top while an earlier version is on screen */
#vh-bar {
  position: fixed;
  top: 12px;
  left: calc((100vw - 320px) / 2);
  transform: translateX(-50%);
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: calc(100vw - 340px);
  padding: 6px 8px 6px 6px;
  background: #fff;
  border-radius: 28px;
  box-shadow: var(--doc-shadow);
  font-family: var(--doc-font);
  color: var(--doc-ink);
}
#vh-bar[hidden] { display: none; }
.vh-bar-text { min-width: 0; }
.vh-bar-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vh-bar-sub { font-size: 12px; color: var(--doc-muted); }

.vh-primary {
  flex-shrink: 0;
  height: 36px;
  padding: 0 18px;
  border: none;
  border-radius: 18px;
  background: var(--doc-blue);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.vh-primary:hover { background: #0842a0; box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3); }
.vh-primary:focus-visible { outline: 2px solid var(--doc-blue); outline-offset: 2px; }

.vh-text-btn {
  height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 18px;
  background: none;
  color: var(--doc-blue);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.vh-text-btn:hover { background: var(--doc-blue-tint); }

.vh-menu {
  position: fixed;
  z-index: 1003;
  min-width: 200px;
  padding: 6px 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--doc-shadow);
  font-family: var(--doc-font);
}
.vh-menu button {
  display: block;
  width: 100%;
  padding: 9px 16px;
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--doc-ink);
  text-align: left;
  cursor: pointer;
}
.vh-menu button:hover,
.vh-menu button:focus-visible { background: var(--doc-hover); outline: none; }

.vh-dialog-back {
  position: fixed;
  inset: 0;
  z-index: 1004;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(32, 33, 36, 0.4);
}
.vh-dialog {
  width: 400px;
  max-width: 100%;
  padding: 24px 24px 16px;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--doc-shadow);
  font-family: var(--doc-font);
  color: var(--doc-ink);
}
.vh-dialog h3 { margin: 0 0 12px; font-size: 22px; font-weight: 400; }
.vh-dialog p { margin: 0 0 20px; font-size: 14px; line-height: 20px; color: var(--doc-muted); }
.vh-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* While the history is open: properties panel hidden, controls moved out from under it. */
body.vh-open #sidebar-panel,
body.vh-open #help_btn,
body.vh-open #report_bug { display: none !important; }
@media (min-width: 769px) {
  html body.vh-open #top-right-ui { right: 332px; }
  html body.vh-open #zoom-pan-controls { right: 328px; }
  html body.vh-open #timeline-panel { right: 332px; }
}

/* An earlier version is on screen: nothing to edit, so no editing UI. */
body.doc-previewing #doc-share-button,
body.doc-previewing .doc-badge { display: none !important; }

@media (max-width: 768px) {
  #vh-panel {
    top: auto;
    left: 0;
    width: auto;
    height: 46vh;
    border-radius: 16px 16px 0 0;
  }
  #vh-bar {
    left: 50%;
    max-width: calc(100vw - 16px);
    top: 8px;
  }
  .vh-item .vh-more { opacity: 1; }
}

/* Phones: whiteboard-mobile.css draws the page at half size (body scale(0.5),
   200% wide/tall), and fixed elements with it - size the history to match. */
@media only screen and (max-device-width: 900px) {
  #vh-panel { max-width: none; height: 92vh; }
  #vh-bar { max-width: calc(200vw - 32px); top: 110px; }
}

/* Free board limit (live-doc.js): "Not saved" status + dialog */
.doc-status-limit { color: #8a5a00; }
a.vh-primary,
a.vh-text-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  box-sizing: border-box;
}

/* Hidden 100px marker inside the board: live-sync.js measures zoom with it. */
.live-cursor-probe {
  position: absolute;
  left: 0;
  top: 0;
  width: 100px;
  height: 100px;
  visibility: hidden;
  pointer-events: none;
}
