@font-face {
  font-family: 'Astronomicon';
  src: url('AstrologyChart2/AstrologyChart2-master/assets/fonts/ttf/AstronomiconFonts_1.1/Astronomicon.ttf') format('truetype');
  font-display: block;
}

:root {
  color-scheme: dark;
  color: #eee;
  background: #070707;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; padding: 20px; }
h1, h2 { margin: 0 0 12px; }

.page { display: grid; gap: 20px; max-width: 1400px; margin: 0 auto; }
.hero { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.hero .meta { max-width: 760px; }
.layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: start; }
.left-column { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.panel { background: #111; border: 1px solid #252525; border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.panel label { display: flex; flex-direction: column; gap: 8px; margin-bottom: 0; font-size: 0.92rem; color: #ccc; }
.collapsible-panel > .panel-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.panel input[type=text], .panel input[type=date], .panel input[type=time], .panel textarea, .panel select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #333;
  background: #0f0f11;
  color: #eee;
}
.panel textarea { min-height: 140px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; resize: vertical; }
.grid { display: grid; gap: 10px; }
.form-grid { grid-template-columns: 1fr; }
.form-grid .wide { grid-column: span 1; }
.points-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.point-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid #222; border-radius: 14px; background: #101014; }
.point-row label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.95rem; color: #ccc; }
.point-row label:first-child { justify-self: start; }
.point-row input[type=number] { width: 100%; }
.point-row input[type=checkbox] { transform: scale(1.1); margin-right: 6px; }
.lahiri-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 4px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.26);
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.14), transparent 48%),
    linear-gradient(135deg, rgba(28, 24, 12, 0.98), rgba(14, 14, 18, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 22px rgba(0, 0, 0, 0.22);
  cursor: pointer;
}
.lahiri-toggle input[type=checkbox] {
  transform: scale(1.25);
  margin: 0;
  accent-color: #e2c15d;
}
.lahiri-toggle-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.lahiri-toggle-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #fff3cf;
  letter-spacing: 0.01em;
}
.lahiri-toggle-subtitle {
  font-size: 0.82rem;
  color: #c9c1ae;
  line-height: 1.35;
}
.lahiri-toggle-pill {
  align-self: start;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: rgba(212, 175, 55, 0.10);
  color: #f0d58b;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.lahiri-toggle.is-active,
.lahiri-toggle:has(input[type=checkbox]:checked) {
  border-color: rgba(94, 214, 255, 0.42);
  background:
    radial-gradient(circle at top left, rgba(94, 214, 255, 0.18), transparent 48%),
    linear-gradient(135deg, rgba(17, 24, 34, 0.99), rgba(10, 12, 18, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 26px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(94, 214, 255, 0.10);
}
.lahiri-toggle.is-active .lahiri-toggle-title,
.lahiri-toggle:has(input[type=checkbox]:checked) .lahiri-toggle-title {
  color: #e7f9ff;
}
.lahiri-toggle.is-active .lahiri-toggle-subtitle,
.lahiri-toggle:has(input[type=checkbox]:checked) .lahiri-toggle-subtitle {
  color: #bddfea;
}
.lahiri-toggle.is-active .lahiri-toggle-pill,
.lahiri-toggle:has(input[type=checkbox]:checked) .lahiri-toggle-pill {
  border-color: rgba(94, 214, 255, 0.38);
  background: rgba(94, 214, 255, 0.12);
  color: #d7fbff;
}
.tsarion-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 4px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.26);
  background:
    radial-gradient(circle at top left, rgba(255, 169, 77, 0.14), transparent 48%),
    linear-gradient(135deg, rgba(30, 21, 12, 0.98), rgba(14, 14, 18, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 22px rgba(0, 0, 0, 0.22);
  cursor: pointer;
}
.tsarion-toggle input[type=checkbox] {
  transform: scale(1.25);
  margin: 0;
  accent-color: #ffb24d;
}
.tsarion-toggle-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.tsarion-toggle-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #fff0d4;
  letter-spacing: 0.01em;
}
.tsarion-toggle-subtitle {
  font-size: 0.82rem;
  color: #c9c1ae;
  line-height: 1.35;
}
.tsarion-toggle-pill {
  align-self: start;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 178, 77, 0.28);
  background: rgba(255, 178, 77, 0.10);
  color: #ffd59b;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tsarion-toggle.is-active {
  border-color: rgba(255, 178, 77, 0.42);
  background:
    radial-gradient(circle at top left, rgba(255, 178, 77, 0.18), transparent 48%),
    linear-gradient(135deg, rgba(37, 24, 12, 0.99), rgba(10, 12, 18, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 26px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 178, 77, 0.10);
}
.tsarion-toggle.is-active .tsarion-toggle-title {
  color: #fff6e8;
}
.tsarion-toggle.is-active .tsarion-toggle-subtitle {
  color: #ead7bf;
}
.tsarion-toggle.is-active .tsarion-toggle-pill {
  border-color: rgba(255, 178, 77, 0.38);
  background: rgba(255, 178, 77, 0.12);
  color: #fff0cf;
}
.feature-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}
.feature-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.feature-toggle input[type=checkbox] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}
.feature-toggle-switch {
  position: relative;
  display: inline-block;
  flex: 0 0 42px;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.36);
  background:
    linear-gradient(180deg, rgba(9, 9, 11, 0.98), rgba(24, 21, 14, 0.98));
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.035);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.feature-toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff4ce, #d4af37 52%, #8d6d1f 100%);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.62),
    0 0 8px rgba(212, 175, 55, 0.16);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.feature-toggle input[type=checkbox]:checked + .feature-toggle-switch::after {
  transform: translateX(18px);
}
.feature-toggle:has(input[type=checkbox]:focus-visible) {
  outline: 2px solid rgba(244, 213, 108, 0.7);
  outline-offset: 3px;
}
.feature-toggle-copy,
.lahiri-toggle-copy,
.tsarion-toggle-copy {
  align-self: center;
  flex: 1 1 auto;
  min-width: 0;
}
.body-toggle-stack {
  display: grid;
  gap: 10px;
}
.body-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.24);
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.12), transparent 48%),
    linear-gradient(135deg, rgba(24, 22, 15, 0.98), rgba(13, 13, 17, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 10px 22px rgba(0, 0, 0, 0.20);
  cursor: pointer;
}
.feature-toggle-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #fff3cf;
  letter-spacing: 0.01em;
}
.feature-toggle-subtitle {
  font-size: 0.82rem;
  color: #c9c1ae;
  line-height: 1.35;
}
.feature-toggle-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.feature-toggle-pill {
  align-self: center;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.26);
  background: rgba(212, 175, 55, 0.10);
  color: #f0d58b;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.lahiri-toggle-pill,
.tsarion-toggle-pill {
  align-self: center;
  flex: 0 0 auto;
  margin-left: auto;
}
.body-toggle:has(input[type=checkbox]:checked) {
  border-color: rgba(212, 175, 55, 0.48);
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.20), transparent 48%),
    linear-gradient(135deg, rgba(35, 29, 13, 0.99), rgba(12, 12, 16, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 12px 26px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(212, 175, 55, 0.10);
}
.body-toggle:has(input[type=checkbox]:checked) .feature-toggle-title {
  color: #fff7df;
}
.body-toggle:has(input[type=checkbox]:checked) .feature-toggle-subtitle {
  color: #eadbbc;
}
.body-toggle:has(input[type=checkbox]:checked) .feature-toggle-pill,
.body-toggle:has(input[type=checkbox]:checked) .feature-toggle-switch {
  border-color: rgba(244, 213, 108, 0.44);
  background-color: rgba(212, 175, 55, 0.13);
}
.lahiri-toggle.is-active .feature-toggle-switch,
.lahiri-toggle:has(input[type=checkbox]:checked) .feature-toggle-switch {
  border-color: rgba(94, 214, 255, 0.46);
  background:
    linear-gradient(180deg, rgba(12, 31, 40, 0.98), rgba(8, 13, 19, 0.98));
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.62),
    0 0 12px rgba(94, 214, 255, 0.12);
}
.lahiri-toggle.is-active .feature-toggle-switch::after,
.lahiri-toggle:has(input[type=checkbox]:checked) .feature-toggle-switch::after {
  background:
    radial-gradient(circle at 35% 30%, #f4feff, #5ed6ff 52%, #1d7699 100%);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.58),
    0 0 10px rgba(94, 214, 255, 0.24);
}
.tsarion-toggle.is-active .feature-toggle-switch,
.tsarion-toggle:has(input[type=checkbox]:checked) .feature-toggle-switch {
  border-color: rgba(255, 178, 77, 0.46);
  background:
    linear-gradient(180deg, rgba(40, 25, 10, 0.98), rgba(16, 12, 8, 0.98));
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.62),
    0 0 12px rgba(255, 178, 77, 0.12);
}
.tsarion-toggle.is-active .feature-toggle-switch::after,
.tsarion-toggle:has(input[type=checkbox]:checked) .feature-toggle-switch::after {
  background:
    radial-gradient(circle at 35% 30%, #fff4df, #ffb24d 52%, #9d5a16 100%);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.58),
    0 0 10px rgba(255, 178, 77, 0.24);
}
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row label { margin-bottom: 0; flex: 1 1 400px; min-width: 0; }
.row button { flex: 0 0 auto; margin-top: 0; }
.actions { display: grid; gap: 10px; margin-top: 18px; }
.actions button { padding: 9px 14px; border: 1px solid #333; border-radius: 999px; cursor: pointer; background: #17171a; color: #eee; font-weight: 700; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease; }
.actions button:hover { transform: translateY(-1px); }
.quick-actions,
.utility-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.quick-actions button {
  background: #202024;
  border-color: #34343a;
  color: #ededed;
}
.utility-actions {
  padding-top: 2px;
}
.utility-actions button {
  padding: 7px 11px;
  background: transparent;
  border-color: #2d2d32;
  color: #aaa;
  font-size: 0.82rem;
  font-weight: 600;
}
#backend-render-btn {
  min-width: 240px;
  width: 100%;
  justify-self: stretch;
  padding: 13px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5d36a 0%, #d4af37 55%, #b98f12 100%);
  color: #111;
  box-shadow: 0 10px 24px rgba(212, 175, 55, 0.28);
  font-size: 1.04rem;
  letter-spacing: 0.01em;
  border: 1px solid rgba(255, 255, 255, 0.16);
}
#backend-render-btn:hover {
  background: linear-gradient(135deg, #ffe28d 0%, #e0bb4b 55%, #c69b19 100%);
  box-shadow: 0 14px 30px rgba(212, 175, 55, 0.36);
}
#backend-render-btn:active {
  transform: translateY(0);
}
.recent-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding: 10px 0; }
.recent-tabs button { padding: 8px 12px; border: 1px solid #333; border-radius: 12px; background: #131313; color: #eee; cursor: pointer; }
.recent-tabs button.active { border-color: #d4af37; background: #252525; }
.chart-box {
  position: relative;
  min-height: 700px;
  background:
    radial-gradient(circle at 50% 44%, rgba(212, 175, 55, 0.10), transparent 40%),
    linear-gradient(180deg, #101010 0%, #070707 100%);
  border: 0;
  border-radius: 20px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.42),
    0 0 0 6px rgba(212, 175, 55, 0.05);
  overflow: hidden;
}
.chart-box::before {
  content: none;
}
.chart-box::after {
  content: none;
}
.rotation-hint {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 92px;
  height: 50px;
  z-index: 4;
  pointer-events: none;
  color: rgba(236, 196, 92, 0.92);
  opacity: 0.82;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.5));
}
.rotation-hint svg {
  width: 100%;
  height: 100%;
  display: block;
}
.rotation-hint path {
  stroke: currentColor;
  fill: none;
}
.rotation-hint marker path {
  fill: currentColor;
}
.chart-box.grabbing { cursor: grabbing; }
.paper { position: relative; z-index: 1; transform-origin: center center; cursor: grab; touch-action: none; }
.paper svg {
  width: 100%;
  height: 100%;
  transform-origin: center center;
  filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.06));
  animation: chartFadeIn 0.45s ease both;
}
.paper svg text {
  cursor: help;
  transition: fill 0.18s ease, opacity 0.18s ease;
  text-rendering: geometricPrecision;
  shape-rendering: geometricPrecision;
}
.paper svg text:hover {
  opacity: 0.95;
}
.paper svg text.astrochart-label {
  paint-order: stroke fill;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.paper svg text.astro-zodiac-glyph,
.paper svg text.astro-point-glyph,
.paper svg text.astro-axis-glyph {
  stroke: rgba(52, 36, 9, 0.88);
  stroke-width: 1.2px;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.16))
    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.08))
    drop-shadow(0 0 3px rgba(0, 0, 0, 0.88));
}
.paper svg text.astro-zodiac-glyph {
  fill: #fff7e4;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.2))
    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.1))
    drop-shadow(0 0 3px rgba(0, 0, 0, 0.88));
}
.paper svg text.astro-point-glyph {
  fill: #fff0c8;
}
.paper svg text.astro-custom-point-glyph {
  fill: #fff0c8;
  stroke: rgba(52, 36, 9, 0.88);
  stroke-width: 1.05px;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.16))
    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.08))
    drop-shadow(0 0 3px rgba(0, 0, 0, 0.88));
}
.paper svg text.astro-overlap-glyph {
  fill: #ffd76f;
  stroke: rgba(52, 36, 9, 0.9);
  stroke-width: 1.15px;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.14))
    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.08))
    drop-shadow(0 0 4px rgba(0, 0, 0, 0.9));
}
.paper svg text.astro-reference-glyph {
  fill: #fff2bf;
  stroke: rgba(52, 36, 9, 0.9);
  stroke-width: 1.1px;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.14))
    drop-shadow(0 0 4px rgba(0, 0, 0, 0.92));
}
.paper svg text.astro-axis-glyph {
  fill: #e9d59b;
  stroke-width: 1px;
}
.paper svg .astro-axis-arrow-tail {
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.12))
    drop-shadow(0 0 4px rgba(0, 0, 0, 0.86));
}
.paper svg .astro-axis-arrow-feather {
  fill: none;
  stroke: #d4af37;
  stroke-width: 2.15px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.paper svg .astro-axis-arrow-feather-inner {
  stroke: #fff1b8;
  stroke-width: 1.2px;
}
.paper svg .astro-axis-arrow-tail:hover .astro-axis-arrow-feather {
  stroke: #f4d56c;
}
.paper svg text.astro-small-label,
.paper svg text.astro-house-label {
  stroke: rgba(4, 4, 4, 0.94);
  stroke-width: 1.35px;
  fill: #f6ecd1;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.08))
    drop-shadow(0 0 2px rgba(0, 0, 0, 0.9));
}
.paper svg text.astro-aspect-glyph {
  stroke: rgba(8, 5, 2, 0.78);
  stroke-width: 0.95px;
  fill: #f1ddb0;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
}
.paper svg .astro-aspect-connection {
  cursor: help;
}
.paper svg .astro-aspect-connection:hover .astro-aspect-line {
  opacity: 0.82;
  stroke-width: 4px;
}
.paper svg text.astro-zodiac-glyph:hover,
.paper svg text.astro-point-glyph:hover,
.paper svg text.astro-custom-point-glyph:hover,
.paper svg text.astro-overlap-glyph:hover,
.paper svg g[id^="overlap-sign-overlay-"]:hover > text.astro-overlap-glyph,
.paper svg g[id^="reference-marker-"]:hover > text.astro-reference-glyph,
.paper svg text.astro-axis-glyph:hover,
.paper svg text.astro-small-label:hover,
.paper svg text.astro-house-label:hover,
.paper svg text.astro-aspect-glyph:hover {
  stroke-width: 1.25px;
  opacity: 1;
}
.paper svg path.astro-sign-segment {
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 0.7px;
  stroke-linejoin: round;
  filter:
    brightness(1.04)
    saturate(0.94)
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.08))
    drop-shadow(0 0 3px rgba(0, 0, 0, 0.2));
}
.paper svg line {
  transition: stroke 0.18s ease, opacity 0.18s ease;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.paper svg line:hover {
  opacity: 0.85;
}
.paper svg circle[stroke="#333"] {
  fill: rgba(240, 217, 155, 0.12);
  stroke: #d4af37;
  stroke-width: 1.2px;
  filter:
    drop-shadow(0 0 2px rgba(0, 0, 0, 0.82))
    drop-shadow(0 0 4px rgba(212, 175, 55, 0.18));
}
@keyframes chartFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.angle-labels { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.angle-label {
  display: none;
  position: absolute;
  z-index: 11;
  color: #f4f4f4;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-shadow: 0 0 14px rgba(0,0,0,0.8);
  padding: 4px 8px;
  background: rgba(5,5,10,0.88);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  white-space: nowrap;
}
.angle-label.top { top: 8px; left: 50%; transform: translateX(-50%); }
.angle-label.right { right: 8px; top: 50%; transform: translateY(-50%); }
.angle-label.bottom { bottom: 8px; left: 50%; transform: translateX(-50%); }
.angle-label.left { left: 8px; top: 50%; transform: translateY(-50%); }
.chart-container {
  position: sticky;
  top: 12px;
  align-self: start;
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
  padding: 12px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(8,8,10,0.92), rgba(6,6,8,0.96));
}
.chart-tabs {
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 10px 12px;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(236, 196, 92, 0.08), transparent 22%, rgba(94, 214, 255, 0.08)),
    linear-gradient(180deg, rgba(18,18,23,0.96), rgba(9,9,13,0.96));
  border: 1px solid rgba(236, 196, 92, 0.18);
  border-radius: 14px;
  z-index: 20;
  backdrop-filter: none;
  width: 100%;
  align-self: stretch;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.time-machine-toolbar::before {
  content: '';
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d4af37, #5ed6ff, #d4af37);
  opacity: 0.8;
}
.chart-preset-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(150px, 0.9fr) minmax(120px, 0.7fr) minmax(240px, 1.6fr) auto auto auto;
  gap: 8px;
  align-items: end;
}
.chart-preset-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  font-size: 0.86rem;
  color: #d0d0d0;
}
.chart-preset-field span {
  letter-spacing: 0.01em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.chart-preset-field small { font-size: 0.74rem; color: #9ea3ab; }
.chart-preset-field input,
.chart-preset-field select,
.chart-preset-btn,
.chart-clear-btn {
  min-height: 40px;
}
.chart-preset-field input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(94, 214, 255, 0.18);
  background: #0c0d11;
  color: #eee;
  padding: 9px 10px;
}
.chart-preset-field select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(94, 214, 255, 0.18);
  background: #0c0d11;
  color: #eee;
  padding: 9px 10px;
}
.chart-preset-btn,
.chart-clear-btn {
  padding: 10px 14px;
  border: 1px solid #444;
  border-radius: 12px;
  background: linear-gradient(180deg, #242428, #18181d);
  color: #f0f0f0;
  cursor: pointer;
  font-weight: 700;
}
.chart-clear-btn {
  border-color: rgba(94, 214, 255, 0.28);
  background: linear-gradient(180deg, #182027, #11151a);
  color: #d9f5ff;
}
.chart-tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chart-toolbar-panel {
  position: relative;
  top: auto;
  max-height: none;
  overflow: visible;
  z-index: 1;
  width: 100%;
}
.chart-toolbar-panel > .panel-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chart-toolbar-panel .chart-preset-bar {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.chart-toolbar-panel .chart-preset-field-search {
  grid-column: 1 / -1;
}
.chart-toolbar-panel .chart-preset-btn,
.chart-toolbar-panel .chart-add-btn,
.chart-toolbar-panel .chart-clear-btn {
  width: 100%;
}
.chart-toolbar-panel .chart-tab-row {
  margin-top: 2px;
}
.chart-toolbar-panel summary h2 {
  margin-bottom: 0;
}
.chart-tab { padding: 10px 16px; border: 1px solid #333; border-radius: 12px; background: #131313; color: #eee; cursor: pointer; transition: transform .2s ease; }
.chart-tab:hover, .chart-add-btn:hover, .chart-clear-btn:hover { transform: translateY(-1px); }
.chart-tab.active { background: #d4af37; color: #070707; border-color: #d4af37; }
.chart-add-btn { padding: 10px 16px; border: 1px dashed #555; border-radius: 12px; background: #1b1b1f; color: #eee; cursor: pointer; }
.chart-legend {
  position: relative;
  right: auto;
  bottom: auto;
  left: auto;
  transform: none;
  width: 100%;
  max-width: none;
  margin: 10px 0 0;
  background: rgba(10,10,14,0.34);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 10px 10px 8px;
  color: #ddd;
  z-index: 1;
  box-shadow: none;
  max-height: none;
  overflow: visible;
  line-height: 1;
}
.chart-legend h4 { display: none; }
.chart-legend-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); justify-items: center; gap: 4px 6px; font-size: 0.75rem; }
.chart-legend-item { display: flex; align-items: center; justify-content: center; gap: 4px; color: #ddd; }
.chart-legend-item span { width: 9px; height: 9px; border-radius: 3px; display: inline-block; border: 1px solid rgba(255,255,255,0.08); }
.chart-overlap-key {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.chart-overlap-key-title {
  margin-bottom: 8px;
  color: #cfcfcf;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.chart-reference-title {
  margin-top: 10px;
}
.chart-overlap-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}
.chart-overlap-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ddd;
  font-size: 0.8rem;
  line-height: 1.2;
}
.chart-overlap-symbol {
  width: 1.1em;
  text-align: center;
  font-size: 1rem;
  line-height: 1;
  color: #f4f4f4;
  text-shadow: 0 0 10px rgba(0,0,0,0.65);
  flex: 0 0 auto;
}
.chart-overlap-swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.2) inset;
  flex: 0 0 auto;
}
.chart-reference-swatch {
  border-radius: 50%;
}
.chart-overlap-text strong { color: #f5f5f5; }
.chart-panel-empty { color: #aaa; font-size: 0.95rem; padding: 14px 18px; border: 1px dashed #2a2a2a; border-radius: 14px; margin-bottom: 14px; background: #09090d; }
.chart-panels { display: grid; gap: 2px; padding-top: 2px; }
.chart-panel { display: none; }
.chart-panel.active { display: block; }
.chart-panel .paper { width: 100%; min-height: 680px; background: transparent; border-radius: 14px; overflow: hidden; }
.chart-loading-state {
  min-height: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
  color: #f3e6c0;
  background:
    radial-gradient(circle at 50% 30%, rgba(212, 175, 55, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(20, 18, 16, 0.96), rgba(7, 7, 8, 0.98));
}
.chart-loading-title {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.chart-loading-subtitle {
  max-width: 340px;
  color: #cdbd92;
  font-size: 0.92rem;
  line-height: 1.45;
}
.chart-loading-bars {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.chart-loading-bars span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d4af37;
  opacity: 0.4;
  animation: chartLoadingPulse 1.2s infinite ease-in-out;
}
.chart-loading-bars span:nth-child(2) { animation-delay: 0.15s; }
.chart-loading-bars span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chartLoadingPulse {
  0%, 80%, 100% { transform: scale(0.75); opacity: 0.35; }
  40% { transform: scale(1); opacity: 1; }
}
.aspect-key { margin-top: 18px; }
.aspect-key-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.aspect-key-item { display: flex; align-items: center; gap: 10px; color: #ccc; font-size: 0.95rem; }
.aspect-swatch { width: 16px; height: 16px; border-radius: 5px; display: inline-block; border: 1px solid #333; }
.aspect-swatch.Conjunction { background: #ffcc66; }
.aspect-swatch.Opposition { background: #55aaff; }
.aspect-swatch.Trine { background: #66ff99; }
.aspect-swatch.Square { background: #ff6666; }
.aspect-swatch.Sextile { background: #88ccff; }
.aspect-swatch.Quincunx { background: #ff99cc; }
.aspect-swatch.Semisquare { background: #8b0000; }
.aspect-swatch.Sesquiquadrate { background: #d05d3f; }
.aspect-swatch.Semioctile,
.aspect-swatch.Sesquioctile,
.aspect-swatch.Quinsemioctile,
.aspect-swatch.Sepsemioctile { background: #d97c66; }
.aspect-swatch.Semisextile { background: #ffd700; }
.aspect-swatch.Quintile { background: #8a2be2; }
.aspect-swatch.Biquintile { background: #ff00ff; }
.aspect-swatch.Septile { background: #7c63ff; }
.aspect-swatch.Biseptile { background: #8f57ff; }
.aspect-swatch.Triseptile { background: #a54eff; }
.aspect-swatch.Novile { background: #35c0b5; }
.aspect-swatch.Binovile { background: #28a9c2; }
.aspect-swatch.Quadranovile { background: #46d0a7; }
.aspect-swatch.Undecile { background: #b47dff; }
.aspect-swatch.Biundecile { background: #c06dff; }
.aspect-swatch.Triundecile { background: #d35fff; }
.aspect-swatch.Quadundecile { background: #e055d4; }
.aspect-swatch.Quinundecile { background: #ff6ab3; }
.aspect-toggle-panel { margin-top: 0; padding: 0; background: transparent; border: 0; width: 100%; }
.aspect-toggle-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  overflow: visible;
  padding: 1px 0 4px;
}
.aspect-toggle-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: #f4f4f4;
  justify-content: flex-start;
  padding: 4px 8px;
  min-width: 0;
  border-radius: 9px;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--aspect-color, #777) 22%, rgba(255,255,255,0.04)),
    color-mix(in srgb, var(--aspect-color, #777) 12%, rgba(0,0,0,0.18)));
  border: 1px solid color-mix(in srgb, var(--aspect-color, #777) 72%, rgba(255,255,255,0.08));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 0 0 1px color-mix(in srgb, var(--aspect-color, #777) 18%, transparent);
  white-space: nowrap;
  line-height: 1;
}
.aspect-toggle-item input {
  transform: scale(0.82);
  margin: 0;
  width: 12px;
  height: 12px;
  accent-color: var(--aspect-color, #ffcc66);
}
.aspect-toggle-item:hover {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--aspect-color, #777) 30%, rgba(255,255,255,0.06)),
    color-mix(in srgb, var(--aspect-color, #777) 16%, rgba(0,0,0,0.14)));
}
.aspect-toggle-item .aspect-label-text { display: inline-block; max-width: 32px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aspect-controls-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  justify-content: flex-start;
  margin-top: 2px;
}
.aspect-controls-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.aspect-tolerance-control {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.85rem;
  color: #ccc;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  min-width: min(100%, 360px);
  width: min(100%, 420px);
}
.aspect-tolerance-control input[type='range'] { width: 100%; max-width: 420px; }
.aspect-controls-left .aspect-toggle-item {
  padding: 4px 8px;
  flex: 0 0 auto;
}
.aspect-controls-row .aspect-toggle-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
}
.aspect-controls-secondary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.aspect-controls-secondary .aspect-toggle-item { padding: 4px 8px; background: rgba(255,255,255,0.05); }
.notice { margin-top: 12px; color: #9aa; font-size: 0.94rem; line-height: 1.5; }
.status { margin-top: 12px; color: #a3ffa3; font-size: 0.94rem; min-height: 24px; }
.summary-block {
  width: 100%;
}
.summary-block h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  letter-spacing: 0.01em;
}
.summary-block .notice,
.summary-block .summary-list,
.summary-block .summary-table,
.summary-block .pattern-panel {
  margin-top: 10px;
}
.summary-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.summary-table th, .summary-table td { border: 1px solid #333; padding: 10px; text-align: left; }
.summary-table th { background: #161616; color: #ddd; }
.summary-table tr:nth-child(odd) { background: #0d0d0f; }
.summary-list { margin: 0; padding-left: 20px; color: #ccc; }
.summary-list li { margin-bottom: 6px; }
.aspect-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.aspect-stat {
  border: 1px solid #242424;
  border-radius: 12px;
  background: #101014;
  padding: 8px 10px;
}
.aspect-stat strong {
  display: block;
  color: #f4f4f4;
  font-size: 1.05rem;
  line-height: 1;
}
.aspect-stat span {
  color: #aeb0b8;
  font-size: 0.76rem;
}
.aspect-highlight-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.aspect-highlight-list h3 {
  margin: 0;
  font-size: 0.95rem;
}
.aspect-highlight-item {
  border: 1px solid #242424;
  border-radius: 12px;
  background: #101014;
  padding: 9px 10px;
}
.aspect-highlight-item p {
  margin: 4px 0 0;
  color: #bfc0c8;
  font-size: 0.84rem;
  line-height: 1.35;
}
.aspect-table-note {
  color: #9aa;
  font-size: 0.76rem;
  margin-top: 2px;
}
.aspect-strength {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.aspect-strength.exact { background: rgba(212, 175, 55, 0.18); color: #f3d777; }
.aspect-strength.tight { background: rgba(102, 255, 153, 0.14); color: #a8f0bd; }
.aspect-strength.wide { background: rgba(255, 255, 255, 0.08); color: #bbb; }
.balance-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-top: 10px;
}
.balance-chart {
  display: grid;
  grid-template-columns: minmax(112px, 150px) minmax(0, 1fr);
  grid-template-areas:
    "title title"
    "chart detail"
    "chart key";
  align-items: start;
  gap: 10px 14px;
  background: #101016;
  border: 1px solid #222;
  border-radius: 16px;
  padding: 14px;
}
.balance-chart-title {
  grid-area: title;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f4f4f4;
}
.balance-chart-svg {
  grid-area: chart;
  width: 100%;
  max-width: 150px;
  height: auto;
  overflow: visible;
  justify-self: center;
}
.balance-chart-detail {
  grid-area: detail;
  min-height: 84px;
  max-height: 84px;
  overflow-y: auto;
  color: #d0d0d0;
  font-size: 0.86rem;
  line-height: 1.42;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
}
.balance-slice-key {
  grid-area: key;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 0;
}
.balance-slice-key-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ccc;
  font-size: 0.82rem;
  line-height: 1.2;
  white-space: nowrap;
}
.balance-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid #313131; }
.balance-slice:hover { opacity: 0.85; cursor: pointer; }
#summary-patterns { margin-top: 14px; }
.pattern-panel { background: #101016; border: 1px solid #222; border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.pattern-panel h4 { margin: 0 0 8px; font-size: 0.95rem; color: #f2f2f2; }
.pattern-panel p { margin: 0 0 8px; color: #c7c7c7; font-size: 0.9rem; line-height: 1.45; }
.pattern-list { margin: 0; padding-left: 18px; color: #c7c7c7; }
.pattern-list li { margin-bottom: 4px; }
.pattern-digest {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.pattern-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  border: 1px solid #2a2a32;
  border-radius: 8px;
  background: #141419;
  padding: 10px;
}
.pattern-symbol {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #3a3424;
  border-radius: 8px;
  background: #191816;
  color: #d4af37;
  font-family: "Noto Sans Symbols 2", "Segoe UI Symbol", Astronomicon, sans-serif;
  font-size: 1.45rem;
  line-height: 1;
}
.pattern-card-body { min-width: 0; }
.pattern-card-title {
  color: #f4f4f4;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
}
.pattern-card-meta,
.pattern-card-score,
.pattern-card-field,
.pattern-card-mode,
.pattern-card-variants,
.pattern-card-recipe,
.pattern-card-runes,
.pattern-card-parts {
  color: #bdbdbd;
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.pattern-card-score { margin-top: 4px; color: #d2c7a8; }
.pattern-card-field { margin-top: 4px; color: #b8d7dd; }
.pattern-card-mode { margin-top: 4px; color: #e5bb87; text-transform: uppercase; letter-spacing: 0.04em; }
.pattern-card-variants { margin-top: 4px; color: #e2a7a7; }
.pattern-card-recipe { margin-top: 4px; color: #dbc7ef; }
.pattern-card-runes { margin-top: 4px; color: #c8ddb8; }
.pattern-card-parts { margin-top: 4px; color: #aaa; }
.pattern-detail-table,
.pattern-descriptions {
  margin-top: 12px;
  border: 1px solid #26262d;
  border-radius: 8px;
  background: #0d0d11;
  padding: 8px 10px;
}
.pattern-detail-table > summary,
.pattern-descriptions > summary {
  cursor: pointer;
  color: #e5e5e5;
  font-size: 0.88rem;
  font-weight: 700;
}
.pattern-table-scroll {
  max-height: 360px;
  overflow: auto;
  margin-top: 8px;
  border: 1px solid #222;
  border-radius: 8px;
}
.pattern-table-scroll .summary-table {
  min-width: 860px;
  margin-top: 0;
}
.pattern-table-scroll .summary-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.pattern-descriptions p { margin-top: 8px; }

details.collapsible-section,
details.summary-section {
  border: 1px solid #242424;
  border-radius: 16px;
  background: #0f0f12;
  padding: 14px 16px 16px;
}

details.collapsible-section:not([open]),
details.summary-section:not([open]) {
  opacity: 0.96;
}

details.collapsible-section + details.collapsible-section,
details.summary-section + details.summary-section {
  margin-top: 18px;
}

details.collapsible-section > summary,
details.summary-section > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

details.collapsible-section > summary::-webkit-details-marker,
details.summary-section > summary::-webkit-details-marker {
  display: none;
}

details.collapsible-section > summary::before,
details.summary-section > summary::before {
  content: "+";
  display: inline-block;
  color: #d4af37;
  font-size: 0.95rem;
  line-height: 1;
  width: 0.9em;
  text-align: center;
}

details.collapsible-section[open] > summary::before,
details.summary-section[open] > summary::before {
  content: "-";
}

details.collapsible-section:not([open]) > :not(summary),
details.summary-section:not([open]) > :not(summary) {
  display: none;
}

details.collapsible-section > summary h2,
details.collapsible-section > summary h3,
details.summary-section > summary h2,
details.summary-section > summary h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

details.collapsible-section > :not(summary),
details.summary-section > :not(summary) {
  margin-top: 14px;
}

details.collapsible-section[open],
details.summary-section[open] {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

@media (min-width: 1120px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid .wide { grid-column: span 2; }
  .layout { grid-template-columns: 1fr 1.3fr; }
}

@media (max-width: 1120px) {
  .layout { grid-template-columns: 1fr; }
  .chart-container { order: -1; }
  .left-column { order: 0; }
  .chart-preset-bar {
    grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 1fr) minmax(120px, 0.8fr);
  }
  .chart-container {
    position: relative;
    top: auto;
    max-height: none;
    overflow-y: visible;
  }
  .chart-preset-field:nth-of-type(4) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .chart-tabs { position: relative; top: auto; width: 100%; background: rgba(19,19,23,0.96); border: 1px solid #222; backdrop-filter: none; }
  .chart-preset-bar { grid-template-columns: 1fr; }
  .chart-panels { padding-top: 0; }
  .chart-container { margin-top: 0; }
  .chart-legend { position: relative; right: auto; bottom: auto; width: auto; margin-top: 8px; box-shadow: none; }
  .chart-overlap-list { grid-template-columns: 1fr; }
  .chart-box { min-height: 580px; padding: 14px; }
  .chart-panel .paper { min-height: 540px; }
  .rotation-hint {
    width: 80px;
    height: 42px;
    top: 12px;
    right: 12px;
  }
}

@media (max-width: 560px) {
  .feature-toggle-grid {
    grid-template-columns: 1fr;
  }
  .feature-toggle {
    align-items: flex-start;
  }
  .feature-toggle-pill,
  .lahiri-toggle-pill,
  .tsarion-toggle-pill {
    display: none;
  }
  .aspect-controls-left {
    justify-content: flex-start;
    gap: 8px;
  }
  .aspect-controls-row .aspect-toggle-list {
    width: 100%;
  }
  .aspect-tolerance-control {
    min-width: 100%;
  }
  .aspect-tolerance-control input[type='range'] {
    width: 100%;
  }
  .chart-container { margin-top: -4px; }
  .chart-box { min-height: 520px; padding: 12px; }
  .chart-panel .paper { min-height: 480px; }
  .balance-chart {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "chart"
      "detail"
      "key";
  }
  .balance-chart-svg {
    max-width: 180px;
  }
}




