/* ============================================================
   Astromantie Radix Widget - Scoped Styles
   All selectors prefixed with #astromantie-radix-widget
   except body-level overrides, #arm-tooltip, and #val-hint
   ============================================================ */

/* ---- Widget container (IS the .container) ---- */
#astromantie-radix-widget {
  font-family: 'Cinzel', 'Inter', -apple-system, sans-serif;
  color: var(--astro-text, #ffffff);
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 20px;
  background: var(--astro-bg, #0a0a1a);
  border-radius: 16px;
  border: 1px solid var(--astro-card-border, rgba(167,139,250,0.15));
}

/* ---- Heading ---- */
#astromantie-radix-widget h1 {
  font-family: 'Cinzel', serif;
  font-size: 32px;
  font-weight: 600;
  color: #e8c96a;
  text-align: center;
  margin: 0 0 4px;
  letter-spacing: 0.04em;
}

body.astro-light-theme #astromantie-radix-widget h1 {
  color: var(--astro-accent-dark, #a07c2a);
}

#astromantie-radix-widget .subtitle {
  text-align: center;
  color: var(--astro-text-mid, rgba(255,255,255,0.6));
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  margin: 0 0 28px;
  letter-spacing: 0.02em;
}

/* ---- Form ---- */
#astromantie-radix-widget .form-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}

#astromantie-radix-widget .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

#astromantie-radix-widget .form-row-date {
  grid-template-columns: 0.7fr 1fr 1fr;
}

#astromantie-radix-widget .form-row-place {
  grid-template-columns: 1fr 1fr 1fr;
}

#astromantie-radix-widget .form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
}

#astromantie-radix-widget .form-field label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #e8c96a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.astro-light-theme #astromantie-radix-widget .form-field label {
  color: var(--astro-accent-dark, #a07c2a);
}

#astromantie-radix-widget .form-field input,
#astromantie-radix-widget .form-field select {
  background: var(--astro-input-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--astro-card-border, rgba(167,139,250,0.15));
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--astro-text, #ffffff);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#astromantie-radix-widget .form-field input:focus,
#astromantie-radix-widget .form-field select:focus {
  border-color: var(--astro-gold, #e8c96a);
  box-shadow: 0 0 0 2px rgba(232,201,106,0.15);
}

#astromantie-radix-widget .form-hint {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--astro-text-mid, rgba(255,255,255,0.6));
  opacity: 0.7;
}

#astromantie-radix-widget .tz-info {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--astro-text-mid, rgba(255,255,255,0.6));
  margin-top: 2px;
}

/* ---- Required indicator ---- */
#astromantie-radix-widget .req {
  color: #e8c96a;
  margin-left: 0;
}

/* ---- Field error state ---- */
#astromantie-radix-widget .field-error input,
#astromantie-radix-widget .field-error .csel-display {
  border-color: #e74c3c !important;
  box-shadow: 0 0 0 2px rgba(231,76,60,0.2) !important;
}

/* ---- Validation hint ---- */
#val-hint {
  display: none;
  background: rgba(231,76,60,0.12);
  color: #e74c3c;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid rgba(231,76,60,0.2);
}

body.astro-light-theme #val-hint {
  background: rgba(231,76,60,0.08);
  border-color: rgba(231,76,60,0.15);
}

/* ---- Buttons ---- */
#astromantie-radix-widget .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  letter-spacing: 0.01em;
}

#astromantie-radix-widget .btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

#astromantie-radix-widget .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#astromantie-radix-widget .btn-gold {
  display: inline-block;
  width: 100%;
  padding: 16px 24px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 6px 30px rgba(124,58,237,0.3);
  font-family: 'Inter', sans-serif;
  transition: all 0.3s;
  line-height: 1.4;
  position: relative;
  overflow: hidden;
  text-align: center;
}

#astromantie-radix-widget .btn-gold:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 35px rgba(124,58,237,0.3);
}

body.astro-light-theme #astromantie-radix-widget .btn-gold {
  background: linear-gradient(135deg, #c9a84c, #dbb85c);
  box-shadow: 0 6px 30px rgba(169,132,42,0.3);
}

body.astro-light-theme #astromantie-radix-widget .btn-gold:hover:not(:disabled) {
  box-shadow: 0 8px 35px rgba(169,132,42,0.3);
}

#astromantie-radix-widget .btn-sm {
  font-size: 12px;
  padding: 8px 16px;
}

#astromantie-radix-widget .btn-outline {
  background: transparent;
  color: var(--astro-gold, #e8c96a);
  border: 1px solid var(--astro-card-border, rgba(167,139,250,0.15));
}

#astromantie-radix-widget .btn-outline:hover:not(:disabled) {
  background: rgba(232,201,106,0.06);
}

#astromantie-radix-widget .btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  justify-content: center;
}

/* ---- Place autocomplete ---- */
#astromantie-radix-widget .ac-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #0f0c23;
  border: 1px solid var(--astro-card-border, rgba(167,139,250,0.15));
  border-radius: 8px;
  overflow: hidden;
  z-index: 100;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  margin-top: 4px;
}

body.astro-light-theme #astromantie-radix-widget .ac-results {
  background: #ffffff;
}

#astromantie-radix-widget .ac-item {
  padding: 10px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--astro-text, #ffffff);
  cursor: pointer;
  border-bottom: 1px solid var(--astro-card-border, rgba(167,139,250,0.15));
  transition: background 0.15s;
}

#astromantie-radix-widget .ac-item:hover {
  background: rgba(232,201,106,0.08);
  color: var(--astro-gold, #e8c96a);
}

#astromantie-radix-widget .ac-item:last-child {
  border-bottom: none;
}

/* ---- Place input wrapper ---- */
#astromantie-radix-widget .place-wrap {
  position: relative;
}

/* ---- Custom select (csel) ---- */
#astromantie-radix-widget .csel {
  position: relative;
  user-select: none;
}

#astromantie-radix-widget .csel-display {
  background: #1a1a2e;
  border: 1px solid var(--astro-card-border, rgba(167,139,250,0.15));
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--astro-text, #ffffff);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.2s;
}

#astromantie-radix-widget .csel-display::after {
  content: '\25BC';
  font-size: 10px;
  opacity: 0.5;
  margin-left: 8px;
}

body.astro-light-theme #astromantie-radix-widget .csel-display {
  background: #F5F2EC;
  color: var(--astro-text, #2a2018);
  border-color: var(--astro-card-border, rgba(160,124,42,0.15));
}

#astromantie-radix-widget .csel-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1a1a2e;
  border: 1px solid var(--astro-card-border, rgba(167,139,250,0.15));
  border-radius: 8px;
  overflow: hidden;
  z-index: 200;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  margin-top: 4px;
}

body.astro-light-theme #astromantie-radix-widget .csel-list {
  background: #F5F2EC;
  border-color: var(--astro-card-border, rgba(160,124,42,0.15));
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

#astromantie-radix-widget .csel.open .csel-list {
  display: block;
}

#astromantie-radix-widget .csel-item {
  padding: 9px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--astro-text, #ffffff);
  cursor: pointer;
  border-bottom: 1px solid var(--astro-card-border, rgba(167,139,250,0.08));
  transition: background 0.15s;
}

body.astro-light-theme .csel-item {
  color: var(--astro-text, #2a2018);
  border-bottom-color: var(--astro-card-border, rgba(160,124,42,0.08));
}

#astromantie-radix-widget .csel-item:hover,
#astromantie-radix-widget .csel-item.selected {
  background: rgba(232,201,106,0.1);
  color: var(--astro-gold, #e8c96a);
}

body.astro-light-theme .csel-item:hover {
  background: rgba(201,168,76,0.1);
  color: var(--astro-gold, #c9a84c);
}

#astromantie-radix-widget .csel-item:last-child {
  border-bottom: none;
}

/* ---- Select separator ---- */
#astromantie-radix-widget .sel-sep {
  width: 100%;
  height: 1px;
  background: var(--astro-card-border, rgba(167,139,250,0.15));
  margin: 0;
}

/* ---- Date / Time row helpers ---- */
#astromantie-radix-widget .date-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

#astromantie-radix-widget .time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ---- Tab bar ---- */
#astromantie-radix-widget .tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--astro-card-border, rgba(167,139,250,0.15));
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

#astromantie-radix-widget .tab-btn {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--astro-text-mid, rgba(255,255,255,0.6));
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

#astromantie-radix-widget .tab-btn:hover {
  color: var(--astro-text, #ffffff);
}

#astromantie-radix-widget .tab-btn.active {
  color: var(--astro-gold, #e8c96a);
  border-bottom-color: var(--astro-gold, #e8c96a);
}

#astromantie-radix-widget .tab-content {
  display: none;
}

#astromantie-radix-widget .tab-content.active {
  display: block;
}

/* ---- Switcher row (Koch/Placidus) ---- */
#astromantie-radix-widget .switcher-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 6px 0;
}

#astromantie-radix-widget .switcher-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--astro-text-mid, rgba(255,255,255,0.6));
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#astromantie-radix-widget .pill-switch {
  display: flex;
  background: var(--astro-input-bg, rgba(255,255,255,0.04));
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--astro-card-border, rgba(167,139,250,0.15));
}

#astromantie-radix-widget .pill-switch button {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--astro-text-mid, rgba(255,255,255,0.6));
  background: none;
  border: none;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

#astromantie-radix-widget .pill-switch button.active {
  background: var(--astro-gold, #e8c96a);
  color: var(--astro-bg, #0a0a1a);
}

/* ---- Chart wrapper ---- */
#astromantie-radix-widget .chart-wrap {
  max-width: 600px;
  margin: 0 auto 20px;
  border-radius: 12px;
  overflow: hidden;
}

#astromantie-radix-widget .chart-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ---- Human-readable text ---- */
#astromantie-radix-widget .human-text {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--astro-text, #ffffff);
  white-space: pre-wrap;
  background: var(--astro-surface, rgba(255,255,255,0.03));
  border: 1px solid var(--astro-card-border, rgba(167,139,250,0.15));
  border-radius: 10px;
  padding: 16px 20px;
  max-height: 500px;
  overflow-y: auto;
  display: none;
}

/* ---- Raw text (technical) ---- */
#astromantie-radix-widget .raw-text {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #ffffff;
  white-space: pre-wrap;
  background: var(--astro-surface, rgba(255,255,255,0.03));
  border: 1px solid var(--astro-card-border, rgba(167,139,250,0.15));
  border-radius: 10px;
  padding: 16px 20px;
  max-height: 400px;
  overflow-y: auto;
}

/* ---- Transit text (no scroll, override human-text display:none) ---- */
#astromantie-radix-widget #transit-text {
  display: block;
  max-height: none;
  overflow: visible;
  height: auto;
}

/* ---- Transit date row ---- */
#astromantie-radix-widget .transit-date-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

#astromantie-radix-widget .transit-date-row .btn-gold {
  width: auto;
  padding: 8px 18px;
  font-size: 13px;
}

#astromantie-radix-widget .transit-date-row input {
  background: var(--astro-input-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--astro-card-border, rgba(167,139,250,0.15));
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--astro-text, #ffffff);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
}

/* ---- Result section ---- */
#astromantie-radix-widget #result-section {
  display: none;
  margin-top: 24px;
  animation: arm-fadeIn 0.5s ease;
}

@keyframes arm-fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Tooltip (outside widget, position:fixed) ---- */
#arm-tooltip {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  max-width: 300px;
  background: rgba(10, 10, 26, 0.95);
  border: 1px solid rgba(167, 139, 250, 0.2);
  color: #e8c96a;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

#arm-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

body.astro-light-theme #arm-tooltip {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #a07c2a;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* ---- Data box ---- */
#astromantie-radix-widget .data-box {
  margin-top: 24px;
  padding: 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(167,139,250,0.15);
  border-radius: 12px;
}

body.astro-light-theme #astromantie-radix-widget .data-box {
  background: #faf8f4;
  border: 1px solid rgba(0,0,0,0.1);
}

body.astro-light-theme #astromantie-radix-widget .human-text {
  color: #2a2018;
}

body.astro-light-theme #astromantie-radix-widget .raw-text {
  background: rgba(0,0,0,0.03);
  color: #2a2018;
  border: 1px solid rgba(0,0,0,0.08);
}

body.astro-light-theme #astromantie-radix-widget .tab-content {
  color: #2a2018;
}

body.astro-light-theme #astromantie-radix-widget .transit-date-row label {
  color: #2a2018;
}

body.astro-light-theme #astromantie-radix-widget #transit-date {
  background: #ffffff;
  color: #2a2018;
  border-color: rgba(0,0,0,0.1);
}

#astromantie-radix-widget #btn-copy-raw {
  margin-bottom: 12px;
  width: auto;
  display: inline-block;
}

/* ---- Subtitle credit ---- */
#astromantie-radix-widget .subtitle-credit {
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  margin: -22px 0 28px;
  letter-spacing: 0.02em;
}

#astromantie-radix-widget .subtitle-credit a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  pointer-events: auto;
  cursor: pointer;
}

#astromantie-radix-widget .subtitle-credit a:hover {
  text-decoration: underline;
}

body.astro-light-theme #astromantie-radix-widget .subtitle-credit {
  color: rgba(0,0,0,0.45);
}

body.astro-light-theme #astromantie-radix-widget .subtitle-credit a {
  color: rgba(0,0,0,0.45);
}

body.astro-light-theme #astromantie-radix-widget .subtitle-credit a:hover {
  text-decoration: underline;
}

/* ---- Intro text (SEO block above form) ---- */
#astromantie-radix-widget .intro-text {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
  text-align: center;
  margin: 0 0 24px;
  padding: 0;
  border: none;
  background: none;
  quotes: none;
  max-width: 100%;
}

#astromantie-radix-widget .intro-text::before,
#astromantie-radix-widget .intro-text::after {
  content: none !important;
  display: none !important;
}

#astromantie-radix-widget .intro-text p {
  margin: 0 0 10px;
  padding: 0;
  font-style: normal;
  color: inherit;
  border: none;
  background: none;
}

#astromantie-radix-widget .intro-text p:last-child {
  margin-bottom: 0;
}

body.astro-light-theme #astromantie-radix-widget .intro-text {
  color: rgba(30,30,50,0.65);
}

/* ---- Button shimmer ---- */
#astromantie-radix-widget .btn-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: ctaShimmer 3s linear infinite;
  pointer-events: none;
}

@keyframes ctaShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}

/* ---- PDF hide ---- */
#astromantie-radix-widget .pdf-hide {
  /* visible on screen, hidden during PDF/PNG export */
}

/* ---- Light mode: unified input backgrounds ---- */
body.astro-light-theme #astromantie-radix-widget .form-field input {
  background: #F5F2EC;
}

body.astro-light-theme #astromantie-radix-widget input[readonly] {
  background: #F5F2EC;
}

/* ---- CTA Section (below results) ---- */
#astromantie-radix-widget .arm-cta-wrap {
  margin-top: 40px;
  padding-top: 0;
}

#astromantie-radix-widget .arm-cta-box {
  padding: 44px 36px;
  border-radius: 22px;
  background: rgba(124,58,237,0.06);
  border: 1px solid rgba(124,58,237,0.12);
  text-align: center;
}

body.astro-light-theme #astromantie-radix-widget .arm-cta-box {
  background: rgba(201,168,76,0.04);
  border-color: rgba(201,168,76,0.12);
}

#astromantie-radix-widget .arm-cta-label {
  font-size: 10px;
  color: var(--astro-accent, #e8c96a);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 14px;
}

#astromantie-radix-widget .arm-cta-title {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  font-weight: 400;
  color: var(--astro-text, #ffffff);
  margin: 0 0 20px;
}

body.astro-light-theme #astromantie-radix-widget .arm-cta-title {
  color: var(--astro-text, #1a1a2e);
}

#astromantie-radix-widget .arm-cta-grad {
  font-weight: 500;
  background: var(--astro-title-gradient, linear-gradient(135deg, #e8c96a, #a78bfa));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

body.astro-light-theme #astromantie-radix-widget .arm-cta-grad {
  background: var(--astro-title-gradient, linear-gradient(135deg, #a07c2a, #7c5cbf));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

#astromantie-radix-widget .arm-cta-desc {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--astro-text-mid, rgba(255,255,255,0.6));
  margin: 0 0 28px;
  line-height: 1.7;
}

#astromantie-radix-widget .arm-cta-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 32px;
}

#astromantie-radix-widget .arm-cta-stat {
  text-align: center;
}

#astromantie-radix-widget .arm-cta-stat-num {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--astro-accent, #e8c96a);
}

body.astro-light-theme #astromantie-radix-widget .arm-cta-stat-num {
  color: var(--astro-accent-dark, #a07c2a);
}

#astromantie-radix-widget .arm-cta-stat-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--astro-text-dim, rgba(255,255,255,0.35));
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 4px;
}

#astromantie-radix-widget .arm-cta-btn {
  display: inline-block;
  padding: 15px 40px;
  border-radius: 50px;
  border: none;
  background: var(--astro-btn-gradient, linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%));
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 30px var(--astro-accent-glow, rgba(124,58,237,0.3));
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

#astromantie-radix-widget .arm-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 35px var(--astro-accent-glow, rgba(124,58,237,0.4));
}

body.astro-light-theme #astromantie-radix-widget .arm-cta-btn {
  background: var(--astro-btn-gradient, linear-gradient(135deg, #a07c2a 0%, #c9a84c 100%));
  box-shadow: 0 6px 30px rgba(160,124,42,0.25);
}

body.astro-light-theme #astromantie-radix-widget .arm-cta-btn:hover {
  box-shadow: 0 8px 35px rgba(160,124,42,0.35);
}

/* ---- Data tables mobile overflow ---- */
#astromantie-radix-widget .data-box > div {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 600px) {
  #astromantie-radix-widget {
    padding: 20px 14px;
  }

  #astromantie-radix-widget h1 {
    font-size: 24px;
  }

  #astromantie-radix-widget .form-row {
    grid-template-columns: 1fr;
  }

  #astromantie-radix-widget .form-row-date {
    grid-template-columns: 1fr;
  }

  #astromantie-radix-widget .form-row-place {
    grid-template-columns: 1fr;
  }

  #astromantie-radix-widget .date-row {
    grid-template-columns: 1fr 1fr 1fr;
  }

  #astromantie-radix-widget .tab-btn {
    font-size: 11px;
    padding: 8px 8px;
  }

  #astromantie-radix-widget .btn-row {
    flex-direction: column;
  }

  #astromantie-radix-widget .btn-row .btn {
    width: 100%;
  }

  #astromantie-radix-widget .arm-cta-box {
    padding: 32px 20px;
  }

  #astromantie-radix-widget .arm-cta-stats {
    gap: 24px;
  }

  #astromantie-radix-widget .arm-cta-title {
    font-size: 22px;
  }

  #astromantie-radix-widget .intro-text {
    font-size: 13px;
  }

  #astromantie-radix-widget .data-box {
    padding: 10px 6px;
  }

  /* Mobile: hide Placidus/Koch switcher on non-Radix tabs */
  #astromantie-radix-widget:not([data-active-tab="tab-chart"]) .switcher-row {
    display: none;
  }

  /* Mobile Auswertung tab: hide signatur, collapse all gaps above the table */
  #astromantie-radix-widget[data-active-tab="tab-auswertung"] .arm-signatur-section {
    display: none;
  }
  #astromantie-radix-widget[data-active-tab="tab-auswertung"] .arm-signatur-section + * {
    margin-top: 0 !important;
  }
  #astromantie-radix-widget[data-active-tab="tab-auswertung"] .data-box {
    margin-top: 0 !important;
    padding-top: 12px !important;
    border-top: none;
  }
}

@media (max-width: 420px) {
  #astromantie-radix-widget .date-row {
    grid-template-columns: 1fr 1fr;
  }

  #astromantie-radix-widget .switcher-row {
    margin-left: 0;
    margin-top: 4px;
  }
}

/* ════════════════════════════════════════════════════════════
   Profile-Save Controls (2026-05-06 Bug-Fix)
   Ersetzt den stillen Auto-Save durch expliziten Klick.
   ════════════════════════════════════════════════════════════ */
#astromantie-radix-widget .arm-profile-save-wrap {
  margin: 24px 0 0;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid rgba(232, 201, 106, 0.18);
  background: rgba(232, 201, 106, 0.04);
  text-align: center;
}
body.astro-light-theme #astromantie-radix-widget .arm-profile-save-wrap {
  border-color: rgba(160, 124, 42, 0.25);
  background: rgba(160, 124, 42, 0.05);
}
#astromantie-radix-widget .arm-profile-save-hint {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}
body.astro-light-theme #astromantie-radix-widget .arm-profile-save-hint {
  color: rgba(60, 50, 40, 0.7);
}
#astromantie-radix-widget .arm-profile-save-primary,
#astromantie-radix-widget .arm-profile-save-secondary {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 10px;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s;
}
#astromantie-radix-widget .arm-profile-save-primary {
  background: linear-gradient(135deg, #c9a84c, #e8c96a);
  color: #1a1226;
  box-shadow: 0 4px 18px rgba(232, 201, 106, 0.25);
}
#astromantie-radix-widget .arm-profile-save-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(232, 201, 106, 0.35);
}
#astromantie-radix-widget .arm-profile-save-secondary {
  background: transparent;
  color: var(--astro-gold, #e8c96a);
  border: 1px solid rgba(232, 201, 106, 0.4);
}
#astromantie-radix-widget .arm-profile-save-secondary:hover:not(:disabled) {
  background: rgba(232, 201, 106, 0.08);
  border-color: rgba(232, 201, 106, 0.65);
}
body.astro-light-theme #astromantie-radix-widget .arm-profile-save-secondary {
  color: #a07c2a;
  border-color: rgba(160, 124, 42, 0.4);
}
body.astro-light-theme #astromantie-radix-widget .arm-profile-save-secondary:hover:not(:disabled) {
  background: rgba(160, 124, 42, 0.08);
  border-color: rgba(160, 124, 42, 0.65);
}
#astromantie-radix-widget .arm-profile-save-primary:disabled,
#astromantie-radix-widget .arm-profile-save-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
#astromantie-radix-widget .arm-profile-save-success {
  margin: 0;
  font-size: 13px;
  color: #5fb87a;
}
#astromantie-radix-widget .arm-profile-save-error {
  margin: 0;
  font-size: 13px;
  color: #e74c3c;
}

/* ════════════════════════════════════════════════════════════
   Confirm-Modal: Profil-Überschreibung
   ════════════════════════════════════════════════════════════ */
.radix-confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(8, 6, 22, 0.75);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
body.astro-light-theme .radix-confirm-overlay {
  background: rgba(40, 30, 20, 0.55);
}
.radix-confirm-modal {
  background: #1a1226;
  border: 1px solid rgba(232, 201, 106, 0.3);
  border-radius: 14px;
  padding: 24px 26px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.5);
  color: #e6e8f0;
  font-family: 'Inter', sans-serif;
}
body.astro-light-theme .radix-confirm-modal {
  background: #faf6ee;
  color: #2a2018;
  border-color: rgba(160, 124, 42, 0.4);
}
.radix-confirm-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--astro-gold, #e8c96a);
}
body.astro-light-theme .radix-confirm-title { color: #a07c2a; }
.radix-confirm-body {
  font-size: 13px;
  line-height: 1.55;
}
.radix-confirm-body p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.8);
}
body.astro-light-theme .radix-confirm-body p {
  color: rgba(60, 50, 40, 0.85);
}
.radix-confirm-block {
  margin: 8px 0 14px;
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 3px solid rgba(232, 201, 106, 0.5);
  background: rgba(255, 255, 255, 0.03);
}
.radix-confirm-block-old { border-left-color: rgba(255, 255, 255, 0.25); }
.radix-confirm-block-new { border-left-color: var(--astro-gold, #e8c96a); }
body.astro-light-theme .radix-confirm-block { background: rgba(0, 0, 0, 0.04); }
body.astro-light-theme .radix-confirm-block-old { border-left-color: rgba(0, 0, 0, 0.2); }
body.astro-light-theme .radix-confirm-block-new { border-left-color: #a07c2a; }
.radix-confirm-label {
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
}
body.astro-light-theme .radix-confirm-label { color: rgba(60, 50, 40, 0.6); }
.radix-confirm-value {
  font-size: 13px;
  font-weight: 500;
  color: #e6e8f0;
}
body.astro-light-theme .radix-confirm-value { color: #2a2018; }
.radix-confirm-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 18px;
}
.radix-confirm-cancel,
.radix-confirm-confirm {
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.radix-confirm-cancel {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.radix-confirm-cancel:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
}
body.astro-light-theme .radix-confirm-cancel {
  color: rgba(60, 50, 40, 0.75);
  border-color: rgba(60, 50, 40, 0.25);
}
body.astro-light-theme .radix-confirm-cancel:hover {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(60, 50, 40, 0.95);
}
.radix-confirm-confirm {
  background: linear-gradient(135deg, #c9a84c, #e8c96a);
  color: #1a1226;
  box-shadow: 0 4px 14px rgba(232, 201, 106, 0.3);
}
.radix-confirm-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(232, 201, 106, 0.45);
}
