:root {
	/* KuoLO palette: charcoal + gold */
	--opdb-ink: #1a1a1a;
	--opdb-muted: #8a8a8a;
	--opdb-line: #d8d4c8;
	--opdb-accent: #f9df4d;
	--opdb-accent-hover: #ffe566;
	--opdb-accent-soft: rgba(249, 223, 77, 0.22);
	--opdb-surface: #111111;
	--opdb-surface-2: #1a1a1a;
	--opdb-on-dark: #f5f5f5;
	--opdb-font-display: "Roboto", system-ui, sans-serif;
	--opdb-font-body: "Roboto", system-ui, sans-serif;
	--opdb-radius: 6px;
	--opdb-max: 1100px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	font-family: var(--opdb-font-body);
	color: var(--opdb-on-dark);
	background:
		radial-gradient(ellipse 70% 50% at 80% 0%, rgba(249, 223, 77, 0.12), transparent 55%),
		linear-gradient(180deg, #0e0e0e 0%, var(--opdb-surface) 42%, #161616 100%);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
}

.opdb-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--opdb-accent);
	color: #1a1a1a;
	padding: 0.5rem 0.75rem;
	z-index: 100;
}

.opdb-skip:focus {
	left: 0.75rem;
	top: 0.75rem;
}

.opdb-top {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(17, 17, 17, 0.92);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(249, 223, 77, 0.18);
}

.opdb-top__inner {
	max-width: var(--opdb-max);
	margin: 0 auto;
	padding: 0.9rem 1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.opdb-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	font-family: var(--opdb-font-display);
	font-weight: 700;
	font-size: 1.15rem;
	letter-spacing: 0.08em;
	text-decoration: none;
	color: var(--opdb-accent);
}

.opdb-brand__logo {
	display: block;
	width: 2.4rem;
	height: auto;
}

.opdb-brand__name {
	color: var(--opdb-accent);
}

.opdb-top__nav {
	display: flex;
	align-items: center;
	gap: 0.95rem;
}

.opdb-link {
	text-decoration: none;
	color: #cfcfcf;
	font-size: 0.95rem;
	font-weight: 500;
}

.opdb-link:hover {
	color: var(--opdb-accent);
}

.opdb-top__account {
	display: inline-flex;
	align-items: center;
	gap: 0.95rem;
	margin-left: 0.2rem;
	padding-left: 0.95rem;
	border-left: 1px solid rgba(249, 223, 77, 0.22);
}

.opdb-link--logout {
	color: #9a9a9a;
}

.opdb-main {
	flex: 1 0 auto;
	display: flex;
	flex-direction: column;
}

.opdb-hero {
	position: relative;
	flex: 1 0 auto;
	display: grid;
	align-items: center;
	padding: 3.5rem 1.25rem 4rem;
	overflow: hidden;
}

.opdb-hero__atmosphere {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 55% 60% at 85% 40%, rgba(249, 223, 77, 0.22), transparent 68%),
		radial-gradient(ellipse 40% 45% at 70% 70%, rgba(249, 223, 77, 0.1), transparent 70%),
		radial-gradient(ellipse 50% 40% at 12% 70%, rgba(255, 255, 255, 0.04), transparent 65%);
	pointer-events: none;
}

.opdb-hero__atmosphere::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: linear-gradient(rgba(249, 223, 77, 0.05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(249, 223, 77, 0.05) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, #000 20%, transparent 75%);
	animation: opdb-grid-fade 8s ease-in-out infinite alternate;
}

.opdb-hero__layout {
	position: relative;
	z-index: 1;
	max-width: var(--opdb-max);
	width: 100%;
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	align-items: center;
	gap: 2.5rem;
}

.opdb-hero__content {
	position: relative;
	animation: opdb-rise 0.65s ease-out both;
}

.opdb-hero__visual {
	position: relative;
	min-height: 18rem;
	display: grid;
	place-items: center;
	animation: opdb-rise 0.8s ease-out 0.08s both;
}

.opdb-hero__glow {
	position: absolute;
	width: 20rem;
	height: 20rem;
	border-radius: 50%;
	background:
		radial-gradient(circle at 40% 35%, rgba(249, 223, 77, 0.4), transparent 42%),
		radial-gradient(circle at 60% 60%, rgba(249, 223, 77, 0.18), transparent 55%);
	filter: blur(10px);
	animation: opdb-glow-pulse 5.5s ease-in-out infinite alternate;
}

.opdb-hero__image {
	position: relative;
	z-index: 1;
	display: block;
	width: min(22rem, 88%);
	height: auto;
	object-fit: contain;
	filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.35));
	animation: opdb-card-float 4.8s ease-in-out infinite alternate;
}

.opdb-hero__title {
	margin: 0 0 0.9rem;
	max-width: 14ch;
	font-family: var(--opdb-font-display);
	font-size: clamp(2.4rem, 6vw, 4rem);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.03em;
	color: var(--opdb-accent);
}

.opdb-hero__body {
	max-width: 34rem;
}

.opdb-hero__body > p:first-child {
	margin: 0;
	color: #cfcfcf;
	font-size: 1.08rem;
	line-height: 1.6;
}

.opdb-hero__cta,
.opdb-hero__body .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.75rem;
}

.opdb-hero__body a.opdb-btn,
.opdb-hero__body .wp-block-button__link,
.opdb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.78rem 1.3rem;
	border: 1px solid var(--opdb-accent);
	background: var(--opdb-accent);
	color: #1a1a1a !important;
	text-decoration: none;
	font-family: var(--opdb-font-display);
	font-weight: 700;
	font-size: 0.95rem;
	border-radius: var(--opdb-radius);
	transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.opdb-hero__body a.opdb-btn:hover,
.opdb-hero__body .wp-block-button__link:hover,
.opdb-btn:hover {
	background: var(--opdb-accent-hover);
	border-color: var(--opdb-accent-hover);
	transform: translateY(-1px);
}

.opdb-btn--ghost,
.opdb-hero__body a.opdb-btn--ghost {
	background: transparent !important;
	color: var(--opdb-accent) !important;
	border-color: rgba(249, 223, 77, 0.55);
}

.opdb-btn--ghost:hover,
.opdb-hero__body a.opdb-btn--ghost:hover {
	background: rgba(249, 223, 77, 0.12) !important;
	border-color: var(--opdb-accent);
	color: var(--opdb-accent) !important;
}

.opdb-btn--small {
	padding: 0.45rem 0.9rem;
	font-size: 0.86rem;
}

.opdb-panel {
	padding: 2rem 1.25rem 3.25rem;
}

.opdb-panel__inner {
	max-width: var(--opdb-max);
	margin: 0 auto;
	/* Opacity only — lingering transform breaks native <select> popup placement. */
	animation: opdb-panel-in 0.45s ease-out;
}

.opdb-panel__masthead {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: auto auto auto auto;
	column-gap: 1.5rem;
	row-gap: 0.35rem;
	align-items: start;
}

.opdb-panel__title {
	grid-column: 1;
	grid-row: 1;
	margin: 0;
	font-family: var(--opdb-font-display);
	font-size: clamp(1.6rem, 3vw, 2.1rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--opdb-accent);
}

.opdb-panel__logo {
	grid-column: 2;
	grid-row: 1 / 3;
	align-self: stretch;
	justify-self: end;
	display: flex;
	align-items: stretch;
	justify-content: center;
	box-sizing: border-box;
	margin: 0;
	padding: 0.3rem 0.85rem;
	height: 100%;
	max-width: min(22rem, 46vw);
	background: #fff;
	border-radius: var(--opdb-radius);
}

.opdb-panel__logo-img {
	display: block;
	box-sizing: border-box;
	width: auto;
	height: 100%;
	max-width: 100%;
	object-fit: contain;
	object-position: center;
}

.opdb-prose h1 {
	font-family: var(--opdb-font-display);
	margin-top: 0;
}

.opdb-foot {
	border-top: 1px solid rgba(249, 223, 77, 0.18);
	background: #0e0e0e;
	color: #cfcfcf;
}

.opdb-foot__inner {
	max-width: var(--opdb-max);
	margin: 0 auto;
	padding: 1.1rem 1.25rem 1.35rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	font-size: 0.85rem;
	font-family: var(--opdb-font-display);
}

.opdb-foot__brand {
	color: var(--opdb-accent);
	font-weight: 700;
	letter-spacing: 0.06em;
}

.opdb-foot__details {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	margin-top: 0.2rem;
}

.opdb-foot__line {
	margin: 0;
	line-height: 1.45;
	color: #cfcfcf;
	font-family: var(--opdb-font-body);
}

.opdb-foot__label {
	color: var(--opdb-muted);
	margin-right: 0.3rem;
}

.opdb-foot__link {
	color: var(--opdb-muted);
	text-decoration: none;
	font-family: var(--opdb-font-body);
}

.opdb-foot__link:hover {
	color: var(--opdb-accent);
	text-decoration: underline;
}

.opdb-foot__privacy {
	display: inline-block;
	line-height: 1.45;
	margin-top: 0.45rem;
}

.opdb-directory {
	display: contents;
}

.opdb-directory__header {
	grid-column: 1;
	grid-row: 2;
}

.opdb-directory__header h2 {
	margin: 0 0 0.25rem;
	font-family: var(--opdb-font-display);
	font-size: 1.4rem;
	color: var(--opdb-accent);
}

.opdb-directory__header p,
.opdb-directory__count {
	grid-column: 1;
	grid-row: 2;
	margin: 0;
	color: #cfcfcf;
}

.opdb-directory__filters {
	grid-column: 1 / -1;
	grid-row: 3;
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem 1rem;
	align-items: flex-end;
	margin: 0.8rem 0 1.25rem;
	padding: 0.95rem 1.05rem;
	background: #1a1a1a;
	border: 1px solid rgba(249, 223, 77, 0.22);
	border-radius: var(--opdb-radius);
	overflow: visible;
}

.opdb-directory__filters label {
	display: grid;
	gap: 0.28rem;
	font-family: var(--opdb-font-display);
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--opdb-accent);
	letter-spacing: 0.03em;
	text-transform: uppercase;
	position: relative;
}

.opdb-directory__filters select {
	min-width: 10rem;
	padding: 0.5rem 0.65rem;
	border: 1px solid rgba(249, 223, 77, 0.35);
	border-radius: var(--opdb-radius);
	background: #111;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	color: #f5f5f5;
	cursor: pointer;
	color-scheme: dark;
}

.opdb-directory__filters select:focus,
.opdb-directory__filters select.is-open {
	outline: none;
	border-color: var(--opdb-accent);
	box-shadow: 0 0 0 3px rgba(249, 223, 77, 0.2);
}

/* Custom menu always opens below the closed select. */
.opdb-select-menu {
	position: absolute;
	top: calc(100% + 0.2rem);
	left: 0;
	right: 0;
	z-index: 40;
	margin: 0;
	padding: 0.25rem;
	list-style: none;
	max-height: 18.8rem;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--opdb-line);
	border-radius: var(--opdb-radius);
	background: #fff;
	box-shadow: 0 12px 28px rgba(18, 32, 28, 0.16);
	text-transform: none;
	letter-spacing: 0;
	font-weight: 500;
	color: var(--opdb-ink);
}

.opdb-select-menu__item {
	padding: 0.45rem 0.6rem;
	border-radius: 4px;
	font-size: 0.95rem;
	cursor: pointer;
}

.opdb-select-menu__item:hover,
.opdb-select-menu__item.is-selected {
	background: var(--opdb-accent-soft);
	color: var(--opdb-ink);
}

.opdb-directory__actions {
	margin-left: auto;
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.55rem;
}

.opdb-directory__admin {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: flex-end;
	min-height: 2.35rem;
	padding: 0 1rem;
	border: 1px solid rgba(249, 223, 77, 0.45);
	border-radius: var(--opdb-radius);
	background: transparent;
	color: var(--opdb-accent);
	text-decoration: none;
	font-family: var(--opdb-font-display);
	font-weight: 600;
	font-size: 0.9rem;
	line-height: 1;
}

.opdb-directory__admin:hover {
	border-color: var(--opdb-accent);
	background: rgba(249, 223, 77, 0.14);
	color: var(--opdb-accent);
}

.opdb-directory__table-wrap {
	grid-column: 1 / -1;
	grid-row: 4;
	overflow-x: auto;
	border: 1px solid var(--opdb-line);
	border-radius: var(--opdb-radius);
	background: #fff;
}

.opdb-directory__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.opdb-directory__table th,
.opdb-directory__table td {
	padding: 0.65rem 0.9rem;
	border-bottom: 1px solid var(--opdb-line);
	text-align: left;
	vertical-align: middle;
	white-space: nowrap;
	line-height: 1.2;
	color: var(--opdb-ink);
}

.opdb-directory__table thead th {
	background: #1a1a1a;
	font-family: var(--opdb-font-display);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--opdb-accent);
}

.opdb-directory__table tbody tr:nth-child(even) {
	background: #faf8f2;
}

.opdb-directory__table tbody tr:hover {
	background: rgba(249, 223, 77, 0.18);
}

.opdb-directory__table tbody tr:last-child td {
	border-bottom: none;
}

@keyframes opdb-rise {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes opdb-panel-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes opdb-grid-fade {
	from {
		opacity: 0.55;
	}
	to {
		opacity: 1;
	}
}

@keyframes opdb-glow-pulse {
	from {
		transform: scale(0.96);
		opacity: 0.85;
	}
	to {
		transform: scale(1.05);
		opacity: 1;
	}
}

@keyframes opdb-card-float {
	from {
		transform: translateY(0.35rem);
	}
	to {
		transform: translateY(-0.45rem);
	}
}

@media (max-width: 900px) {
	.opdb-hero__layout {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.opdb-hero__visual {
		min-height: 14rem;
		order: -1;
	}

	.opdb-hero__glow {
		width: 16rem;
		height: 16rem;
	}

	.opdb-hero__image {
		width: min(16rem, 70%);
	}
}

@media (max-width: 720px) {
	.opdb-panel__masthead {
		grid-template-columns: 1fr;
		grid-template-rows: none;
	}

	.opdb-panel__title,
	.opdb-panel__logo,
	.opdb-directory__header,
	.opdb-directory__count,
	.opdb-directory__filters,
	.opdb-directory__table-wrap {
		grid-column: 1;
		grid-row: auto;
	}

	.opdb-panel__logo {
		justify-self: center;
		width: fit-content;
		max-width: min(18rem, 88vw);
		min-height: 3.75rem;
		height: auto;
		margin: 0.35rem 0 0.55rem;
		padding: 0.65rem 1.25rem;
	}

	.opdb-panel__logo-img {
		height: 3.25rem;
	}

	.opdb-hero__title {
		max-width: none;
	}

	.opdb-top__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 0.75rem;
	}

	.opdb-brand {
		justify-content: center;
	}

	.opdb-top__nav {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		align-items: center;
		gap: 0.75rem 1.25rem;
		width: 100%;
	}

	.opdb-top__nav > .opdb-link {
		white-space: nowrap;
	}

	.opdb-top__account {
		flex: 1 0 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		gap: 1.25rem;
		margin: 0;
		padding: 0.75rem 0 0;
		border: 0;
		border-top: 1px solid var(--opdb-line);
		width: 100%;
	}

	.opdb-directory__filters {
		align-items: stretch;
	}

	.opdb-directory__filters label {
		flex: 1 1 0;
		min-width: 0;
	}

	.opdb-directory__filters select {
		width: 100%;
		min-width: 0;
	}

	.opdb-directory__actions {
		margin-left: 0;
		width: 100%;
		flex-direction: column;
	}

	.opdb-directory__admin {
		width: 100%;
	}

	.opdb-directory__table th,
	.opdb-directory__table td {
		white-space: normal;
	}

}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}
