/* Light mode only */
:root {
	--bg: #ffffff;
	--tile: #eef0f3;
	--tile-border: #d7dbe0;
	--text: #0f172a;
	--muted: #4b5563;
	--surface: #f7f7f8;
	--border: #e5e7eb;
	--on: #22c55e;
	--on-border: rgba(34, 197, 94, 0.65);
	--on-bg: rgba(34, 197, 94, 0.14);
	--radius: 6px;
}
* {
	box-sizing: border-box;
}
html,
body {
	height: 100%;
	margin: 0;
}
body {
	background: var(--bg);
	color: var(--text);
	font:
		16px / 1.5 system-ui,
		-apple-system,
		Segoe UI,
		Roboto,
		Inter,
		Arial,
		sans-serif;
}

/* top bar */
.topbar {
	border-bottom: 1px solid var(--border);
}
.topbar__inner {
	max-width: 720px;
	margin: 0 auto;
	height: 60px;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	padding: 0 12px;
}
.logo {
	margin: 0;
	font-weight: 800;
	letter-spacing: 0.15em;
	font-size: 18px;
	text-align: center;
}
.spacer {
	width: 100%;
}

/* layout */
.board {
	max-width: 720px;
	margin: 18px auto;
	padding: 0 12px 24px;
}

/* main options bar */
.meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 10px 0 18px;
}
.meta-bar {
	justify-content: center;
}

/* pills */
.pill {
	color: var(--muted);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 4px 12px;
	font-size: 12px;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	height: 28px;
	gap: 8px;
	position: relative;
	background: transparent;
}
.pill--click {
	cursor: pointer;
	transition:
		background 0.15s,
		border-color 0.15s,
		color 0.15s,
		box-shadow 0.15s,
		transform 0.04s;
}
.pill--click:hover {
	background: var(--surface);
	border-color: var(--tile-border);
	color: var(--text);
}
.pill--click:active {
	transform: translateY(1px);
}
.pill.is-on {
	color: #0b3d22;
	border-color: var(--on-border);
	background: var(--on-bg);
	box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.25);
}
.pill.is-on::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 999px;
	background: var(--on);
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}
.pill.is-off {
	color: var(--muted);
	border-color: var(--border);
	background: transparent;
}
.pill.is-off::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 999px;
	background: #cbd5e1;
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.03);
}

/* dropdown (Cards) */
.select {
	position: relative;
}
.select__button {
	appearance: none;
	background: transparent;
	border: 0;
	color: inherit;
	font: inherit;
	padding: 0;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}
.caret {
	font-size: 10px;
	opacity: 0.7;
}
.select .menu {
	display: none;
	position: absolute;
	top: 34px;
	left: 0;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 10px;
	min-width: 160px;
	padding: 6px;
	z-index: 20;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
	grid-template-columns: 1fr;
	gap: 4px;
}
.select[aria-expanded="true"] .menu {
	display: grid;
}
.select .menu a {
	color: var(--text);
	text-decoration: none;
	padding: 6px 8px;
	border-radius: 8px;
	font-size: 13px;
}
.select .menu a:hover {
	background: var(--tile);
}

/* settings panel */
.settings-wrap {
	max-width: 720px;
	margin: 0 auto 14px;
	padding: 0 12px;
}
.rule {
	height: 1px;
	background: var(--border);
	margin: 10px 0;
}
.settings-panel {
	max-width: 720px;
	margin: 0 auto;
	padding: 0 12px;
}
.settings-grid {
	display: grid;
	grid-template-columns: max-content 1fr;
	column-gap: 14px;
	row-gap: 12px;
	align-items: start;
}
.label {
	color: var(--muted);
	font-size: 12px;
	font-weight: 700;
	padding: 4px 0;
	white-space: nowrap;
}
.pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* grid: ALWAYS 4 columns */
.grid {
	display: grid;
	gap: 8px;
}
.grid--wordle {
	grid-template-columns: repeat(4, 1fr);
}

/* tiles */
.tile {
	position: relative;
	background: var(--bg);
	border: 2px solid var(--tile-border);
	border-radius: var(--radius);
	aspect-ratio: 1 / 1;
	display: grid;
	place-items: center;
	will-change: transform;
	animation: pop-in 320ms cubic-bezier(0.2, 0.9, 0.2, 1) backwards;
}
.tile:hover {
	border-color: var(--tile);
}

/* chord typography */
.chord {
	display: inline-flex;
	align-items: baseline;
	gap: 2px;
	font-weight: 800;
	font-size: clamp(18px, 5.2vw, 34px);
}
.root {
	text-transform: uppercase;
	font-size: 1.15em;
}
.suffix {
	text-transform: none;
	font-size: 0.7em;
	font-weight: 700;
}

/* animation */
@keyframes pop-in {
	from {
		transform: scale(0.8);
		opacity: 0;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}
