/* Inline profile chip (Slack-style) inside composer field */
.astro-ai-chat__inline-chip {
	display: inline-flex;
	align-items: stretch;
	vertical-align: middle;
	max-width: min(48%, 150px);
	margin: 0 0 0 4px;
	border-radius: 14px;
	border: 1px solid rgba(180, 67, 123, 0.3);
	background: linear-gradient(180deg, rgba(180, 67, 123, 0.14) 0%, rgba(180, 67, 123, 0.08) 100%);
	box-shadow: 0 1px 4px rgba(180, 67, 123, 0.1);
	overflow: hidden;
	user-select: none;
}
.astro-ai-chat__input-placeholder {
	color: #999;
	pointer-events: none;
	user-select: none;
	line-height: 1.45;
}
/* Legacy floated pill (widget fallback) */
.astro-ai-chat__profile-pill {
	display: none;
	position: absolute;
	top: 6px;
	right: 6px;
	left: auto;
	z-index: 2;
	align-items: stretch;
	max-width: min(48%, 150px);
	border-radius: 14px;
	border: 1px solid rgba(180, 67, 123, 0.3);
	background: linear-gradient(180deg, rgba(180, 67, 123, 0.14) 0%, rgba(180, 67, 123, 0.08) 100%);
	box-shadow: 0 1px 4px rgba(180, 67, 123, 0.1);
	overflow: hidden;
	pointer-events: auto;
}
.astro-ai-chat__input-wrap.has-profile-chip .astro-ai-chat__profile-pill {
	display: inline-flex;
}
.astro-ai-chat__profile-chip {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	flex: 1 1 auto;
	min-width: 0;
	padding: 4px 4px 4px 8px;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	cursor: pointer;
	font-family: inherit;
	transition: background 0.15s;
}
.astro-ai-chat__profile-chip:hover,
.astro-ai-chat__profile-chip:focus-visible {
	background: rgba(180, 67, 123, 0.12);
	outline: none;
}
.astro-ai-chat__profile-chip-at {
	display: none;
}
.astro-ai-chat__profile-chip-name {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 12px;
	font-weight: 700;
	color: #b4437b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.astro-ai-chat__profile-chip-close {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	align-self: stretch;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #999;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	font-family: inherit;
	transition: color 0.15s, background 0.15s;
}
.astro-ai-chat__profile-chip-close:hover,
.astro-ai-chat__profile-chip-close:focus-visible {
	color: #b4437b;
	background: rgba(180, 67, 123, 0.12);
	outline: none;
}
.astro-ai-chat__at-btn {
	position: relative;
}
.astro-ai-chat__at-btn::after {
	content: attr(data-tooltip);
	position: absolute;
	bottom: calc(100% + 6px);
	right: 50%;
	transform: translateX(50%);
	background: #222;
	color: #fff;
	font-size: 12px;
	font-weight: 400;
	white-space: nowrap;
	padding: 4px 8px;
	border-radius: 6px;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.15s;
	z-index: 10;
	direction: rtl;
}
.astro-ai-chat__at-btn:hover::after,
.astro-ai-chat__at-btn:focus-visible::after {
	opacity: 1;
}
.astro-ai-chat__mention {
	position: absolute;
	right: 0;
	left: 0;
	bottom: calc(100% + 4px);
	margin: 0;
	z-index: 6;
}
.astro-ai-chat__mention-list {
	list-style: none;
	margin: 0;
	padding: 4px;
	max-height: 240px;
	overflow-y: auto;
	border: 1px solid #dcdce8;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 8px 22px rgba(42, 99, 199, 0.12);
}
.astro-ai-chat__mention-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 8px 10px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #222;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	text-align: right;
	cursor: pointer;
}
.astro-ai-chat__mention-item-name {
	flex: 0 0 auto;
	color: #222;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
}
.astro-ai-chat__mention-item-details {
	flex: 1 1 auto;
	min-width: 0;
	color: #999;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: left;
	direction: ltr;
}
.astro-ai-chat__mention-item.is-active,
.astro-ai-chat__mention-item:hover,
.astro-ai-chat__mention-item:focus-visible {
	background: rgba(53, 155, 220, 0.1);
	color: #359bdc;
	outline: none;
}
.astro-ai-chat__mention-item.is-active .astro-ai-chat__mention-item-name,
.astro-ai-chat__mention-item:hover .astro-ai-chat__mention-item-name,
.astro-ai-chat__mention-item:focus-visible .astro-ai-chat__mention-item-name {
	color: #359bdc;
}

.astro-report-cover {
	position:relative;
	overflow:hidden;
	margin:0 0 18px 0;
	border-radius:14px;
	min-height:180px;
	color:#fff;
}
.astro-report-cover__bg {
	position:absolute;
	inset:0;
	background:linear-gradient(135deg,#1f4f9a 0%,#6b4bb2 45%,#b4437b 100%);
	background-size:cover;
	background-position:center center;
	background-repeat:no-repeat;
}
.astro-report-cover__inner { position:relative; z-index:1; padding:28px 24px; }
.astro-report-cover__brand { margin:0 0 8px 0; font-size:13px; letter-spacing:.04em; opacity:.9; }
.astro-report-cover__name { margin:0 0 8px 0; font-size:28px; line-height:1.2; }
.astro-report-cover__person,.astro-report-cover__date { margin:0; font-size:15px; opacity:.95; }

/* Sample preview / modal header — photo cover (same assets as catalog) */
.astro-sample-report-view__header--photo {
	position:relative;
	overflow:hidden;
	border-top:none;
	color:#fff;
	background-size:cover;
	background-position:center center;
	background-repeat:no-repeat;
}
.astro-sample-report-view__header--photo h2 {
	margin:0 0 14px;
	color:#fff !important;
	text-shadow:0 1px 6px rgba(0,0,0,.45);
}
.astro-sample-report-view__header--photo .astro-sample-report-view__badge {
	margin:0 0 8px;
	background:rgba(255,255,255,.92);
}
.astro-sample-report-view__header--photo .astro-sample-report-view__meta {
	margin:0;
}
.astro-sample-report-view__header--photo::before {
	content:'';
	position:absolute;
	inset:0;
	z-index:0;
	background:linear-gradient(
		180deg,
		rgba(12,4,28,.72) 0%,
		rgba(12,4,28,.38) 40%,
		rgba(12,4,28,.15) 65%,
		rgba(12,4,28,.5) 100%
	);
}
.astro-sample-report-view__header--photo > * {
	position:relative;
	z-index:1;
}
.astro-sample-report-view__header--photo .astro-sample-report-view__meta strong,
.astro-sample-report-view__header--photo .astro-sample-report-view__meta span {
	background:rgba(255,255,255,.88);
	border-color:rgba(255,255,255,.55);
}

.astro-report-takeaways {
	margin:0 0 18px 0;
	padding:16px 18px;
	border:1px solid #dce8f6;
	border-radius:12px;
	background:#f8fbff;
}
.astro-report-takeaways__title { margin:0 0 10px 0; color:#2a63c7; font-size:20px; }
.astro-report-takeaways__list { margin:0; padding:0 18px 0 0; line-height:1.55; }
.astro-report-takeaways__list li { margin:0 0 8px 0; }
.astro-report-planets-wrap { margin:0 0 18px 0; }
.astro-report-planets-wrap__title { margin:0 0 10px 0; color:#2a63c7; font-size:20px; }
.astro-report-planets__table { width:100%; border-collapse:collapse; font-size:14px; }
.astro-report-planets__table th,.astro-report-planets__table td { border:1px solid #e5ebf5; padding:8px 10px; text-align:right; }
.astro-report-planets__table th { background:#f3f8fd; color:#2a63c7; }

/* /ai-chat — overrides after responsive CSS (main-mini-*.css load after style.css) */
body.astro-ai-chat-page-mode #content,
body.astro-ai-chat-page-mode #content .box1,
body.astro-ai-chat-page-mode #content .box1 .wrapper {
	padding: 0 !important;
	margin: 0 !important;
	min-height: 0 !important;
}
body.astro-ai-chat-page-mode .astro-ai-chat-page-col2 {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

/* /ai-chat — ensure internal scroll wins over later theme CSS */
body.astro-ai-chat-page-mode .astro-ai-chat__panel,
.astro-ai-chat.astro-ai-chat--page .astro-ai-chat__panel {
	display: flex !important;
	flex-direction: column !important;
	height: var(--astro-chat-panel-h, calc(100dvh - var(--astro-chat-top, 72px))) !important;
	max-height: var(--astro-chat-panel-h, calc(100dvh - var(--astro-chat-top, 72px))) !important;
	min-height: 0 !important;
	overflow: hidden !important;
}
body.astro-ai-chat-page-mode .astro-ai-chat__messages,
.astro-ai-chat.astro-ai-chat--page .astro-ai-chat__messages {
	flex: 1 1 auto !important;
	min-height: 0 !important;
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch;
}

/* Mobile /ai-chat — pin panel to viewport below site header (fixes cut-off bottom) */
@media (max-width: 700px) {
	body.astro-ai-chat-page-mobile-shell {
		overflow: hidden;
	}
	body.astro-ai-chat-page-mobile-shell .mainfoot,
	body.astro-ai-chat-page-mobile-shell #footer {
		display: none;
	}
	body.astro-ai-chat-page-mobile-shell .astro-ai-chat-page__mount {
		min-height: var(--astro-chat-panel-h, 50vh);
	}
	body.astro-ai-chat-page-mobile-shell .astro-ai-chat__panel,
	body.astro-ai-chat-page-mobile-shell .astro-ai-chat.astro-ai-chat--page .astro-ai-chat__panel {
		position: fixed !important;
		top: var(--astro-chat-top, 0px) !important;
		right: 0 !important;
		left: 0 !important;
		bottom: var(--astro-chat-bottom, 0px) !important;
		width: 100% !important;
		height: auto !important;
		max-height: none !important;
		min-height: 0 !important;
		margin: 0 !important;
		border-radius: 0 !important;
		border-left: 0 !important;
		border-right: 0 !important;
		border-bottom: 0 !important;
		z-index: 150;
	}
	body.astro-ai-chat-page-mobile-shell .astro-ai-chat__form {
		padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
	}
}

/* /ai-chat — thread sidebar (history, new chat, soft delete) */
.astro-ai-chat__threads-toggle,
.astro-ai-chat__new-thread {
	border: 1px solid #dcdce8;
	background: #fff;
	color: #222;
	border-radius: 8px;
	cursor: pointer;
	font-family: inherit;
}
body.astro-ai-chat-page-mode .astro-ai-chat__header-brand .astro-ai-chat__threads-toggle,
.astro-ai-chat.astro-ai-chat--page .astro-ai-chat__header-brand .astro-ai-chat__threads-toggle {
	flex: 0 0 36px;
	order: -1;
}
.astro-ai-chat__threads-toggle {
	width: 36px;
	height: 36px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.astro-ai-chat__threads-toggle-icon,
.astro-ai-chat__threads-toggle-icon::before,
.astro-ai-chat__threads-toggle-icon::after {
	display: block;
	width: 16px;
	height: 2px;
	background: #555;
	border-radius: 1px;
	position: relative;
}
.astro-ai-chat__threads-toggle-icon::before,
.astro-ai-chat__threads-toggle-icon::after {
	content: "";
	position: absolute;
	left: 0;
}
.astro-ai-chat__threads-toggle-icon::before { top: -5px; }
.astro-ai-chat__threads-toggle-icon::after { top: 5px; }
.astro-ai-chat__threads-toggle:hover,
.astro-ai-chat__threads-toggle:focus-visible,
.astro-ai-chat__new-thread:hover,
.astro-ai-chat__new-thread:focus-visible {
	border-color: #b4437b;
	color: #b4437b;
}
.astro-ai-chat__new-thread {
	height: 36px;
	padding: 0 12px;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.astro-ai-chat__new-thread-icon {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
}
.astro-ai-chat__page-layout {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: row;
	position: relative;
	overflow: hidden;
}
.astro-ai-chat__main {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
}
.astro-ai-chat__threads-drawer {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(300px, 88vw);
	z-index: 20;
	background: #fff;
	border-left: 1px solid #dcdce8;
	box-shadow: -4px 0 18px rgba(0, 0, 0, 0.08);
	display: flex;
	flex-direction: column;
	direction: rtl;
	transform: translateX(100%);
	transition: transform 0.22s ease;
}
.astro-ai-chat--threads-open .astro-ai-chat__threads-drawer:not([hidden]) {
	transform: translateX(0);
}
.astro-ai-chat__threads-drawer[hidden] {
	display: none !important;
	transform: translateX(100%);
}
.astro-ai-chat__threads-backdrop {
	position: absolute;
	inset: 0;
	z-index: 15;
	background: rgba(0, 0, 0, 0.28);
}
.astro-ai-chat__threads-backdrop[hidden] {
	display: none !important;
}
.astro-ai-chat__threads-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	border-bottom: 1px solid #dcdce8;
	color: #222;
}
.astro-ai-chat__threads-head strong {
	font-size: 15px;
}
.astro-ai-chat__threads-close {
	border: 0;
	background: transparent;
	color: #666;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
}
.astro-ai-chat__threads-list {
	list-style: none;
	margin: 0;
	padding: 8px;
	overflow-y: auto;
	flex: 1 1 auto;
	min-height: 0;
}
.astro-ai-chat__threads-item {
	display: block;
	margin-bottom: 6px;
	position: relative;
}
.astro-ai-chat__threads-link {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	width: 100%;
	padding: 10px 12px 10px 40px;
	border: 1px solid #dcdce8;
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	text-align: right;
	font-family: inherit;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.astro-ai-chat__threads-link:hover {
	background: #f6f7fb;
	border-color: #c8c8dc;
}
.astro-ai-chat__threads-item.is-active .astro-ai-chat__threads-link {
	border-color: #b4437b;
	background: #fdf5f9;
}
.astro-ai-chat__threads-item-menu {
	position: absolute;
	left: 4px;
	top: 4px;
	bottom: 4px;
	width: 32px;
	z-index: 2;
	display: flex;
	align-items: stretch;
}
.astro-ai-chat__threads-more {
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 8px;
	background: transparent;
	cursor: pointer;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	opacity: 0;
	transition: opacity 0.15s ease, background-color 0.15s ease;
}
.astro-ai-chat__threads-item:hover .astro-ai-chat__threads-more,
.astro-ai-chat__threads-more[aria-expanded="true"] {
	opacity: 1;
}
.astro-ai-chat__threads-more-dot {
	display: block;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: #666;
	transition: background-color 0.15s ease;
}
.astro-ai-chat__threads-more:hover,
.astro-ai-chat__threads-more:focus-visible {
	background: #eef1f7;
	outline: none;
}
.astro-ai-chat__threads-more[aria-expanded="true"] {
	background: #e3e8f2;
}
.astro-ai-chat__threads-more:hover .astro-ai-chat__threads-more-dot,
.astro-ai-chat__threads-more:focus-visible .astro-ai-chat__threads-more-dot,
.astro-ai-chat__threads-more[aria-expanded="true"] .astro-ai-chat__threads-more-dot {
	background: #444;
}
@media (hover: none), (pointer: coarse) {
	.astro-ai-chat__threads-link,
	.astro-ai-chat__threads-more,
	.astro-ai-chat__threads-toggle,
	.astro-ai-chat__threads-close,
	.astro-ai-chat__new-thread {
		touch-action: manipulation;
		-webkit-tap-highlight-color: rgba(180, 67, 123, 0.14);
	}
	.astro-ai-chat__threads-more {
		opacity: 1;
	}
}
.astro-ai-chat__threads-meta-profile {
	display: inline-block;
	padding: 1px 7px;
	border: 1px solid #e4e4ef;
	border-radius: 999px;
	background: #f4f4f9;
	font-size: 11px;
	font-weight: 600;
	color: #666;
	line-height: 1.5;
}
.astro-ai-chat__threads-menu {
	position: absolute;
	top: calc(100% - 2px);
	left: 0;
	z-index: 30;
	min-width: 160px;
	padding: 6px;
	border: 1px solid #dcdce8;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.astro-ai-chat__threads-menu[hidden] {
	display: none !important;
}
.astro-ai-chat__threads-menu-item {
	display: block;
	width: 100%;
	padding: 9px 12px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	text-align: right;
	font-family: inherit;
	font-size: 13px;
	color: #222;
	cursor: pointer;
}
.astro-ai-chat__threads-menu-item:hover,
.astro-ai-chat__threads-menu-item:focus-visible {
	background: #f6f7fb;
}
.astro-ai-chat__threads-menu-item--danger {
	color: #b71c1c;
}
.astro-ai-chat__threads-menu-item--danger:hover,
.astro-ai-chat__threads-menu-item--danger:focus-visible {
	background: #ffebee;
}
.astro-ai-chat__threads-confirm {
	position: absolute;
	inset: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.35);
}
.astro-ai-chat__threads-confirm[hidden] {
	display: none !important;
}
.astro-ai-chat__threads-confirm-box {
	width: min(100%, 320px);
	padding: 18px 16px 14px;
	border: 1px solid #dcdce8;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
	text-align: right;
}
.astro-ai-chat__threads-confirm-title {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 700;
	color: #222;
}
.astro-ai-chat__threads-confirm-note {
	margin: 0 0 16px;
	font-size: 13px;
	line-height: 1.45;
	color: #666;
}
.astro-ai-chat__threads-confirm-actions {
	display: flex;
	justify-content: flex-start;
	gap: 8px;
}
.astro-ai-chat__threads-confirm-cancel,
.astro-ai-chat__threads-confirm-ok {
	height: 36px;
	padding: 0 14px;
	border-radius: 8px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.astro-ai-chat__threads-confirm-cancel {
	border: 1px solid #dcdce8;
	background: #fff;
	color: #222;
}
.astro-ai-chat__threads-confirm-ok {
	border: 1px solid #ef9a9a;
	background: #ffebee;
	color: #b71c1c;
}
.astro-ai-chat__threads-confirm-cancel:hover,
.astro-ai-chat__threads-confirm-cancel:focus-visible {
	border-color: #b4437b;
	color: #b4437b;
}
.astro-ai-chat__threads-confirm-ok:hover,
.astro-ai-chat__threads-confirm-ok:focus-visible {
	border-color: #b71c1c;
	background: #ffcdd2;
}
.astro-ai-chat__threads-title {
	font-size: 14px;
	font-weight: 600;
	color: #222;
	width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.astro-ai-chat__threads-meta {
	font-size: 12px;
	color: #666;
	width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.astro-ai-chat__threads-empty {
	margin: 0;
	padding: 16px 14px;
	color: #666;
	font-size: 13px;
	text-align: center;
}
body.astro-ai-chat-page-mode .astro-ai-chat__header-tools,
.astro-ai-chat.astro-ai-chat--page .astro-ai-chat__header-tools {
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}
body.astro-ai-chat-page-mode .astro-ai-chat__header-brand,
.astro-ai-chat.astro-ai-chat--page .astro-ai-chat__header-brand {
	gap: 10px;
}
@media (max-width: 640px) {
	body.astro-ai-chat-page-mode .astro-ai-chat__header-tag,
	.astro-ai-chat.astro-ai-chat--page .astro-ai-chat__header-tag {
		display: none;
	}
	body.astro-ai-chat-page-mode .astro-ai-chat__header-meta,
	.astro-ai-chat.astro-ai-chat--page .astro-ai-chat__header-meta {
		margin-top: 2px;
	}
}
@media (max-width: 520px) {
	.astro-ai-chat__new-thread {
		padding: 0 8px;
		width: 36px;
		justify-content: center;
	}
	.astro-ai-chat__new-thread-label {
		display: none;
	}
}

