/* GEODES TOOL LAYOUT */

.geodes-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
  border-top: 2px solid var(--ink);
}

/* Cloud Projects */
.cloud-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cloud-panel-title {
  font-family: 'Crimson Pro', serif;
  font-size: 24px;
  font-style: italic;
  line-height: 1.05;
  color: var(--ink);
}

.cloud-panel-copy {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  opacity: 0.68;
}

.cloud-card {
  border: 1px solid rgba(26,26,46,0.12);
  background: rgba(26,26,46,0.025);
  padding: 12px;
}

.cloud-label {
  display: block;
  margin-bottom: 6px;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.58;
}

.cloud-input {
  width: 100%;
  margin-bottom: 8px;
  font-size: 11px;
  padding: 8px;
}

.cloud-full-btn {
  width: 100%;
  margin-bottom: 8px;
}

.cloud-full-btn:disabled,
.cloud-small-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cloud-account-row,
.cloud-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cloud-current-email {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--ink);
  word-break: break-word;
}

.cloud-small-btn {
  padding: 6px 8px;
  background: transparent;
  border: 1px solid rgba(26,26,46,0.35);
  color: var(--ink);
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.cloud-small-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.cloud-list-header {
  margin-top: 4px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}

.cloud-project-list {
  display: flex;
  flex-direction: column;
}

.cloud-public-list-header {
  margin-top: 0;
}

.cloud-public-section {
  border: 1px solid rgba(26,26,46,0.12);
  background: rgba(26,26,46,0.015);
}

.cloud-public-section + .cloud-public-section {
  margin-top: 8px;
}

.cloud-public-section.is-collapsed .cloud-public-section-body {
  display: none;
}

.cloud-project-item {
  align-items: flex-start;
}

.cloud-project-item .local-file-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cloud-status {
  min-height: 18px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.72;
}

.cloud-status[data-tone="ok"] {
  color: #1f7a4d;
  opacity: 1;
}

.cloud-status[data-tone="error"] {
  color: #c0392b;
  opacity: 1;
}



.cloud-projects-modal {
  width: min(680px, 94vw);
  max-width: 680px;
  max-height: 86vh;
  overflow-y: auto;
  text-align: left;
}

.cloud-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 2px;
  padding-bottom: 1px;
  border-bottom: 1px solid rgba(26,26,46,0.12);
}

.cloud-modal-header h3 {
  margin: 0 0 8px;
}

.cloud-modal-close {
  flex: 0 0 auto;
  border: 1px solid rgba(26,26,46,0.22);
  background: transparent;
  color: var(--ink);
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.cloud-modal-close:hover {
  background: var(--ink);
  color: var(--paper);
}

.cloud-share-wrapper {
  position: relative;
  display: inline-flex;
}

.cloud-share-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  width: min(360px, 88vw);
  padding: 12px;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 4px 4px 0 rgba(26,26,46,0.22);
}

.cloud-share-link-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.cloud-share-link-row .cloud-input {
  margin-bottom: 0;
}

.cloud-share-link-row .cloud-small-btn {
  flex: 0 0 auto;
  min-height: 34px;
}

.cloud-modal-tabs {
  display: flex;
  border: 1px solid rgba(26,26,46,0.18);
}

.cloud-modal-tab {
  flex: 1;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cloud-modal-tab.active {
  background: var(--ink);
  color: var(--paper);
}

.cloud-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cloud-public-section-title {
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  background: transparent;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  cursor: pointer;
  text-align: left;
}

.cloud-public-section-title:hover {
  background: rgba(26,26,46,0.06);
}

.cloud-public-section-title::before {
  content: '-';
  color: var(--ink);
}

.cloud-public-section.is-collapsed .cloud-public-section-title::before {
  content: '+';
}

.cloud-public-section-title span:first-child {
  flex: 1;
  min-width: 0;
}

.cloud-public-section-count {
  min-width: 22px;
  padding: 2px 6px;
  border: 1px solid rgba(26,26,46,0.18);
  color: var(--ink);
  text-align: center;
}

.cloud-public-section-body {
  padding: 0 8px 8px;
}

.cloud-admin-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.cloud-admin-row .cloud-input {
  margin-bottom: 0;
}

.cloud-admin-list-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.cloud-admin-list-item {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border: 1px solid rgba(26,26,46,0.1);
  font-family: 'Space Mono', monospace;
  font-size: 10px;
}

.cloud-project-admin-row {
  margin-top: 7px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.cloud-project-admin-row select {
  flex: 1;
  min-width: 0;
}

.cloud-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10000;
  max-width: min(360px, calc(100vw - 36px));
  padding: 11px 14px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  box-shadow: 4px 4px 0 rgba(26,26,46,0.22);
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  line-height: 1.45;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.cloud-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.cloud-toast[data-tone="error"] {
  background: #c0392b;
  border-color: #c0392b;
}

.geodes-sidebar {
  width: 280px;
  background: var(--paper2);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  border-right: 2px solid var(--ink);
}

.geodes-sidebar-tabs {
  display: flex;
  height: 64px;
  border-bottom: 2px solid var(--ink);
}

.geodes-tab {
  flex: 1;
  padding: 16px;
  background: transparent;
  border: none;
  color: var(--ink);
  opacity: 0.5;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}

.geodes-tab.active {
  opacity: 1;
  background: rgba(26, 26, 46, 0.05);
  border-bottom: 2px solid var(--accent2);
}

.geodes-sidebar-content {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  /* Ocultar barra no Firefox */
  scrollbar-width: none;
  /* Ocultar barra no IE/Edge */
  -ms-overflow-style: none;
}

/* Ocultar barra no Chrome, Safari e Opera */
.geodes-sidebar-content::-webkit-scrollbar {
  display: none;
}

.geodes-example-btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: rgba(26, 26, 46, 0.03);
  border: 1px solid rgba(26, 26, 46, 0.1);
  border-left: 3px solid transparent;
  color: var(--ink);
  font-family: 'Crimson Pro', serif;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.geodes-example-btn:hover {
  background: rgba(26, 26, 46, 0.08);
  border-left: 3px solid var(--gold);
}

.geodes-main {
  flex: 1;
  display: flex;
  padding: 0;
  margin: 0;
  max-width: none;
}

.geodes-3d {
  flex: 1;
  border-right: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
}

.geodes-epura {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--paper2);
}

.geodes-toolbar {
  padding: 17px 20px;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--ink);
}

/* Viewport Controls */
.viewport-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.viewport-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid rgba(26, 26, 46, 0.2);
  border-radius: 4px;
  color: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.viewport-toggle-btn:hover {
  background: rgba(26, 26, 46, 0.08);
  border-color: rgba(26, 26, 46, 0.4);
  transform: scale(1.05);
}

.viewport-toggle-btn:active {
  transform: scale(0.95);
}

/* Panel Minimize / Maximize States */
.geodes-3d,
.geodes-epura {
  transition: flex 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              min-width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
  overflow: hidden;
}

.geodes-3d.minimized,
.geodes-epura.minimized {
  flex: 0 0 42px !important;
  min-width: 42px;
  max-width: 42px;
}

.geodes-3d.minimized .geodes-canvas-container,
.geodes-epura.minimized .geodes-canvas-container {
  display: none;
}

.geodes-3d.minimized .geodes-toolbar,
.geodes-epura.minimized .geodes-toolbar {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 16px 10px;
  height: 100%;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  border-bottom: none;
}

.geodes-3d.minimized .geodes-toolbar span {
  order: 2;
  opacity: 0.5;
  font-size: 10px;
}

.geodes-epura.minimized .geodes-toolbar span {
  order: 2;
  opacity: 0.5;
  font-size: 10px;
}

.geodes-3d.minimized .viewport-controls,
.geodes-epura.minimized .viewport-controls {
  writing-mode: horizontal-tb;
  order: 1;
}

.geodes-3d.minimized .viewport-controls .viewport-toggle-btn svg,
.geodes-epura.minimized .viewport-controls .viewport-toggle-btn svg {
  transform: rotate(180deg);
}

.geodes-epura.minimized #btnResetZoom {
  display: none;
}

.geodes-3d.maximized,
.geodes-epura.maximized {
  flex: 3 !important;
}

.geodes-canvas-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#geodes-3d-canvas, #geodes-epure-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#geodes-3d-canvas {
  background: var(--paper);
}

/* Context Menu */
.geodes-ctx-menu {
  display: none;
  position: absolute;
  z-index: 1000;
  background: var(--ink);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 4px 4px 0 rgba(26,26,46,0.3);
  padding: 8px 0;
  min-width: 150px;
}
.geodes-ctx-menu button {
  display: block;
  width: 100%;
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--paper);
  text-align: left;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.15s;
}
.geodes-ctx-menu button:hover {
  background: rgba(255,255,255,0.1);
}

.geodes-ctx-item {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 8px 16px;
  color: var(--paper);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.15s;
}

.geodes-ctx-item:hover {
  background: rgba(255,255,255,0.1);
}

.geodes-ctx-submenu {
  display: none;
  position: absolute;
  top: 0;
  left: 100%; /* pop out to the right */
  background: var(--ink);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 4px 4px 0 rgba(26,26,46,0.3);
  min-width: 160px;
  padding: 8px 0;
  z-index: 1001;
}

.geodes-ctx-item.has-submenu:hover > .geodes-ctx-submenu {
  display: block;
}

/* Modal Dialog */
.geodes-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(26, 26, 46, 0.6);
  z-index: 9000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  padding: 20px;
}
.geodes-modal {
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  width: 100%;
  max-width: 400px;
  padding: 28px;
  position: relative;
  animation: geodesModalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes geodesModalSlideIn {
  from { transform: translateY(15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.geodes-modal h3 {
  font-family: 'Crimson Pro', serif;
  font-size: 24px;
  font-style: italic;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--grid);
  padding-bottom: 8px;
  color: var(--ink);
}
.modal-form, label.modal-form {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  color: var(--ink);
  opacity: 0.7;
  text-transform: uppercase;
}
.geodes-modal input.geodes-input, 
.geodes-modal select.geodes-input {
  width: 100%;
  margin-bottom: 12px;
  box-sizing: border-box;
  min-width: 0;
}
.point-edit-modal {
  max-width: 460px;
}
.point-edit-name-input {
  width: 72px !important;
  text-align: center;
  font-weight: 700;
}
.point-edit-coords {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.point-edit-field {
  min-width: 0;
}
.point-edit-field label {
  display: block;
  min-height: 24px;
  line-height: 1.2;
}
.point-edit-field input {
  margin-bottom: 0 !important;
}
@media (max-width: 520px) {
  .point-edit-coords {
    grid-template-columns: 1fr;
  }
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(26,26,46,0.05);
}
.modal-actions button {
  padding: 10px 20px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  cursor: pointer;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  transition: all 0.2s;
}
.modal-actions button:hover {
  background: rgba(26,26,46,0.05);
}
.modal-actions button.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.modal-actions button.btn-primary:hover {
  background: var(--accent2);
  border-color: var(--accent2);
}

/* Sidebar Category Styles */
.geodes-category-card {
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(26, 26, 46, 0.1);
}

.geodes-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  background: rgba(26, 26, 46, 0.05);
  border: none;
  color: var(--ink);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.geodes-category-header:hover {
  background: rgba(26, 26, 46, 0.08);
}

.geodes-category-header .arrow {
  transition: transform 0.3s ease;
  opacity: 0.6;
}

.geodes-category-card.open .geodes-category-header .arrow {
  transform: rotate(180deg);
}

.geodes-category-card.open .geodes-category-header {
  color: var(--gold);
  background: rgba(26, 26, 46, 0.08);
}

.geodes-category-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background: var(--paper2);
}

.geodes-category-card.open .geodes-category-body {
  max-height: 2000px; /* Large enough for nested items */
  padding: 12px 0;
}

/* Sidebar Accordion Styles */
.geodes-example-btn {
  display: block;
  width: 90%;
  margin: 0 auto 8px auto;
  padding: 12px 14px;
  background: rgba(26, 26, 46, 0.03);
  border: 1px solid rgba(26, 26, 46, 0.1);
  border-left: 3px solid transparent;
  color: var(--ink);
  font-family: 'Crimson Pro', serif;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.geodes-example-btn.active {
  background: var(--ink);
  color: var(--paper);
  border-left-color: var(--gold);
}

.geodes-aula-group-title {
  width: 90%;
  margin: 14px auto 8px;
  padding: 0 4px;
  color: var(--gold);
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.geodes-example-btn.is-nested {
  width: 82%;
  margin-left: 12%;
  padding: 10px 12px;
  font-size: 14px;
}

.geodes-acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--paper);
  width: 90%;
  margin: 0 auto 12px auto;
}

.geodes-acc-body.open {
  max-height: 500px;
  border: 1px solid var(--grid);
  border-top: none;
  padding: 12px;
}

.pt-row {
  display: flex; gap: 6px; margin-bottom: 8px; align-items: center;
}

.pt-row span {
  font-family: 'Crimson Pro', serif; font-weight: bold; font-style: italic;
  font-size: 14px; width: 20px; text-align: center; color: var(--ink);
}

.pt-row input {
  width: 32%; padding: 4px; font-family: 'Space Mono', monospace; font-size: 10px;
  border: 1px solid var(--grid); background: var(--paper); color: var(--ink); text-align: center;
}

.pt-row input:focus {
  border-color: var(--accent2);
  outline: none;
}

/* Analysis Toggles */
.geodes-toggle-row {
  display: flex;
  align-items: center;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--ink);
  cursor: pointer;
  margin-bottom: 8px;
}
.geodes-toggle-row input {
  display: none;
}
.geodes-fake-check {
  width: 26px;
  height: 14px;
  background: rgba(26,26,46,0.1);
  border-radius: 7px;
  margin-right: 8px;
  position: relative;
  transition: all 0.2s;
}
.geodes-fake-check::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 10px; height: 10px;
  background: #fff;
  border-radius: 5px;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.geodes-toggle-row input:checked + .geodes-fake-check {
  background: var(--ink);
}
.geodes-toggle-row input:checked + .geodes-fake-check::after {
  left: 14px;
  background: var(--paper);
}

.geodes-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--grid);
  color: var(--ink);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
}
.geodes-input:focus {
  border-color: var(--accent2);
  outline: none;
}

.geodes-editor {
  width: 100%;
  padding: 10px;
  background: rgba(26,26,46,0.03);
  border: 1px solid var(--grid);
  border-radius: 4px;
  color: var(--ink);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  resize: vertical;
  line-height: 1.5;
  outline: none;
}
.geodes-editor:focus {
  border-color: var(--accent2);
  background: rgba(26,26,46,0.05);
}

.geodes-btn-outline {
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.geodes-btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Plane parameter inputs */
.plane-params {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plane-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plane-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--ink);
  opacity: 0.7;
  min-width: 90px;
  flex-shrink: 0;
}

.plane-row .geodes-input {
  flex: 1;
  padding: 6px 8px;
  font-size: 12px;
  text-align: center;
}

/* ═══ Criar Panel Sections ═══ */
.criar-section {
  margin-bottom: 12px;
  border: 1px solid rgba(26,26,46,0.1);
  background: rgba(26,26,46,0.01);
  overflow: hidden;
  transition: all 0.2s ease;
}

/* Hide content by default */
.criar-section .criar-section-body,
.criar-section .criar-add-btn,
.criar-section .formar-reta-row {
  display: none;
}

/* Show when open */
.criar-section.open .criar-section-body {
  display: block;
}
.criar-section.open .criar-add-btn {
  display: flex;
}
.criar-section.open .formar-reta-row {
  display: flex;
}

.criar-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--ink);
  background: rgba(26,26,46,0.05);
  border-bottom: 1px solid rgba(26,26,46,0.08);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.criar-section-header:hover {
  background: rgba(26,26,46,0.1);
}
.criar-section.open .criar-section-header {
  background: rgba(26, 26, 46, 0.08);
}

.criar-counter {
  background: var(--ink);
  color: var(--paper);
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.criar-section-body {
  padding: 0;
}

/* Point Card */
.point-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(26,26,46,0.06);
  transition: background 0.15s;
}
.point-card:hover {
  background: rgba(26,26,46,0.04);
}

.point-color-chip {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(26,26,46,0.15);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s, border-color 0.15s;
  position: relative;
}
.point-color-chip:hover {
  transform: scale(1.2);
  border-color: rgba(26,26,46,0.4);
}
.point-color-chip input[type="color"] {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}

.point-card-name {
  font-family: 'Crimson Pro', serif;
  font-weight: bold;
  font-style: italic;
  font-size: 14px;
  color: var(--ink);
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.point-card-coords {
  display: flex;
  gap: 3px;
  flex: 1;
}

.point-card-coords input {
  width: 100%;
  padding: 3px 2px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  text-align: center;
  transition: all 0.15s;
  border-radius: 2px;
}
.point-card-coords input:hover {
  background: rgba(26,26,46,0.04);
  border-color: rgba(26,26,46,0.15);
}
.point-card-coords input:focus {
  border-color: var(--accent2);
  background: var(--paper);
  outline: none;
}

.point-card-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.point-card-actions button {
  background: transparent;
  border: none;
  color: var(--ink);
  opacity: 0.3;
  cursor: pointer;
  padding: 2px;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
}
.point-card-actions button:hover {
  opacity: 1;
}
.point-card-actions button.btn-del-pt:hover {
  color: #c0392b;
}

/* Add button */
.criar-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  background: transparent;
  border: none;
  border-top: 1px dashed rgba(26,26,46,0.15);
  color: var(--ink);
  opacity: 0.6;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
}
.criar-add-btn:hover {
  opacity: 1;
  background: rgba(26,26,46,0.05);
}

/* Formar Reta Row */
.formar-reta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(26,26,46,0.04);
  border-bottom: 1px solid rgba(26,26,46,0.06);
}
.criar-select {
  flex: 1;
  padding: 5px 4px;
  font-size: 11px;
  text-align: center;
  text-align-last: center;
}
.criar-confirm-btn {
  background: var(--ink);
  color: var(--paper);
  border: none;
  width: 28px;
  height: 28px;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.criar-confirm-btn:hover {
  background: var(--accent2);
}

/* Line Card */
.line-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(26,26,46,0.06);
  transition: background 0.15s;
}
.line-card:hover {
  background: rgba(26,26,46,0.04);
}
.line-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.line-card-name {
  font-family: 'Space Mono', monospace;
  font-weight: bold;
  font-size: 11px;
  color: var(--ink);
}
.line-card-toggles {
  display: flex;
  gap: 12px;
}

/* Solid Card */
.solid-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(26,26,46,0.06);
  transition: background 0.15s;
}
.solid-card:hover {
  background: rgba(26,26,46,0.04);
}
.solid-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.solid-card-name {
  font-family: 'Space Mono', monospace;
  font-weight: bold;
  font-size: 11px;
  color: var(--ink);
}
.solid-card-toggles {
  display: flex;
  gap: 12px;
}

/* ═══ Local Storage File List ═══ */
.local-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid rgba(26,26,46,0.1);
  margin-bottom: 6px;
  transition: all 0.15s;
  background: rgba(26,26,46,0.02);
}

.local-file-item:hover {
  background: rgba(26,26,46,0.06);
  border-color: rgba(26,26,46,0.2);
}

.local-file-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.local-file-name {
  font-family: 'Crimson Pro', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.local-file-date {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: var(--ink);
  opacity: 0.4;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.local-file-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 12px;
}

.local-file-actions button {
  padding: 5px 10px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: 1px solid var(--ink);
  transition: all 0.15s;
  text-transform: uppercase;
}

.local-file-actions .btn-load-local {
  background: var(--ink);
  color: var(--paper);
}

.local-file-actions .btn-load-local:hover {
  background: var(--accent2);
  border-color: var(--accent2);
}

.local-file-actions .btn-del-local {
  background: transparent;
  color: #c0392b;
  border-color: rgba(192,57,43,0.3);
}

.local-file-actions .btn-del-local:hover {
  background: #c0392b;
  color: #fff;
  border-color: #c0392b;
}

.local-empty-msg {
  text-align: center;
  padding: 30px 16px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--ink);
  opacity: 0.4;
  letter-spacing: 0.05em;
}

/* ═══ Code Points Input ═══ */
.code-input-wrapper {
  margin-bottom: 4px;
}

.code-points-editor {
  font-size: 11px !important;
  line-height: 1.6 !important;
  min-height: 80px;
  tab-size: 2;
  white-space: pre;
  border-radius: 2px !important;
  border-color: rgba(26,26,46,0.15) !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.code-points-editor:focus {
  border-color: var(--accent2) !important;
  box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.08);
}

.code-points-editor.success {
  border-color: #27ae60 !important;
  box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.15);
}

.code-points-editor.error {
  border-color: #c0392b !important;
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.15);
}

.code-input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.code-input-hint {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: var(--ink);
  opacity: 0.35;
  letter-spacing: 0.05em;
}

.code-parse-btn {
  width: auto !important;
  height: auto !important;
  padding: 5px 10px !important;
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 2px;
}

/* Tutorial / Aula Floating Panel */
.geodes-tutorial-panel {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 16px;
  color: var(--ink);
  z-index: 1000;
}

.tutorial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(26,26,46,0.1);
  padding-bottom: 8px;
}

.tutorial-header #tutorial-title {
  font-family: 'Crimson Pro', serif;
  font-weight: bold;
  font-style: italic;
  color: var(--gold);
  font-size: 18px;
  letter-spacing: 0.05em;
}

.tutorial-header #btn-tutorial-close {
  background: none;
  border: none;
  color: #c0392b;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-weight: bold;
  font-size: 10px;
  letter-spacing: 0.1em;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.tutorial-header #btn-tutorial-close:hover {
  opacity: 1;
}

.tutorial-body {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 16px;
  min-height: 60px;
  color: var(--ink);
}

.tutorial-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tutorial-footer #btn-tutorial-prev,
.tutorial-footer #btn-tutorial-next {
  padding: 6px 14px;
  font-size: 11px;
}

.tutorial-footer #tutorial-progress {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  opacity: 0.7;
  color: var(--ink);
}

/* ── Onboarding Tutorial Enhancements ── */
.geodes-tutorial-panel.onboarding-active {
  border-color: var(--gold);
  box-shadow: 6px 6px 0 var(--gold), 0 0 30px rgba(183, 137, 10, 0.12);
  animation: onboardingSlideIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  width: 460px;
}

.geodes-tutorial-panel.onboarding-active .tutorial-header {
  border-bottom-color: rgba(183, 137, 10, 0.25);
}

.geodes-tutorial-panel.onboarding-active #tutorial-title {
  font-size: 20px;
  color: var(--gold);
}

.geodes-tutorial-panel.onboarding-active .tutorial-body {
  font-size: 12px;
  line-height: 1.75;
  min-height: 70px;
}

.geodes-tutorial-panel.onboarding-active #btn-tutorial-next {
  background: var(--gold);
  color: var(--paper);
  border-color: var(--gold);
}

.geodes-tutorial-panel.onboarding-active #btn-tutorial-next:hover {
  background: var(--ink);
  border-color: var(--ink);
}

@keyframes onboardingSlideIn {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* ── Geodes Modal (New Version with Header/Body) ── */
.geodes-modal-overlay.geodes-modal-new {
  display: flex; /* Override display:none */
  z-index: 9999;
}

.geodes-modal-new .geodes-modal {
  padding: 0; /* Content padding is handled by header/body/footer */
  max-width: 420px;
}

.geodes-modal-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--grid);
}

.geodes-modal-header h3 {
  font-family: 'Crimson Pro', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.geodes-modal-body {
  padding: 18px 22px;
}

.geodes-modal-body p {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0;
  opacity: 0.85;
}

.geodes-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--grid);
}

.geodes-modal-btn {
  padding: 8px 18px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
}

.geodes-modal-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.geodes-modal-btn.primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.geodes-modal-btn.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* ── Settings Dropdown ────────────────────────── */
.geodes-settings-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--paper);
  border: 2px solid var(--ink);
  min-width: 220px;
  padding: 0;
  z-index: 9000;
  box-shadow: 4px 4px 0 rgba(26,26,46,0.15);
  animation: geodesModalSlideIn 0.15s ease;
}

.geodes-settings-dropdown.open {
  display: block;
}

.settings-title {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--ink);
  opacity: 0.5;
  padding: 12px 16px 6px;
  border-bottom: 1px solid var(--grid);
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(200,191,168,0.3);
}

.settings-toggle-row:last-child {
  border-bottom: none;
}

.settings-toggle-row:hover {
  background: var(--paper2);
}

.settings-toggle-row > span:first-child {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--ink);
}

.settings-control-row {
  display: grid;
  grid-template-columns: 1fr 82px;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(200,191,168,0.3);
}

.settings-control-row label {
  grid-column: 1 / -1;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--ink);
}

.settings-control {
  width: 100%;
  padding: 6px 8px;
  background: var(--paper);
  border: 1px solid var(--grid);
  color: var(--ink);
  font-family: 'Space Mono', monospace;
  font-size: 10px;
}

.settings-control:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.settings-toggle-row input[type="checkbox"] {
  display: none;
}

.settings-switch {
  position: relative;
  width: 34px;
  height: 18px;
  background: var(--grid);
  border-radius: 9px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.settings-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: var(--paper);
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

input[type="checkbox"]:checked + .settings-switch {
  background: var(--ink);
}

input[type="checkbox"]:checked + .settings-switch::after {
  transform: translateX(16px);
}

/* ── Help Modal Styles ────────────────────────── */
.help-section {
  margin-bottom: 25px;
}

.help-section h4 {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.help-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.help-list li {
  font-size: 11px;
  line-height: 1.6;
  margin-bottom: 8px;
  padding-left: 15px;
  position: relative;
  color: var(--ink);
  opacity: 0.9;
}

.help-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 10px;
}

.help-list li strong {
  color: var(--ink);
  font-weight: 600;
}

@keyframes rec-pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

/* Mobile tool layout. Desktop rules above remain the source of truth. */
.geodes-mobile-view-switch,
.geodes-mobile-context-slot,
.geodes-mobile-menu-toggle {
  display: none;
}

@media (max-width: 800px) {
  html,
  body.geodes-app-body {
    width: 100%;
    height: 100%;
    overscroll-behavior: none;
  }

  body.geodes-app-body > header {
    min-height: 56px;
    padding: 8px 10px !important;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
  }

  body.geodes-app-body > header h1 {
    font-size: 20px !important;
    white-space: nowrap;
  }

  .geodes-mobile-menu-toggle {
    display: inline-flex;
    flex: 0 0 38px;
    width: 38px;
    height: 34px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    padding: 0;
    z-index: 21;
  }

  .geodes-mobile-menu-toggle span {
    display: block;
    width: 17px;
    height: 2px;
    background: currentColor;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }

  .geodes-mobile-menu-toggle.open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .geodes-mobile-menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .geodes-mobile-menu-toggle.open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  body.geodes-app-body > header .geodes-header-actions {
    position: fixed;
    top: 56px;
    left: 10px;
    right: 10px;
    z-index: 9000;
    display: none !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 8px !important;
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    padding: 10px;
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 rgba(26,26,46,0.18);
    font-size: 10px !important;
  }

  body.geodes-app-body > header .geodes-header-actions.mobile-open {
    display: flex !important;
  }

  body.geodes-app-body > header .geodes-header-actions > a,
  body.geodes-app-body #btn-help-toggle,
  body.geodes-app-body #btn-settings-toggle,
  body.geodes-app-body #btn-export-toggle,
  body.geodes-app-body #btn-projects-modal,
  body.geodes-app-body #btn-share-project,
  body.geodes-app-body #btn-report-bug {
    width: 100%;
    justify-content: center;
    padding: 7px 9px !important;
    font-size: 10px !important;
  }

  body.geodes-app-body > header .geodes-settings-wrapper,
  body.geodes-app-body > header .geodes-export-wrapper,
  body.geodes-app-body > header .cloud-share-wrapper {
    width: 100%;
  }

  body.geodes-app-body > header .cloud-share-wrapper {
    display: flex;
  }

  body.geodes-app-body > header .cloud-share-popover {
    position: static;
    width: 100%;
    margin-top: 8px;
    box-shadow: none;
  }

  .geodes-layout {
    flex-direction: column;
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
    min-height: 0;
  }

  .geodes-main {
    order: 1;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .geodes-mobile-view-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 0 0 42px;
    border-bottom: 2px solid var(--ink);
    background: var(--paper);
  }

  .geodes-mobile-view-btn {
    min-width: 0;
    border: 0;
    border-right: 1px solid rgba(26,26,46,0.18);
    background: transparent;
    color: var(--ink);
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
  }

  .geodes-mobile-view-btn:last-child {
    border-right: 0;
  }

  .geodes-mobile-view-btn.active {
    background: var(--ink);
    color: var(--paper);
  }

  .geodes-3d,
  .geodes-epura,
  .geodes-3d.minimized,
  .geodes-epura.minimized,
  .geodes-3d.maximized,
  .geodes-epura.maximized {
    flex: 1 1 auto !important;
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 0;
    border-right: 0;
    transition: none;
  }

  body[data-mobile-view="3d"] #panel-3d,
  body[data-mobile-view="epura"] #panel-epura {
    display: flex;
  }

  body:not([data-mobile-view]) #panel-epura,
  body[data-mobile-view="3d"] #panel-epura,
  body[data-mobile-view="epura"] #panel-3d {
    display: none !important;
  }

  .geodes-3d.minimized .geodes-canvas-container,
  .geodes-epura.minimized .geodes-canvas-container {
    display: block;
  }

  .geodes-3d.minimized .geodes-toolbar,
  .geodes-epura.minimized .geodes-toolbar {
    writing-mode: horizontal-tb;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    border-bottom: 2px solid var(--ink);
  }

  .geodes-3d.minimized .geodes-toolbar span,
  .geodes-epura.minimized .geodes-toolbar span {
    order: initial;
    opacity: 1;
    font-size: 10px;
  }

  .geodes-toolbar {
    display: none !important;
  }

  .viewport-toggle-btn {
    display: none;
  }

  .geodes-canvas-container {
    min-height: 0;
  }

  .geodes-mobile-context-slot {
    display: block;
    max-height: none;
    overflow: visible;
    border: 1px solid rgba(26,26,46,0.1);
    margin: 0 0 14px;
    background: rgba(26,26,46,0.01);
  }

  .geodes-mobile-context-slot.has-menu {
    display: block;
  }

  .geodes-mobile-context-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(26,26,46,0.08);
    background: rgba(26,26,46,0.05);
    color: var(--ink);
    font-family: 'Space Mono', monospace;
    cursor: pointer;
    user-select: none;
  }

  .geodes-mobile-context-slot.is-minimized {
    max-height: none;
  }

  .geodes-mobile-context-header span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .geodes-mobile-context-header::after {
    content: 'ABRIR';
    flex: 0 0 auto;
    border: 1px solid rgba(26,26,46,0.22);
    padding: 5px 8px;
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .geodes-mobile-context-slot:not(.is-minimized) .geodes-mobile-context-header::after {
    content: 'FECHAR';
  }

  .geodes-mobile-context-slot.is-minimized .geodes-mobile-context-header {
    border-bottom: 0;
  }

  .geodes-mobile-context-slot.is-minimized .geodes-mobile-context-tabs,
  .geodes-mobile-context-slot.is-minimized .geodes-mobile-context-picker,
  .geodes-mobile-context-slot.is-minimized .geodes-mobile-context-empty,
  .geodes-mobile-context-slot.is-minimized .geodes-mobile-context-body {
    display: none !important;
  }

  .geodes-mobile-context-tabs {
    display: flex;
    flex: 1 1 100%;
    gap: 6px;
    min-width: 0;
  }

  .geodes-mobile-context-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    min-height: 30px;
    border: 1px solid rgba(26,26,46,0.22);
    background: transparent;
    color: var(--ink);
    padding: 6px 7px;
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .geodes-mobile-context-tab:hover,
  .geodes-mobile-context-tab.active {
    background: rgba(26,26,46,0.08);
  }

  .geodes-mobile-context-tab.active {
    border-color: rgba(26,26,46,0.42);
    font-weight: 700;
  }

  .geodes-mobile-context-picker {
    display: none;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(26,26,46,0.06);
    background: rgba(26,26,46,0.025);
  }

  .geodes-mobile-context-picker.has-options {
    display: block;
  }

  .geodes-mobile-context-picker select {
    width: 100%;
    padding: 8px 9px;
    border: 1px solid rgba(26,26,46,0.18);
    background: var(--paper);
    color: var(--ink);
    font-family: 'Space Mono', monospace;
    font-size: 10px;
  }

  .geodes-mobile-context-empty {
    display: block;
    padding: 12px;
    color: rgba(26,26,46,0.58);
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    line-height: 1.45;
  }

  .geodes-mobile-context-body {
    display: none;
  }

  .geodes-mobile-context-slot.has-menu .geodes-mobile-context-empty {
    display: none;
  }

  .geodes-mobile-context-slot.has-menu .geodes-mobile-context-body {
    display: block;
  }

  .geodes-mobile-context-body .geodes-ctx-menu,
  .geodes-ctx-menu.mobile-open {
    position: static;
    left: auto !important;
    top: auto !important;
    width: 100%;
    min-width: 0;
    max-height: none;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .geodes-mobile-context-body .geodes-ctx-menu button,
  .geodes-mobile-context-body .geodes-ctx-item {
    min-height: 38px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(26,26,46,0.06);
    background: transparent;
    color: var(--ink);
    font-size: 10px;
    letter-spacing: 0.05em;
    transition: background 0.15s, opacity 0.15s;
  }

  .geodes-mobile-context-body .geodes-ctx-menu button:hover,
  .geodes-mobile-context-body .geodes-ctx-item:hover {
    background: rgba(26,26,46,0.05);
  }

  .geodes-mobile-context-body .geodes-ctx-item[style*="#ffffff"] {
    color: var(--ink) !important;
  }

  .geodes-mobile-context-body .geodes-ctx-item.has-submenu {
    display: flex;
    flex-wrap: wrap;
  }

  .geodes-mobile-context-body .geodes-ctx-item.has-submenu > .arrow {
    margin-left: auto;
  }

  .geodes-mobile-context-body .geodes-ctx-submenu {
    flex: 0 0 calc(100% - 12px);
    position: static;
    top: auto;
    left: auto;
    min-width: 0;
    margin: 4px 0 4px 12px;
    border-left: 1px dashed rgba(26,26,46,0.18);
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: none;
    background: rgba(26,26,46,0.035);
  }

  .geodes-mobile-context-body .geodes-ctx-submenu button {
    min-height: 36px;
    padding-left: 14px;
    border-bottom-color: rgba(26,26,46,0.05);
    color: var(--ink);
  }

  .geodes-mobile-context-body #line-ctx-title,
  .geodes-mobile-context-body #solid-ctx-title {
    color: rgba(26,26,46,0.58) !important;
    padding: 10px 12px 6px !important;
    border-bottom: 1px solid rgba(26,26,46,0.06);
  }

  .geodes-mobile-context-body .geodes-ctx-item.has-submenu:hover > .geodes-ctx-submenu {
    display: none;
  }

  .geodes-mobile-context-body .geodes-ctx-item.has-submenu.submenu-open > .geodes-ctx-submenu {
    display: block;
  }

  .geodes-mobile-context-slot[data-active-menu="geodes-ctx-menu"] {
    border-left: 3px solid var(--gold);
  }

  .geodes-mobile-context-slot[data-active-menu="geodes-line-ctx-menu"] {
    border-left: 3px solid var(--accent2);
  }

  .geodes-mobile-context-slot[data-active-menu="geodes-bg-ctx-menu"] {
    border-left: 3px solid var(--ink);
  }

  .geodes-mobile-context-slot[data-active-menu="geodes-solid-ctx-menu"] {
    border-left: 3px solid #8e44ad;
  }

  .geodes-sidebar {
    order: 3;
    flex: 0 0 38vh;
    flex-basis: 38dvh;
    width: 100%;
    max-height: 42vh;
    max-height: 42dvh;
    min-height: 190px;
    border-right: 0;
    border-top: 2px solid var(--ink);
  }

  .geodes-sidebar-tabs {
    flex: 0 0 44px;
    height: 44px;
  }

  .geodes-tab {
    padding: 10px 12px;
    font-size: 10px;
  }

  .geodes-sidebar-content {
    padding: 14px 16px;
  }

  #panel-exemplos.geodes-sidebar-content {
    padding: 0 !important;
  }

  .geodes-settings-dropdown {
    position: fixed;
    top: 56px;
    left: 10px;
    right: 10px;
    width: auto !important;
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
  }

  #survey-invite-card {
    right: 10px !important;
    width: min(320px, calc(100vw - 20px)) !important;
  }
}
