.mmg-geoboard-root {
  --mmg-border: #d6dee8;
  --mmg-surface: #ffffff;
  --mmg-muted: #5f6b7a;
  --mmg-bg: #f4f7fb;
  --mmg-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  color: #142033;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mmg-shell {
  display: grid;
  gap: 1rem;
}

.mmg-toolbar {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--mmg-surface);
  border: 1px solid var(--mmg-border);
  border-radius: 18px;
  box-shadow: var(--mmg-shadow);
}

.mmg-toolbar__group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.mmg-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
}

.mmg-toolbar label.is-disabled {
  opacity: 0.55;
}

.mmg-toolbar button,
.mmg-toolbar select,
.mmg-sidebar button,
.mmg-sidebar input,
.mmg-sidebar textarea {
  border: 1px solid var(--mmg-border);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  font: inherit;
}

.mmg-toolbar button,
.mmg-sidebar button {
  padding: 0.55rem 0.8rem;
  cursor: pointer;
}

.mmg-toolbar button:hover,
.mmg-sidebar button:hover,
.mmg-band-chip:hover {
  background: #eff5ff;
}

.mmg-toolbar button:disabled,
.mmg-sidebar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f6f8fb;
}

.mmg-main {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(220px, 0.48fr);
  gap: 1rem;
}

.mmg-board-pane,
.mmg-sidebar .mmg-panel {
  background: var(--mmg-surface);
  border: 1px solid var(--mmg-border);
  border-radius: 18px;
  box-shadow: var(--mmg-shadow);
}

.mmg-board-pane {
  min-height: var(--mmg-height, 780px);
  padding: 0.75rem;
}

.mmg-board {
  width: 100%;
  height: calc(var(--mmg-height, 780px) - 1.5rem);
  display: block;
  touch-action: none;
}

.mmg-sidebar {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.mmg-panel {
  overflow: hidden;
}

.mmg-panel summary,
.mmg-panel--static h2 {
  margin: 0;
  padding: 0.95rem 1rem;
}

.mmg-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.mmg-panel summary::-webkit-details-marker {
  display: none;
}

.mmg-panel summary::after {
  content: '▾';
  font-size: 0.95rem;
  color: var(--mmg-muted);
  transition: transform 0.18s ease;
}

.mmg-panel:not([open]) summary::after {
  transform: rotate(-90deg);
}

.mmg-panel__body,
.mmg-panel--static {
  padding: 0 1rem 1rem;
}

.mmg-panel[open] summary {
  border-bottom: 1px solid #edf2f7;
}

.mmg-sidebar h2,
.mmg-metrics h3,
.mmg-picks-hint h4 {
  margin: 0 0 0.75rem;
}

.mmg-caption {
  padding: 0.85rem;
  background: #f4f8ff;
  border-radius: 14px;
  min-height: 3.4rem;
  color: #1d3557;
  margin: 0;
}

.mmg-band-list {
  display: grid;
  gap: 0.5rem;
}


.mmg-band-editor {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #edf2f7;
}

.mmg-band-editor__label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--mmg-muted);
  margin-bottom: 0.55rem;
}

.mmg-band-editor__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mmg-band-editor__name {
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mmg-band-editor__color {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.mmg-band-color {
  width: 2.6rem;
  height: 2rem;
  padding: 0.15rem;
  cursor: pointer;
}

.mmg-band-chip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.6rem;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--mmg-border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.mmg-band-chip.is-selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.mmg-band-chip__swatch {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
}

.mmg-band-chip__meta {
  font-size: 0.8rem;
  color: var(--mmg-muted);
}

.mmg-share-note {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: #f4f8ff;
  color: #33507c;
  font-size: 0.92rem;
}

.mmg-export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.mmg-board-bg {
  fill: var(--mmg-bg);
  stroke: #dde6f0;
  stroke-width: 1.5;
}

.mmg-grid-line,
.mmg-circle-ray {
  stroke: #d7e2ee;
  stroke-width: 1;
}

.mmg-axis-line {
  stroke: #64748b;
  stroke-width: 2.2;
}

.mmg-axis-label,
.mmg-coordinate-label,
.mmg-band-caption,
.mmg-side-label,
.mmg-angle-label,
.mmg-vertex-label {
  fill: #22324d;
  font-size: 12px;
  font-weight: 600;
  paint-order: stroke;
  stroke: rgba(255,255,255,0.92);
  stroke-width: 3;
}

.mmg-coordinate-label {
  font-size: 10px;
  fill: #64748b;
}

.mmg-right-angle-marker {
  fill: none;
  stroke: #22324d;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mmg-pin {
  fill: #fff;
  stroke: #7b8ca3;
  stroke-width: 2;
}

.mmg-band {
  cursor: pointer;
  vector-effect: non-scaling-stroke;
}

.mmg-band-fill {
  pointer-events: all;
}

.mmg-band.is-selected {
  filter: drop-shadow(0 6px 16px rgba(37, 99, 235, 0.24));
}

.mmg-handle {
  fill: #fff;
  stroke: #142033;
  stroke-width: 2.5;
  cursor: grab;
}

.mmg-handle.is-active {
  fill: #dbeafe;
  stroke: #2563eb;
}

.mmg-symmetry-line {
  stroke: #7c3aed;
  stroke-dasharray: 8 8;
  stroke-width: 2.5;
}

.mmg-picks-hint {
  padding: 0.8rem;
  border-radius: 14px;
  background: #fff9e8;
}

@media (max-width: 1080px) {
  .mmg-main {
    grid-template-columns: 1fr;
  }
}
