/* Minecraft Circle Generator — product page built from the shared site tokens. */

.circle-brand {
  color: inherit;
  text-decoration: none;
}

.circle-brand:hover {
  color: inherit;
}

.circle-brand h1 {
  font-size: clamp(27px, 3vw, 40px);
}

.circle-workspace {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(310px, 380px) minmax(0, 1fr);
  min-width: 0;
}

.circle-right {
  align-content: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.circle-controls {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 14px;
  min-width: 0;
}

.circle-card,
.circle-preview {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.control-section {
  display: grid;
  gap: 16px;
  padding: 20px;
  min-width: 0;
}

.control-heading {
  align-items: center;
  display: flex;
  gap: 12px;
}

.circle-page .step-index {
  align-items: center;
  background: linear-gradient(145deg, var(--violet), var(--violet-2));
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  height: 25px;
  justify-content: center;
  width: 25px;
}

.circle-page .ready-dot {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
}

.circle-page .ready-dot span:first-child {
  background: var(--grass);
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(53, 201, 133, 0.12);
  height: 8px;
  width: 8px;
}

.control-heading .eyebrow,
.builder-head .eyebrow,
.export-panel .eyebrow {
  margin-bottom: 4px;
}

.shape-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.shape-choice {
  align-items: center;
  background: rgba(247, 248, 255, 0.68);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  font-family: var(--body-font);
  font-size: 11px;
  font-weight: 700;
  gap: 7px;
  justify-items: center;
  min-height: 72px;
  min-width: 0;
  overflow: hidden;
  padding: 9px 5px;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.shape-choice:hover {
  border-color: rgba(109, 76, 255, 0.3);
  color: var(--ink);
  transform: translateY(-2px);
}

.shape-choice.is-active {
  background: linear-gradient(145deg, rgba(109, 76, 255, 0.14), rgba(138, 69, 255, 0.08));
  border-color: rgba(109, 76, 255, 0.46);
  color: var(--violet);
}

.shape-glyph {
  border: 3px solid currentColor;
  display: block;
  height: 24px;
  opacity: 0.88;
  width: 24px;
}

.glyph-circle,
.glyph-sphere {
  border-radius: 50%;
}

.glyph-sphere {
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.72), transparent 30%), currentColor;
  box-shadow: inset -5px -5px 0 rgba(0, 0, 0, 0.16);
}

.glyph-oval,
.glyph-ellipsoid {
  border-radius: 50%;
  width: 30px;
}

.glyph-ellipsoid {
  background: currentColor;
  box-shadow: inset -6px -4px 0 rgba(0, 0, 0, 0.16);
}

.glyph-dome {
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  height: 14px;
  margin-top: 10px;
  width: 28px;
}

.glyph-arc {
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(-20deg);
}

.glyph-torus {
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--panel-solid);
}

.dimension-stack {
  display: grid;
  gap: 14px;
}

.range-field,
.toolbar-range {
  display: grid;
  gap: 8px;
}

.field-label,
.builder-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.field-label label,
.select-field > span,
.toolbar-range label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.field-label output,
.toolbar-range output {
  background: rgba(109, 76, 255, 0.09);
  border-radius: 999px;
  color: var(--violet);
  font-size: 12px;
  font-weight: 700;
  min-width: 42px;
  padding: 4px 8px;
  text-align: center;
}

.circle-page input[type="range"] {
  accent-color: var(--violet);
  cursor: pointer;
  margin: 0;
  width: 100%;
}

.segmented-control,
.view-switcher {
  background: rgba(103, 112, 141, 0.09);
  border-radius: 10px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
}

.segmented-control button,
.view-switcher button {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--body-font);
  font-size: 13px;
  font-weight: 700;
  min-height: 38px;
  padding: 6px 10px;
}

.segmented-control button.is-active,
.view-switcher button.is-active {
  background: var(--panel-solid);
  box-shadow: 0 6px 16px rgba(43, 52, 103, 0.09);
  color: var(--violet);
}

.select-field {
  display: grid;
  gap: 8px;
}

.select-field select {
  appearance: none;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--body-font);
  font-size: 14px;
  font-weight: 700;
  min-height: 46px;
  padding: 8px 38px 8px 12px;
}

.circle-preview {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 22px;
}

.preview-head {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.preview-head h2 {
  font-size: clamp(20px, 2vw, 27px);
  margin-top: 7px;
  text-transform: capitalize;
}

.view-switcher {
  flex: 0 0 auto;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
}

.canvas-toolbar {
  align-items: center;
  background: rgba(247, 248, 255, 0.68);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(180px, 1fr) minmax(220px, 1.2fr);
  padding: 10px 12px;
}

.compact-toggle {
  align-items: center;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
}

.compact-toggle input {
  accent-color: var(--grass-dark);
  height: 17px;
  width: 17px;
}

.toolbar-range {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(60px, 1fr) auto;
}

.shape-canvas-wrap {
  background:
    linear-gradient(45deg, rgba(109, 76, 255, 0.025) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(109, 76, 255, 0.025) 25%, transparent 25%);
  background-size: 24px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 540px;
  overflow: hidden;
}

#shape-canvas {
  cursor: default;
  display: block;
  height: auto;
  max-height: 680px;
  min-height: 520px;
  touch-action: none;
  width: 100%;
}

#shape-canvas.is-dragging {
  cursor: grabbing;
}

.shape-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.shape-stats > div {
  background: rgba(247, 248, 255, 0.72);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px;
}

.shape-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.shape-stats strong {
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.builder-panel,
.export-panel {
  background: rgba(247, 248, 255, 0.6);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  display: grid;
  gap: 13px;
  padding: 16px;
}

.builder-head > strong {
  color: var(--violet);
  font-size: 13px;
}

.builder-actions,
.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.builder-actions button,
.export-actions button {
  min-height: 42px;
  padding: 8px 13px;
}

.builder-actions .download-button,
.export-actions .download-button {
  box-shadow: 0 12px 24px rgba(109, 76, 255, 0.22);
  font-family: var(--body-font);
  font-weight: 700;
}

.export-panel {
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr);
}

.export-actions {
  justify-content: flex-end;
}

.circle-toast {
  background: var(--obsidian);
  border-radius: 10px;
  bottom: 24px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  left: 50%;
  opacity: 0;
  padding: 11px 16px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 16px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 2000;
}

.circle-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.circle-prose strong {
  color: var(--ink);
}

.circle-prose code {
  background: rgba(109, 76, 255, 0.09);
  border-radius: 5px;
  color: var(--violet);
  font-size: 0.92em;
  padding: 2px 5px;
}

.circle-chart-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.circle-chart {
  border-collapse: collapse;
  min-width: 900px;
  width: 100%;
}

.circle-chart caption {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  clip: rect(0 0 0 0);
}

.circle-chart th,
.circle-chart td {
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  padding: 13px 15px;
  text-align: left;
  white-space: nowrap;
}

.circle-chart thead th {
  background: rgba(109, 76, 255, 0.08);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.circle-chart tbody tr:last-child th,
.circle-chart tbody tr:last-child td {
  border-bottom: 0;
}

.circle-chart tbody tr:hover {
  background: rgba(109, 76, 255, 0.035);
}

.circle-chart tbody th {
  color: var(--violet);
  font-size: 16px;
}

.circle-chart small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 3px;
}

.chart-size-button {
  background: rgba(109, 76, 255, 0.09);
  border: 1px solid rgba(109, 76, 255, 0.2);
  border-radius: 8px;
  color: var(--violet);
  cursor: pointer;
  font-family: var(--body-font);
  font-size: 12px;
  font-weight: 700;
  min-height: 34px;
  padding: 6px 11px;
}

.chart-size-button:hover,
.chart-size-button:focus-visible {
  background: var(--violet);
  color: #fff;
}

.chart-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  margin: 0 auto;
  max-width: 900px;
  text-align: center;
}

.circle-build-steps {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body[data-theme="dark"] .shape-choice,
body[data-theme="dark"] .canvas-toolbar,
body[data-theme="dark"] .shape-stats > div,
body[data-theme="dark"] .builder-panel,
body[data-theme="dark"] .export-panel {
  background: rgba(255, 255, 255, 0.04);
}

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

  .circle-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    position: static;
  }

  .control-section {
    align-content: start;
  }

  .circle-build-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .circle-controls {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .preview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .canvas-toolbar {
    grid-template-columns: 1fr;
  }

  .shape-canvas-wrap {
    min-height: 390px;
  }

  #shape-canvas {
    min-height: 380px;
  }

  .shape-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .export-panel {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .export-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .circle-brand {
    gap: 9px;
    min-width: 0;
  }

  .circle-brand > div:last-child {
    min-width: 0;
  }

  .circle-brand .brand-cube {
    height: 44px;
    width: 44px;
  }

  .circle-brand h1 {
    font-size: 23px;
    overflow-wrap: anywhere;
  }

  .circle-brand .brand-subtitle {
    font-size: 13px;
  }

  .shape-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .circle-preview {
    padding: 12px;
  }

  .shape-canvas-wrap {
    min-height: 310px;
  }

  #shape-canvas {
    min-height: 300px;
  }

  .builder-actions,
  .export-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .circle-build-steps {
    grid-template-columns: 1fr;
  }

  .circle-chart th,
  .circle-chart td {
    padding: 11px 12px;
  }
}
