@font-face {
  font-family: "Oswald";
  src: url("/fonts/oswald-var.woff2?v=2026.07.31-double-cusp-contours-22") format("woff2");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Astronomicon";
  src: url("/fonts/Astronomicon.ttf?v=2026.07.31-double-cusp-contours-22") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #292d41;
  --surface: #333951;
  --surface-deep: #282d43;
  --surface-light: #3a4058;
  --text: #f5f5f5;
  --muted: #cbd0df;
  --accent: #d79eaa;
  --accent-rgb: 215, 158, 170;
  --accent-text: #282d43;
  --shadow-333951:
    inset 2px 2px 5px rgba(255, 255, 255, .05),
    5px 5px 5px rgba(0, 0, 0, .25);
  --shadow-282d43:
    inset 5px 5px 5px rgba(0, 0, 0, .25);
  --shadow-mode2-333951:
    inset 2px 2px 4px rgba(255, 255, 255, .02),
    5px 5px 5px rgba(0, 0, 0, .25);
  --figma-surface-shadow: var(--shadow-333951);
  --figma-deep-shadow: var(--shadow-282d43);
  --control-raised-shadow:
    inset 2px 2px 4px rgba(255, 255, 255, .02),
    5px 5px 5px rgba(0, 0, 0, .25);
  --control-inset-shadow:
    inset -1px -1px 4px rgba(0, 0, 0, .25),
    inset 1px 1px 4px rgba(0, 0, 0, .25),
    inset -1px -1px 4px rgba(255, 255, 255, .10),
    inset 5px 5px 5px rgba(0, 0, 0, .25);
  --mode2-inset-shadow:
    inset -1px -1px 4px rgba(0, 0, 0, .25),
    inset 1px 1px 4px rgba(0, 0, 0, .25);
  --control-shadow: var(--control-raised-shadow);
  --raised-control-fill: var(--surface);
  --range-thumb-fill: var(--surface-deep);
  --range-track-fill: var(--surface-deep);
  --range-color2-shadow: var(--figma-deep-shadow);
  --range-track-shadow:
    inset 2px 2px 4px rgba(255, 255, 255, .02),
    5px 5px 5px rgba(0, 0, 0, .25);
  --button-active-shadow:
    inset 0 0 0 2px var(--raised-control-fill),
    5px 5px 5px rgba(0, 0, 0, .25);
  --color-choice-shadow:
    5px 5px 5px rgba(0, 0, 0, .25),
    inset -1px -1px 4px rgba(0, 0, 0, .25),
    inset 1px 1px 4px rgba(0, 0, 0, .25),
    inset -1px -1px 4px rgba(255, 255, 255, .10),
    inset 5px 5px 5px rgba(0, 0, 0, .25);
  --color-choice-inset-shadow:
    inset -1px -1px 4px rgba(0, 0, 0, .25),
    inset 1px 1px 4px rgba(0, 0, 0, .25),
    inset -1px -1px 4px rgba(255, 255, 255, .10),
    inset 5px 5px 5px rgba(0, 0, 0, .25);
  --corner-radius: 30px;
  --ink: var(--text);
  --chart-person-a: var(--text);
  --chart-person-b: var(--accent);
  --chart-degree-ink: #ffffff;
  --chart-retro: #d24a7c;
  --chart-zodiac-ink: var(--text);
  --aspect-conjunction: #d24a7c;
  --aspect-opposition: #d24a7c;
  --aspect-square: #d24a7c;
  --aspect-trine: #47846b;
  --aspect-sextile: #6497a5;
  --aspect-minor-neutral: #7e94bc;
  --aspect-minor-soft: #65a184;
  --aspect-minor-tension: #b72057;
  --aspect-minor-creative: #8d6ab8;
  font-family: "Oswald", "Arial Narrow", sans-serif;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--background);
  --raised-control-fill: var(--surface);
  --range-thumb-fill: var(--surface-deep);
  --range-track-fill: var(--surface-deep);
  --button-active-shadow:
    inset 0 0 0 2px var(--raised-control-fill),
    5px 5px 5px rgba(0, 0, 0, .25);
}

body[data-theme="white"] {
  --background: #eef0f5;
  --surface: #ffffff;
  --surface-deep: #e4e7ef;
  --surface-light: #f7f8fb;
  --text: #292d41;
  --muted: #596078;
  --accent: #333951;
  --accent-rgb: 51, 57, 81;
  --accent-text: #ffffff;
}

body[data-theme="beige"] {
  --background: #d9d5d2;
  --surface: #f1f0ee;
  --surface-deep: #d9d5d2;
  --surface-light: #f1f0ee;
  --text: #3c3840;
  --muted: #6c6267;
  --accent: #9fa8be;
  --accent-rgb: 159, 168, 190;
}

body[data-theme="gray"] {
  --background: #cdcdd0;
  --surface: #eeeef2;
  --surface-deep: #cdcdd0;
  --surface-light: #eeeef2;
  --text: #282d43;
  --muted: #596078;
  --accent: #788198;
  --accent-rgb: 120, 129, 152;
  --accent-text: #ffffff;
}

body[data-theme="pink"] {
  --background: #f0e2e5;
  --surface: #fff8fa;
  --surface-deep: #f0e2e5;
  --surface-light: #fff8fa;
  --text: #493944;
  --muted: #765d6b;
  --accent: #cb93a1;
  --accent-rgb: 203, 147, 161;
}

body[data-theme="blue"] {
  --background: #9fa8be;
  --surface: #c3cada;
  --surface-deep: #9fa8be;
  --surface-light: #c3cada;
  --text: #414867;
  --muted: #68718e;
  --accent: #333951;
  --accent-rgb: 51, 57, 81;
  --accent-text: #ffffff;
}

body[data-theme="lavender"] {
  --background: #555a7b;
  --surface: #737896;
  --surface-deep: #555a7b;
  --surface-light: #737896;
  --text: #f5f5f5;
  --muted: #d9dbea;
  --accent: #d79eaa;
  --accent-rgb: 215, 158, 170;
}

body[data-theme="dark-pink"] {
  --background: #282d43;
  --surface: #333951;
  --surface-deep: #282d43;
  --surface-light: #3a4058;
  --text: #ffffff;
  --muted: #cbd0df;
  --accent: #d79eaa;
  --accent-rgb: 215, 158, 170;
  --accent-text: #282d43;
}

body[data-theme="dark-blue"] {
  --background: #282d43;
  --surface: #333951;
  --surface-deep: #282d43;
  --surface-light: #3a4058;
  --text: #ffffff;
  --muted: #c7d9e2;
  --accent: #8cb7c4;
  --accent-rgb: 140, 183, 196;
  --accent-text: #282d43;
}

body:is(
  [data-theme="white"],
  [data-theme="beige"],
  [data-theme="gray"],
  [data-theme="pink"],
  [data-theme="blue"]
) {
  --chart-person-a: #282d43;
  --chart-person-b: #282d43;
  --chart-degree-ink: #282d43;
}

body[data-relief-mode="1"] {
  --range-thumb-fill: var(--accent);
  --range-track-fill: var(--surface);
  --range-color2-shadow: var(--control-raised-shadow);
}

body[data-relief-mode="2"] {
  --control-shadow: var(--mode2-inset-shadow);
  --raised-control-fill: var(--surface-deep);
  --range-thumb-fill: var(--accent);
  --range-track-fill: var(--surface);
  --range-color2-shadow:
    inset 2px 2px 4px rgba(255, 255, 255, .02);
  --range-track-shadow:
    inset -1px -1px 4px rgba(0, 0, 0, .25);
}

body[data-relief-mode="2"][data-theme="white"] {
  --background: #ffffff;
  --surface: #e4e7ef;
  --surface-deep: #ffffff;
}

body[data-relief-mode="2"][data-theme="beige"] {
  --background: #f1f0ee;
  --surface: #d9d5d2;
  --surface-deep: #f1f0ee;
}

body[data-relief-mode="2"][data-theme="gray"] {
  --background: #eeeef2;
  --surface: #cdcdd0;
  --surface-deep: #eeeef2;
}

body[data-relief-mode="2"][data-theme="pink"] {
  --background: #fff8fa;
  --surface: #f0e2e5;
  --surface-deep: #fff8fa;
}

body[data-relief-mode="2"][data-theme="blue"] {
  --background: #c3cada;
  --surface: #9fa8be;
  --surface-deep: #c3cada;
}

body[data-relief-mode="2"][data-theme="lavender"] {
  --background: #737896;
  --surface: #555a7b;
  --surface-deep: #737896;
}

body[data-relief-mode="2"]:is([data-theme="dark-pink"], [data-theme="dark-blue"]) {
  --background: #333951;
  --surface: #282d43;
  --surface-deep: #333951;
  --figma-surface-shadow: var(--shadow-282d43);
  --figma-deep-shadow: var(--shadow-mode2-333951);
  --control-shadow: var(--mode2-inset-shadow);
}

button,
input,
select,
textarea,
summary {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.app-shell {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  padding: clamp(18px, 2vw, 30px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.topbar {
  display: grid;
  grid-template-columns: clamp(48px, 5vw, 64px) minmax(0, 1fr) clamp(48px, 5vw, 64px);
  align-items: center;
  gap: clamp(14px, 1.4vw, 22px);
  margin-bottom: clamp(18px, 1.6vw, 26px);
}

.round-button,
.topbar-track {
  height: clamp(48px, 5vw, 64px);
  border: 0;
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
}

.round-button {
  display: grid;
  width: clamp(48px, 5vw, 64px);
  padding: 0;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
}

.back-button {
  cursor: pointer;
}

.round-button img {
  display: block;
  width: clamp(22px, 2.1vw, 30px);
  height: clamp(22px, 2.1vw, 30px);
  filter: invert(1) brightness(1.8);
}

body:is(
  [data-theme="white"],
  [data-theme="beige"],
  [data-theme="gray"],
  [data-theme="pink"],
  [data-theme="blue"]
) .round-button img {
  filter: none;
}

.profile-button {
  cursor: pointer;
}

.topbar-track {
  display: flex;
  min-width: 0;
  padding: 0 clamp(22px, 2vw, 34px);
  align-items: center;
  border-radius: var(--corner-radius);
}

.topbar-track h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 400;
  line-height: 1;
}

.workspace {
  display: grid;
  min-height: 0;
  height: 100%;
  padding: clamp(8px, 1vw, 14px) clamp(18px, 2vw, 30px);
  grid-template-columns: minmax(0, 1fr) clamp(300px, 23vw, 370px);
  align-items: start;
  gap: clamp(26px, 3vw, 52px);
  border-radius: var(--corner-radius);
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
}

.canvas {
  position: sticky;
  top: 8px;
  display: grid;
  min-width: 0;
  min-height: 0;
  height: 100%;
  align-self: start;
  padding: 4px clamp(10px, 1.2vw, 18px);
  place-items: center;
  overflow: hidden;
  border-radius: var(--corner-radius);
  container-type: size;
}

.wheel-root {
  position: relative;
  width: min(var(--wheel-size, 85%), 1100px);
  max-width: none;
  color: var(--text);
  transform-origin: center;
  transition: width .18s ease, opacity .16s ease;
}

.wheel-root[aria-busy="true"] {
  opacity: .46;
}

.astro-wheel__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  background: transparent;
}

.astro-wheel__svg .is-astronomicon,
.wheel-sign-glyph.is-astronomicon,
.wheel-planet-glyph.is-astronomicon,
.wheel-object-tooltip .is-astronomicon {
  font-family: "Astronomicon", serif;
  font-style: normal;
  font-weight: 400;
}

.wheel-retro-inline {
  color: var(--chart-retro);
}

.wheel-degree-label {
  font-family: "Oswald", "Arial Narrow", sans-serif;
}

.wheel-house-label:not(.is-astronomicon) {
  font-family: "Oswald", "Arial Narrow", sans-serif;
}

.wheel-planet-node,
.wheel-cusp-node,
.wheel-aspect-node {
  outline: none;
  cursor: default;
}

.wheel-object-tooltip {
  position: absolute;
  z-index: 60;
  width: min(210px, calc(100vw - 24px));
  padding: 12px 14px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  border-radius: 18px;
  background: var(--surface-deep);
  box-shadow: var(--mode2-inset-shadow);
  pointer-events: none;
  transform: translate(16px, 16px);
}

.wheel-object-tooltip__primary {
  display: flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}

.wheel-object-tooltip__primary strong {
  font-size: 16px;
}

.wheel-object-tooltip__coordinate {
  min-width: 0;
  font-weight: 400;
}

.wheel-object-tooltip__details {
  display: grid;
  gap: 2px;
}

.wheel-object-tooltip__detail-row {
  display: block;
}

.wheel-object-tooltip__aspects {
  display: grid;
  margin-top: 10px;
  padding-top: 10px;
  gap: 5px;
  border-top: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
}

.wheel-object-tooltip__aspect-row {
  grid-template-columns: 20px 20px 20px auto minmax(0, 1fr);
  align-items: baseline;
  justify-items: start;
  text-align: left;
}

.wheel-object-tooltip__aspect-row .wheel-aspect-glyph {
  font-size: 22px;
  line-height: 1;
}

.wheel-object-tooltip__aspect-row .wheel-planet-glyph {
  font-size: 20px;
  line-height: 1;
}

.wheel-aspect-orb,
.wheel-aspect-phase {
  white-space: nowrap;
  font-weight: 400;
  text-align: left;
}

.wheel-object-tooltip[hidden] {
  display: none;
}

.wheel-object-tooltip.is-left {
  transform: translate(calc(-100% - 16px), 16px);
}

.wheel-object-tooltip.is-above {
  transform: translate(16px, calc(-100% - 16px));
}

.wheel-object-tooltip.is-left.is-above {
  transform: translate(calc(-100% - 16px), calc(-100% - 16px));
}

.wheel-object-tooltip__detail-row {
  display: block;
}

.wheel-object-tooltip__aspect-row {
  display: grid;
  grid-template-columns: 20px 20px 20px auto minmax(0, 1fr);
  align-items: baseline;
  justify-items: start;
  gap: 0;
  text-align: left;
}

.control-panel {
  display: grid;
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  min-width: 0;
  padding-right: 6px;
  align-content: start;
  gap: clamp(10px, .9vw, 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--surface-deep) transparent;
  scrollbar-width: thin;
}

.menu-section {
  min-width: 0;
}

.menu-section > summary {
  display: grid;
  min-height: clamp(42px, 3vw, 50px);
  padding: 6px clamp(16px, 1.25vw, 20px);
  align-items: center;
  color: var(--text);
  font-size: clamp(18px, 1.25vw, 21px);
  font-weight: 400;
  line-height: 1;
  list-style: none;
  border-radius: var(--corner-radius);
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-shadow);
  cursor: pointer;
}

.menu-section > summary::-webkit-details-marker,
.disclosure > summary::-webkit-details-marker {
  display: none;
}

.menu-section[open] > summary {
  border-radius: var(--corner-radius);
}

.menu-section-body {
  margin-top: 6px;
  padding: 14px 16px 16px;
  border-radius: var(--corner-radius);
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-shadow);
}

.segmented-control {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.segmented-control button {
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--corner-radius);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--control-shadow);
  cursor: pointer;
}

.segmented-control button.is-active {
  color: var(--accent-text);
  background: var(--accent);
  box-shadow: var(--control-raised-shadow);
}

body[data-relief-mode="2"] .segmented-control button {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--mode2-inset-shadow);
}

body[data-relief-mode="2"] .segmented-control button.is-active {
  color: var(--accent-text);
  background: var(--accent);
  box-shadow: var(--control-raised-shadow);
}

.zodiac-palette-settings {
  margin-top: 24px;
}

.control-heading {
  margin: 0 0 12px;
  color: var(--text);
}

.zodiac-palette-picker {
  position: relative;
  z-index: 8;
}

.zodiac-palette-trigger {
  display: grid;
  width: 100%;
  min-height: 48px;
  padding: 8px 16px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: var(--corner-radius);
  color: var(--text);
  text-align: left;
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
  cursor: pointer;
}

.zodiac-palette-swatches {
  display: flex;
  min-width: 54px;
}

.zodiac-palette-swatches i {
  width: 18px;
  height: 18px;
  margin-right: -5px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35);
}

.zodiac-palette-menu {
  display: grid;
  margin-top: 10px;
  padding: 12px;
  gap: 8px;
  border-radius: var(--corner-radius);
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
}

.zodiac-palette-menu[hidden] {
  display: none;
}

.zodiac-palette-menu button {
  min-height: 44px;
  padding: 8px 16px;
  border: 0;
  border-radius: var(--corner-radius);
  color: var(--text);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.zodiac-palette-menu button.is-selected {
  color: var(--text);
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-shadow);
}

.zodiac-palette-trigger[aria-expanded="true"] {
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-shadow);
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.element-color-editor {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--corner-radius);
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
}

.element-color-editor[hidden],
.element-color-grid[hidden] {
  display: none;
}

.element-color-editor h3,
.element-color-editor p {
  margin: 0;
}

.element-color-editor p {
  margin-top: 6px;
  color: var(--muted);
}

.zodiac-opacity-control,
.map-size-control {
  margin-top: 14px;
}

.element-color-targets {
  display: grid;
  margin-top: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}

.element-color-targets button {
  display: grid;
  min-width: 0;
  padding: 4px;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 0;
  color: var(--text);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.element-color-targets button span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--element-color);
  box-shadow: var(--range-color2-shadow);
}

.element-color-targets button.is-active span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.element-color-grid {
  display: grid;
  margin-top: 18px;
  grid-template-columns: repeat(7, minmax(28px, 1fr));
  gap: 12px;
}

.element-color-grid button {
  width: clamp(34px, 3vw, 46px);
  height: clamp(34px, 3vw, 46px);
  justify-self: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--element-color);
  box-shadow: var(--control-shadow);
  cursor: pointer;
}

body[data-relief-mode="2"] .element-color-targets button span,
body[data-relief-mode="2"] .element-color-grid button {
  box-shadow: var(--color-choice-inset-shadow);
}

.element-color-grid button.is-selected {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.wheel-color-setting {
  display: grid;
  gap: 12px;
}

.wheel-color-heading {
  color: var(--text);
}

.wheel-color-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.wheel-color-buttons button {
  display: grid;
  min-width: 0;
  padding: 6px 4px;
  place-items: center;
  gap: 7px;
  border: 0;
  color: var(--text);
  text-align: center;
  background: transparent;
  cursor: pointer;
}

.wheel-color-buttons button i {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--setting-color, var(--chart-person-a));
  box-shadow: var(--control-shadow);
}

.wheel-color-buttons button i.is-secondary {
  background: var(--setting-color, var(--chart-person-b));
}

[data-wheel-color-group="objects"] button i.is-degree {
  background: var(--setting-color, #35589a);
}

[data-wheel-color-group="cusps"] button i.is-degree {
  background: var(--setting-color, #102d75);
}

.zodiac-sign-color {
  margin-top: 16px;
}

.zodiac-sign-color .wheel-color-buttons {
  grid-template-columns: minmax(0, 120px);
}

.zodiac-sign-color button i.is-zodiac {
  background: var(--setting-color, var(--chart-zodiac-ink));
}

.ring-line-color .wheel-color-buttons {
  grid-template-columns: minmax(0, 140px);
}

.ring-line-color button i.is-ring {
  background: var(--setting-color, var(--ink));
}

.wheel-color-buttons button.is-active i {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.wheel-color-buttons button span {
  overflow: hidden;
  max-width: 100%;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wheel-color-grid {
  display: grid;
  padding: 14px;
  grid-template-columns: repeat(7, minmax(28px, 1fr));
  gap: 12px;
  border-radius: var(--corner-radius);
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
}

.wheel-color-grid[hidden] {
  display: none;
}

.wheel-color-grid button {
  width: clamp(34px, 3vw, 46px);
  height: clamp(34px, 3vw, 46px);
  justify-self: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--setting-color);
  box-shadow: var(--control-shadow);
  cursor: pointer;
}

body[data-relief-mode="2"] .wheel-color-buttons button i,
body[data-relief-mode="2"] .wheel-color-grid button {
  box-shadow: var(--color-choice-inset-shadow);
}

.wheel-color-grid button.is-selected {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.object-controls,
.switch-row {
  display: grid;
  gap: 16px;
}

.object-settings {
  display: grid;
  gap: 18px;
}

.aspect-settings {
  display: grid;
  gap: 18px;
}

.aspect-setting-help {
  margin: -10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.object-setting-choice,
.object-setting-row,
.object-setting-color {
  display: grid;
  gap: 10px;
}

.wheel-zoom-control {
  margin-top: 14px;
}

.secondary-ring-setting {
  margin-top: 18px;
}

.cusp-settings {
  display: grid;
  gap: 18px;
}

.design-configuration-body {
  display: grid;
  gap: 12px;
}

.sun-action-button {
  width: 100%;
  min-height: 50px;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--corner-radius);
  color: var(--accent-text);
  font: inherit;
  background: var(--accent);
  box-shadow: var(--control-raised-shadow);
  cursor: pointer;
}

.sun-action-button:hover {
  color: var(--accent-text);
  background: var(--accent);
  box-shadow: var(--control-raised-shadow);
}

.sun-action-button:disabled {
  cursor: default;
  opacity: .62;
}

.design-configuration-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sun-secondary-button {
  min-height: 50px;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--corner-radius);
  color: var(--text);
  font: inherit;
  background: var(--surface);
  box-shadow: var(--control-raised-shadow);
  cursor: pointer;
}

.sun-secondary-button.is-danger {
  color: var(--accent);
}

.sun-secondary-button:disabled {
  cursor: default;
  opacity: .48;
}

body[data-relief-mode="2"] .sun-secondary-button {
  background: var(--surface-deep);
  box-shadow: var(--mode2-inset-shadow);
}

@media (max-width: 640px) {
  .design-configuration-actions {
    grid-template-columns: 1fr;
  }
}

body[data-relief-mode="2"] .sun-action-button {
  box-shadow: var(--mode2-inset-shadow);
}

.configuration-status {
  min-height: 1.35em;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.configuration-status.is-error {
  color: var(--accent);
}

.object-setting-row > span,
.object-setting-color > span,
.object-setting-choice > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.object-setting-row output {
  color: var(--text);
  font-weight: 500;
}

.object-setting-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.secondary-ring-width[hidden] {
  display: none;
}

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

.object-setting-color input[type="color"] {
  width: 52px;
  height: 32px;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--control-shadow);
  cursor: pointer;
}

.object-setting-color input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.object-setting-color input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 999px;
}

.object-setting-choice select {
  width: 100%;
  min-height: 48px;
  padding: 8px 16px;
  border: 0;
  border-radius: var(--corner-radius);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--control-raised-shadow);
  cursor: pointer;
}

body[data-relief-mode="2"] .object-setting-choice select {
  box-shadow: var(--mode2-inset-shadow);
}

.setting-picker-native {
  display: none;
}

.setting-picker {
  position: relative;
}

.setting-picker-trigger {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 8px 16px;
  border: 0;
  border-radius: var(--corner-radius);
  color: var(--text);
  text-align: left;
  background: var(--surface);
  box-shadow: var(--control-raised-shadow);
  cursor: pointer;
}

body[data-relief-mode="2"] .setting-picker-trigger {
  box-shadow: var(--mode2-inset-shadow);
}

.setting-picker-menu {
  display: grid;
  margin-top: 10px;
  padding: 12px;
  gap: 6px;
  border-radius: var(--corner-radius);
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
}

.setting-picker-menu[hidden] {
  display: none;
}

.setting-picker-menu button {
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--corner-radius);
  color: var(--text);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.setting-picker-menu button.is-selected {
  color: var(--text);
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-shadow);
}

.setting-picker.is-open .setting-picker-trigger {
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-shadow);
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

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

.inline-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.switch {
  position: relative;
  display: inline-block;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch > span {
  display: block;
  width: 42px;
  height: 22px;
  padding: 2px;
  border-radius: var(--corner-radius);
  background: var(--surface);
  box-shadow: var(--control-shadow);
  cursor: pointer;
}

.switch > span::after {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface-deep);
  box-shadow: var(--control-shadow);
  content: "";
  transition: transform .18s ease, background .18s ease;
}

.switch input:checked + span::after {
  background: var(--accent);
  box-shadow: var(--button-active-shadow);
  transform: translateX(20px);
}

body[data-relief-mode="2"] .switch > span {
  background: var(--surface);
  box-shadow: var(--mode2-inset-shadow);
}

body[data-relief-mode="2"] .switch > span::after,
body[data-relief-mode="2"] .switch input:checked + span::after {
  box-shadow: var(--control-raised-shadow);
}

body[data-relief-mode="1"] .switch input:checked + span,
body[data-relief-mode="1"][data-control-style="toggle"] .dot-button.is-active {
  background: var(--surface-deep);
}

.dot-button {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--control-shadow);
  cursor: pointer;
  transition: width .16s ease, height .16s ease, background .16s ease;
}

.dot-button.is-active {
  background: var(--accent);
  box-shadow: var(--button-active-shadow);
}

body[data-relief-mode="1"][data-control-style="button"] .dot-button {
  background: var(--accent);
  box-shadow: var(--control-inset-shadow);
}

body[data-relief-mode="1"][data-control-style="button"] .dot-button.is-active {
  background: var(--surface);
  box-shadow:
    inset 0 0 0 2px var(--accent),
    5px 5px 5px rgba(0, 0, 0, .25);
}

body[data-relief-mode="2"][data-control-style="button"] .dot-button {
  background: var(--surface);
  box-shadow: var(--mode2-inset-shadow);
}

body[data-relief-mode="2"][data-control-style="button"] .dot-button.is-active {
  background: var(--accent);
  box-shadow: var(--control-raised-shadow);
}

body[data-control-style="button"] .switch > span {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
}

body[data-control-style="button"] .switch > span::after {
  width: 18px;
  height: 18px;
  background: var(--surface-light);
}

body[data-control-style="button"] .switch input:checked + span::after {
  background: var(--accent);
  box-shadow: var(--button-active-shadow);
  transform: none;
}

body[data-relief-mode="1"][data-control-style="button"] .switch > span,
body[data-relief-mode="2"][data-control-style="button"] .switch > span {
  background: transparent;
  box-shadow: none;
}

body[data-relief-mode="1"][data-control-style="button"] .switch > span::after {
  background: var(--accent);
  box-shadow: var(--control-inset-shadow);
}

body[data-relief-mode="1"][data-control-style="button"] .switch input:checked + span::after {
  background: var(--surface);
  box-shadow:
    inset 0 0 0 2px var(--accent),
    5px 5px 5px rgba(0, 0, 0, .25);
}

body[data-relief-mode="2"][data-control-style="button"] .switch > span::after {
  background: var(--surface);
  box-shadow: var(--mode2-inset-shadow);
}

body[data-relief-mode="2"][data-control-style="button"] .switch input:checked + span::after {
  background: var(--accent);
  box-shadow: var(--control-raised-shadow);
}

body[data-control-style="toggle"] .dot-button {
  position: relative;
  width: 42px;
  height: 22px;
  padding: 2px;
  border-radius: 999px;
  background: var(--surface);
}

body[data-control-style="toggle"] .dot-button::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface-light);
  box-shadow: var(--control-shadow);
  content: "";
  transition: transform .18s ease, background .18s ease;
}

body[data-control-style="toggle"] .dot-button.is-active::after {
  background: var(--accent);
  box-shadow: var(--button-active-shadow);
  transform: translateX(20px);
}

body[data-relief-mode="2"][data-control-style="toggle"] .dot-button {
  background: var(--surface);
  box-shadow: var(--mode2-inset-shadow);
}

body[data-relief-mode="2"][data-control-style="toggle"] .dot-button::after,
body[data-relief-mode="2"][data-control-style="toggle"] .dot-button.is-active::after {
  box-shadow: var(--control-raised-shadow);
}

body[data-relief-mode="2"][data-control-style="toggle"] .dot-button::after {
  background: var(--surface-deep);
}

body[data-relief-mode="2"][data-control-style="toggle"] .dot-button.is-active::after {
  background: var(--accent);
}

.color-choice-swatch {
  width: 37px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 100px;
  background: var(--accent);
  box-shadow: var(--color-choice-shadow);
  cursor: pointer;
}

.range-label {
  display: block;
  margin-bottom: 4px;
}

.range {
  width: 100%;
  height: 6px;
  margin: 3px 0;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(
      to right,
      var(--accent) 0,
      var(--accent) var(--range-progress, 24%),
      var(--range-track-fill) var(--range-progress, 24%),
      var(--range-track-fill) 100%
    );
  box-shadow: var(--range-track-shadow);
}

.range::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: var(--range-thumb-fill);
  box-shadow: var(--range-color2-shadow);
  cursor: pointer;
}

.range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: var(--range-thumb-fill);
  box-shadow: var(--range-color2-shadow);
  cursor: pointer;
}

.theme-picker {
  position: relative;
}

.theme-picker-trigger {
  display: grid;
  width: 100%;
  min-height: 58px;
  padding: 10px 18px;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  text-align: left;
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
  cursor: pointer;
}

.theme-dot,
.theme-picker-menu button::before {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: var(--figma-surface-shadow);
}

.theme-picker-menu {
  display: grid;
  margin-top: 12px;
  padding: 16px;
  gap: 6px;
  border-radius: var(--corner-radius);
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
}

.theme-picker-menu[hidden] {
  display: none;
}

.theme-picker-menu button {
  display: grid;
  width: 100%;
  min-height: 50px;
  padding: 8px 14px;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: var(--corner-radius);
  color: var(--text);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.theme-picker-menu button::before {
  content: "";
  background: #292d41;
}

.theme-picker-menu button[data-theme-value="white"]::before { background: #ffffff; }
.theme-picker-menu button[data-theme-value="beige"]::before { background: #d9d5d2; }
.theme-picker-menu button[data-theme-value="gray"]::before { background: #788198; }
.theme-picker-menu button[data-theme-value="pink"]::before { background: #e9cdd3; }
.theme-picker-menu button[data-theme-value="blue"]::before { background: #9fa8be; }
.theme-picker-menu button[data-theme-value="lavender"]::before { background: #555a7b; }
.theme-picker-menu button[data-theme-value="dark-pink"]::before { background: #d79eaa; }
.theme-picker-menu button[data-theme-value="dark-blue"]::before { background: #9dc8df; }

.theme-picker-menu button.is-selected {
  color: var(--text);
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-shadow);
}

.theme-picker.is-open .theme-picker-trigger {
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-shadow);
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.theme-config-group {
  margin-top: 12px;
}

.theme-config-group > p {
  margin: 0 0 6px;
  color: var(--text);
}

.theme-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.theme-choice button {
  display: grid;
  min-width: 0;
  min-height: 46px;
  padding: 8px 10px;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: var(--corner-radius);
  color: var(--text);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.theme-choice button:focus-visible {
  outline: none;
}

.theme-choice button > span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
}

.theme-choice button.is-active {
  color: var(--text);
  background: transparent;
  box-shadow: none;
}

.theme-choice button.is-active > span {
  background: var(--accent);
}

body[data-relief-mode="2"] .theme-choice button > span {
  background: var(--surface);
  box-shadow: var(--mode2-inset-shadow);
}

body[data-relief-mode="2"] .theme-choice button.is-active > span {
  background: var(--accent);
  box-shadow: var(--control-raised-shadow);
}

.disclosure > summary {
  list-style: none;
  cursor: pointer;
}

.disclosure > summary > span:first-child {
  display: block;
  margin-bottom: 12px;
}

.select-preview {
  display: block;
  width: 100%;
  height: 44px;
  border-radius: var(--corner-radius);
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
}

.disclosure[open] .select-preview {
  display: none;
}

.disclosure-body {
  display: none;
  padding: 10px;
  border-radius: var(--corner-radius);
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
}

.disclosure[open] .disclosure-body {
  display: block;
}

.disclosure-body button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--corner-radius);
  color: var(--text);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.disclosure-body button:hover,
.disclosure-body button:focus-visible {
  background: rgba(var(--accent-rgb), .18);
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) clamp(290px, 37vw, 340px);
    gap: 24px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
    height: auto;
    padding: 14px;
  }

  .topbar {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 12px;
  }

  .workspace {
    min-height: auto;
    padding: 14px;
    grid-template-columns: 1fr;
    gap: 18px;
    border-radius: var(--corner-radius);
  }

  .canvas {
    position: relative;
    top: auto;
    min-height: min(calc(100vw - 28px), 560px);
    padding: 0;
    place-items: center;
    overflow: visible;
  }

  .wheel-root {
    width: min(
      calc(var(--wheel-size, 85%) + 14%),
      calc(100vw - 28px),
      560px
    );
  }

  .control-panel {
    height: auto;
    max-height: none;
    min-height: 0;
    padding-right: 0;
    gap: 14px;
    overflow: visible;
  }

  .element-color-grid {
    grid-template-columns: repeat(5, minmax(28px, 1fr));
  }

  .wheel-color-grid {
    grid-template-columns: repeat(5, minmax(28px, 1fr));
  }

  .menu-section > summary {
    min-height: 46px;
    font-size: 18px;
  }

}

@media (min-width: 561px) and (max-width: 820px) {
  .app-shell {
    display: block;
    height: auto;
    padding: 14px;
  }

  .topbar {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 12px;
  }

  .workspace {
    min-height: auto;
    padding: 14px;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .canvas {
    position: relative;
    top: auto;
    min-height: min(calc(100vw - 20px), 760px);
    padding: 0;
    place-items: center;
    overflow: visible;
  }

  .wheel-root {
    width: min(
      calc(var(--wheel-size, 85%) + 35%),
      calc(100vw - 12px),
      760px
    );
  }

  .control-panel {
    height: auto;
    max-height: none;
    min-height: 0;
    padding-right: 0;
    gap: 14px;
    overflow: visible;
  }
}

@media (max-width: 560px) {
  .wheel-object-tooltip {
    scale: .46;
    transform-origin: top left;
  }

  .wheel-object-tooltip.is-left {
    transform-origin: top right;
  }

  .wheel-object-tooltip.is-above {
    transform-origin: bottom left;
  }

  .wheel-object-tooltip.is-left.is-above {
    transform-origin: bottom right;
  }
}

@media (max-width: 430px) {
  .element-color-targets {
    grid-template-columns: 1fr;
  }

  .element-color-grid {
    grid-template-columns: repeat(5, minmax(28px, 1fr));
  }

  .wheel-color-grid {
    grid-template-columns: repeat(5, minmax(28px, 1fr));
  }
}

@media (max-width: 420px) {
  .segmented-control {
    grid-template-columns: 1fr;
  }

  .switch-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Профиль: та же геометрия, цвета и тени, что у остальных блоков SUN. */
.profile-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, .36);
}

.profile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(420px, 92vw);
  height: 100dvh;
  color: var(--text);
  background: var(--background);
  box-shadow: -8px 0 18px rgba(0, 0, 0, .28);
  transform: translateX(105%);
  transition: transform 180ms ease;
  outline: none;
}

.profile-drawer.is-open {
  transform: translateX(0);
}

body.profile-drawer-open {
  overflow: hidden;
}

.profile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  padding: 14px 18px;
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-shadow);
}

.profile-drawer-header h2,
.profile-drawer-section h3 {
  margin: 0;
  font-weight: 600;
}

.profile-drawer-header h2 {
  font-size: clamp(1.65rem, 3vw, 2rem);
}

.profile-drawer-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0 0 3px;
  border: 0;
  border-radius: 50%;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--control-raised-shadow);
  font: 400 1.5rem/1 "Oswald", sans-serif;
  cursor: pointer;
}

.profile-drawer-scroll {
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.profile-account-card,
.profile-drawer-section {
  position: relative;
  padding: 18px;
  border-radius: var(--corner-radius);
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
}

.profile-account-card {
  padding-right: 90px;
}

.profile-account-name,
.profile-account-email {
  margin: 0;
  overflow-wrap: anywhere;
}

.profile-account-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.profile-account-email {
  margin-top: 4px;
  color: var(--muted);
  font-size: .9rem;
}

.profile-inline-button,
.profile-login-link {
  position: absolute;
  top: 50%;
  right: 18px;
  border: 0;
  color: var(--text);
  background: transparent;
  font: 500 .92rem/1.2 "Oswald", sans-serif;
  text-decoration: none;
  transform: translateY(-50%);
  cursor: pointer;
}

.profile-drawer-section {
  margin-top: 14px;
}

.profile-drawer-section h3 {
  margin-bottom: 14px;
  font-size: 1.25rem;
}

.profile-folder-select select {
  min-width: 0;
  min-height: 46px;
  border: 0;
  border-radius: var(--corner-radius);
  color: var(--text);
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-shadow);
  font: 500 .92rem/1.2 "Oswald", sans-serif;
}

.profile-folder-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-folder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--corner-radius);
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-shadow);
}

.profile-folder-item span:last-child {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 16px;
  color: var(--accent-text);
  background: var(--accent);
  font-weight: 600;
}

.profile-folder-select {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
}

.profile-folder-select select {
  width: 100%;
  padding: 0 48px 0 20px;
}

.profile-chart-list {
  display: grid;
  gap: 10px;
}

.profile-chart-card {
  padding: 14px 16px;
  border-radius: var(--corner-radius);
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-shadow);
}

.profile-chart-card h4,
.profile-chart-card p {
  margin: 0;
}

.profile-chart-card h4 {
  font-size: 1.05rem;
}

.profile-chart-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: .9rem;
}

.profile-chart-folder {
  color: var(--accent) !important;
  font-size: .92rem;
}

.profile-empty,
.profile-drawer-status {
  margin: 14px 0 0;
  color: var(--muted);
}

.profile-drawer-status.is-error {
  color: var(--accent);
}

.profile-drawer-footer {
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-shadow);
}

.profile-save-chart {
  width: 100%;
  margin: 0;
}

@media (max-width: 560px) {
  .profile-drawer-header {
    min-height: 68px;
    padding: 12px 14px;
  }

  .profile-drawer-header h2 {
    font-size: 1.6rem;
  }

  .profile-drawer-close {
    width: 30px;
    height: 30px;
  }

  .profile-drawer-scroll {
    padding: 14px;
  }

  .profile-account-card,
  .profile-drawer-section {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-drawer {
    transition: none;
  }
}
