.whiteboard-app {
  width: min(1500px, calc(100% - 36px));
  padding-bottom: 54px;
}

.whiteboard-intro {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
}

.whiteboard-workspace {
  min-height: 740px;
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(360px, .88fr);
  overflow: hidden;
  box-shadow: 12px 12px 0 var(--shadow);
}

.board-panel,
.code-panel,
.chat-panel {
  min-width: 0;
  padding: 22px;
}

.board-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  border-radius: 24px 0 0 24px;
  background: var(--surface-soft);
}

.chat-panel {
  width: 100%;
  max-width: 100%;
  min-height: 740px;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  border-radius: 0 24px 24px 0;
  background: var(--surface);
  container-type: inline-size;
}

.code-panel {
  min-height: 740px;
  border-right: 1px solid var(--line);
  border-radius: 24px 0 0 24px;
  background: var(--surface-soft);
}

.code-panel .code-workspace-launcher {
  display: none;
}

.board-heading,
.board-heading-actions,
.board-footer,
.mobile-view-tabs,
.board-toolbar,
.tool-set,
.board-legend,
.text-tool-row,
.board-context {
  display: flex;
  align-items: center;
}

.board-heading {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.board-kicker {
  margin: 0 0 5px;
  color: var(--violet-strong);
  font: 500 .65rem/1 'DM Mono', monospace;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.board-heading h2,
.whiteboard-chat-heading h2 {
  margin: 0;
  font: 700 clamp(1.3rem, 2vw, 1.65rem)/1.2 Fraunces, serif;
  letter-spacing: -.035em;
}

.board-heading-actions {
  flex: 0 0 auto;
  gap: 8px;
}

.board-upload,
.board-action,
.board-tool {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface-raised);
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}

.board-upload { cursor: pointer; }
.board-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.board-upload:has(input:focus-visible) {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.board-page-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}

.page-nav-group,
.page-nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-indicator {
  font-family: 'DM Mono', monospace;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink);
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  min-width: 90px;
  text-align: center;
}

.page-action {
  min-height: 36px;
  padding: 6px 12px;
  font-size: .78rem;
}

.board-toolbar {
  min-height: 58px;
  gap: 9px;
  margin-bottom: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-raised);
  scrollbar-width: thin;
}

.tool-set { gap: 4px; }
.board-tool {
  min-width: 48px;
  flex-direction: column;
  gap: 1px;
  padding: 5px 8px;
  border-color: transparent;
  font-size: .61rem;
}
.board-tool > span:first-child { font-size: 1rem; line-height: 1; }
.board-tool.active,
.board-tool[aria-pressed='true'] {
  border-color: var(--violet);
  color: var(--violet-strong);
  background: var(--lav);
}

.toolbar-divider {
  width: 1px;
  height: 34px;
  flex: 0 0 auto;
  background: var(--line);
}

.color-control {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
}
.color-control .sr-only { top: 0; left: 0; }
.color-control input {
  width: 27px;
  height: 27px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.color-control input::-webkit-color-swatch-wrapper { padding: 0; }
.color-control input::-webkit-color-swatch { border: 0; border-radius: 50%; }
.color-control input::-moz-color-swatch { border: 0; border-radius: 50%; }

.width-control {
  min-width: 118px;
  display: grid;
  grid-template-columns: auto 76px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
}
.width-control input { accent-color: var(--violet); }

.history-tools { margin-left: auto; }
.icon-action span:first-child { font-size: 1.05rem; }
.board-action:disabled { cursor: not-allowed; opacity: .42; }
.danger-action { color: var(--danger); }

.text-tool-row {
  gap: 10px;
  margin: 0 0 12px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-raised);
  font-size: .74rem;
}
.text-tool-row label { flex: 0 0 auto; color: var(--ink); font-weight: 700; }
.text-tool-row input {
  min-width: 120px;
  min-height: 40px;
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-soft);
}
.text-tool-row span { color: var(--muted); }

.board-stage {
  position: relative;
  min-height: 320px;
  display: grid;
  flex: 1;
  place-items: center;
  overflow: auto;
  border: 1px solid #d7d4e2;
  border-radius: 14px;
  background: #dcd9e4;
  box-shadow: inset 0 1px 7px rgb(28 30 56 / .08);
}

#homework-board {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3 / 2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgb(28 30 56 / .12);
  cursor: crosshair;
  touch-action: none;
}
#homework-board[data-tool='eraser'] { cursor: cell; }
#homework-board[data-tool='text'] { cursor: text; }

.drop-prompt {
  position: absolute;
  inset: 18px;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 3px dashed var(--violet);
  border-radius: 16px;
  color: var(--violet-strong);
  background: color-mix(in srgb, var(--lav) 88%, transparent);
  font-size: 1rem;
  font-weight: 700;
  pointer-events: none;
}

.board-equation-layer,
.board-equation-layer * {
  pointer-events: none !important;
}
.board-equation-layer {
  position: absolute;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.board-equation-mark {
  position: absolute;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  padding: 6px 14px;
  overflow: visible;
  border-left: 3.5px solid currentColor;
  border-radius: 8px;
  background: rgb(255 255 255 / .96);
  box-shadow: 0 2px 8px rgb(28 30 56 / .09);
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.board-equation-formula {
  min-width: 0;
  overflow: visible;
  color: inherit;
  pointer-events: none;
}
.board-equation-formula .katex-display { margin: 0; text-align: left; }
.board-equation-formula .katex { color: inherit; font-size: 1.05em; }

.board-footer {
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-top: 10px;
}
.board-footer p,
.board-status {
  margin: 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.45;
}
.board-footer > p:first-child { max-width: 560px; }
.board-legend { flex: 0 0 auto; gap: 7px; white-space: nowrap; }
.legend-line {
  width: 20px;
  border-top: 3px solid #292641;
}
.legend-line--helper {
  margin-left: 7px;
  border-color: #6f5bd3;
  border-top-style: dashed;
}
.board-status {
  min-height: 20px;
  padding-top: 5px;
  color: var(--success);
}

.whiteboard-chat-heading {
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 13px;
}
.whiteboard-mode-tabs { margin-bottom: 13px; }
.whiteboard-mode-tabs,
.whiteboard-chat-heading > div {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.whiteboard-mode-tabs .mode-tab {
  min-width: 0;
  overflow-wrap: anywhere;
}
.whiteboard-chat-heading .new-chat {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.chat-heading-actions {
  width: min(100%, 360px);
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  justify-self: end;
}

.workspace-launchers {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 13px;
}

.workspace-launcher {
  min-width: 0;
  white-space: normal;
}

.saved-chats-dialog {
  width: min(520px, calc(100% - 32px));
  max-height: min(720px, calc(100dvh - 40px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(28, 30, 56, .28);
}
.saved-chats-dialog::backdrop { background: rgba(22, 21, 37, .62); backdrop-filter: blur(3px); }
.saved-chats-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 22px 14px; }
.saved-chats-heading h2 { margin: 0; font: 700 1.7rem/1.1 Fraunces, serif; }
.saved-chats-close { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: transparent; font-size: 1.6rem; cursor: pointer; }
.saved-chats-note { margin: 0; padding: 0 22px 16px; color: var(--muted); font-size: .83rem; line-height: 1.5; }
.saved-chats-status { min-height: 40px; padding: 11px 22px; border-block: 1px solid var(--line); color: var(--muted); background: var(--lav); font-size: .8rem; }
.saved-chats-list { display: grid; gap: 9px; max-height: min(490px, calc(100dvh - 250px)); padding: 14px; overflow: auto; }
.saved-chat-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 7px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.saved-chat-row[data-active='true'] { border-color: var(--violet-strong); box-shadow: inset 3px 0 0 var(--violet-strong); }
.saved-chat-open { display: grid; gap: 5px; min-width: 0; padding: 9px 10px; border: 0; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.saved-chat-open strong { overflow: hidden; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.saved-chat-open span { color: var(--muted); font-size: .72rem; }
.saved-chat-delete { align-self: center; min-height: 40px; padding: 0 10px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: .72rem; font-weight: 700; cursor: pointer; }
.saved-chat-delete:hover, .saved-chat-delete:focus-visible, .saved-chat-delete[data-confirm='true'] { color: #8e2f34; background: #fff0f0; }
:root[data-theme='dark'] .saved-chats-dialog,
:root[data-theme='dark'] .saved-chat-row { background: #242432; }
:root[data-theme='dark'] .saved-chat-delete:hover,
:root[data-theme='dark'] .saved-chat-delete:focus-visible,
:root[data-theme='dark'] .saved-chat-delete[data-confirm='true'] { color: #ffc0c3; background: #4a2c35; }
.tutor-call-panel {
  margin-bottom: 13px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}
.tutor-call-heading,
.tutor-call-status {
  display: flex;
  align-items: center;
}
.tutor-call-heading {
  justify-content: space-between;
  gap: 12px;
}
.tutor-call-heading h3 {
  margin: 0;
  color: var(--ink);
  font: 700 1rem/1.2 Fraunces, serif;
  letter-spacing: -.025em;
}
.tutor-call-description {
  margin: 8px 0 5px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.45;
}
.tutor-call-usage {
  margin: 0 0 10px;
  color: var(--success);
  font-size: .67rem;
  font-weight: 700;
  line-height: 1.4;
}
.tutor-call-status {
  flex: 0 0 auto;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: .65rem;
  font-weight: 700;
  white-space: nowrap;
}
.call-status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
}
.tutor-call-status[data-state='connecting'] .call-status-dot {
  background: var(--orange);
  animation: tutor-call-pulse 1.1s ease-in-out infinite;
}
.tutor-call-status[data-state='live'] { color: var(--success); }
.tutor-call-status[data-state='live'] .call-status-dot { background: var(--success); }
.tutor-call-status[data-state='muted'] { color: var(--orange); }
.tutor-call-status[data-state='muted'] .call-status-dot { background: var(--orange); }
.tutor-call-status[data-state='error'] { color: var(--danger); }
.tutor-call-status[data-state='error'] .call-status-dot { background: var(--danger); }
.tutor-call-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.call-action {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface-raised);
  font-size: .72rem;
  font-weight: 700;
}
.call-action--primary {
  border-color: var(--ink);
  color: var(--paper);
  background: var(--ink);
}
.call-action--end { color: var(--danger); }
.call-action[aria-pressed='true'] {
  border-color: var(--orange);
  color: var(--danger);
  background: var(--danger-surface);
}
.call-action:disabled { cursor: not-allowed; opacity: .45; }

.intelligence-picker {
  min-width: 0;
  margin: 0 0 13px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: var(--surface-soft);
}
.intelligence-picker legend {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 5px;
}
.intelligence-picker legend .board-kicker { margin: 0; }
.intelligence-title {
  font: 700 1rem/1.2 Fraunces, serif;
  letter-spacing: -.025em;
}
.intelligence-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}
.intelligence-option {
  position: relative;
  min-width: 0;
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 9px 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}
.intelligence-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.intelligence-option:has(input:focus-visible) {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}
.intelligence-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--violet) 60%, var(--line));
  color: var(--ink);
  background: var(--lav);
  box-shadow: 0 2px 8px rgb(38 34 70 / .09);
}
.intelligence-option[data-locked='true'] {
  cursor: not-allowed;
  opacity: .58;
}
.intelligence-option-name { font-size: .78rem; font-weight: 800; }
.intelligence-option-description {
  overflow: hidden;
  display: -webkit-box;
  font-size: .61rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.intelligence-option-cost {
  margin-top: 3px;
  color: var(--violet-strong);
  font: 500 .58rem/1.2 'DM Mono', monospace;
}
.intelligence-option[data-locked='true'] .intelligence-option-cost { color: var(--muted); }
.intelligence-meta {
  display: grid;
  gap: 3px;
  margin-top: 8px;
}
.intelligence-meta p {
  margin: 0;
  color: var(--muted);
  font-size: .65rem;
  line-height: 1.4;
}
#intelligence-status { color: var(--success); font-weight: 700; }
.intelligence-picker[aria-busy='true'] .intelligence-options { opacity: .7; }

@keyframes tutor-call-pulse {
  0%, 100% { opacity: .45; transform: scale(.82); }
  50% { opacity: 1; transform: scale(1.12); }
}

.whiteboard-conversation {
  min-height: 280px;
  max-height: 480px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 14px;
}
.whiteboard-conversation .message { max-width: 94%; }
.whiteboard-conversation .message-body { font-size: .86rem; }
.message-board-link {
  min-height: 38px;
  margin-top: 10px;
  padding: 7px 9px;
  border: 1px dashed var(--violet);
  border-radius: 8px;
  color: var(--violet-strong);
  background: var(--lav);
  font-size: .72rem;
  font-weight: 700;
}
.message-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.message-sources strong {
  width: 100%;
  color: var(--muted);
  font: 500 .61rem/1.2 'DM Mono', monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.message-sources a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--violet-strong);
  background: var(--surface-soft);
  font-size: .68rem;
  font-weight: 700;
  text-decoration: none;
}

.whiteboard-composer textarea {
  min-height: 78px;
  max-height: 180px;
  resize: vertical;
  overflow-y: auto;
}
.board-context {
  gap: 5px;
  margin-right: auto;
  color: var(--success);
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
}
.board-context.disabled {
  color: var(--muted);
}
.board-context span { font-size: .6rem; }
.whiteboard-composer .composer-hint { margin-right: 0; }
.whiteboard-privacy { margin-top: 12px; text-align: left; }

.whiteboard-workspace.board-disabled.code-disabled {
  grid-template-columns: minmax(0, 1fr);
  max-width: 920px;
  margin-inline: auto;
}
.whiteboard-workspace.board-disabled .board-panel {
  display: none !important;
}
.whiteboard-workspace.code-disabled .code-panel {
  display: none !important;
}
.whiteboard-workspace:not(.board-disabled):not(.code-disabled)[data-active-surface='board'] .code-panel,
.whiteboard-workspace:not(.board-disabled):not(.code-disabled)[data-active-surface='code'] .board-panel {
  display: none !important;
}
.whiteboard-workspace.board-disabled.code-disabled .chat-panel {
  border-radius: 24px;
}
.mobile-view-tabs:has(+ .whiteboard-workspace.board-disabled.code-disabled) {
  display: none !important;
}

.mobile-view-tabs { display: none; }
.unread-dot {
  padding: 3px 5px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--orange);
  font-size: .55rem;
  text-transform: uppercase;
}

@media (hover: hover) {
  .board-upload:hover,
  .board-action:hover:not(:disabled),
  .board-tool:hover,
  .call-action:hover:not(:disabled) { border-color: var(--violet); background: var(--lav); }
  .call-action--primary:hover:not(:disabled) { color: var(--ink); }
  .intelligence-option:not([data-locked='true']):hover { border-color: var(--violet); }
  .message-sources a:hover { border-color: var(--violet); }
}

:root[data-theme='dark'] .board-stage { border-color: #4a4856; background: #171720; }
:root[data-theme='dark'] #homework-board { background: #ffffff; }
:root[data-theme='dark'] .legend-line--you { border-color: #f5f3ff; }

@media (max-width: 1100px) {
  .whiteboard-workspace { grid-template-columns: minmax(0, 1.45fr) minmax(340px, .85fr); }
  .board-tool { min-width: 45px; }
  .board-tool span:last-child { display: none; }
  .board-tool > span:first-child { font-size: 1.08rem; }
  .width-control { min-width: 105px; grid-template-columns: auto 65px; }
}

@media (max-width: 980px) {
  .whiteboard-app { width: min(100% - 26px, 760px); padding-top: 28px; }
  .whiteboard-intro { grid-template-columns: 1fr; }
  .mobile-view-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface-soft);
  }
  .mobile-view-tab {
    min-height: 46px;
    border: 0;
    border-radius: 9px;
    color: var(--muted);
    background: transparent;
    font-size: .82rem;
    font-weight: 700;
  }
  .mobile-view-tab.active {
    color: var(--ink);
    background: var(--surface-raised);
    box-shadow: 0 2px 8px rgb(35 33 59 / .09);
  }
  .whiteboard-workspace { min-height: 0; display: block; border-radius: 20px; }
  .whiteboard-workspace[data-mobile-view='board'] :is(.chat-panel, .code-panel),
  .whiteboard-workspace[data-mobile-view='code'] :is(.board-panel, .chat-panel),
  .whiteboard-workspace[data-mobile-view='chat'] :is(.board-panel, .code-panel) { display: none !important; }
  .board-panel,
  .code-panel,
  .chat-panel {
    min-height: min(760px, calc(100dvh - 110px));
    border: 0;
    border-radius: 20px;
  }
  .board-panel { background: var(--surface-soft); }
  .code-panel { background: var(--surface-soft); }
  .chat-panel { background: var(--surface); }
  .board-stage { min-height: 360px; }
  .whiteboard-conversation { min-height: 390px; }
}

@media (max-width: 600px) {
  .saved-chats-dialog { width: 100%; max-width: none; max-height: 82dvh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .saved-chats-list { max-height: calc(82dvh - 210px); }
  .whiteboard-app { width: min(100% - 20px, 760px); }
  .whiteboard-intro h1 { font-size: clamp(2.2rem, 12vw, 3rem); }
  .board-panel,
  .code-panel,
  .chat-panel { padding: 14px; }
  .board-heading { align-items: flex-start; flex-direction: column; }
  .board-heading-actions { width: 100%; }
  .board-upload,
  .board-heading-actions .board-action { flex: 1; }
  .board-page-bar { align-items: stretch; flex-direction: column; }
  .page-nav-group {
    display: grid;
    grid-template-columns: auto minmax(80px, 1fr) auto;
    width: 100%;
  }
  .page-nav-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }
  .page-nav-actions .board-action { min-width: 0; }
  .board-toolbar { width: 100%; min-width: 0; max-width: 100%; margin-inline: 0; }
  .text-tool-row { align-items: stretch; flex-direction: column; }
  .text-tool-row input { width: 100%; }
  .text-tool-row span { display: none; }
  .board-stage { min-height: 280px; }
  .board-footer { flex-direction: column; gap: 7px; }
  .board-context { font-size: .62rem; }
}

@media (max-width: 400px) {
  .board-context { max-width: 118px; white-space: normal; }
  .intelligence-option { min-height: 70px; padding-inline: 4px; }
  .intelligence-option-description { display: none; }
  .intelligence-option-cost { font-size: .54rem; white-space: normal; }
}

@container (max-width: 400px) {
  .workspace-launchers {
    grid-template-columns: minmax(0, 1fr);
  }
}

@container (max-width: 340px) {
  .whiteboard-mode-tabs {
    grid-template-columns: minmax(0, 1fr);
  }
}
