/* Astrology birth-chart slideout — match CRM / calendar contact-card spacing */

#astro-chart-overlay.contact-overlay.admin-crm-add-overlay {
  z-index: 451;
}

#astro-chart-overlay .contact-panel.astro-slideout-panel {
  width: min(75vw, calc(100vw - 32px));
  max-width: min(75vw, calc(100vw - 32px));
}

#astro-chart-overlay .contact-panel__main.astro-slideout-main {
  overflow: hidden;
  gap: 10px;
}

.astro-slideout-form {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 0;
}

#astro-chart-overlay .astro-slideout-tabs {
  display: flex !important;
  flex-wrap: nowrap;
  flex-shrink: 0;
  align-items: flex-end;
  gap: 0 18px;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

#astro-chart-overlay .astro-slideout-tabs::-webkit-scrollbar {
  display: none;
}

#astro-chart-overlay .astro-slideout-tabs .crm-lead-tabs__btn {
  flex: 0 0 auto;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.5);
}

#astro-chart-overlay .astro-slideout-tabs .crm-lead-tabs__btn.is-active {
  color: var(--secondary-color, #e3dbcc);
}

.astro-slideout-tabpanels {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-top: 14px;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

#astro-chart-overlay .crm-lead-tabpanel.is-active {
  /* Details/chart/etc. size to content; Predictions overrides below */
  flex: 0 1 auto;
  min-height: 0;
  width: 100%;
}

#astro-chart-overlay #astro-tab-panel-predictions.is-active {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#astro-chart-overlay .contact-card {
  position: relative;
  overflow: visible;
  flex: 0 0 auto;
  height: auto;
  align-self: stretch;
}

#astro-chart-overlay .contact-card > .contact-field {
  padding: 0;
}

#astro-chart-overlay .contact-card .contact-input:not(.cal-time-select) {
  padding: 12px 16px;
}

.astro-suggest-field.is-open {
  position: relative;
  z-index: 40;
}

/* Combined date/time rows — format selector + inputs on one line */
.astro-combo-field {
  padding: 0 !important;
}

.astro-combo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 16px;
}

#astro-chart-overlay .astro-combo-fmt {
  flex: 1 1 200px;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  flex-grow: 1;
}

#astro-chart-overlay .astro-combo-row .cal-time-selects {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

#astro-chart-overlay .astro-combo-row .cal-time-select {
  width: 2.75rem;
  min-width: 2.75rem;
  max-width: 3.5rem;
  padding: 0;
  text-align: center;
  border: none;
  background: transparent;
}

#astro-chart-overlay .astro-combo-row .astro-year-input {
  width: 4.25rem;
  min-width: 4.25rem;
  max-width: 4.5rem;
}

#astro-chart-overlay .astro-combo-row .cal-time-select--ampm {
  width: auto;
  min-width: 3.25rem;
  max-width: none;
}

#astro-chart-overlay .contact-card > .contact-field::before {
  width: calc(100% - 32px);
  max-width: calc(100% - 32px);
  right: auto;
}

.astro-place-row {
  display: flex;
  align-items: center;
  padding: 10px 16px 6px;
}

.astro-suggest-field {
  position: relative;
}

.astro-suggest-input {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f5f203' stroke-width='2.25'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
}

/* Prefer accent token when host sets --cal-accent (Astroflick yellow, Digiknack pink) */
.af-body .astro-suggest-input,
.af-app .astro-suggest-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f5f203' stroke-width='2.25'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.astro-suggest-list {
  list-style: none;
  margin: 0;
  padding: 4px 8px 8px;
  position: absolute;
  left: 8px;
  right: 8px;
  top: 100%;
  z-index: 50;
  background: #141414;
  border: 1px solid rgba(227, 219, 204, 0.28);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  max-height: 220px;
  overflow: auto;
  display: block;
}

.astro-suggest-list[hidden] {
  display: none !important;
}

.astro-suggest-list__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  border-radius: 6px;
  padding: 10px 8px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.astro-suggest-list__btn:hover,
.astro-suggest-list__btn:focus-visible {
  background: color-mix(in srgb, var(--cal-accent, #f2133c) 14%, transparent);
}

.astro-suggest-list__tag {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(227, 219, 204, 0.45);
  flex-shrink: 0;
}

.astro-place-hint {
  margin: 0;
  padding: 0 16px 8px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(227, 219, 204, 0.55);
}

.astro-place-lookup-btn {
  padding-left: 0;
  margin: 0;
}

#astro-ampm[hidden] {
  display: none !important;
}

/* Predictions tab — CRM Research pattern */
#astro-tab-panel-predictions.is-active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.astro-predict-wrap {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  display: flex;
  margin-top: 0;
  overflow: hidden;
}

.astro-predict-shell {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
  border: none;
  background: transparent;
  padding: 0;
  overflow: hidden;
}

.astro-predict-shell.crm-research-shell.crm-email-ai {
  background: transparent;
  border-color: rgba(227, 219, 204, 0.14);
}

#astro-chart-overlay .astro-slideout-tabpanels:has(#astro-tab-panel-predictions.is-active) {
  overflow: hidden;
}

.astro-predict-body {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
  overflow: hidden;
}

.astro-predict-meta {
  margin: 0 0 8px;
  flex-shrink: 0;
}

.astro-predict-profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.astro-predict-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid rgba(227, 219, 204, 0.18);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  line-height: 1.3;
}

.astro-predict-chip--primary {
  border-color: color-mix(in srgb, var(--cal-accent, #f2133c) 35%, transparent);
}

.astro-predict-chip__tag {
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(227, 219, 204, 0.45);
  flex-shrink: 0;
}

.astro-predict-chip__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.astro-predict-chip__remove {
  border: 0;
  background: transparent;
  color: rgba(227, 219, 204, 0.55);
  cursor: pointer;
  padding: 0 2px;
  font-size: 14px;
  line-height: 1;
}

.astro-predict-chip__remove:hover {
  color: var(--secondary-color, #e3dbcc);
}

.astro-predict-profile-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 8px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(227, 219, 204, 0.14);
  background: rgba(0, 0, 0, 0.28);
}

.astro-predict-profile-picker[hidden] {
  display: none !important;
}

.astro-predict-profile-picker__hint {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(227, 219, 204, 0.55);
}

.astro-predict-profile-picker__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 180px;
  overflow: auto;
}

.astro-predict-profile-picker__empty {
  margin: 0;
  font-size: 12px;
  color: rgba(227, 219, 204, 0.5);
}

.astro-predict-profile-picker__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--cal-text, #e3dbcc);
  font-size: 13px;
}

.astro-predict-profile-picker__row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.astro-predict-profile-picker__check {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  accent-color: var(--cal-accent, #f2133c);
}

.astro-predict-profile-picker__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.astro-predict-profile-picker__apply {
  align-self: flex-end;
}

.astro-predict-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 80px;
  min-width: 0;
  max-width: 100%;
  max-height: none;
  margin: 0;
  /* Vertical only — wide Thinking / tables must not sidescroll the chat */
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-x: none;
}

.astro-predict-empty {
  margin: 0 0 8px;
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(227, 219, 204, 0.5);
}

.astro-predict-compose {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 8px;
}

.astro-predict-compose__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(227, 219, 204, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.astro-predict-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  max-height: 120px;
  margin: 0;
  padding: 10px 2px;
  border: none;
  background: transparent;
  color: var(--secondary-color, #e3dbcc);
  font: inherit;
  font-size: 15px;
  line-height: 20px;
  box-sizing: border-box;
  resize: none;
  outline: none;
}

.astro-predict-input::placeholder {
  color: rgba(227, 219, 204, 0.38);
}

.astro-predict-compose__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.astro-predict-add-wrap {
  position: relative;
}

.astro-predict-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--secondary-color, #e3dbcc);
  cursor: pointer;
}

.astro-predict-add:hover,
.astro-predict-add[aria-expanded='true'] {
  background: rgba(255, 255, 255, 0.06);
}

.astro-predict-add__icon,
.astro-predict-add svg.lucide {
  width: 20px;
  height: 20px;
  stroke: var(--secondary-color, #e3dbcc);
  color: var(--secondary-color, #e3dbcc);
}

.astro-predict-add-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 30;
  width: min(280px, calc(100vw - 48px));
  padding: 10px;
  border: 1px solid rgba(227, 219, 204, 0.16);
  border-radius: 12px;
  background: rgba(28, 26, 24, 0.96);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.astro-predict-add-menu[hidden] {
  display: none !important;
}

.astro-predict-add-menu__block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 2px 8px;
  border-bottom: 1px solid rgba(227, 219, 204, 0.1);
}

.astro-predict-add-menu__label {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(227, 219, 204, 0.45);
}

.astro-predict-add-menu__select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(227, 219, 204, 0.16);
  background: rgba(0, 0, 0, 0.25);
  color: var(--secondary-color, #e3dbcc);
  font: inherit;
  font-size: 13px;
}

.astro-predict-add-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--secondary-color, #e3dbcc);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.astro-predict-add-menu__item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.astro-predict-add-menu__item--danger {
  color: color-mix(in srgb, var(--cal-accent, #f2133c) 92%, transparent);
}

.astro-predict-add-menu__icon,
.astro-predict-add-menu__item svg.lucide {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.astro-predict-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: color-mix(in srgb, var(--cal-accent, #f2133c) 10%, transparent);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.astro-predict-send__icon,
.astro-predict-send svg.lucide {
  width: 18px;
  height: 18px;
  stroke: var(--secondary-color, #e3dbcc);
  color: var(--secondary-color, #e3dbcc);
}

.astro-predict-send svg.lucide path,
.astro-predict-send svg.lucide line,
.astro-predict-send svg.lucide polyline {
  stroke: var(--secondary-color, #e3dbcc);
}

.astro-predict-send:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.astro-predict-send.astro-predict-send--ready:not(:disabled) {
  background: var(--admin-nav-idle, #e3dbcc);
}

.astro-predict-send.astro-predict-send--ready:not(:disabled) .astro-predict-send__icon,
.astro-predict-send.astro-predict-send--ready:not(:disabled) svg.lucide,
.astro-predict-send.astro-predict-send--ready:not(:disabled) svg.lucide path,
.astro-predict-send.astro-predict-send--ready:not(:disabled) svg.lucide line,
.astro-predict-send.astro-predict-send--ready:not(:disabled) svg.lucide polyline {
  stroke: #2a241c;
  color: #2a241c;
}

.astro-predict-send:not(:disabled):active {
  transform: scale(0.96);
}

.astro-predict-quote-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--cal-accent, #f2133c) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--cal-accent, #f2133c) 22%, transparent);
}

.astro-predict-quote-bar[hidden] {
  display: none;
}

.astro-predict-quote-bar__label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.72);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.astro-predict-quote-bar__cancel {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--cal-accent, #f2133c);
  cursor: pointer;
}

.astro-predict-recall-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(227, 219, 204, 0.08);
  border: 1px solid rgba(227, 219, 204, 0.18);
}

.astro-predict-recall-bar[hidden] {
  display: none;
}

.astro-predict-recall-bar__label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.72);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.astro-predict-recall-bar__cancel {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--cal-accent, #f2133c);
  cursor: pointer;
}

.astro-predict-recall-card__intro {
  margin: 0 0 10px;
}

.astro-predict-recall-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.astro-predict-recall-picker__select {
  flex: 1 1 180px;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
  color: var(--cal-text, #e3dbcc);
  font-family: inherit;
  font-size: 0.82rem;
}

.astro-predict-recall-picker__btn {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(227, 219, 204, 0.35);
  background: #e3dbcc;
  color: #1a1a1a;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.astro-predict-recall-picker__btn:hover {
  filter: brightness(1.04);
}

.astro-predict-attach-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

.astro-predict-attach-chips[hidden] {
  display: none;
}

.astro-predict-attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 8px 4px 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.82);
}

.astro-predict-attach-chip__thumb {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.35);
}

.astro-predict-attach-chip i.astro-predict-attach-chip__thumb,
.astro-predict-attach-chip svg.astro-predict-attach-chip__thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  box-sizing: border-box;
  color: rgba(255, 255, 255, 0.7);
}

.astro-predict-attach-chip__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.astro-predict-attach-chip__remove {
  flex-shrink: 0;
  margin: 0;
  padding: 0 2px;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.astro-predict-attach-chip__remove:hover {
  color: var(--cal-accent, #f2133c);
}

.astro-predict-thread .astro-predict-user-attach {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

.astro-predict-thread .astro-predict-user-attach__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--cal-accent, #f2133c) 28%, transparent);
  background: color-mix(in srgb, var(--cal-accent, #f2133c) 8%, transparent);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.78);
}

.astro-predict-quote-popover {
  position: fixed;
  z-index: 12000;
  pointer-events: auto;
}

.astro-predict-quote-popover[hidden] {
  display: none;
}

.astro-predict-quote-popover__btn {
  margin: 0;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--cal-accent, #f2133c) 35%, transparent);
  border-radius: 999px;
  background: rgba(18, 18, 20, 0.96);
  color: var(--cal-text, #e3dbcc);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.astro-predict-quote-popover__btn:hover {
  border-color: color-mix(in srgb, var(--cal-accent, #f2133c) 55%, transparent);
  color: #fff;
}

.astro-predict-thread .crm-research-msg--user .astro-predict-user-quote {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-left: 3px solid var(--cal-accent, #f2133c);
  border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  line-height: 1.45;
}

.astro-predict-thread .crm-research-msg--user .astro-predict-user-text {
  margin: 0;
}

.astro-predict-msg {
  margin: 8px 0 0;
  min-height: 1.2em;
}

/* Predictions: user prompts left-aligned, tight vertical padding */
.astro-predict-thread .crm-research-msg--user {
  width: fit-content;
  max-width: min(92%, 34rem);
  min-width: 0;
  align-self: flex-start;
  padding: 4px 12px;
  min-height: 0;
  line-height: 1.35;
  border-radius: 8px 8px 8px 0; /* 8px on 3 corners; sharp bottom-left */
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid color-mix(in srgb, var(--cal-accent, #f2133c) 50%, transparent);
  color: var(--cal-text, #e8e4dc);
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* AI answer — no bubble fill; same L/R padding as prompts */
.astro-predict-thread .crm-research-msg--assistant {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-self: stretch;
  padding: 0 12px;
  min-height: 0;
  line-height: 1.45;
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  color: var(--cal-text, #e8e4dc);
  box-shadow: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Keep markdown / engine dumps inside the chat column */
.astro-predict-thread .admin-ai-md,
.astro-predict-thread .admin-ai-md *,
.astro-predict-thread .astro-predict-thought,
.astro-predict-thread .astro-predict-thought__body,
.astro-predict-thread .admin-ai-thought__body {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.astro-predict-thread .admin-ai-table-scroll,
.astro-predict-thread .admin-ai-md pre,
.astro-predict-thread .dk-mermaid-wrap,
.astro-predict-thread .astro-predict-code {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.astro-predict-thread .admin-ai-md table {
  width: 100%;
  max-width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
}

.astro-predict-thread .admin-ai-md th,
.astro-predict-thread .admin-ai-md td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.astro-predict-thread .crm-research-msg--assistant > .crm-research-msg__reply {
  margin: 0;
  padding: 0;
}

/* Leaked model <details> must never show Digiknack’s bordered Thinking card in chat */
.astro-predict-thread .astro-predict-chat details,
.astro-predict-thread .crm-research-msg__reply > details,
.astro-predict-thread .admin-ai-md > details:not(.astro-predict-thought) {
  display: none !important;
}

/* Thought accordion — sibling above AI output; closed = label only */
.astro-predict-thread > .astro-predict-thought.admin-ai-thought {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 2px 0 8px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--cal-accent, #f2133c);
}

.astro-predict-thread > .astro-predict-thought.admin-ai-thought[open] {
  width: 100%;
  max-width: 100%;
  background: transparent;
}

.astro-predict-thread > .astro-predict-thought > summary.astro-predict-thought__summary,
.astro-predict-thread > .astro-predict-thought > summary.admin-ai-thought__summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 12px;
  margin: 0;
  min-height: 0;
  line-height: 1.2;
  font-size: 0.75rem;
  color: var(--cal-accent, #f2133c);
  cursor: pointer;
  list-style: none;
}

.astro-predict-thread > .astro-predict-thought > summary::-webkit-details-marker,
.astro-predict-thread > .astro-predict-thought > summary::marker {
  display: none;
}

.astro-predict-thread > .astro-predict-thought .admin-ai-thought__icon,
.astro-predict-thread > .astro-predict-thought .admin-ai-thought__chevron {
  color: var(--cal-accent, #f2133c);
  width: 14px;
  height: 14px;
}

.astro-predict-thread > .astro-predict-thought .admin-ai-thought__icon svg,
.astro-predict-thread > .astro-predict-thought .admin-ai-thought__chevron svg {
  width: 14px;
  height: 14px;
  stroke: var(--cal-accent, #f2133c);
}

.astro-predict-thread > .astro-predict-thought .admin-ai-thought__chevron {
  transition: transform 0.15s ease;
}

.astro-predict-thread > .astro-predict-thought[open] .admin-ai-thought__chevron {
  transform: rotate(90deg);
}

.astro-predict-thread > .astro-predict-thought .admin-ai-thought__title,
.astro-predict-thread > .astro-predict-thought .admin-ai-thought__label {
  color: var(--cal-accent, #f2133c);
  font-size: 0.75rem;
  line-height: 1.2;
  font-weight: 400;
}

/* Open Thought body — on slideout; pushes AI output down */
.astro-predict-thread > .astro-predict-thought .astro-predict-thought__body,
.astro-predict-thread > .astro-predict-thought .admin-ai-thought__body {
  margin: 8px 0 4px;
  padding: 0 12px;
  background: transparent;
  border: none;
  border-radius: 0;
}

.astro-predict-thread > .astro-predict-thought--live {
  pointer-events: none;
}

.astro-predict-thread > .astro-predict-thought--live .admin-ai-thought__chevron {
  opacity: 0.85;
}

.astro-predict-thinking-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgba(227, 219, 204, 0.72);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.astro-predict-thinking {
  font-size: 0.8125rem;
  color: rgba(232, 228, 220, 0.55);
  margin-top: 4px;
}

.crm-research-msg__reply.admin-ai-md {
  white-space: normal;
}

.astro-predict-chat {
  min-width: 0;
}

.astro-predict-code {
  position: relative;
  margin: 0.85em 0;
}

.astro-predict-code > pre {
  margin: 0;
  padding-top: 36px;
}

.astro-predict-code__copy {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  appearance: none;
  border: 1px solid rgba(227, 219, 204, 0.18);
  border-radius: 7px;
  background: rgba(20, 20, 20, 0.92);
  color: rgba(227, 219, 204, 0.85);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 5px 10px;
  cursor: pointer;
  line-height: 1.2;
}

.astro-predict-code__copy:hover {
  color: #fff;
  border-color: color-mix(in srgb, var(--cal-accent, #f2133c) 45%, transparent);
  background: color-mix(in srgb, var(--cal-accent, #f2133c) 16%, transparent);
}

.astro-predict-code__copy.is-copied {
  color: #8fbf8a;
  border-color: rgba(143, 191, 138, 0.4);
}

.astro-details-hint {
  margin: 0 0 12px;
}

.astro-chart--slideout {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.astro-chart__empty {
  margin: 0;
  padding: 8px 0 4px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(227, 219, 204, 0.55);
}

.astro-chart__section-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(227, 219, 204, 0.55);
}

.astro-chart__meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.astro-chart__meta-row .astro-chart__meta {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.astro-chart-copy {
  flex-shrink: 0;
  font-size: 12px;
  padding: 4px 8px;
}

.astro-chart__meta {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(227, 219, 204, 0.55);
}

.astro-sade-sati-hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.45;
}

.astro-transit-hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.45;
}

.astro-transit-panel {
  margin-top: 12px;
}

.astro-dasha-panel {
  margin-bottom: 12px;
  padding: 14px 16px 16px;
  border: 1px solid rgba(227, 219, 204, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
}

.astro-sade-sati-panel {
  margin-top: 0;
}

.astro-dasha-panel__title {
  margin: 0 0 12px;
  padding: 0;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(227, 219, 204, 0.5);
}

.astro-dasha-dl {
  margin: 0;
  display: grid;
  gap: 8px;
}

.astro-dasha-dl__row {
  display: grid;
  grid-template-columns: minmax(10.5rem, 46%) minmax(0, 1fr);
  gap: 6px 14px;
  align-items: start;
  font-size: 13px;
  line-height: 1.45;
}

.astro-dasha-dl__row dt {
  margin: 0;
  color: rgba(227, 219, 204, 0.5);
  font-weight: 500;
  padding-right: 4px;
}

.astro-dasha-dl__row dd {
  margin: 0;
  color: var(--secondary-color, #e3dbcc);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.astro-chart__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.astro-summary-card {
  border: 1px solid rgba(227, 219, 204, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.15);
}

.astro-summary-card__label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(227, 219, 204, 0.45);
}

.astro-summary-card__value {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--secondary-color, #e3dbcc);
}

.astro-table-wrap {
  max-height: min(420px, 50vh);
  border-radius: 8px;
}

#astro-chart-overlay .admin-slideout-actions.astro-details-actions {
  margin-top: 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.astro-slideout-msg {
  flex: 1;
  margin: 0;
  min-width: 100px;
  text-align: left;
}

.admin-table--compact th,
.admin-table--compact td {
  font-size: 12px;
  padding: 8px 10px;
}

@media (max-width: 720px) {
  #astro-chart-overlay .contact-panel.astro-slideout-panel {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }

  #astro-chart-overlay .contact-panel__main.astro-slideout-main {
    gap: 8px;
  }

  #astro-chart-overlay .contact-title {
    font-size: clamp(1.35rem, 6vw, 1.75rem);
    line-height: 1.15;
  }

  #astro-chart-overlay .astro-slideout-tabs {
    gap: 0 14px;
    margin: 2px 0 0;
  }

  #astro-chart-overlay .astro-slideout-tabs .crm-lead-tabs__btn {
    padding: 10px 2px 12px;
    font-size: 12px;
  }

  /* Shorter tab labels so five tabs fit without wrapping */
  #astro-chart-overlay .astro-slideout-tabs .crm-lead-tabs__btn[data-short] {
    font-size: 0;
    line-height: 0;
  }

  #astro-chart-overlay .astro-slideout-tabs .crm-lead-tabs__btn[data-short]::after {
    content: attr(data-short);
    font-size: 12px;
    line-height: 1.2;
    letter-spacing: 0.02em;
  }

  #astro-chart-overlay .astro-slideout-tabpanels {
    padding-top: 10px;
    /* Block flow on Details — avoids flex children stretching the card */
    display: block;
  }

  #astro-chart-overlay .astro-slideout-tabpanels:has(#astro-tab-panel-predictions.is-active) {
    display: flex;
    flex-direction: column;
  }

  #astro-chart-overlay .astro-details-hint,
  #astro-chart-overlay .cal-slideout-hint {
    font-size: 12px;
    line-height: 1.4;
    margin: 0 0 10px;
  }

  #astro-chart-overlay .contact-card {
    border-color: rgba(227, 219, 204, 0.2);
  }

  /* Date / time: stack format above inputs, never stretch empty space */
  #astro-chart-overlay .astro-combo-row {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    padding: 12px 14px;
  }

  #astro-chart-overlay .astro-combo-fmt,
  #astro-chart-overlay .astro-combo-row .astro-combo-fmt {
    flex: 0 0 auto !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    width: 100%;
    max-width: none;
    align-self: stretch;
    font-size: 12px;
    line-height: 1.35;
    min-height: 0;
    height: auto;
    padding: 2px 28px 2px 0;
    color: rgba(227, 219, 204, 0.55);
  }

  #astro-chart-overlay .astro-combo-row .cal-time-selects {
    flex: 0 0 auto;
    width: 100%;
    justify-content: flex-start;
    gap: 6px 8px;
    margin: 0;
  }

  #astro-chart-overlay .astro-combo-row .cal-time-select {
    width: 2.85rem;
    min-width: 2.85rem;
    max-width: 3.5rem;
    min-height: 40px;
    font-size: 16px;
    flex: 0 0 auto;
  }

  #astro-chart-overlay .astro-combo-row .astro-year-input {
    width: 4.5rem;
    min-width: 4.5rem;
    max-width: 5rem;
  }

  #astro-chart-overlay .astro-combo-row .cal-time-select--ampm {
    width: auto;
    min-width: 3.5rem;
    max-width: none;
  }

  #astro-chart-overlay .contact-card .contact-input:not(.cal-time-select) {
    padding: 13px 14px;
    font-size: 16px;
  }

  #astro-chart-overlay .astro-coords-row .astro-coords-input {
    padding: 2px 0 0;
    font-size: 15px;
  }

  #astro-chart-overlay .astro-details-actions {
    padding: 14px 12px 18px;
    gap: 10px;
  }

  .astro-predict-shell {
    min-height: min(52vh, 420px);
  }

  .astro-predict-thread {
    max-height: min(42vh, 360px);
  }

  .astro-predict-compose__bar {
    gap: 8px;
  }

  .astro-predict-code__copy {
    top: 6px;
    right: 6px;
    padding: 6px 10px;
  }
}

@media (max-width: 520px) {
  .astro-chart__summary {
    grid-template-columns: 1fr;
  }

  #astro-chart-overlay .contact-panel.astro-slideout-panel {
    width: calc(100vw - 12px);
    max-width: calc(100vw - 12px);
  }

  .astro-dasha-dl__row {
    grid-template-columns: 1fr;
    gap: 2px 0;
    padding-bottom: 6px;
  }

  .astro-dasha-dl__row dd {
    text-align: left;
  }

  #astro-chart-overlay .astro-place-hint {
    font-size: 11px;
    line-height: 1.4;
    word-break: break-word;
  }

  /* Hint is redundant once fields are visible — reclaim vertical space */
  #astro-chart-overlay .astro-details-hint {
    display: none;
  }
}


/* House system toggle (whole sign / Placidus) */
.astro-hsys {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 10px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(227, 219, 204, 0.12);
}
.astro-hsys__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(227, 219, 204, 0.55);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.astro-hsys__btn:hover {
  color: rgba(227, 219, 204, 0.85);
}
.astro-hsys__btn.is-active {
  background: rgba(227, 219, 204, 0.12);
  color: var(--secondary-color, #e3dbcc);
}

/* Relocation suitability scores */
.astro-reloc-scores {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(227, 219, 204, 0.12);
  background: rgba(0, 0, 0, 0.18);
}
.astro-reloc-scores__overall {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 14px;
  margin-bottom: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(227, 219, 204, 0.14);
}
.astro-reloc-scores__place {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(232, 228, 220, 0.95);
  overflow-wrap: anywhere;
}
.astro-reloc-scores__overall-right {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
  flex: 0 0 auto;
}
.astro-reloc-scores__overall-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(227, 219, 204, 0.5);
}
.astro-reloc-scores__overall-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--secondary-color, #e3dbcc);
}
.astro-reloc-scores.is-good .astro-reloc-scores__overall-value { color: #8fbf8a; }
.astro-reloc-scores.is-mid .astro-reloc-scores__overall-value { color: #d2b56a; }
.astro-reloc-scores.is-low .astro-reloc-scores__overall-value { color: #d0887a; }
.astro-reloc-scores__overall-note {
  font-size: 13px;
  color: rgba(227, 219, 204, 0.65);
}
.astro-reloc-scores__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.astro-reloc-scores__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}
.astro-reloc-scores__name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(227, 219, 204, 0.9);
}
.astro-reloc-scores__pct {
  font-size: 13px;
  font-weight: 700;
  color: rgba(227, 219, 204, 0.85);
}
.astro-reloc-scores__factors {
  display: block;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(227, 219, 204, 0.55);
  margin: 0 0 4px;
  word-break: break-word;
}
.astro-reloc-scores__factors--part {
  margin: 2px 0 2px;
  color: rgba(227, 219, 204, 0.48);
}
.astro-reloc-scores__detail {
  display: block;
  font-size: 11px;
  color: rgba(227, 219, 204, 0.45);
  margin-bottom: 4px;
}
.astro-reloc-scores__bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(227, 219, 204, 0.1);
  overflow: hidden;
}
.astro-reloc-scores__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: rgba(227, 219, 204, 0.45);
  transition: width 0.25s ease;
}
.astro-reloc-scores__row.is-good .astro-reloc-scores__fill { background: #7faf7a; }
.astro-reloc-scores__row.is-mid .astro-reloc-scores__fill { background: #c9a85a; }
.astro-reloc-scores__row.is-low .astro-reloc-scores__fill { background: #c47a6c; }
.astro-reloc-scores__note {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: rgba(227, 219, 204, 0.4);
}
.astro-reloc-scores__hint {
  margin: 12px 0 0;
  font-size: 11px;
  color: rgba(227, 219, 204, 0.38);
}

.astro-houses-panel {
  margin-top: 0.75rem;
}

.astro-houses-hint {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(227, 219, 204, 0.45);
}

.astro-house-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 7.5rem;
}

.astro-house-meter__bar {
  flex: 1 1 auto;
  height: 6px;
  border-radius: 999px;
  background: rgba(227, 219, 204, 0.1);
  overflow: hidden;
}

.astro-house-meter__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.25s ease;
}

.astro-house-meter--power .astro-house-meter__fill {
  background: #5b6bc8;
}

.astro-house-meter--ease.is-ease-good .astro-house-meter__fill {
  background: #2a9d8f;
}

.astro-house-meter--ease.is-ease-mid .astro-house-meter__fill {
  background: #c9a85a;
}

.astro-house-meter--ease.is-ease-low .astro-house-meter__fill {
  background: #c47a6c;
}

.astro-house-meter__pct {
  flex: 0 0 auto;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: rgba(227, 219, 204, 0.72);
  min-width: 1.5rem;
  text-align: right;
}

.astro-reloc-section {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.65rem;
  /* Match Country / City input inset (contact-input padding-left: 16px) */
  padding: 12px 16px;
}
.astro-reloc-section:first-child {
  margin-top: 0;
}
.astro-reloc-section__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--secondary-color, #e3dbcc);
}
.astro-reloc-section__hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--admin-muted, #8a8a8a);
}
.astro-reloc-section > .contact-actions,
.astro-reloc-section__body {
  /* Align divider + fields with card edges like classic contact-card */
  margin-left: -16px;
  margin-right: -16px;
}
.astro-reloc-section > .contact-actions {
  padding-left: 16px;
  padding-right: 16px;
}
.astro-reloc-section > .contact-actions::before {
  left: 16px;
  right: 16px;
}
.astro-reloc-section__body > .contact-actions {
  padding-left: 16px;
  padding-right: 16px;
}
.astro-reloc-section__body > .contact-feedback {
  padding: 0 16px 8px;
}
.astro-reloc-focus {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.astro-reloc-focus__btn {
  margin: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--admin-border, #333) 85%, transparent);
  background: rgba(0, 0, 0, 0.22);
  color: var(--secondary-color, #e3dbcc);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.astro-reloc-focus__btn:hover,
.astro-reloc-focus__btn:focus-visible {
  border-color: color-mix(in srgb, var(--cal-accent, #f2133c) 45%, var(--admin-border, #333));
  outline: none;
}
.astro-reloc-focus__btn.is-active {
  border-color: color-mix(in srgb, var(--cal-accent, #f2133c) 55%, transparent);
  background: color-mix(in srgb, var(--cal-accent, #f2133c) 14%, transparent);
  color: #fff;
}
.astro-reloc-world-list {
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: min(42vh, 28rem);
  overflow: auto;
}
.astro-reloc-world-list[hidden] {
  display: none;
}
.astro-reloc-world-item {
  display: grid;
  grid-template-columns: 1.5rem 1fr auto;
  gap: 0.5rem 0.65rem;
  align-items: baseline;
  width: 100%;
  text-align: left;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--admin-border, #2a2a2a) 80%, transparent);
  background: color-mix(in srgb, var(--admin-surface, #141414) 92%, #1c1c1c);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.astro-reloc-world-item:hover,
.astro-reloc-world-item:focus-visible {
  border-color: color-mix(in srgb, var(--cal-accent, #f2133c) 45%, var(--admin-border, #333));
  outline: none;
}
.astro-reloc-world-item__rank {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--admin-muted, #8a8a8a);
}
.astro-reloc-world-item__place {
  font-size: 0.85rem;
  font-weight: 600;
}
.astro-reloc-world-item__meta {
  grid-column: 2 / -1;
  margin: 0;
  font-size: 0.7rem;
  color: var(--admin-muted, #8a8a8a);
}
.astro-reloc-world-item__explainer {
  grid-column: 2 / -1;
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: rgba(227, 219, 204, 0.7);
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.astro-reloc-world-item__pct {
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.astro-reloc-world-item.is-good .astro-reloc-world-item__pct { color: #8fbf8a; }
.astro-reloc-world-item.is-mid .astro-reloc-world-item__pct { color: #d2b56a; }
.astro-reloc-world-item.is-low .astro-reloc-world-item__pct { color: #d0887a; }

/* Relocation city reading (prose under tables) */
.astro-reloc-narrative {
  margin: 16px 0 4px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(227, 219, 204, 0.12);
  background: rgba(0, 0, 0, 0.16);
}
.astro-reloc-narrative__title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(227, 219, 204, 0.7);
}
.astro-reloc-narrative__body {
  display: grid;
  gap: 10px;
}
.astro-reloc-narrative__p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(227, 219, 204, 0.82);
}

.astro-reloc-scores__parts {
  list-style: none;
  margin: 10px 0 0;
  padding: 8px 0 0 10px;
  border-left: 2px solid rgba(227, 219, 204, 0.12);
  display: grid;
  gap: 8px;
}
.astro-reloc-scores__part-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.astro-reloc-scores__part-name {
  font-size: 12px;
  font-weight: 600;
  color: rgba(227, 219, 204, 0.8);
}
.astro-reloc-scores__part-pct {
  font-size: 12px;
  font-weight: 700;
  color: rgba(227, 219, 204, 0.75);
}
.astro-reloc-scores__part-detail {
  display: block;
  font-size: 10px;
  color: rgba(227, 219, 204, 0.4);
  margin: 1px 0 3px;
}
.astro-reloc-scores__bar--sm {
  height: 4px;
}

/* Relocation history tab */
.astro-history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
}
.astro-history-toolbar__meta {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--admin-muted, #8a8a8a);
}
.astro-history-empty {
  margin: 1rem 0;
  font-size: 0.9rem;
  color: var(--admin-muted, #8a8a8a);
}
.astro-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.astro-history-card {
  display: grid;
  gap: 0.45rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--admin-border, #2a2a2a) 80%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--admin-surface, #141414) 92%, #1c1c1c);
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.astro-history-card:hover,
.astro-history-card:focus-visible {
  border-color: color-mix(in srgb, var(--cal-accent, #f2133c) 45%, var(--admin-border, #333));
  outline: none;
}
.astro-history-card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.astro-history-card__place {
  font-weight: 600;
  font-size: 0.95rem;
}
.astro-history-card__overall {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}
.astro-history-card.is-good .astro-history-card__overall { color: #8fbf8a; }
.astro-history-card.is-mid .astro-history-card__overall { color: #d2b56a; }
.astro-history-card.is-low .astro-history-card__overall { color: #d0887a; }
.astro-history-card__meta {
  font-size: 0.75rem;
  color: var(--admin-muted, #8a8a8a);
}
.astro-history-card__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.astro-history-card__cat {
  font-size: 0.72rem;
  color: var(--admin-muted, #9a9a9a);
  font-variant-numeric: tabular-nums;
}
.astro-history-card__cat strong {
  color: inherit;
  font-weight: 600;
}
.astro-history-card__actions {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.15rem;
}
.astro-history-card__actions .dk-btn {
  font-size: 0.75rem;
}

.astro-history-row {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
}

.astro-history-row > .astro-history-card {
  flex: 1 1 auto;
  min-width: 0;
}

.astro-history-delete {
  flex: 0 0 auto;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--admin-border, #2a2a2a) 80%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--admin-surface, #141414) 92%, #1c1c1c);
  color: var(--admin-muted, #9a9a9a);
  cursor: pointer;
}

.astro-history-delete:hover,
.astro-history-delete:focus-visible {
  color: var(--cal-accent, #f2133c);
  border-color: color-mix(in srgb, var(--cal-accent, #f2133c) 45%, var(--admin-border, #333));
  outline: none;
}

.astro-history-delete__icon,
.astro-history-delete svg.lucide {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}



/* Chat style (Memories tab) */
.astro-style-card {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
}
.astro-style-card__head {
  display: grid;
  gap: 0.35rem;
}
.astro-style-card__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}
.astro-style-card__hint {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--admin-muted, #8a8a8a);
  line-height: 1.45;
}
.astro-style-rules {
  min-height: 5.5rem;
  resize: vertical;
}
.astro-style-examples {
  display: grid;
  gap: 0.85rem;
}
.astro-style-examples__label {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--admin-muted, #8a8a8a);
}
.astro-style-example {
  display: grid;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--admin-border, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}
.astro-style-ex-input {
  min-height: 2.6rem;
  resize: vertical;
}
.astro-style-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.astro-style-status {
  margin: 0;
  font-size: 0.75rem;
  color: var(--admin-muted, #8a8a8a);
}
.astro-style-status--ok {
  color: var(--admin-success, #6bcf8a);
}
.astro-memory-section-title {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

/* Memories tab */
.astro-memory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
}
.astro-memory-toolbar__meta {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--admin-muted, #8a8a8a);
}
.astro-memory-add {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1rem;
  padding: 0.85rem 0.9rem;
}
.astro-memory-input {
  width: 100%;
  min-height: 3.2rem;
  resize: vertical;
}
.astro-memory-add__actions {
  display: flex;
  justify-content: flex-end;
}
.astro-memory-empty {
  margin: 0.75rem 0 1rem;
  font-size: 0.9rem;
  color: var(--admin-muted, #8a8a8a);
}
.astro-memory-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.astro-memory-card {
  display: grid;
  gap: 0.4rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(227, 219, 204, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.astro-memory-card__top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.astro-memory-card__num {
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--cal-accent, #f2133c);
  flex-shrink: 0;
}
.astro-memory-card__source {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(227, 219, 204, 0.55);
}
.astro-memory-card__when {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--admin-muted, #8a8a8a);
}
.astro-memory-card__del {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(227, 219, 204, 0.45);
  cursor: pointer;
  padding: 2px;
  line-height: 0;
  border-radius: 6px;
}
.astro-memory-card__del:hover {
  color: var(--cal-accent, #f2133c);
  background: color-mix(in srgb, var(--cal-accent, #f2133c) 12%, transparent);
}
.astro-memory-card__del svg {
  width: 14px;
  height: 14px;
}
.astro-memory-card__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(232, 228, 220, 0.92);
}

/* Angle Lines tab */
.astro-lines-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
}
.astro-lines-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
  flex: 1 1 120px;
}
.astro-lines-filter__label {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(227, 219, 204, 0.55);
}
.astro-lines-meta {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: rgba(227, 219, 204, 0.65);
}
.astro-crossings-section {
  margin-top: 18px;
}
.astro-crossings-land {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
  font-size: 0.85rem;
  color: rgba(227, 219, 204, 0.75);
  cursor: pointer;
  user-select: none;
}
.astro-crossings-land input {
  accent-color: #c4a574;
}
.astro-career-hint {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: rgba(227, 219, 204, 0.7);
  line-height: 1.45;
}
.astro-career-places-title {
  margin: 16px 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(227, 219, 204, 0.85);
}
.astro-career-list {
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.astro-career-list__item {
  padding: 10px 12px;
  border: 1px solid rgba(227, 219, 204, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}
.astro-career-list__item.is-hot {
  border-color: rgba(196, 165, 116, 0.45);
}
.astro-career-list__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.astro-career-list__name {
  font-weight: 600;
  color: rgba(227, 219, 204, 0.95);
}
.astro-career-list__pct {
  font-variant-numeric: tabular-nums;
  color: rgba(227, 219, 204, 0.8);
  white-space: nowrap;
}
.astro-career-list__flavors,
.astro-career-list__meta {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: rgba(227, 219, 204, 0.6);
  line-height: 1.4;
}
.astro-career-list__explainer {
  margin: 8px 0 0;
  font-size: 0.84rem;
  color: rgba(227, 219, 204, 0.82);
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}
.astro-reloc-lines {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(227, 219, 204, 0.12);
}
.astro-reloc-lines__list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.astro-reloc-lines__item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  font-size: 0.86rem;
}
.astro-reloc-lines__planet {
  font-weight: 600;
  color: rgba(232, 228, 220, 0.95);
}
.astro-reloc-lines__meta {
  color: rgba(227, 219, 204, 0.65);
  text-align: right;
}

.astro-line-activation {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(227, 219, 204, 0.12);
}
.astro-line-activation__chip {
  margin: 8px 0 0;
  padding: 8px 10px;
  font-size: 0.86rem;
  color: rgba(227, 219, 204, 0.78);
  background: rgba(227, 219, 204, 0.06);
  border-radius: 6px;
}
.astro-line-activation__track-wrap {
  position: relative;
  margin-top: 12px;
}
.astro-line-activation__track {
  position: relative;
  display: flex;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(227, 219, 204, 0.08);
  border: 1px solid rgba(227, 219, 204, 0.12);
}
.astro-line-activation__seg {
  flex: none;
  height: 100%;
  min-width: 1px;
  cursor: default;
  transition: filter 0.12s ease;
}
.astro-line-activation__seg:hover,
.astro-line-activation__seg.is-focus {
  filter: brightness(1.18);
  outline: 1px solid rgba(232, 228, 220, 0.45);
  outline-offset: -1px;
  z-index: 1;
}
.astro-line-activation__seg.is-peak {
  box-shadow: inset 0 0 0 1px rgba(232, 228, 220, 0.55);
}
.astro-line-activation__seg.is-good { background: #7faf7a; }
.astro-line-activation__seg.is-mid { background: #c9a85a; }
.astro-line-activation__seg.is-low { background: #c47a6c; }
.astro-line-activation__seg.is-quiet {
  background: transparent;
  pointer-events: none;
}
.astro-line-activation__now {
  position: absolute;
  top: 0;
  bottom: 22px;
  width: 2px;
  margin-left: -1px;
  background: rgba(232, 228, 220, 0.95);
  box-shadow: 0 0 0 1px rgba(20, 18, 16, 0.35);
  pointer-events: none;
  z-index: 2;
}
.astro-line-activation__years {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.72rem;
  color: rgba(227, 219, 204, 0.55);
  letter-spacing: 0.02em;
}
.astro-line-activation__hover {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: rgba(227, 219, 204, 0.82);
  line-height: 1.4;
  min-height: 1.2em;
}

.astro-coords-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 0;
  margin: 0;
  border-top: 1px solid rgba(227, 219, 204, 0.18);
}
.astro-coords-field {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  min-width: 0;
  margin: 0;
  padding: 8px 14px 10px;
  border-left: 1px solid rgba(227, 219, 204, 0.12);
}
.astro-coords-field:first-child {
  border-left: none;
}
.astro-coords-field--tz {
  min-width: 0;
}
.astro-coords-label {
  display: block;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
  color: rgba(227, 219, 204, 0.5);
}
#astro-chart-overlay .astro-coords-row .astro-coords-input {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 2px 0 0;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left !important;
  color: var(--secondary-color, #e3dbcc);
}
#astro-chart-overlay .astro-coords-row .astro-coords-input--tz {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.9;
  cursor: default;
}
#astro-chart-overlay .astro-coords-row .astro-coords-input:focus,
#astro-chart-overlay .astro-coords-row .astro-coords-input:focus-visible {
  outline: none;
  box-shadow: none;
}
/* Hide number spinners — they blow out the compact row */
#astro-chart-overlay .astro-coords-row input[type='number'].astro-coords-input::-webkit-outer-spin-button,
#astro-chart-overlay .astro-coords-row input[type='number'].astro-coords-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#astro-chart-overlay .astro-coords-row input[type='number'].astro-coords-input {
  -moz-appearance: textfield;
  appearance: textfield;
}
.astro-coords-hint {
  margin: 0;
  padding: 8px 16px 10px;
  font-size: 0.75rem;
  line-height: 1.4;
  border-top: 1px solid rgba(227, 219, 204, 0.1);
  color: rgba(227, 219, 204, 0.5);
}

@media (max-width: 520px) {
  .astro-coords-row {
    grid-template-columns: 1fr 1fr;
  }
  .astro-coords-field--tz {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid rgba(227, 219, 204, 0.12);
  }
}
.astro-reloc-scores__blend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  margin: 10px 0 12px;
  font-size: 0.82rem;
  color: rgba(227, 219, 204, 0.7);
}
.astro-reloc-scores__blend strong {
  color: rgba(232, 228, 220, 0.95);
  font-weight: 600;
}
.astro-reloc-scores__blend-sep {
  opacity: 0.45;
}
.astro-reloc-scores__split {
  display: block;
  margin: 2px 0 4px;
  font-size: 0.75rem;
  color: rgba(227, 219, 204, 0.55);
}
.astro-reloc-scores__split--part {
  margin: 0 0 4px;
}
.astro-reloc-scores__line-factors {
  display: block;
  margin: 0 0 4px;
  font-size: 0.75rem;
  color: rgba(227, 219, 204, 0.5);
}

/* Angle Explainer tab */
.astro-angles-dl {
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 12px;
}
.astro-angles-dl__item {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(227, 219, 204, 0.12);
  background: rgba(0, 0, 0, 0.14);
}
.astro-angles-dl__item dt {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(232, 228, 220, 0.95);
}
.astro-angles-dl__full {
  font-weight: 500;
  color: rgba(227, 219, 204, 0.55);
}
.astro-angles-dl__item dd {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(227, 219, 204, 0.78);
}
.astro-angles-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(227, 219, 204, 0.1);
  background: rgba(0, 0, 0, 0.1);
}
.astro-angles-note__title {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(227, 219, 204, 0.55);
}
.astro-angles-note__body {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(227, 219, 204, 0.72);
}
.astro-angles-note__body strong {
  color: rgba(232, 228, 220, 0.9);
  font-weight: 600;
}
