#anecdote-container {
	min-height: 180px;
}

.anecdote-content.has-precise-tooltip {
	cursor: help;
}

.anecdote-precise-tooltip {
	position: fixed;
	background: rgba(20, 20, 20, 0.95);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	color: var(--color-text-primary);
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 0.8rem;
	font-family: var(--font-mono);
	line-height: 1.5;
	pointer-events: none;
	z-index: 10000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.15);
	white-space: nowrap;
}

.anecdote-precise-tooltip.visible {
	opacity: 1;
	visibility: visible;
}

.anecdote-container.is-transitioning .anecdote-card {
	opacity: 0;
}

.anecdote-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: 2rem;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	transition: opacity 0.3s ease;
}

.anecdote-domain {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: var(--color-text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 0.75rem;
}

.anecdote-content {
	font-size: 1.05rem;
	line-height: 1.7;
	color: var(--color-text-primary);
	text-align: left;
	margin-bottom: 1.25rem;
}

.anecdote-links-row {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
}

.anecdote-link {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	color: var(--color-text-secondary);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	transition: color 0.2s ease;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.anecdote-link:hover {
	color: var(--color-text-primary);
}

.anecdote-source-link::after {
	content: '\2197';
	font-size: 0.75em;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.anecdote-source-link:hover::after {
	opacity: 1;
}

.skeleton-block {
	background: linear-gradient(110deg, rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.05) 70%);
	background-size: 200% 100%;
	animation: anecdoteShimmer 1.6s infinite linear;
	border-radius: 6px;
}

.skeleton-domain {
	width: 140px;
	height: 12px;
	margin-bottom: 1rem;
}

.skeleton-line {
	width: 100%;
	height: 16px;
	margin-bottom: 10px;
}

.skeleton-line-short {
	width: 60%;
}

@keyframes anecdoteShimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

.anecdote-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 3000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	padding: env(safe-area-inset-top) 1rem env(safe-area-inset-bottom);
}

.anecdote-modal-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.anecdote-modal-container {
	background: #0f0f0f;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	max-width: 640px;
	width: 100%;
	max-height: 80vh;
	overflow-y: auto;
	padding: 2rem;
	position: relative;
}

.anecdote-modal-close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	width: 44px;
	height: 44px;
	background: rgba(255, 255, 255, 0.05);
	border: none;
	border-radius: 50%;
	color: var(--color-text-primary);
	font-size: 1.4rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.anecdote-modal-title {
	margin-bottom: 1rem;
	padding-right: 2.5rem;
	color: var(--color-text-primary);
}

.anecdote-modal-body {
	color: var(--color-text-secondary);
	line-height: 1.7;
}

.anecdote-markdown-body p {
	margin-bottom: 1rem;
}

.anecdote-markdown-body img {
	max-width: 100%;
	border-radius: 8px;
}

.anecdote-markdown-body .katex-display {
	overflow-x: auto;
	overflow-y: hidden;
	padding: 0.5rem 0;
}

.anecdote-markdown-body h1,
.anecdote-markdown-body h2,
.anecdote-markdown-body h3 {
	color: var(--color-text-primary);
	margin: 1.5rem 0 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
	.skeleton-block {
		animation: none;
	}
	.anecdote-card {
		transition: none;
	}
}
