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

html,
body {
  overflow-x: hidden;
  overflow-x: clip;
}

html {
  scrollbar-gutter: stable;
}

@font-face {
  font-family: "Astronomicon";
  src: url("/fonts/Astronomicon.ttf?v=2026.08.22-forecast-952") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Каркас страницы показывается сразу. До загрузки символьного шрифта
   скрываются только астрологические глифы, поэтому нет белых квадратов,
   пустого экрана и последующего скачка всей страницы. */
body.fonts-loading :is(.astro,.astro-glyph,.day-sign,.natal-table-symbol,
  .natal-coordinate-sign,.natal-coordinate-retro,.year-row-label,
  .graph-lane-glyph,.graph-planet-glyph,.graph-hierarchy-glyph,
  .time-lord-astro-glyph,.profection-summary-angle-glyph,
  .profection-zodiac-glyph,.profection-planet-glyph,
  .profection-aspect-glyph,.profection-cusp-glyph,
  .profection-object-button) {
  visibility: hidden;
}

/* The shared shell becomes visible only after fonts and the cached layout
   geometry are ready.  This class is owned exclusively by the synchronous
   preference bootstrap, so page modules cannot reveal a half-settled layout. */
body.sun-layout-loading > :is(.app-shell, .login-layout) {
  visibility: hidden;
}

body.sun-booting *,
body.sun-booting *::before,
body.sun-booting *::after {
  transition: none !important;
  animation: none !important;
}

:root {
  color-scheme: dark;
  --theme-color: #1d2539;
  --background: var(--theme-color);
  --surface: var(--theme-color);
  --surface-deep: var(--theme-color);
  --surface-light: var(--theme-color);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, .72);
  --accent: #37496c;
  --accent-rgb: 55, 73, 108;
  --accent-text: #ffffff;
  --icon-filter: brightness(0) invert(1);
  --theme-shadow-dark-alpha: .5;
  --theme-shadow-light-alpha: .05;
  --control-raised-shadow: 5px 5px 10px rgba(0, 0, 0, var(--theme-shadow-dark-alpha)), -5px -5px 10px rgba(255, 255, 255, var(--theme-shadow-light-alpha));
  --control-inset-shadow: inset 5px 5px 10px rgba(0, 0, 0, var(--theme-shadow-dark-alpha)), inset -5px -5px 10px rgba(255, 255, 255, var(--theme-shadow-light-alpha));
  --shadow-333951: var(--control-raised-shadow);
  --shadow-282d43: var(--control-inset-shadow);
  --shadow-mode2-282d43: var(--control-raised-shadow);
  --shadow-mode2-333951: var(--control-inset-shadow);
  --figma-surface-shadow: var(--control-raised-shadow);
  --figma-deep-shadow: var(--control-inset-shadow);
  --mode2-raised-shadow: var(--control-raised-shadow);
  --mode2-inset-shadow: var(--control-inset-shadow);
  --control-shadow: var(--control-raised-shadow);
  --raised-control-fill: var(--surface);
  --cut-control-fill: var(--surface);
  --range-thumb-fill: var(--surface);
  --range-track-fill: var(--surface);
  --range-color2-shadow: var(--figma-deep-shadow);
  --range-track-shadow: var(--shadow-333951);
  --button-active-shadow: var(--control-raised-shadow);
  --color-choice-shadow: var(--control-raised-shadow);
  --color-choice-inset-shadow: var(--control-inset-shadow);
  --corner-radius: 30px;
  --sun-standard-control-height: 40px;
  --sun-standard-round-control-size: 40px;
  --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);
  --chart-cusp-degree: #ffffff;
  --aspect-conjunction: #B5949B;
  --aspect-opposition: #B5949B;
  --aspect-square: #B5949B;
  --aspect-trine: #496A70;
  --aspect-sextile: #496A70;
  --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;
}

/* Все интерфейсные SVG-иконки всегда совпадают с цветом текста темы. */
body img[src$=".svg"],
body img[src*=".svg?"] {
  filter: var(--icon-filter) !important;
}

.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);
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  margin: 0;
  --background: var(--theme-color);
  --surface: var(--theme-color);
  --surface-deep: var(--theme-color);
  --surface-light: var(--theme-color);
  color: var(--text);
  background: var(--background);
  --raised-control-fill: var(--surface);
  --cut-control-fill: var(--surface);
  /* Здесь тени вычисляются уже после выбора темы. В :root браузер иначе
     фиксирует утверждённые значения теней для всех профилей. */
  --control-raised-shadow: 5px 5px 10px rgba(0, 0, 0, var(--theme-shadow-dark-alpha)), -5px -5px 10px rgba(255, 255, 255, var(--theme-shadow-light-alpha));
  --control-inset-shadow: inset 5px 5px 10px rgba(0, 0, 0, var(--theme-shadow-dark-alpha)), inset -5px -5px 10px rgba(255, 255, 255, var(--theme-shadow-light-alpha));
  --shadow-333951: var(--control-raised-shadow);
  --shadow-282d43: var(--control-inset-shadow);
  --shadow-mode2-282d43: var(--control-raised-shadow);
  --shadow-mode2-333951: var(--control-inset-shadow);
  --figma-surface-shadow: var(--control-raised-shadow);
  --figma-deep-shadow: var(--control-inset-shadow);
  --mode2-raised-shadow: var(--control-raised-shadow);
  --mode2-inset-shadow: var(--control-inset-shadow);
  --control-shadow: var(--control-raised-shadow);
  --color-choice-shadow: var(--control-raised-shadow);
  --color-choice-inset-shadow: var(--control-inset-shadow);
  --range-thumb-fill: var(--surface);
  --range-track-fill: var(--surface);
  --button-active-shadow: var(--control-raised-shadow);
}

body[data-theme="white"] {
  color-scheme: light;
  --theme-color: #f1f2f9; --text: #515569; --muted: rgba(81, 85, 105, .72);
  --accent: #b5bac9; --accent-rgb: 181, 186, 201; --accent-text: #515569;
  --theme-shadow-dark-alpha: .10; --theme-shadow-light-alpha: 1;
  --button-active-shadow: inset 5px 5px 10px rgba(0, 0, 0, .10), inset -5px -5px 10px rgba(255, 255, 255, .30);
  --color-choice-inset-shadow: var(--button-active-shadow);
  --chart-focus-muted-opacity: .05;
  --icon-filter: brightness(0) saturate(100%) invert(34%) sepia(8%) saturate(1076%) hue-rotate(190deg) brightness(91%) contrast(88%);
}

body[data-theme="pink"] {
  color-scheme: light;
  --theme-color: #f2eced; --text: #705358; --muted: rgba(112, 83, 88, .72);
  --accent: #dbc1c5; --accent-rgb: 219, 193, 197; --accent-text: #705358;
  --theme-shadow-dark-alpha: .10; --theme-shadow-light-alpha: .5;
  --chart-focus-muted-opacity: .05;
  --icon-filter: brightness(0) saturate(100%) invert(35%) sepia(14%) saturate(738%) hue-rotate(294deg) brightness(91%) contrast(88%);
}

body[data-theme="beige"] {
  color-scheme: light;
  --theme-color: #edebe7; --text: #444961; --muted: rgba(68, 73, 97, .72);
  --accent: #798b90; --accent-rgb: 121, 139, 144; --accent-text: #444961;
  --theme-shadow-dark-alpha: .10; --theme-shadow-light-alpha: .5;
  --chart-focus-muted-opacity: .05;
  --icon-filter: brightness(0) saturate(100%) invert(29%) sepia(13%) saturate(892%) hue-rotate(190deg) brightness(87%) contrast(86%);
}

body[data-theme="lilac"] {
  color-scheme: light;
  --theme-color: #cfd4e1; --text: #444961; --muted: rgba(68, 73, 97, .72);
  --accent: #8589a1; --accent-rgb: 133, 137, 161; --accent-text: #444961;
  --theme-shadow-dark-alpha: .10; --theme-shadow-light-alpha: .3;
  --chart-focus-muted-opacity: .05;
  --icon-filter: brightness(0) saturate(100%) invert(29%) sepia(13%) saturate(892%) hue-rotate(190deg) brightness(87%) contrast(86%);
}

body[data-theme="blue"] {
  color-scheme: light;
  --theme-color: #d2d9df; --text: #444961; --muted: rgba(68, 73, 97, .72);
  --accent: #7a8ea6; --accent-rgb: 122, 142, 166; --accent-text: #444961;
  --theme-shadow-dark-alpha: .10; --theme-shadow-light-alpha: .5;
  --chart-focus-muted-opacity: .05;
  --icon-filter: brightness(0) saturate(100%) invert(29%) sepia(13%) saturate(892%) hue-rotate(190deg) brightness(87%) contrast(86%);
}

body[data-theme="khaki"] {
  --theme-color: #4d5e62; --text: #ffffff; --muted: rgba(255, 255, 255, .72);
  --accent: #b5949b; --accent-rgb: 181, 148, 155; --accent-text: #ffffff;
  --theme-shadow-dark-alpha: .30; --theme-shadow-light-alpha: .05;
}

body[data-theme="indigo"] {
  --theme-color: #10263e; --text: #ffffff; --muted: rgba(255, 255, 255, .72);
  --accent: #304b68; --accent-rgb: 48, 75, 104; --accent-text: #ffffff;
  --theme-shadow-dark-alpha: .30; --theme-shadow-light-alpha: .05;
}

body[data-theme="green"] {
  --theme-color: #1c434a; --text: #ffffff; --muted: rgba(255, 255, 255, .72);
  --accent: #496a70; --accent-rgb: 73, 106, 112; --accent-text: #ffffff;
  --theme-shadow-dark-alpha: .30; --theme-shadow-light-alpha: .05;
}

body[data-theme="navy"] {
  --theme-color: #1d2539; --text: #ffffff; --muted: rgba(255, 255, 255, .72);
  --accent: #37496c; --accent-rgb: 55, 73, 108; --accent-text: #ffffff;
  --theme-shadow-dark-alpha: .30; --theme-shadow-light-alpha: .05;
}

body[data-theme="purple"] {
  --theme-color: #343c51; --text: #ffffff; --muted: rgba(255, 255, 255, .72);
  --accent: #536281; --accent-rgb: 83, 98, 129; --accent-text: #ffffff;
  --theme-shadow-dark-alpha: .30; --theme-shadow-light-alpha: .05;
}

html[data-theme="white"] { --theme-color: #f1f2f9; }
html[data-theme="pink"] { --theme-color: #f2eced; }
html[data-theme="beige"] { --theme-color: #edebe7; }
html[data-theme="lilac"] { --theme-color: #cfd4e1; }
html[data-theme="blue"] { --theme-color: #d2d9df; }
html[data-theme="khaki"] { --theme-color: #4d5e62; }
html[data-theme="indigo"] { --theme-color: #10263e; }
html[data-theme="green"] { --theme-color: #1c434a; }
html[data-theme="navy"] { --theme-color: #1d2539; }
html[data-theme="purple"] { --theme-color: #343c51; }

body:is(
  [data-theme="white"],
  [data-theme="pink"],
  [data-theme="beige"],
  [data-theme="lilac"],
  [data-theme="blue"]
) {
  --chart-person-a: var(--text);
  --chart-person-b: var(--text);
  --chart-degree-ink: var(--text);
  --chart-cusp-degree: var(--text);
}

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

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

body {
  -webkit-user-select:none;
  user-select:none;
}

html.sun-copy-admin #natal-reading-content,
html.sun-copy-admin .natal-object-interpretation,
html.sun-copy-admin [data-interpretation-copy-scope] {
  -webkit-user-select:text;
  user-select:text;
}

html.sun-copy-admin #natal-reading-content ::selection,
html.sun-copy-admin .natal-object-interpretation ::selection,
html.sun-copy-admin [data-interpretation-copy-scope] ::selection {
  color:inherit;
  background:rgba(var(--accent-rgb), .35);
}

input,
textarea,
[contenteditable="true"] {
  -webkit-user-select:text;
  user-select:text;
}

::selection {
  color:inherit;
  background:transparent;
}

::-moz-selection {
  color:inherit;
  background: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);
  padding-bottom: clamp(6px, .7vw, 10px);
  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: var(--icon-filter);
}

.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 {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 400;
  line-height: 1;
  text-overflow: ellipsis;
  transform: translateY(-0.08em);
  white-space: nowrap;
}

.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: 5px clamp(10px, 1.2vw, 18px);
  place-items: center;
  align-items: unsafe center;
  justify-items: unsafe center;
  overflow: visible;
  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: opacity .16s ease;
}

@media (min-width: 601px) {
  .wheel-root.sun-shared-wheel-size {
    width: min(
      calc(88dvh * var(--wheel-user-zoom-scale, var(--sun-wheel-stored-scale, 1))),
      calc(100vw - var(--natal-tools-panel-width, 340px) - 100px)
    );
  }
}

.workspace > .canvas > .wheel-root {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@media (min-width: 821px) {
  @supports (width: 1cqh) {
    .wheel-root {
      width: min(var(--wheel-size, 85%), 1100px, calc(100cqh - 10px));
    }
  }
}

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

.wheel-root[data-initializing="true"] {
  visibility: hidden;
}

.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;
  border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
  background: color-mix(in srgb, var(--surface-deep) 50%, transparent);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--background) 30%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  pointer-events: none;
  transform: none;
}

.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-aspect-phase { margin-left: .35em; }

.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 > summary:hover,
.menu-section > summary:focus-visible {
  outline: 0;
  box-shadow: var(--figma-deep-shadow);
}

.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;
}

.menu-section-mode {
  width: 100%;
  margin: 0;
}

.segmented-control button {
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--corner-radius);
  color: var(--text);
  background: var(--raised-control-fill);
  box-shadow: var(--control-raised-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(--raised-control-fill);
  box-shadow: var(--control-raised-shadow);
}

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

.map-theme-settings {
  margin-top: 0;
}

.map-color-settings {
  margin-top: 24px;
}

.zodiac-ring-colors {
  display: grid;
  margin-top: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 18px;
}

.zodiac-ring-color-heading {
  display: block;
  margin-top: 20px;
}

.zodiac-ring-colors .wheel-color-buttons {
  grid-template-columns: 1fr;
}

.zodiac-ring-colors .wheel-color-buttons button {
  justify-items: center;
}

.zodiac-ring-colors .wheel-color-buttons button i.is-cusp-label {
  background: var(--setting-color, var(--accent));
}

.zodiac-ring-colors > .zodiac-ring-palette {
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
}

.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-deep);
  box-shadow: var(--figma-deep-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(--accent-text);
  background: var(--accent);
  box-shadow: var(--control-raised-shadow);
}

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

.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(8, 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 {
  box-shadow: var(--control-raised-shadow), inset 0 0 0 3px var(--accent);
}

.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, var(--chart-degree-ink));
}

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

[data-wheel-color-group="cusps"] button i.is-primary,
[data-wheel-color-group="cusps"] button i.is-secondary {
  background: var(--setting-color, var(--accent));
}

.zodiac-sign-color {
  margin-top: 0;
}

.zodiac-sign-color .wheel-color-buttons,
.ring-line-color .wheel-color-buttons,
.cusp-label-color .wheel-color-buttons {
  grid-template-columns: minmax(0, 1fr);
}

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

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

.wheel-color-buttons button.is-active i {
  box-shadow: var(--control-raised-shadow), inset 0 0 0 3px var(--accent);
}

.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(8, 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 {
  box-shadow: var(--control-raised-shadow), inset 0 0 0 3px var(--accent);
}

.wheel-color-grid .wheel-custom-color-trigger {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 42px;
  border-radius: 22px;
  color: #fff;
  background: var(--setting-color, #14374c);
  font: 500 .82rem/1 "Oswald", sans-serif;
  letter-spacing: .04em;
}

.apply-object-colors-toggle {
  min-height: 22px;
  grid-template-columns: max-content 30px;
  justify-content: start;
  gap: 8px;
}

.object-color-toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.filled-circle-toggle {
  min-height: 22px;
  grid-template-columns: max-content 30px;
  justify-content: start;
  gap: 8px;
}

.profile-save-chart,
.profile-release {
  display: none;
}

.individual-object-colors {
  display: grid;
  gap: 12px;
}

.individual-object-colors[hidden] {
  display: none;
}

.individual-object-color-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.individual-object-color-buttons button {
  display: grid;
  min-width: 0;
  min-height: 32px;
  padding: 4px 6px;
  grid-template-columns: 18px 18px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: var(--corner-radius);
  color: var(--text);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.individual-object-color-buttons button b {
  font: 18px/1 "Astronomicon", sans-serif;
  font-weight: 400;
  text-align: center;
}

.individual-object-color-buttons button span {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.individual-object-color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--setting-color, var(--chart-person-a));
  box-shadow: var(--control-raised-shadow);
}

.individual-object-color-buttons button.is-active .individual-object-color-swatch {
  box-shadow: var(--control-raised-shadow), inset 0 0 0 2px var(--accent);
}

body[data-relief-mode="2"] .individual-object-color-swatch {
  box-shadow: var(--mode2-raised-shadow);
}

.wheel-custom-color-editor {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--corner-radius);
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-shadow);
}

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

.wheel-custom-color-editor input[type="color"] {
  width: 42px;
  height: 42px;
  padding: 3px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
}

.wheel-custom-color-editor input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.wheel-custom-color-editor input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 50%;
}

.wheel-custom-color-editor input[type="text"] {
  min-width: 0;
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 22px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
  font: 500 .9rem/1 "Oswald", sans-serif;
  text-transform: uppercase;
}

.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: 0;
}

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

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

.design-correspondence-body,
.design-correspondence-list {
  display: grid;
  gap: 12px;
}

.design-correspondence-hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.design-correspondence-row {
  display: grid;
  grid-template-columns: minmax(130px, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 10px;
}

.design-correspondence-row > span {
  min-width: 0;
  line-height: 1.15;
}

@media (max-width: 560px) {
  .design-correspondence-row {
    grid-template-columns: 1fr;
  }
}

.design-configuration-name input {
  box-sizing: border-box;
  width: 100%;
  min-height: 50px;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--corner-radius);
  color: var(--text);
  font: inherit;
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
  outline: 0;
}

.design-configuration-name input:focus-visible {
  box-shadow: var(--control-inset-shadow), 0 0 0 2px var(--accent);
}

.sun-action-button {
  width: 100%;
  min-height: var(--sun-standard-control-height);
  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;
}

.design-configuration-actions .sun-action-button,
.design-configuration-actions .sun-secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 8px;
  font-size: clamp(.82rem, 1.4vw, .95rem);
  line-height: 1.1;
  text-align: center;
}

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

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

.design-configuration-actions .sun-secondary-button,
.design-configuration-actions .sun-secondary-button:hover,
.design-configuration-actions .sun-secondary-button:focus,
.design-configuration-actions .sun-secondary-button:focus-visible,
.design-configuration-actions .sun-secondary-button:active,
.design-configuration-actions .sun-secondary-button:disabled {
  color: var(--text);
}

.design-configuration-actions .sun-action-button,
.design-configuration-actions .sun-action-button:hover,
.design-configuration-actions .sun-action-button:focus,
.design-configuration-actions .sun-action-button:focus-visible,
.design-configuration-actions .sun-action-button:active,
.design-configuration-actions .sun-action-button:disabled {
  color: var(--text);
}

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

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

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

body[data-relief-mode="2"] .sun-action-button {
  box-shadow: var(--mode2-raised-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;
}

.object-visibility-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.object-visibility-controls .object-setting-toggle {
  min-width: 0;
}

.cusp-visibility-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.cusp-visibility-controls .object-setting-toggle {
  min-width: 0;
}

.cusp-visibility-controls [hidden] {
  display: none;
}

.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(--figma-surface-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(--figma-surface-shadow);
  cursor: pointer;
}

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

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

.setting-picker {
  position: relative;
  min-width: 0;
}

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

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

.setting-picker-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 120;
  display: grid;
  margin-top: 10px;
  padding: 12px;
  gap: 6px;
  border-radius: var(--corner-radius);
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-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(--accent-text);
  background: var(--accent);
  box-shadow: var(--control-raised-shadow);
}

.setting-picker.is-open .setting-picker-trigger {
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
  outline: 0;
}

.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(--figma-surface-shadow);
  cursor: pointer;
}

.switch > span::after {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-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(--figma-surface-shadow);
}

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

.dot-button {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--figma-surface-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="2"] .dot-button {
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
}

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

.switch > span {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
}

.switch > span::after {
  width: 18px;
  height: 18px;
  background: var(--surface-light);
}

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

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

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

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

.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: 48px;
  padding: 8px 16px;
  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-deep);
  box-shadow: var(--figma-deep-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: #f1f2f9; }
.theme-picker-menu button[data-theme-value="pink"]::before { background: #f2eced; }
.theme-picker-menu button[data-theme-value="beige"]::before { background: #edebe7; }
.theme-picker-menu button[data-theme-value="lilac"]::before { background: #cfd4e1; }
.theme-picker-menu button[data-theme-value="blue"]::before { background: #d2d9df; }
.theme-picker-menu button[data-theme-value="khaki"]::before { background: #4d5e62; }
.theme-picker-menu button[data-theme-value="indigo"]::before { background: #10263e; }
.theme-picker-menu button[data-theme-value="green"]::before { background: #1c434a; }
.theme-picker-menu button[data-theme-value="navy"]::before { background: #1d2539; }
.theme-picker-menu button[data-theme-value="purple"]::before { background: #343c51; }

.theme-picker-menu button.is-selected {
  color: var(--accent-text);
  background: var(--accent);
  box-shadow: var(--control-raised-shadow);
}

.theme-picker.is-open .theme-picker-trigger {
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-shadow);
  outline: 0;
}

.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;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 8px 0;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  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(--figma-surface-shadow);
}

body[data-relief-mode="2"] .theme-choice button.is-active > span {
  background: var(--accent);
  box-shadow: var(--mode2-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: 600px) {
  .app-shell {
    display: block;
    height: auto;
    padding: 14px;
  }

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

  .workspace {
    min-height: auto;
    padding: 5px 14px 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: 5px 0;
    place-items: center;
    overflow: visible;
  }

  .wheel-root {
    width: var(--wheel-size, 85%);
  }

  .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: 5px 14px 14px;
    grid-template-columns: 1fr;
    gap: 18px;
  }

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

  .wheel-root {
    width: var(--wheel-size, 85%);
  }

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

/*
 * Планшеты: iPad в альбомной ориентации имеет широкую CSS-область и раньше
 * ошибочно получал десктопные две колонки. Карта и настройки идут одним
 * потоком, поэтому холст не растягивается на всю высоту экрана.
 */
@media (min-width: 761px) and (max-width: 1180px),
       (hover: none) and (pointer: coarse) and (min-width: 761px) and (max-width: 1366px) {
  .app-shell {
    display: block;
    height: auto;
    min-height: 100dvh;
    padding: 14px;
  }

  .topbar {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 14px;
    margin-bottom: 16px;
  }

  .round-button,
  .topbar-track {
    height: 52px;
  }

  .round-button {
    width: 52px;
  }

  .topbar-track h1 {
    font-size: clamp(34px, 5vw, 50px);
  }

  .workspace {
    height: auto;
    min-height: 0;
    padding: 5px 14px 14px;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .canvas {
    position: relative;
    top: auto;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    aspect-ratio: 1 / 1;
    justify-self: center;
    padding: 5px;
    place-items: center;
    container-type: inline-size;
  }

  .wheel-root {
    width: var(--wheel-size, 85%);
  }

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

}

@media (max-width: 560px) {
  .topbar-track {
    padding-inline: 14px;
  }

  .topbar-track h1 {
    font-size: clamp(25px, 7vw, 31px);
  }

  .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;
  }
}

/* SUN-571: палитра всегда помещается в ширину панели. Размер образцов
   ограничен сеткой, поэтому крайний столбец больше не обрезается. */
.wheel-color-grid {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 10px;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  overflow: hidden;
}

.wheel-color-grid button {
  width: min(38px, 100%);
  height: auto;
  aspect-ratio: 1;
}

.wheel-color-grid .wheel-custom-color-trigger {
  width: 100%;
  aspect-ratio: auto;
}

@media (max-width: 560px) {
  .wheel-color-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* На небольшом альбомном экране панель оформления остаётся справа; в
   портретной ориентации действуют существующие правила потока под картой. */
@media (max-width: 1180px) and (orientation: landscape) {
  body.sun-design-fixed-layout .app-shell {
    display: grid;
    height: 100dvh;
    min-height: 100dvh;
    padding: 8px;
    overflow: hidden;
  }

  body.sun-design-fixed-layout .workspace {
    display: grid;
    height: 100%;
    min-height: 0;
    padding: 0;
    grid-template-columns: minmax(0, 1fr) min(300px, 38vw);
    grid-template-rows: 40px auto minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 8px;
  }

  body.sun-design-fixed-layout .canvas {
    grid-column: 1;
    grid-row: 1 / 4;
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    overflow: hidden;
  }

  body.sun-design-fixed-layout .workspace > .topbar-track,
  body.sun-design-fixed-layout .workspace > .menu-section-mode,
  body.sun-design-fixed-layout .control-panel {
    grid-column: 2;
    width: 100%;
    min-width: 0;
  }

  body.sun-design-fixed-layout .workspace > .topbar-track { grid-row: 1; }
  body.sun-design-fixed-layout .workspace > .menu-section-mode { grid-row: 2; }
  body.sun-design-fixed-layout .control-panel {
    grid-row: 3;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
input[type="number"]{-moz-appearance:textfield;appearance:textfield}
input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}

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

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

.profile-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition-delay: 0s;
}

body:not(.profile-drawer-open) .profile-drawer:not(.is-open) {
  display: none;
}

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: transparent;
  box-shadow: none;
}

.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(--figma-surface-shadow);
  font: 400 1.5rem/1 "Oswald", sans-serif;
  cursor: pointer;
}

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

.profile-account-card,
.profile-preferences-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 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 14px;
}

.profile-preferences-card {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: var(--corner-radius);
  background: var(--cut-control-fill);
  box-shadow: var(--control-inset-shadow);
}

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

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

.profile-account-email {
  grid-column: 1;
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.profile-account-card > .profile-inline-button,
.profile-account-card > .profile-login-link {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.profile-inline-button,
.profile-login-link {
  flex: 0 0 auto;
  border: 0;
  color: var(--text);
  background: transparent;
  font: 500 .92rem/1.2 "Oswald", sans-serif;
  text-decoration: none;
  cursor: pointer;
}

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

.profile-admin-section {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: var(--corner-radius);
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
}

.profile-admin-section[hidden] {
  display: none;
}

.profile-admin-section h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.profile-admin-section a {
  display: flex;
  min-height: var(--sun-standard-control-height);
  padding: 0 16px;
  align-items: center;
  border-radius: var(--corner-radius);
  color: var(--text);
  background: var(--cut-control-fill);
  box-shadow: var(--control-inset-shadow);
  font: 500 .92rem/1.2 "Oswald", sans-serif;
  text-decoration: none;
}

.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);
  font: 500 .92rem/1.2 "Oswald", sans-serif;
}

/* «Без папки» — поле-вырез во всех режимах, как в дизайне SUN. */
.profile-folder-select .setting-picker-trigger,
body[data-relief-mode="2"] .profile-folder-select .setting-picker-trigger,
.profile-folder-select .setting-picker.is-open .setting-picker-trigger {
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-shadow);
}

body[data-relief-mode="2"] .profile-folder-select select {
  background: var(--surface);
  box-shadow: var(--figma-surface-shadow);
}

.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;
  height: 244px;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  overflow-anchor: none;
  overscroll-behavior: contain;
}

.profile-chart-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  padding: 0;
  border-radius: var(--corner-radius);
  color: inherit;
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-shadow);
}

.profile-chart-open {
  min-width: 0;
  padding: 14px 8px 14px 16px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.profile-chart-remove {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--figma-shadow);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.profile-chart-remove:disabled {
  opacity: .45;
  cursor: wait;
}

.profile-chart-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 8px;
}

.profile-chart-line h4,
.profile-chart-datetime,
.profile-chart-city {
  flex: 0 0 auto;
  white-space: nowrap;
}

.profile-chart-city {
  max-width: 100%;
}

.profile-chart-open:focus-visible,
.profile-chart-remove:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

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

.profile-chart-card p,
.profile-chart-card span {
  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:empty {
  display: none;
}

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

.profile-drawer-footer {
  display: grid;
  align-self: end;
  padding: 4px 16px max(8px, env(safe-area-inset-bottom));
  gap: 9px;
  background: transparent;
  box-shadow: none;
}

.profile-drawer-scroll > .profile-drawer-footer {
  margin-top: 10px;
  padding: 0;
}

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

.profile-preference-field {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: .88rem;
}

.profile-preference-field > span {
  padding-left: 4px;
}

.profile-preference-field select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 44px 0 16px;
  border: 0;
  border-radius: var(--corner-radius);
  color: var(--text);
  background: var(--surface-deep);
  box-shadow: var(--figma-deep-shadow);
  font: 500 .86rem/1.2 "Oswald", sans-serif;
}

.profile-preference-field .setting-picker {
  min-width: 0;
}

.profile-preference-field .setting-picker-trigger {
  min-height: 42px;
  padding: 0 16px;
  background: var(--raised-control-fill);
  box-shadow: var(--control-raised-shadow);
}

/* Карточка настроек профиля — вырез, а поля внутри неё объёмные. */
.profile-preference-field .setting-picker.is-open .setting-picker-trigger {
  background: var(--raised-control-fill);
  box-shadow: var(--control-raised-shadow);
}

.profile-preference-field .setting-picker-menu {
  background: var(--cut-control-fill);
  box-shadow: var(--control-inset-shadow);
}

.profile-preference-field .setting-picker-menu button.is-selected {
  color: var(--text);
  background: var(--raised-control-fill);
  box-shadow: var(--control-raised-shadow);
}

.profile-release {
  justify-self: end;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.1;
}

@media (max-width: 560px) {
  body.sun-global-menu-pinned .profile-drawer,
  body.sun-menu-pinned.sun-menu-compact .profile-drawer {
    width: calc(100vw - 58px);
  }

  .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-preference-field {
    grid-template-columns: 78px minmax(0, 1fr);
  }

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

@media (min-width: 761px) and (max-width: 1180px),
       (hover: none) and (pointer: coarse) and (min-width: 761px) and (max-width: 1366px) {
  .profile-drawer {
    width: min(390px, 74vw);
  }
}

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