/* Desktop mode - Win95-inspired shell */
.desktop-page-body #toast-container {
  inset: auto 1rem calc(40px + 1rem) auto;
}

.desktop-page-body .toast {
  background: var(--bg);
  color: var(--fg);
  border-radius: 0;
  border: 2px solid var(--border);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted),
    0 10px 22px rgb(0 0 0 / 20%);
  transform: translateY(12px);
}

.desktop-page-body .toast.show {
  transform: translateY(0);
}

.desktop-page-body .toast-success {
  border-color: var(--green-light);
  color: var(--fg);
}

.desktop-page-body .toast-error {
  border-color: var(--red-light);
  color: var(--fg);
}

.desktop-page-body .toast-info {
  border-color: var(--accent);
  color: var(--fg);
}

.desktop-page-body {
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.desktop-page-body:has(.admin-banner) {
  padding-top: 40px;
}

.desktop-shell {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

.desktop-page-body:has(.admin-banner) .desktop-shell {
  height: calc(100dvh - 40px);
}

.desktop-wallpaper {
  position: absolute;
  inset: 0;
  background: var(--desktop-wallpaper, var(--bg));
}

.desktop-icons {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  gap: 1rem 0.75rem;
  width: 180px;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}

.desktop-icon:hover,
.desktop-icon:focus-visible {
  border-color: var(--border);
  background: rgb(255 255 255 / 40%);
}

.desktop-icon.selected {
  border-color: var(--accent);
  background: rgb(255 255 255 / 55%);
}

.dark .desktop-icon.selected {
  background: rgb(0 0 0 / 45%);
}

.desktop-icon-glyph {
  font-size: 1.6rem;
}

.desktop-icon-label {
  font-size: 0.75rem;
  text-align: center;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgb(255 255 255 / 60%);
  color: var(--fg);
  box-shadow: 0 1px 3px rgb(0 0 0 / 15%);
}

.desktop-icon.secret-icon {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

.dark .desktop-icon-label {
  background: rgb(0 0 0 / 55%);
  color: #fff;
}

.desktop-windows {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.desktop-window {
  position: absolute;
  min-width: 320px;
  min-height: 220px;
  background: var(--bg);
  border: 2px solid var(--border);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted),
    0 14px 28px rgb(0 0 0 / 18%);
  pointer-events: auto;
}

.desktop-window.minimized {
  display: none;
}

.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.5rem;
  background: var(--code-bg);
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  cursor: move;
  user-select: none;
}

.desktop-window.active .window-titlebar {
  background: var(--accent);
  color: var(--white);
}

.window-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.window-title-icon {
  font-size: 0.9rem;
}

.window-controls {
  display: flex;
  gap: 0.3rem;
}

.window-controls button {
  width: 20px;
  height: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted);
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1;
  color: var(--fg);
}

.window-controls button:hover {
  border-color: var(--muted);
}

.window-content {
  height: calc(100% - 28px);
  background: var(--bg);
}

.taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.6rem;
  background: var(--code-bg);
  border-top: 2px solid var(--border);
  box-shadow: inset 0 1px 0 var(--white);
  z-index: 1000;
}

.dark .taskbar {
  color: #fff;
}

.start-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  background: var(--bg);
  border: 2px solid var(--border);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted);
  font-weight: 600;
  cursor: pointer;
  color: var(--fg);
}

.dark .start-button {
  color: #fff;
}

.start-button.active {
  box-shadow:
    inset -1px -1px 0 var(--white),
    inset 1px 1px 0 var(--muted);
}

.taskbar-apps {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  overflow-x: auto;
  padding: 0 0.25rem;
}

.taskbar-utilities {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.taskbar-apps::-webkit-scrollbar {
  height: 6px;
}

.taskbar-apps::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

.taskbar-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  background: var(--bg);
  border: 2px solid var(--border);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
  cursor: pointer;
  color: var(--fg);
}

.taskbar-icon {
  font-size: 0.9rem;
}

.dark .taskbar-button {
  color: #fff;
}

.taskbar-button.active {
  box-shadow:
    inset -1px -1px 0 var(--white),
    inset 1px 1px 0 var(--muted);
}

.taskbar-tray {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-left: 0.6rem;
  border-left: 1px solid var(--border);
}

.taskbar-tray span {
  padding: 0.2rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted);
  font-size: 0.75rem;
  color: var(--fg);
}

.dark .taskbar-tray span {
  color: #fff;
}

.start-menu {
  position: absolute;
  bottom: 40px;
  left: 0.6rem;
  width: 220px;
  background: var(--bg);
  border: 2px solid var(--border);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted),
    0 12px 24px rgb(0 0 0 / 20%);
  display: none;
  z-index: 1200;
}

.start-menu.open {
  display: block;
}

.start-menu-header {
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  padding: 0.45rem 0.6rem;
}

.start-menu-items {
  list-style: none;
  padding: 0.35rem;
  margin: 0;
}

.start-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  text-decoration: none;
  color: var(--fg);
  background: transparent;
  border: none;
  box-sizing: border-box;
  cursor: pointer;
  font-size: 0.85rem;
  text-align: left;
}

.start-menu-item:hover {
  background: var(--code-bg);
}

.start-menu-item.open {
  background: var(--accent);
  color: var(--white);
}

.menu-glyph {
  width: 1.25rem;
  text-align: center;
}

.terminal-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #0c0f0a;
  color: #e8e6e3;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.terminal-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  height: 100%;
}

.terminal-output {
  flex: 1;
  overflow-y: auto;
  padding: 0.4rem 0.25rem;
  border: 1px solid rgb(255 255 255 / 12%);
  background: #0a0b09;
}

.terminal-output .terminal-hint {
  font-size: 0.75rem;
  color: rgb(232 230 227 / 70%);
  margin: 0 0 0.5rem;
}

.terminal-line {
  font-size: 0.85rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.terminal-command {
  color: var(--accent);
  font-weight: 600;
}

.terminal-output .terminal-output {
  color: #e8e6e3;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-prompt {
  color: var(--accent);
  font-weight: 600;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  caret-color: #9ad1ff;
}

.game-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
}

.game-body {
  height: 100%;
}

.game-shell #command-mode {
  position: static;
  inset: auto;
  display: flex;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  border: none;
  background: var(--bg);
  box-shadow: none;
}

.game-shell #command-mode.open {
  display: flex;
}

.game-shell #game-output {
  padding: 0.75rem 0;
}

.notepad-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
}

.notepad-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--code-bg);
  border-bottom: 1px solid var(--border);
}

.notepad-title {
  font-weight: 600;
}

.notepad-actions {
  display: flex;
  gap: 0.4rem;
}

.notepad-save {
  padding: 0.25rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted);
  cursor: pointer;
  color: var(--fg);
}

.notepad-editor {
  flex: 1;
  border: none;
  padding: 0.75rem;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  background: #fff;
  color: #111;
  resize: none;
  outline: none;
}

.browser-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
}

.browser-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--code-bg);
  border-bottom: 1px solid var(--border);
}

.browser-title {
  font-weight: 600;
}

.browser-controls {
  display: flex;
  gap: 0.4rem;
  flex: 1;
}

.browser-input {
  flex: 1;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.browser-go {
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted);
  cursor: pointer;
  color: var(--fg);
}

.browser-frame-wrap {
  flex: 1;
  background: var(--bg);
}

.browser-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

.photos-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
}

.photos-toolbar {
  padding: 0.5rem 0.75rem;
  background: var(--code-bg);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.photos-empty {
  padding: 0.75rem;
  color: var(--muted);
}

.photos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 1fr);
  gap: 0;
  height: 100%;
}

.photos-viewer {
  padding: 0.75rem;
  border-right: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
}

.photos-viewer-controls {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}

.photos-nav {
  width: 30px;
  height: 28px;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted);
  cursor: pointer;
  color: var(--fg);
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
  padding: 0.75rem;
  overflow-y: auto;
  background: var(--code-bg);
}

.photos-viewer-image {
  width: 100%;
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100% - 48px);
  object-fit: contain;
  background: #111;
  border: 1px solid var(--border);
}

.photos-viewer-title {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  flex-shrink: 0;
  height: 24px;
  line-height: 24px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photos-thumb {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 0.35rem;
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted);
  cursor: pointer;
}

.photos-thumb img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.files-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
}

.files-toolbar {
  padding: 0.5rem 0.75rem;
  background: var(--code-bg);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.files-body {
  flex: 1;
  padding: 0.5rem 0.75rem;
  overflow-y: auto;
}

.files-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.files-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted);
  cursor: pointer;
  color: var(--fg);
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  text-align: left;
}

.files-item:hover {
  border-color: var(--muted);
}

.files-icon {
  font-size: 1rem;
}

.desktop-page-body #chatbot-overlay {
  display: none;
}

.desktop-chat-shell #chatbot {
  position: static;
  width: 100%;
  max-width: none;
  max-height: none;
  height: 100%;
  opacity: 1;
  visibility: visible;
  transform: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: var(--bg);
}

.desktop-chat-shell .chatbot-header {
  display: none;
}

.desktop-chat-shell .chatbot-body {
  flex: 1;
}

.desktop-page-body #settings-picker,
.desktop-page-body #shortcuts-dialog,
.desktop-page-body #confirm-dialog {
  background: var(--bg);
  border-radius: 0;
  border: 2px solid var(--border);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted),
    0 18px 36px rgb(0 0 0 / 25%);
}

.desktop-page-body .modal-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--code-bg);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  margin: -1.5rem -1.5rem 1rem;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.desktop-page-body .modal-titlebar h3 {
  margin-bottom: 0 !important;
}

.desktop-page-body #settings-picker .modal-titlebar,
.desktop-page-body #shortcuts-dialog .modal-titlebar,
.desktop-page-body #confirm-dialog .modal-titlebar {
  background: var(--accent);
  color: var(--white);
}

.desktop-page-body .modal-close {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  background: var(--bg);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--fg);
}

.desktop-page-body #settings-picker .settings-section label,
.desktop-page-body #shortcuts-dialog h4,
.desktop-page-body #confirm-dialog p {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.desktop-page-body #settings-picker .mode-toggle button,
.desktop-page-body #settings-picker .color-swatches button,
.desktop-page-body #settings-picker .leader-key-option,
.desktop-page-body #settings-picker .settings-section button,
.desktop-page-body #shortcuts-dialog button,
.desktop-page-body #confirm-dialog button {
  border-radius: 0;
  border: 2px solid var(--border);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted);
}

.desktop-page-body .chatbot {
  border-radius: 0;
  border: 2px solid var(--border);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted);
}

.desktop-chat-shell #chat-messages {
  padding: 0.75rem;
  gap: 0.5rem;
  max-height: none;
}

.desktop-chat-shell .chat-message {
  border-radius: 0;
  border: 1px solid var(--border);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted);
  font-size: 0.85rem;
}

.desktop-chat-shell .chat-message.bot {
  background: var(--code-bg);
  color: var(--fg);
}

.desktop-chat-shell .chat-message.user {
  background: var(--bg);
  color: var(--fg);
  border-color: var(--accent);
}

.desktop-chat-shell #chat-options {
  border-top: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
  gap: 0.4rem;
}

.desktop-chat-shell #chat-options .chat-option,
.desktop-chat-shell #contact-form button,
.desktop-chat-shell #contact-form input,
.desktop-chat-shell #contact-form textarea,
.desktop-chat-shell .emoji-btn {
  border-radius: 0;
  border: 2px solid var(--border);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted);
  background: var(--bg);
  color: var(--fg);
}

.desktop-chat-shell #chat-options .chat-option:hover,
.desktop-chat-shell #contact-form button:hover,
.desktop-chat-shell .emoji-btn:hover {
  border-color: var(--muted);
}

.desktop-chat-shell #contact-form input,
.desktop-chat-shell #contact-form textarea {
  padding: 0.4rem 0.5rem;
}

.desktop-chat-shell #contact-form .form-actions {
  gap: 0.5rem;
}

.desktop-mobile-block {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: var(--bg);
  color: var(--fg);
  flex-direction: column;
  gap: 0.5rem;
}

.desktop-loader {
  position: fixed;
  inset: 0;
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  transition: opacity 0.3s ease;
}

.desktop-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.boot-screen {
  width: min(520px, 90vw);
  border: 2px solid var(--border);
  padding: 1.5rem;
  background: var(--code-bg);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted),
    0 10px 20px rgb(0 0 0 / 20%);
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.boot-header {
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--fg);
}

.boot-subtitle {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.boot-log {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--fg);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.boot-log p {
  margin: 0;
}

.boot-line {
  opacity: 0;
  transform: translateX(-6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.boot-line.visible {
  opacity: 1;
  transform: translateX(0);
}

.boot-cursor {
  color: var(--accent);
  font-weight: 600;
  animation: boot-cursor 1s step-end infinite;
}

.boot-progress {
  margin-top: 1.4rem;
  height: 18px;
  border: 2px solid var(--border);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.boot-progress-bar {
  height: 100%;
  width: 30%;
  background: var(--accent);
  animation: boot-progress 1.6s linear infinite;
}

.boot-footer {
  margin-top: 1.2rem;
  font-size: 0.7rem;
  color: var(--muted);
}

@keyframes boot-progress {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(220%);
  }
}

@keyframes boot-cursor {
  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

.desktop-mobile-block h1 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

@media (width <= 900px), (pointer: coarse) {
  .desktop-shell {
    display: none;
  }

  .desktop-mobile-block {
    display: flex;
  }
}

.context-menu {
  position: absolute;
  min-width: 200px;
  background: var(--bg);
  border: 2px solid var(--border);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted),
    0 12px 24px rgb(0 0 0 / 20%);
  padding: 0.35rem 0;
  display: none;
  z-index: 1500;
}

.context-menu.open {
  display: block;
}

.context-menu-section {
  padding: 0.2rem 0;
  border-bottom: 1px solid var(--border);
}

.context-menu-section:last-child {
  border-bottom: none;
}

.context-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  background: transparent;
  border: none;
  color: var(--fg);
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
}

.context-menu-item:hover {
  background: var(--code-bg);
}

.context-menu-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0.2rem 0.6rem;
}

.context-menu-empty {
  display: block;
  padding: 0.35rem 0.6rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.paint-app {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.paint-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--code-bg);
  border-bottom: 1px solid var(--border);
}

.paint-swatches {
  display: flex;
  gap: 0.3rem;
}

.paint-swatch {
  width: 20px;
  height: 20px;
  border: 1px solid var(--border);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted);
  background: var(--swatch);
  cursor: pointer;
}

.paint-swatch.active {
  outline: 2px solid var(--accent);
}

.paint-size-control {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
}

.paint-size-control input {
  accent-color: var(--accent);
}

.paint-clear {
  padding: 0.25rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted);
  cursor: pointer;
  color: var(--fg);
}

.paint-save {
  padding: 0.25rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow:
    inset 1px 1px 0 var(--white),
    inset -1px -1px 0 var(--muted);
  cursor: pointer;
  color: var(--fg);
}

.paint-canvas-wrap {
  flex: 1;
  background: var(--white);
}

.paint-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: var(--white);
  cursor: crosshair;
}
