/* BluesBear 每日星座運勢 — night-sky card in the 星座小熊 palette.
   Override any --bbh-* variable from your theme's Additional CSS. */

.bbh {
	--bbh-bg-top: #2a1b55;
	--bbh-bg-bottom: #4a2c7a;
	--bbh-card: rgba(255, 255, 255, 0.08);
	--bbh-card-strong: rgba(255, 255, 255, 0.14);
	--bbh-line: rgba(255, 255, 255, 0.16);
	--bbh-text: #f7f1ff;
	--bbh-muted: #c9bde6;
	--bbh-gold: #f6c96f;
	--bbh-star-off: rgba(255, 255, 255, 0.22);
	--bbh-radius: 18px;

	position: relative;
	box-sizing: border-box;
	max-width: 720px;
	margin: 1.5em auto;
	padding: clamp(14px, 4%, 22px);
	overflow: hidden;
	/* Layout adapts to the block's own width, so it also fits narrow sidebars. */
	container: bbh / inline-size;
	border-radius: var(--bbh-radius);
	background:
		radial-gradient(1.5px 1.5px at 12% 18%, #fff 60%, transparent 61%),
		radial-gradient(1px 1px at 28% 8%, #fff 60%, transparent 61%),
		radial-gradient(1.5px 1.5px at 72% 12%, #fff 60%, transparent 61%),
		radial-gradient(1px 1px at 88% 30%, #fff 60%, transparent 61%),
		radial-gradient(1px 1px at 55% 22%, #fff 60%, transparent 61%),
		radial-gradient(1px 1px at 8% 60%, #fff 60%, transparent 61%),
		radial-gradient(1.5px 1.5px at 94% 70%, #fff 60%, transparent 61%),
		linear-gradient(180deg, var(--bbh-bg-top), var(--bbh-bg-bottom));
	color: var(--bbh-text);
	font-size: 16px;
	line-height: 1.6;
	text-align: left;
}

.bbh *,
.bbh *::before,
.bbh *::after {
	box-sizing: inherit;
}

.bbh p,
.bbh h3,
.bbh h4,
.bbh dl,
.bbh dd {
	margin: 0;
	padding: 0;
	color: inherit;
}

/* Header */
.bbh-head {
	display: flex;
	align-items: center;
	gap: 14px;
}

.bbh-bear {
	flex: none;
	width: 64px;
	height: auto;
	filter: drop-shadow(0 0 14px rgba(246, 201, 111, 0.45));
}

.bbh-title {
	font-size: 1.45em;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: 0.04em;
	color: var(--bbh-gold);
}

.bbh .bbh-date {
	margin-top: 2px;
	font-size: 0.9em;
	color: var(--bbh-muted);
}

.bbh .bbh-lucky {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
	padding: 5px 14px 5px 5px;
	border-radius: 999px;
	background: var(--bbh-card-strong);
	font-weight: 700;
}

.bbh-lucky-label {
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--bbh-gold);
	color: #3a2560;
	font-size: 0.8em;
}

/* Sign picker */
.bbh-tabs {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 8px;
	margin-top: 16px;
}

.bbh .bbh-tab {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	min-width: 0;
	margin: 0;
	padding: 8px 2px;
	border: 1px solid var(--bbh-line);
	border-radius: 12px;
	background: var(--bbh-card);
	color: var(--bbh-text);
	font: inherit;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.bbh .bbh-tab:hover {
	background: var(--bbh-card-strong);
	transform: translateY(-1px);
}

.bbh .bbh-tab:focus-visible {
	outline: 2px solid var(--bbh-gold);
	outline-offset: 2px;
}

.bbh .bbh-tab.is-active {
	border-color: var(--bbh-gold);
	background: var(--bbh-gold);
	color: #3a2560;
}

.bbh-tab-symbol {
	font-size: 1.35em;
	font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols", sans-serif;
}

.bbh-tab-name {
	font-size: 0.78em;
	font-weight: 600;
	white-space: nowrap;
}

/* Panel */
.bbh-panels {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 14px;
	margin-top: 16px;
}

.bbh-js .bbh-panel:not(.is-active),
[data-bbh-static] .bbh-panel:not(.is-active) {
	display: none;
}

.bbh-panel {
	min-width: 0;
	padding: 18px;
	border: 1px solid var(--bbh-line);
	border-radius: 14px;
	background: var(--bbh-card);
}

.bbh-panel:focus-visible {
	outline: 2px solid var(--bbh-gold);
	outline-offset: 2px;
}

.bbh-panel-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.bbh-symbol {
	display: grid;
	place-items: center;
	flex: none;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--bbh-card-strong);
	color: var(--bbh-gold);
	font-size: 1.7em;
	font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols", sans-serif;
}

.bbh-sign-name {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 1.25em;
	font-weight: 800;
	line-height: 1.3;
}

.bbh-badge {
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--bbh-gold);
	color: #3a2560;
	font-size: 0.6em;
	font-weight: 700;
}

.bbh-sign-meta {
	font-size: 0.85em;
	color: var(--bbh-muted);
}

.bbh-overall {
	margin-left: auto;
	text-align: right;
}

.bbh-overall-label {
	display: block;
	font-size: 0.75em;
	color: var(--bbh-muted);
}

.bbh-overall .bbh-stars {
	font-size: 1.3em;
}

.bbh-stars {
	color: var(--bbh-gold);
	letter-spacing: 0.08em;
	white-space: nowrap;
}

.bbh-stars-off {
	color: var(--bbh-star-off);
}

.bbh .bbh-message {
	margin-top: 14px;
	font-size: 1.05em;
}

.bbh .bbh-meters,
.bbh .bbh-lucky-items {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin-top: 14px;
}

.bbh .bbh-lucky-items {
	grid-template-columns: repeat(2, 1fr);
}

.bbh-meters > div,
.bbh-lucky-items > div {
	padding: 10px 12px;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.18);
}

.bbh dt {
	margin: 0;
	font-size: 0.78em;
	font-weight: 400;
	color: var(--bbh-muted);
}

.bbh-lucky-items dd {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
}

.bbh-swatch {
	flex: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.7);
	border-radius: 50%;
}

.bbh-number {
	color: var(--bbh-gold);
	font-size: 1.15em;
}

.bbh .bbh-tip {
	margin-top: 14px;
	padding: 12px 14px;
	border-left: 3px solid var(--bbh-gold);
	border-radius: 0 10px 10px 0;
	background: rgba(246, 201, 111, 0.12);
}

.bbh-tip-label {
	display: block;
	font-size: 0.78em;
	font-weight: 700;
	color: var(--bbh-gold);
}

.bbh .bbh-note {
	margin-top: 14px;
	font-size: 0.75em;
	text-align: center;
	color: var(--bbh-muted);
}

@container bbh (max-width: 520px) {
	.bbh-tabs {
		grid-template-columns: repeat(4, 1fr);
		gap: 6px;
	}

	.bbh-panel {
		padding: 14px;
	}

	.bbh-overall {
		width: 100%;
		margin-left: 0;
		text-align: left;
	}

	.bbh-overall-label {
		display: inline;
		margin-right: 6px;
	}

	.bbh .bbh-meters {
		gap: 6px;
	}

	.bbh-meters > div {
		padding: 8px;
	}

	.bbh-meters .bbh-stars {
		font-size: 0.82em;
		letter-spacing: 0;
	}
}

/* Sidebar widths. */
@container bbh (max-width: 300px) {
	.bbh-head {
		gap: 10px;
	}

	.bbh-bear {
		width: 46px;
	}

	.bbh-title {
		font-size: 1.15em;
	}

	.bbh .bbh-date {
		font-size: 0.8em;
	}

	.bbh-tabs {
		gap: 5px;
	}

	.bbh .bbh-tab {
		padding: 6px 0;
		border-radius: 10px;
	}

	.bbh-tab-symbol {
		font-size: 1.1em;
	}

	.bbh-tab-name {
		font-size: 0.68em;
	}

	.bbh-panel {
		padding: 12px;
	}

	.bbh-panel-head {
		gap: 10px;
	}

	.bbh-symbol {
		width: 40px;
		height: 40px;
		font-size: 1.3em;
	}

	.bbh-sign-name {
		font-size: 1.1em;
	}

	.bbh .bbh-message {
		font-size: 0.95em;
	}

	.bbh .bbh-meters {
		grid-template-columns: minmax(0, 1fr);
	}

	.bbh-meters > div {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 6px 10px;
	}

	.bbh-meters .bbh-stars {
		font-size: 0.95em;
	}

	.bbh .bbh-lucky-items {
		gap: 6px;
	}

	.bbh-lucky-items > div {
		padding: 8px 10px;
	}

	.bbh .bbh-tip {
		padding: 10px 12px;
		font-size: 0.92em;
	}
}

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

	.bbh .bbh-tab:hover {
		transform: none;
	}
}
