/* Pod Drafts — "grimoire" theme: ink night with a mana aurora, gold accents, serif headings. */

:root {
	--bg: #0f0d17;
	--bg-2: #151220;
	--surface: rgba(255, 255, 255, 0.035);
	--surface-solid: #1a1726;
	--surface-2: rgba(255, 255, 255, 0.06);
	--surface-3: rgba(255, 255, 255, 0.1);
	--line: rgba(255, 255, 255, 0.08);
	--line-2: rgba(255, 255, 255, 0.15);
	--text: #f3eee6;
	--text-2: #c8c1d6;
	--text-3: #8e87a2;
	--accent: #f2b84b;
	--accent-2: #ffd98e;
	--accent-ink: #2b1d02;
	--accent-soft: rgba(242, 184, 75, 0.14);
	--iris: #a898ff;
	--iris-soft: rgba(168, 152, 255, 0.15);
	--ok: #5fd39a;
	--ok-soft: rgba(95, 211, 154, 0.14);
	--danger: #ff7a6b;
	--danger-soft: rgba(255, 122, 107, 0.14);
	--k-latest: #f2b84b;
	--k-flashback: #6fb6ff;
	--k-chaos: #ff8a65;
	--k-cube: #b39dff;
	--k-community: #5fd39a;
	--k-sealed: #3ec9c9;
	--k-soup: #f07fbf;
	--aurora-1: rgba(168, 152, 255, 0.2);
	--aurora-2: rgba(242, 184, 75, 0.13);
	--aurora-3: rgba(111, 182, 255, 0.1);
	--shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
	--shadow-soft: 0 8px 24px -12px rgba(0, 0, 0, 0.6);
	--radius: 18px;
	--radius-sm: 12px;
	--serif: "Fraunces Variable", Georgia, "Times New Roman", serif;
	--sans: "Manrope Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
	color-scheme: dark;
}
:root[data-theme="light"] {
	--bg: #f6f1e7;
	--bg-2: #efe7d7;
	--surface: rgba(255, 255, 255, 0.7);
	--surface-solid: #fffbf3;
	--surface-2: rgba(40, 30, 60, 0.05);
	--surface-3: rgba(40, 30, 60, 0.09);
	--line: rgba(40, 30, 60, 0.1);
	--line-2: rgba(40, 30, 60, 0.18);
	--text: #211b30;
	--text-2: #4b4462;
	--text-3: #7d7591;
	--accent: #c4850f;
	--accent-2: #e2a93e;
	--accent-ink: #fffaf0;
	--accent-soft: rgba(196, 133, 15, 0.13);
	--iris: #6752d4;
	--iris-soft: rgba(103, 82, 212, 0.11);
	--ok: #1e9a61;
	--ok-soft: rgba(30, 154, 97, 0.12);
	--danger: #d2463a;
	--danger-soft: rgba(210, 70, 58, 0.11);
	--k-latest: #c4850f;
	--k-flashback: #2f7fd1;
	--k-chaos: #df5f37;
	--k-cube: #7658d4;
	--k-community: #1e9a61;
	--k-sealed: #0f8f8f;
	--k-soup: #b53c80;
	--aurora-1: rgba(103, 82, 212, 0.12);
	--aurora-2: rgba(226, 169, 62, 0.16);
	--aurora-3: rgba(47, 127, 209, 0.08);
	--shadow: 0 18px 40px -22px rgba(70, 50, 20, 0.35);
	--shadow-soft: 0 8px 22px -14px rgba(70, 50, 20, 0.3);
	color-scheme: light;
}

* {
	box-sizing: border-box;
}
html,
body {
	margin: 0;
	min-height: 100%;
}
body {
	color: var(--text);
	font-family: var(--sans);
	font-size: 13.5px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	font-variant-numeric: tabular-nums;
	background:
		radial-gradient(1100px 620px at 8% -12%, var(--aurora-1), transparent 62%),
		radial-gradient(900px 520px at 92% -18%, var(--aurora-2), transparent 60%),
		radial-gradient(800px 600px at 60% 120%, var(--aurora-3), transparent 60%),
		var(--bg);
	background-attachment: fixed;
}
a {
	color: inherit;
	text-decoration: none;
}
a:hover {
	color: var(--accent);
}
button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}
img {
	max-width: 100%;
}
::selection {
	background: var(--accent-soft);
}
code,
.mono {
	font-family: var(--mono);
	font-size: 0.92em;
}
.boot {
	padding: 60px;
	color: var(--text-3);
	font-family: var(--serif);
	font-size: 22px;
	font-style: italic;
}
.wrap {
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 20px;
}
.display {
	font-family: var(--serif);
	font-weight: 600;
}
.kicker {
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--text-3);
}
.muted {
	color: var(--text-3);
}
.subtle {
	color: var(--text-2);
}
.green {
	color: var(--ok);
}
.gold {
	color: var(--accent);
}
.red {
	color: var(--danger);
}
.nowrap {
	white-space: nowrap;
}
.row {
	display: flex;
	align-items: center;
	gap: 10px;
}
.row.wrap-items {
	flex-wrap: wrap;
}
.spacer {
	flex: 1;
}
.stack {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.hidden {
	display: none !important;
}

/* ---------- format kinds ---------- */
.kind-latest {
	--k: var(--k-latest);
}
.kind-flashback {
	--k: var(--k-flashback);
}
.kind-chaos {
	--k: var(--k-chaos);
}
.kind-cube {
	--k: var(--k-cube);
}
.kind-community {
	--k: var(--k-community);
}
.kind-sealed {
	--k: var(--k-sealed);
}
.kind-soup {
	--k: var(--k-soup);
}
.kind-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--k, var(--text-3));
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--k, var(--text-3)) 22%, transparent);
	flex: none;
	display: inline-block;
}
.kind-tag {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 12px;
	font-weight: 700;
	padding: 3px 10px 3px 8px;
	border-radius: 999px;
	color: var(--k, var(--text-2));
	background: color-mix(in srgb, var(--k, var(--text-3)) 14%, transparent);
	white-space: nowrap;
}

/* ---------- header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 30;
	padding: 8px 0 0;
}
.site-header .wrap {
	display: flex;
	align-items: center;
	gap: 14px;
	height: 50px;
	background: color-mix(in srgb, var(--bg-2) 72%, transparent);
	backdrop-filter: blur(16px) saturate(1.3);
	-webkit-backdrop-filter: blur(16px) saturate(1.3);
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 0 8px 0 12px;
	max-width: 1420px;
	box-shadow: var(--shadow-soft);
}
.brand {
	display: flex;
	align-items: center;
	gap: 12px;
}
.brand:hover {
	color: inherit;
}
.sigil {
	width: 30px;
	height: 30px;
	flex: none;
}
.brand-name {
	font-family: var(--serif);
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.05;
}
.brand-name em {
	font-style: italic;
	color: var(--accent);
	font-weight: 500;
}
.brand-sub {
	display: none;
}
.nav {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
}
.nav a,
.nav button.navlink {
	font-weight: 600;
	font-size: 13px;
	padding: 6px 11px;
	border-radius: 999px;
	background: none;
	border: 0;
	cursor: pointer;
	color: var(--text-2);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: background 0.15s, color 0.15s;
}
.nav a:hover,
.nav button.navlink:hover {
	color: var(--text);
	background: var(--surface-2);
}
.nav a.active {
	color: var(--text);
	background: var(--surface-3);
	box-shadow: inset 0 0 0 1px var(--line-2);
}
.nav .login {
	background: linear-gradient(180deg, var(--accent-2), var(--accent));
	color: var(--accent-ink) !important;
}
.theme-toggle {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1px solid var(--line-2);
	background: var(--surface-2);
	display: grid;
	place-items: center;
	cursor: pointer;
	color: var(--text-2);
	flex: none;
}
.theme-toggle:hover {
	color: var(--accent);
}
.discord-link:hover {
	color: #5865f2;
}
.menu-toggle {
	display: none;
	margin-left: auto;
	background: var(--surface-2);
	border: 1px solid var(--line-2);
	border-radius: 12px;
	padding: 8px 10px;
	cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
	padding: 18px 0 0;
}
.hero .wrap {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}
.hero-icon,
.icon.hero-icon {
	width: 46px;
	height: 46px;
	flex: none;
	color: var(--accent);
	padding: 9px;
	border-radius: 14px;
	background: var(--surface);
	border: 1px solid var(--line);
	display: grid;
	place-items: center;
}
.hero-title {
	font-family: var(--serif);
	font-size: clamp(24px, 2.6vw, 32px);
	font-weight: 600;
	line-height: 1.05;
	letter-spacing: -0.02em;
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
}
.hero-title small {
	font-size: 0.62em;
	font-weight: 500;
	font-style: italic;
	color: var(--text-2);
	letter-spacing: 0;
}
.hero-meta {
	color: var(--text-2);
	margin-top: 4px;
	font-size: 13px;
}
.live {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 4px;
}
.format-tabs {
	display: flex;
	gap: 8px;
	margin-left: auto;
	flex-wrap: wrap;
	justify-content: flex-end;
}
.format-tab .chipbtn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-weight: 700;
	font-size: 12.5px;
	padding: 5px 11px 5px 8px;
	border-radius: 999px;
	border: 1px solid var(--line-2);
	background: var(--surface);
	cursor: pointer;
	color: var(--text);
	transition: transform 0.15s, border-color 0.15s;
}
.format-tab .chipbtn .set-icon,
.format-tab .chipbtn .icon {
	color: var(--k, var(--text-2));
}
.format-tab .chipbtn:hover {
	transform: translateY(-1px);
	border-color: var(--k, var(--accent));
}
.format-tab .chipbtn .sub {
	display: none;
}
.format-tab.active .chipbtn {
	background: color-mix(in srgb, var(--k, var(--accent)) 18%, transparent);
	border-color: var(--k, var(--accent));
}

/* ---------- layout ---------- */
.page {
	padding-top: 14px;
	padding-bottom: 50px;
}
/* pages without a hero: some air under the sticky header */
main > .page:first-child {
	padding-top: 24px;
}
.cols {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: 14px;
	align-items: start;
}
.cols.event {
	grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.8fr);
}
/* home: calendar, recent pods on its right */
.home-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
	gap: 14px;
	align-items: start;
}
@media (max-width: 1100px) {
	.home-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
/* narrow column: pod name on the first line, winner or table state on the second */
.home-grid .ev-main {
	flex-wrap: wrap;
	column-gap: 8px;
	row-gap: 2px;
	padding: 7px 10px;
}
.home-grid .ev-name {
	flex: 1 1 0;
	min-width: 0;
}
.home-grid .ev-winners {
	order: 3;
	flex-basis: 100%;
	margin-left: 0;
	justify-content: flex-start;
	gap: 8px;
}
@media (max-width: 1100px) {
	.cols,
	.cols.event {
		grid-template-columns: minmax(0, 1fr);
	}
}
.panel {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: var(--shadow-soft);
}
.panel.pad {
	padding: 14px;
}
.panel-head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-bottom: 1px solid var(--line);
	flex-wrap: wrap;
	min-height: 44px;
}
.panel-title,
.section-title {
	font-family: var(--serif);
	font-size: 16.5px;
	font-weight: 600;
	letter-spacing: -0.01em;
	margin: 0;
}
.panel-count {
	color: var(--text-3);
	margin-left: auto;
	font-size: 12px;
	font-weight: 600;
}
.panel-body {
	padding: 12px 14px;
}

/* ---------- buttons, chips, fields ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-weight: 700;
	font-size: 12.5px;
	padding: 6px 13px;
	border-radius: 999px;
	border: 1px solid var(--line-2);
	background: var(--surface-2);
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:hover {
	background: var(--surface-3);
	color: var(--text);
}
.btn:active {
	transform: translateY(1px);
}
.btn.primary {
	background: linear-gradient(180deg, var(--accent-2), var(--accent));
	border-color: transparent;
	color: var(--accent-ink);
	box-shadow: 0 8px 20px -10px var(--accent);
}
.btn.primary:hover {
	box-shadow: 0 10px 26px -8px var(--accent);
	color: var(--accent-ink);
}
.btn.danger {
	color: var(--danger);
}
.btn.danger:hover {
	background: var(--danger-soft);
	border-color: var(--danger);
	color: var(--danger);
}
.btn.ghost {
	background: transparent;
}
.btn.sm {
	font-size: 12px;
	padding: 4px 10px;
}
.btn.lg {
	font-size: 14px;
	padding: 9px 18px;
}
.btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}
.btn.block {
	width: 100%;
}
.iconbtn {
	display: inline-grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 1px solid var(--line-2);
	background: var(--surface-2);
	cursor: pointer;
	color: var(--text-2);
	transition: color 0.15s, border-color 0.15s;
}
.iconbtn:hover {
	border-color: var(--accent);
	color: var(--accent);
}
.iconbtn:disabled {
	opacity: 0.35;
	cursor: default;
}
.chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	font-weight: 600;
	padding: 4px 11px;
	border-radius: 999px;
	background: var(--surface-2);
	border: 1px solid var(--line);
	color: var(--text-2);
}
.chip.warn {
	color: var(--text);
	background: color-mix(in srgb, var(--accent) 22%, transparent);
	border-color: transparent;
}
.chip.green {
	color: var(--ok);
	background: var(--ok-soft);
	border-color: transparent;
}
.badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11.5px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--surface-3);
	color: var(--text-2);
	white-space: nowrap;
}
.badge.open {
	background: var(--iris-soft);
	color: var(--iris);
}
.badge.running,
.badge.playing,
.badge.drafting,
.badge.lobby,
.badge.ready,
.badge.ok {
	background: var(--ok-soft);
	color: var(--ok);
}
.badge.cancelled,
.badge.disputed,
.badge.rejected,
.badge.error {
	background: var(--danger-soft);
	color: var(--danger);
}
.badge.reported,
.badge.pending,
.badge.checking {
	background: var(--accent-soft);
	color: var(--accent);
}
.dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
	display: inline-block;
}
.pulse {
	animation: pulse 1.6s infinite;
}
@keyframes pulse {
	50% {
		opacity: 0.3;
	}
}
.field {
	display: flex;
	flex-direction: column;
	gap: 7px;
}
.field > span {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--text-2);
}
.field small {
	color: var(--text-3);
	font-size: 12px;
}
input[type="text"],
input[type="password"],
input[type="number"],
input[type="time"],
input[type="date"],
input[type="datetime-local"],
input[type="search"],
input[type="url"],
select,
textarea {
	background: var(--surface-2);
	border: 1px solid var(--line-2);
	border-radius: 10px;
	padding: 7px 11px;
	width: 100%;
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}
select option {
	background: var(--surface-solid);
	color: var(--text);
}
input:focus,
select:focus,
textarea:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 4px var(--accent-soft);
}
textarea {
	resize: vertical;
	min-height: 80px;
}
.form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 10px;
}
.checks {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}
.checks label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 1px solid var(--line-2);
	border-radius: 999px;
	cursor: pointer;
	font-weight: 600;
	font-size: 13px;
	color: var(--text-2);
	user-select: none;
}
.checks label.on {
	border-color: var(--accent);
	color: var(--accent);
	background: var(--accent-soft);
}
.checks input {
	display: none;
}
.select-chip {
	position: relative;
	display: inline-flex;
	align-items: center;
}
.select-chip select {
	appearance: none;
	font-weight: 600;
	font-size: 13px;
	padding: 7px 34px 7px 14px;
	border-radius: 999px;
	width: auto;
	cursor: pointer;
}
.select-chip::after {
	content: "";
	position: absolute;
	right: 14px;
	width: 6px;
	height: 6px;
	border-right: 2px solid var(--text-3);
	border-bottom: 2px solid var(--text-3);
	transform: rotate(45deg) translateY(-3px);
	pointer-events: none;
}
.notice {
	border: 1px solid var(--line);
	background: var(--surface-2);
	padding: 13px 16px 13px 18px;
	border-radius: var(--radius-sm);
	color: var(--text-2);
	position: relative;
}
.notice::before {
	content: "";
	position: absolute;
	left: 0;
	top: 10px;
	bottom: 10px;
	width: 3px;
	border-radius: 3px;
	background: var(--iris);
}
.notice.warn::before {
	background: var(--accent);
}
.notice.ok::before {
	background: var(--ok);
}
.notice.err::before {
	background: var(--danger);
}
.error-text {
	color: var(--danger);
}
.empty {
	padding: 18px 14px;
	text-align: center;
	color: var(--text-3);
	font-family: var(--serif);
	font-style: italic;
	font-size: 14px;
}

/* ---------- mana, icons, avatars ---------- */
.mana {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	vertical-align: middle;
}
.mana img {
	width: 17px;
	height: 17px;
	display: block;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}
.mana img.splash {
	width: 12px;
	height: 12px;
	opacity: 0.85;
}
.mana.lg img {
	width: 23px;
	height: 23px;
}
.mana.lg img.splash {
	width: 16px;
	height: 16px;
}
.set-icon {
	display: inline-block;
	width: 1.2em;
	height: 1.2em;
	background: currentColor;
	-webkit-mask: var(--icon) center / contain no-repeat;
	mask: var(--icon) center / contain no-repeat;
	vertical-align: -0.2em;
	flex: none;
}
.icon {
	width: 1em;
	height: 1em;
	vertical-align: -0.125em;
	flex: none;
}
.avatar {
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-family: var(--serif);
	font-weight: 600;
	font-size: 13px;
	color: #fff;
	flex: none;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.avatar.sm {
	width: 22px;
	height: 22px;
	font-size: 11px;
}
.avatar.lg {
	width: 72px;
	height: 72px;
	font-size: 32px;
}
.player {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}
.player-name {
	font-weight: 700;
	font-size: 13.5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.player-arena {
	font-family: var(--mono);
	font-size: 11.5px;
	color: var(--text-3);
}

/* ---------- tables ---------- */
table.grid {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
}
table.grid th {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text-3);
	text-align: left;
	padding: 7px 10px;
	border-bottom: 1px solid var(--line);
	white-space: nowrap;
}
table.grid td {
	padding: 5px 10px;
	border-bottom: 1px solid var(--line);
	vertical-align: middle;
}
table.grid tr:last-child td {
	border-bottom: 0;
}
table.grid tbody tr {
	transition: background 0.12s;
}
table.grid tbody tr:hover {
	background: var(--surface-2);
}
table.grid .num {
	text-align: right;
	white-space: nowrap;
}
table.grid .rank {
	color: var(--text-3);
	width: 40px;
	text-align: center;
	font-weight: 700;
}
table.grid .points {
	font-family: var(--serif);
	font-size: 18px;
	font-weight: 600;
	text-align: right;
	width: 60px;
}
.medal {
	display: inline-grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	font-weight: 800;
	font-size: 11px;
	color: var(--text-2);
}
.medal.m1 {
	background: radial-gradient(circle at 30% 30%, #ffe7a3, #d9a02c);
	color: #3a2600;
	box-shadow: 0 4px 12px -4px #d9a02c;
}
.medal.m2 {
	background: radial-gradient(circle at 30% 30%, #f4f5f8, #a9adbb);
	color: #2c2f38;
}
.medal.m3 {
	background: radial-gradient(circle at 30% 30%, #f6c9a4, #b87445);
	color: #3a1c07;
}
.record {
	font-weight: 700;
}
.record .w {
	color: var(--ok);
}
.record .l {
	color: var(--text-3);
}
.record .sep {
	color: var(--text-3);
	margin: 0 3px;
	font-weight: 400;
}
.trophy {
	color: var(--accent);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 800;
}
.scroll-x {
	overflow-x: auto;
}

/* ---------- calendar ---------- */
.cal {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	/* weekday header, then every week the height of the fullest day */
	grid-template-rows: auto;
	grid-auto-rows: 1fr;
	gap: 4px;
	padding: 10px 12px;
}
.cal-dow {
	text-align: center;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-3);
}
.cal-dow.today {
	color: var(--accent);
}
.cal-day {
	background: var(--surface);
	border: 1px solid var(--line);
	min-height: 54px;
	padding: 4px;
	display: flex;
	flex-direction: column;
	gap: 3px;
	border-radius: 9px;
}
.cal-day.past {
	opacity: 0.4;
}
.cal-day.today {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
}
.cal-day .date {
	font-family: var(--serif);
	font-size: 12.5px;
	font-weight: 600;
	color: var(--text-2);
	padding-left: 3px;
	line-height: 1.2;
}
.cal-day.today .date {
	color: var(--accent);
}
.cal-ev {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 10.5px;
	font-weight: 700;
	padding: 2px 5px;
	border-radius: 6px;
	color: var(--text);
	background: color-mix(in srgb, var(--k, var(--text-3)) 14%, transparent);
	white-space: nowrap;
	overflow: hidden;
	transition: background 0.15s;
}
.cal-ev:hover {
	color: var(--text);
	background: color-mix(in srgb, var(--k, var(--text-3)) 28%, transparent);
}
.cal-ev .set-icon,
.cal-ev .icon {
	color: var(--k, var(--text-2));
}
.cal-ev.mine {
	box-shadow: inset 0 0 0 1.5px var(--k, var(--accent));
}
.cal-ev.cancelled {
	text-decoration: line-through;
	opacity: 0.5;
}
/* finished pods: grey, the format colour and the "mine" ring fade out */
.cal-ev.done,
.cal-ev.done:hover {
	background: var(--surface-3);
	color: var(--text-3);
	box-shadow: none;
}
.cal-ev.done .set-icon,
.cal-ev.done .icon,
.cal-ev.done .sets {
	color: var(--text-3);
	filter: grayscale(1);
}
.cal-ev .t {
	flex-shrink: 0;
	font-weight: 600;
	font-size: 10px;
	color: var(--text-3);
}
.cal-ev .sets {
	flex-shrink: 0;
	font-weight: 800;
	color: var(--k);
	margin-right: -1px;
}
.cal-ev .code {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}
.cal-ev .n {
	flex-shrink: 0;
	margin-left: auto;
	font-size: 10px;
	font-weight: 700;
	color: var(--text-3);
}
.cal-ev.almost {
	background: color-mix(in srgb, var(--accent) 22%, transparent);
}
.cal-ev.almost .n {
	background: var(--accent);
	color: var(--accent-ink);
	border-radius: 999px;
	padding: 0 5px;
	font-weight: 800;
}
.cal-live {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	color: var(--text);
	background: color-mix(in srgb, var(--k) 18%, transparent);
}
.cal-live .set-icon,
.cal-live .icon,
.cal-next .fmt {
	color: var(--k);
}
.cal-next {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: var(--text-2);
}
.cal-next > .icon {
	width: 14px;
	height: 14px;
}
.cal-next .fmt {
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 8px;
	background: color-mix(in srgb, var(--k) 16%, transparent);
}
.cal-next .fmt:hover {
	background: color-mix(in srgb, var(--k) 30%, transparent);
}
.cal-legend {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-left: auto;
	font-size: 11.5px;
	color: var(--text-2);
}
.cal-legend span {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}
@media (max-width: 640px) {
	.cal {
		gap: 3px;
		padding: 8px;
	}
	.cal-day {
		min-height: 64px;
		border-radius: 10px;
		padding: 5px 3px;
	}
	.cal-ev {
		justify-content: center;
		padding: 3px;
	}
	.cal-ev .t,
	.cal-ev .code {
		display: none;
	}
	.cal-ev .n {
		margin-left: 0;
	}
	/* chaos: the set count replaces the dice */
	.cal-ev.kind-chaos .icon {
		display: none;
	}
	.cal-legend {
		display: none;
	}
}

/* compact list of the next pods */
.next-list {
	display: flex;
	flex-direction: column;
}
.next-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 14px;
	border-bottom: 1px solid var(--line);
	position: relative;
}
.next-row:hover {
	background: var(--surface-2);
}
.next-row .set-icon,
.next-row .icon {
	color: var(--k, var(--text-2));
}
.next-row .what {
	flex: 1;
	min-width: 0;
	line-height: 1.25;
}
.next-row .what a {
	font-weight: 700;
	font-size: 13.5px;
}
.next-row .when {
	color: var(--text-3);
	font-size: 11.5px;
}
.cal-ev.almost,
.cal-next .fmt.almost {
	border-color: var(--accent);
	box-shadow: 0 0 0 2px var(--accent-soft);
	animation: almost 1.8s ease-in-out infinite;
}
@keyframes almost {
	50% {
		box-shadow: 0 0 0 4px var(--accent-soft), 0 0 14px -2px var(--accent);
	}
}
.peek .need {
	background: var(--accent);
	color: var(--accent-ink);
	border-radius: 999px;
	padding: 0 6px;
	font-size: 10px;
	margin-left: 2px;
}
.next-row .count {
	font-size: 12px;
	color: var(--text-3);
	white-space: nowrap;
}
.next-pods {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
	gap: 12px;
	padding: 0 16px 16px;
}
.next-pod {
	border: 1px solid var(--line);
	background: var(--surface);
	border-radius: 16px;
	padding: 16px 16px 16px 19px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	position: relative;
	overflow: hidden;
}
.next-pod::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 3px;
	background: var(--k, var(--line-2));
}
.next-pod .title {
	font-family: var(--serif);
	font-weight: 600;
	font-size: 18px;
	display: flex;
	align-items: center;
	gap: 10px;
}
.next-pod .title .set-icon,
.next-pod .title .icon {
	color: var(--k, var(--text-2));
}
.meter {
	height: 5px;
	background: var(--surface-3);
	border-radius: 999px;
	overflow: hidden;
}
.meter > span {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--k, var(--accent)), var(--accent-2));
}

/* ---------- events list ---------- */
.ev-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.ev {
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--surface);
	overflow: hidden;
}
.ev-row {
	display: flex;
	align-items: stretch;
	min-height: 46px;
}
.ev-date {
	width: 50px;
	flex: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	line-height: 1.05;
	position: relative;
}
.ev-date::after {
	content: "";
	position: absolute;
	right: 0;
	top: 14px;
	bottom: 14px;
	width: 1px;
	background: var(--line);
}
.ev-date .m {
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--k, var(--text-3));
	text-transform: uppercase;
}
.ev-date .d {
	font-family: var(--serif);
	font-size: 18px;
	font-weight: 600;
}
.ev-main {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 12px;
	cursor: pointer;
}
.ev-main:hover {
	color: inherit;
}
.ev-name {
	font-family: var(--serif);
	font-size: 15px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ev-name .set-icon,
.ev-name .icon {
	color: var(--k, var(--text-2));
}
.ev-winners {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: flex-end;
}
.ev-open {
	width: 42px;
	flex: none;
	display: grid;
	place-items: center;
	color: var(--text-3);
	border: 0;
	border-left: 1px solid var(--line);
	background: none;
	cursor: pointer;
}
.ev-open:hover {
	background: var(--surface-2);
	color: var(--accent);
}
.ev-body {
	border-top: 1px solid var(--line);
}
.ev-body .pod-label {
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-3);
	padding: 12px 18px 0;
}
.chev {
	transition: transform 0.2s;
	color: var(--text-3);
}
.chev.open {
	transform: rotate(180deg);
}

/* ---------- event page ---------- */
.stepper {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	margin: 0 0 14px;
}
.step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	font-size: 11.5px;
	font-weight: 700;
	color: var(--text-3);
	position: relative;
	text-align: center;
}
.step::before {
	content: "";
	position: absolute;
	top: 12px;
	left: -50%;
	width: 100%;
	height: 2px;
	background: var(--line-2);
}
.step:first-child::before {
	display: none;
}
.step.done::before,
.step.current::before {
	background: linear-gradient(90deg, var(--accent), var(--iris));
}
.step .n {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--surface-solid);
	border: 2px solid var(--line-2);
	position: relative;
	z-index: 1;
	font-size: 11px;
}
.step.done {
	color: var(--text-2);
}
.step.done .n {
	border-color: var(--accent);
	color: var(--accent);
}
.step.current {
	color: var(--text);
}
.step.current .n {
	background: linear-gradient(180deg, var(--accent-2), var(--accent));
	border-color: transparent;
	color: var(--accent-ink);
	box-shadow: 0 0 0 5px var(--accent-soft);
}
.my-panel {
	border: 1px solid transparent;
	background:
		linear-gradient(var(--surface-solid), var(--surface-solid)) padding-box,
		linear-gradient(125deg, var(--accent), var(--iris) 60%, var(--k-flashback)) border-box;
	border-radius: 14px;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	box-shadow: var(--shadow);
}
.my-panel h3 {
	margin: 0;
	font-family: var(--serif);
	font-size: 19px;
	font-weight: 600;
	letter-spacing: -0.01em;
}
.vs {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	background: var(--surface-2);
	border-radius: 12px;
}
.vs .mid {
	font-family: var(--serif);
	font-style: italic;
	font-size: 22px;
	color: var(--accent);
}
.vs .side {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.vs .side.right {
	align-items: flex-end;
	text-align: right;
}
.score-buttons {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.score-buttons .btn {
	min-width: 70px;
}
.copyline {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--surface-2);
	border: 1px solid var(--line-2);
	border-radius: 999px;
	padding: 3px 3px 3px 14px;
	font-family: var(--mono);
	font-size: 13px;
	max-width: 100%;
}
.copyline span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.lobby {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	padding: 10px 14px;
	border-bottom: 1px solid var(--line);
}
.lobby .who {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 12px;
	border-radius: 999px;
	border: 1px solid var(--line-2);
	font-weight: 600;
	font-size: 13px;
	color: var(--text-3);
}
.lobby .who.in {
	color: var(--text);
	border-color: color-mix(in srgb, var(--ok) 45%, transparent);
}
.lobby .who.ready {
	color: var(--ok);
	background: var(--ok-soft);
	border-color: transparent;
}
.lobby .who.unknown {
	color: var(--accent);
	border-style: dashed;
}
.rounds {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 10px;
	padding: 10px 14px 14px;
}
.round h4 {
	margin: 0 0 8px;
	font-family: var(--serif);
	font-size: 16px;
	font-weight: 600;
	color: var(--text-2);
}
.match {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 6px;
	padding: 5px 9px;
	border-radius: 9px;
	margin-bottom: 4px;
	background: var(--surface-2);
	font-size: 12.5px;
	border: 1px solid transparent;
}
.match .p {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-weight: 600;
}
.match .p.right {
	text-align: right;
}
.match .p.win {
	color: var(--ok);
}
.match .p.me {
	text-decoration: underline;
	text-decoration-color: var(--accent);
	text-underline-offset: 3px;
}
.match .s {
	font-weight: 700;
	color: var(--text-2);
	text-align: center;
	min-width: 52px;
}
.match.mine {
	border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}
.match.admin-edit {
	cursor: pointer;
}
.match.admin-edit:hover {
	border-color: var(--iris);
}
.timeline {
	display: flex;
	flex-direction: column;
	gap: 7px;
}
.timeline .t-item {
	display: grid;
	grid-template-columns: 22px 1fr;
	gap: 8px;
	align-items: center;
	color: var(--text-2);
	font-size: 12.5px;
}
.timeline .t-item .ic {
	color: var(--accent);
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--accent-soft);
	display: grid;
	place-items: center;
	font-size: 11px;
}
.timeline strong {
	color: var(--text);
}

/* ---------- modal & deck ---------- */
.modal-back {
	position: fixed;
	inset: 0;
	background: color-mix(in srgb, var(--bg) 75%, transparent);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 50;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 30px 16px;
	overflow-y: auto;
	animation: fade 0.18s ease-out;
}
@keyframes fade {
	from {
		opacity: 0;
	}
}
.modal {
	width: 100%;
	max-width: 1380px;
	background: var(--surface-solid);
	border: 1px solid var(--line-2);
	border-radius: 24px;
	display: flex;
	flex-direction: column;
	box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
	animation: rise 0.22s ease-out;
}
@keyframes rise {
	from {
		transform: translateY(12px);
		opacity: 0;
	}
}
.modal.narrow {
	max-width: 540px;
}
.modal-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--line);
	flex-wrap: wrap;
}
.modal-head .title {
	font-family: var(--serif);
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.01em;
}
.modal-body {
	padding: 14px 16px;
	min-height: 160px;
}
.modal-foot {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	border-top: 1px solid var(--line);
	flex-wrap: wrap;
}
.modal-foot .caption {
	font-family: var(--serif);
	font-style: italic;
	font-size: 15px;
	color: var(--text-2);
	flex: 1;
	min-width: 200px;
}
.modal-tabs {
	display: flex;
	gap: 8px;
	align-items: center;
	padding: 8px 16px;
	border-bottom: 1px solid var(--line);
	flex-wrap: wrap;
}
.segmented {
	display: inline-flex;
	gap: 3px;
	padding: 4px;
	border-radius: 999px;
	background: var(--surface-2);
	border: 1px solid var(--line);
	flex-wrap: wrap;
}
.segmented .tab {
	font-weight: 700;
	font-size: 12px;
	padding: 5px 11px;
	border-radius: 999px;
	border: 0;
	background: none;
	cursor: pointer;
	display: inline-flex;
	gap: 6px;
	align-items: center;
	color: var(--text-3);
}
.segmented .tab.active {
	color: var(--text);
	background: var(--surface-solid);
	box-shadow: var(--shadow-soft);
}
.segmented .tab:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}
.screenshot {
	display: block;
	margin: 0 auto;
	max-height: 70vh;
	border-radius: 14px;
}
.deck-cols {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding-bottom: 8px;
}
.deck-col {
	flex: 0 0 150px;
	display: flex;
	flex-direction: column;
}
.deck-col .head {
	font-size: 12px;
	font-weight: 700;
	color: var(--text-3);
	text-align: center;
	margin-bottom: 8px;
}
.deck-col .mtg-card + .mtg-card {
	margin-top: -170px;
}
.mtg-card {
	position: relative;
	width: 100%;
	aspect-ratio: 488 / 680;
	border-radius: 8px;
	overflow: hidden;
	background: var(--surface-3);
	box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.6);
	display: block;
	transition: transform 0.15s;
}
.mtg-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.mtg-card .fallback {
	position: absolute;
	inset: 0;
	padding: 8px;
	font-size: 12px;
	color: var(--text-2);
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.mtg-card:hover {
	z-index: 2;
	transform: translateY(-3px) scale(1.02);
}
.mtg-card.picked {
	outline: 3px solid var(--accent);
	box-shadow: 0 0 0 7px var(--accent-soft), 0 10px 20px -8px rgba(0, 0, 0, 0.6);
}
.mtg-card.dim {
	opacity: 0.4;
}
.mtg-card .tag {
	position: absolute;
	left: 6px;
	bottom: 6px;
	background: var(--accent);
	color: var(--accent-ink);
	font-size: 11px;
	font-weight: 800;
	padding: 2px 8px;
	border-radius: 999px;
}
.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
}
/* P1P1: cards large enough to read */
.card-grid.big {
	grid-template-columns: repeat(auto-fill, minmax(min(230px, 42vw), 1fr));
	gap: 14px;
}
.lands-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 12px;
}
.lands-edit {
	align-items: center;
}
.lands-edit .chip {
	gap: 6px;
	padding-inline: 4px;
	font-variant-numeric: tabular-nums;
}
.lands-edit .chip.zero {
	opacity: 0.55;
}
.lands-edit .iconbtn {
	width: 22px;
	height: 22px;
	font-size: 15px;
	line-height: 1;
}
.pick-nav {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}
.pick-nav .where {
	font-family: var(--serif);
	font-size: 22px;
	font-weight: 600;
	min-width: 180px;
}
.pick-strip {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}
.pick-strip button {
	width: 29px;
	height: 29px;
	border: 1px solid var(--line);
	background: var(--surface-2);
	border-radius: 50%;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
	color: var(--text-2);
}
.pick-strip button.on {
	background: var(--accent);
	color: var(--accent-ink);
	border-color: var(--accent);
}
.pick-strip .pack-sep {
	width: 12px;
}
.seat-tabs {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

/* ---------- toasts ---------- */
.toasts {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 80;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 370px;
}
.toast {
	background: var(--surface-solid);
	border: 1px solid var(--line-2);
	padding: 13px 16px 13px 18px;
	border-radius: 16px;
	box-shadow: var(--shadow);
	cursor: pointer;
	position: relative;
	animation: rise 0.2s ease-out;
}
.toast::before {
	content: "";
	position: absolute;
	left: 0;
	top: 12px;
	bottom: 12px;
	width: 3px;
	border-radius: 3px;
	background: var(--accent);
}
.toast.err::before {
	background: var(--danger);
}
.toast strong {
	display: block;
	font-family: var(--serif);
	font-size: 16px;
	font-weight: 600;
}

/* ---------- guide ---------- */
.guide-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}
@media (max-width: 1100px) {
	.guide-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 700px) {
	.guide-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
.guide-step .lead {
	margin: 0 0 12px;
	font-weight: 600;
	line-height: 1.45;
}
.guide-formats {
	display: flex;
	flex-direction: column;
	gap: 9px;
}
.guide-formats > div {
	display: flex;
	flex-direction: column;
	gap: 1px;
	line-height: 1.4;
}
.guide-formats b {
	display: flex;
	align-items: center;
	gap: 7px;
}
.guide-formats span:not(.kind-dot) {
	color: var(--text-2);
	padding-left: 15px;
}
.guide-step {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 24px;
	box-shadow: var(--shadow-soft);
}
.guide-step h3 {
	margin: 0 0 14px;
	font-family: var(--serif);
	font-size: 23px;
	font-weight: 600;
	display: flex;
	gap: 12px;
	align-items: center;
}
.guide-step h3 .n {
	font-style: italic;
	color: var(--accent);
}
.bullets {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.bullets li {
	position: relative;
	padding-left: 20px;
	color: var(--text-2);
}
.bullets li::before {
	content: "";
	position: absolute;
	left: 3px;
	top: 9px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
}
.bullets strong {
	color: var(--text);
}

/* ---------- profile ---------- */
.stat-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
}
.stat {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 9px 12px;
}
.stat .v {
	font-family: var(--serif);
	font-size: 24px;
	font-weight: 600;
	line-height: 1.1;
}
.stat .k {
	font-size: 12px;
	font-weight: 700;
	color: var(--text-3);
}
.tabs {
	display: inline-flex;
	gap: 2px;
	padding: 3px;
	border-radius: 999px;
	background: var(--surface-2);
	border: 1px solid var(--line);
	margin-bottom: 12px;
	overflow-x: auto;
	max-width: 100%;
}
.tabs button {
	background: none;
	border: 0;
	border-radius: 999px;
	padding: 5px 12px;
	font-weight: 700;
	font-size: 12.5px;
	color: var(--text-3);
	cursor: pointer;
	white-space: nowrap;
}
.tabs button.on {
	color: var(--text);
	background: var(--surface-solid);
	box-shadow: var(--shadow-soft);
}

/* ---------- formats & votes ---------- */
.feature-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 10px;
}
.feature {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px;
	position: relative;
}
.chaos-link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	border-radius: 10px;
	background: var(--surface-2);
	font-size: 13px;
}
.chaos-link:hover {
	color: inherit;
	background: color-mix(in srgb, var(--k-chaos) 14%, transparent);
}
a.link-card {
	transition: border-color 0.15s, transform 0.15s;
}
a.link-card:hover {
	color: inherit;
	border-color: var(--k, var(--accent));
	transform: translateY(-1px);
}
a.link-card .top > .icon {
	color: var(--text-3);
}
.feature .top {
	display: flex;
	align-items: center;
	gap: 16px;
}
.feature .glyph {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	display: grid;
	place-items: center;
	color: var(--k, var(--accent));
	background: color-mix(in srgb, var(--k, var(--accent)) 15%, transparent);
	font-size: 20px;
	flex: none;
}
.feature h3 {
	margin: 0;
	font-family: var(--serif);
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.01em;
}
.vote-list {
	display: flex;
	flex-direction: column;
}
.vote-row {
	display: grid;
	grid-template-columns: 22px 1fr minmax(60px, 140px) auto;
	gap: 10px;
	align-items: center;
	padding: 5px 14px;
	border-bottom: 1px solid var(--line);
}
.vote-row:last-child {
	border-bottom: 0;
}
.vote-row .set-icon {
	width: 18px;
	height: 18px;
	color: var(--text-2);
}
.vote-row .bar {
	height: 6px;
	border-radius: 999px;
	background: var(--surface-3);
	overflow: hidden;
}
.vote-row .bar > span {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--k, var(--k-flashback)), var(--iris));
}
.vote-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-weight: 700;
	font-size: 12px;
	padding: 3px 10px;
	border-radius: 999px;
	border: 1px solid var(--line-2);
	background: var(--surface-2);
	cursor: pointer;
	min-width: 58px;
	justify-content: center;
}
.vote-btn.on {
	background: color-mix(in srgb, var(--k, var(--accent)) 20%, transparent);
	border-color: var(--k, var(--accent));
	color: var(--k, var(--accent));
}
.vote-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}
.cube-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 10px;
	padding: 12px 14px 14px;
}
.cube-card {
	border: 1px solid var(--line);
	border-radius: 18px;
	overflow: hidden;
	background: var(--surface);
	display: flex;
	flex-direction: column;
}
.cube-card .art {
	height: 70px;
	background: var(--surface-3) center / cover no-repeat;
	position: relative;
}
.cube-card .art::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 40%, var(--surface-solid));
}
.cube-card .body {
	padding: 2px 12px 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}
.cube-card h4 {
	margin: 0;
	font-family: var(--serif);
	font-size: 15.5px;
	font-weight: 600;
}
.missing-list {
	font-size: 12.5px;
	color: var(--text-3);
	max-height: 90px;
	overflow: auto;
}

.set-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}
.set-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	padding: 3px 10px 3px 7px;
	border-radius: 999px;
	background: var(--surface-2);
	border: 1px solid var(--line);
	color: var(--text-2);
}
.set-chip .set-icon {
	width: 15px;
	height: 15px;
	color: var(--k, var(--text-2));
}
.cube-cols {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 14px;
}
.cube-card-name {
	display: block;
	font-size: 12px;
	line-height: 1.55;
	color: var(--text-2);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.cube-card-name:hover {
	color: var(--accent);
}
.cube-card-name .cmc {
	display: inline-block;
	width: 14px;
	color: var(--text-3);
	font-size: 10.5px;
	font-weight: 700;
}
.cube-type {
	margin-bottom: 8px;
}
.cube-type-head {
	font-size: 10.5px;
	font-weight: 700;
	color: var(--text-3);
	margin: 4px 0 2px;
}
.stack .cube-type .card-grid {
	grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	gap: 6px;
}

/* ---------- admin ---------- */
.admin-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
	gap: 10px;
	padding: 12px 14px 14px;
}
.admin-card {
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--surface);
	padding: 10px 12px 10px 15px;
	display: flex;
	flex-direction: column;
	gap: 7px;
	position: relative;
	overflow: hidden;
}
.admin-card::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 3px;
	background: var(--k, var(--line-2));
}
.admin-card.off {
	opacity: 0.55;
}
table.grid tr.off td {
	opacity: 0.5;
}
.admin-card h4 {
	margin: 0;
	font-family: var(--serif);
	font-size: 15px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 7px;
}
.set-picker {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 6px;
	max-height: 340px;
	overflow: auto;
	padding: 4px;
}
.set-picker label {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 7px 10px;
	border-radius: 12px;
	border: 1px solid var(--line);
	cursor: pointer;
	font-size: 13px;
	user-select: none;
}
.set-picker label.on {
	border-color: var(--k, var(--k-chaos));
	background: color-mix(in srgb, var(--k, var(--k-chaos)) 12%, transparent);
}
.set-picker input {
	display: none;
}
.set-picker .set-icon {
	width: 18px;
	height: 18px;
	color: var(--text-2);
}
.switch {
	position: relative;
	width: 40px;
	height: 23px;
	flex: none;
	cursor: pointer;
	display: inline-block;
}
.switch input {
	display: none;
}
.switch span {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: var(--surface-3);
	transition: background 0.15s;
}
.switch span::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 17px;
	height: 17px;
	border-radius: 50%;
	background: var(--text);
	transition: transform 0.15s;
}
.switch input:checked + span {
	background: var(--accent);
}
.switch input:checked + span::after {
	transform: translateX(17px);
	background: var(--accent-ink);
}

@media (max-width: 900px) {
	.site-header {
		padding-top: 8px;
	}
	.site-header .wrap {
		height: 58px;
		gap: 10px;
		margin: 0 10px;
		width: auto;
	}
	.menu-toggle {
		display: inline-flex;
	}
	.nav {
		display: none;
		position: absolute;
		top: 70px;
		left: 10px;
		right: 10px;
		background: var(--surface-solid);
		border: 1px solid var(--line-2);
		border-radius: 20px;
		flex-direction: column;
		align-items: stretch;
		padding: 10px;
		box-shadow: var(--shadow);
	}
	.nav.open {
		display: flex;
	}
	.brand-sub {
		display: none;
	}
	.wrap {
		padding: 0 16px;
	}
	.hide-sm {
		display: none;
	}
	.hero {
		padding-top: 26px;
	}
	table.grid td,
	table.grid th {
		padding: 9px 7px;
	}
	table.grid .points {
		font-size: 20px;
		width: auto;
	}
	.player-name {
		font-size: 14px;
		max-width: 140px;
	}
	.vote-row {
		grid-template-columns: 24px 1fr auto;
		padding: 10px 14px;
	}
	.vote-row .bar {
		display: none;
	}
	.stepper .step .label {
		display: none;
	}
	.stepper .step.current .label {
		display: inline;
	}
}

/* ---------- event peek (hover card on chips) ---------- */
.peek {
	position: fixed;
	z-index: 80;
	left: -999px;
	top: 0;
	width: 292px;
	background: var(--surface-solid);
	border: 1px solid var(--line-2);
	border-radius: 16px;
	box-shadow:
		0 24px 60px -18px rgba(0, 0, 0, 0.55),
		0 0 0 1px color-mix(in srgb, var(--k, var(--accent)) 22%, transparent);
	overflow: hidden;
	font-size: 12.5px;
	animation: peek-in 0.16s ease-out;
}
@keyframes peek-in {
	from {
		opacity: 0;
		transform: translateY(6px) scale(0.97);
	}
}
.peek-head {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 12px 14px;
	background:
		radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--k) 38%, transparent), transparent 70%),
		color-mix(in srgb, var(--k) 8%, var(--surface-solid));
	border-bottom: 1px solid color-mix(in srgb, var(--k) 28%, transparent);
}
.peek-icon {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	flex: none;
	border-radius: 12px;
	color: var(--k);
	background: var(--surface-solid);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k) 45%, transparent), 0 6px 16px -8px var(--k);
}
.peek-kind {
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--k);
}
.peek-title {
	font-family: var(--serif);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.15;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.peek-body {
	display: flex;
	flex-direction: column;
	gap: 11px;
	padding: 12px 14px;
}
.peek-when {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}
.peek-when .icon {
	width: 14px;
	height: 14px;
	color: var(--k);
}
.peek-fill {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 12px;
}
.peek-seats {
	display: flex;
	gap: 3px;
	flex: 1;
}
.peek-seats span {
	flex: 1;
	height: 7px;
	border-radius: 4px;
	background: var(--surface-3);
}
.peek-seats span.on {
	background: var(--k);
	box-shadow: 0 0 8px -2px var(--k);
}
.peek.almost .peek-seats span.on {
	background: var(--accent);
	box-shadow: 0 0 8px -1px var(--accent);
}
.peek-players {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 5px 10px;
}
.peek-player {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	font-weight: 600;
}
.peek-player > span:last-child {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.peek-label {
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-3);
	margin-bottom: 6px;
}
.peek-sets {
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: 7px 4px;
	justify-items: center;
	color: var(--text-2);
}
.peek-round {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 3px 0;
	font-weight: 600;
}
.peek-round .b {
	width: 20px;
	font-size: 10.5px;
	font-weight: 800;
	color: var(--k);
}
.peek-foot {
	display: flex;
	gap: 6px;
	padding: 10px 14px;
	border-top: 1px solid var(--line);
	background: var(--surface-2);
}
.peek-foot .btn {
	flex: 1;
	justify-content: center;
}

/* ---------- footer and legal page ---------- */
.site-footer {
	border-top: 1px solid var(--line);
	margin-top: 20px;
	padding: 16px 0 24px;
	font-size: 11.5px;
	color: var(--text-3);
}
.site-footer .wrap {
	display: flex;
	gap: 8px 24px;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
}
.site-footer .wrap > span {
	max-width: 780px;
	line-height: 1.5;
}
.site-footer a {
	color: var(--text-2);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.site-footer .wrap > a {
	white-space: nowrap;
}
.legal {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 860px;
}
.legal h2 {
	margin: 0 0 10px;
	font-family: var(--serif);
	font-size: 20px;
	font-weight: 600;
}
.legal p {
	margin: 0 0 8px;
	color: var(--text-2);
	line-height: 1.55;
}
.legal ul {
	margin: 0;
	padding-left: 18px;
	display: flex;
	flex-direction: column;
	gap: 7px;
	color: var(--text-2);
	line-height: 1.5;
}
.legal b {
	color: var(--text);
}
.legal a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* deck state in the deck modal: following Draftmancer, or locked as the deck of the rounds */
.deck-state {
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 1px 8px;
	border-radius: 999px;
	font-family: var(--sans);
	font-weight: 700;
	font-size: 11px;
	background: var(--surface-3);
	color: var(--text-2);
}
.deck-state.short {
	background: var(--danger-soft);
	color: var(--danger);
}
.deck-state.locked {
	background: color-mix(in srgb, var(--accent) 20%, transparent);
	color: var(--text);
}
.deck-state .icon {
	width: 12px;
	height: 12px;
}
/* buttons placed in monospace info rows keep the interface font */
.mono .btn {
	font-family: var(--sans);
}
/* "+2": players waiting for a seat, next to the seated count */
.cal-ev .n em {
	font-style: normal;
	font-weight: 800;
	color: var(--accent);
}
/* language switch in the header: the other language's code, next to the theme toggle */
.lang-toggle {
	font-family: var(--sans);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.04em;
}

/* an organizer browsing as a player */
.view-as-bar {
	position: sticky;
	top: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
	padding: 6px 14px;
	font-size: 12.5px;
	font-weight: 600;
	background: var(--accent);
	color: var(--accent-ink);
}

/* the day a set comes out on Arena: a gold separator on the left edge of the day, and a tag */
.cal-day.release {
	box-shadow: inset 3px 0 0 var(--k-latest);
	background: color-mix(in srgb, var(--k-latest) 6%, var(--surface));
}
.cal-day.today.release {
	box-shadow: inset 3px 0 0 var(--k-latest), 0 0 0 3px var(--accent-soft);
}
.cal-day .date {
	display: flex;
	align-items: center;
	gap: 6px;
}
.release-tag {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	margin-left: auto;
	padding: 0 6px;
	border-radius: 999px;
	font-family: var(--sans);
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--accent-ink);
	background: var(--k-latest);
}
.release-tag .set-icon,
.release-tag .icon {
	color: var(--accent-ink);
}
@media (max-width: 640px) {
	.release-tag {
		font-size: 0;
		padding: 1px 3px;
	}
}

/* sets drawn by each chaos pod, on the format page */
.pod-sets {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 6px;
}
.pod-set {
	display: inline-grid;
	place-items: center;
	color: var(--k-chaos);
}
.pod-sets .set-chip b {
	color: var(--k-chaos);
	font-size: 10.5px;
}

/* home: a format chip picked in the hero */
.cal-ev.dim {
	opacity: 0.25;
	filter: grayscale(1);
}
.cal-ev.focus {
	box-shadow: 0 0 0 2px var(--k, var(--accent));
}
/* formats page: the two chaos drafts side by side, whole rows clickable */
.chaos-links {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 8px;
}
.chaos-links .chaos-link {
	margin: 0;
}
.next-row.clickable {
	cursor: pointer;
}
/* side by side, each chaos button stacks its name over its rule */
.chaos-links .chaos-link {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	column-gap: 6px;
}
.chaos-links .chaos-link strong,
.chaos-links .chaos-link .muted {
	grid-column: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.chaos-links .chaos-link .muted {
	font-size: 11.5px;
}
.chaos-links .chaos-link .spacer {
	display: none;
}
.chaos-links .chaos-link .icon {
	grid-column: 2;
	grid-row: 1 / span 2;
}

/* sealed pods look different from drafts: striped, dashed outline, "sealed" tag */
.cal-ev.kind-sealed {
	background: repeating-linear-gradient(
		135deg,
		color-mix(in srgb, var(--k) 18%, transparent) 0 6px,
		color-mix(in srgb, var(--k) 8%, transparent) 6px 12px
	);
	outline: 1.5px dashed color-mix(in srgb, var(--k) 70%, transparent);
	outline-offset: -1.5px;
}
.sealed-tag {
	font-style: normal;
	font-size: 9px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--k);
}
.practice-banner,
.peek-practice {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	font-size: 13px;
	color: var(--text-2);
}
.practice-banner {
	margin-top: 8px;
	padding: 5px 12px;
	border-radius: 999px;
	border: 1.5px dashed var(--k-sealed);
	background: color-mix(in srgb, var(--k-sealed) 10%, transparent);
}
.practice-banner .icon,
.peek-practice .icon {
	width: 14px;
	height: 14px;
	color: var(--k-sealed);
}
.peek-practice {
	font-size: 12px;
}

/* next to sign-up buttons: the cards must be owned on Arena */
.arena-cards-notice {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin-top: 10px;
	padding: 8px 12px;
	border-radius: var(--radius-sm);
	background: color-mix(in srgb, var(--accent) 10%, transparent);
	border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
	color: var(--text-2);
	font-size: 13px;
	line-height: 1.4;
}
.arena-cards-notice .icon {
	flex: none;
	width: 16px;
	height: 16px;
	margin-top: 1px;
	color: var(--accent);
}
.arena-cards-notice.compact {
	margin: 8px 14px 12px;
	font-size: 12px;
	padding: 6px 10px;
}

/* Stone Soup: the player's 45 cards */
.soup-panel {
	border-top: 3px solid var(--k-soup);
}
.soup-panel .panel-title .icon {
	color: var(--k-soup);
}
.soup-received {
	font-size: 12px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 999px;
	color: var(--k-soup);
	background: color-mix(in srgb, var(--k-soup) 12%, transparent);
}
.soup-body {
	display: grid;
	gap: 12px;
	padding: 14px 16px 16px;
}
.soup-rules {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.soup-rule {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12.5px;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: var(--surface-2);
	color: var(--text-2);
}
.soup-rule b {
	color: var(--text);
	font-size: 13px;
}
.soup-rule.rar-rare b {
	color: #c9a227;
}
.soup-rule.rar-mythic b {
	color: #e8702a;
}
.soup-rule.rar-uncommon b {
	color: #8fa3b8;
}
.soup-rule .icon {
	width: 13px;
	height: 13px;
}
.soup-note {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.55;
	color: var(--text-3);
}
.soup-edit,
.soup-saved {
	display: grid;
	gap: 10px;
}
.soup-edit textarea {
	width: 100%;
	font-size: 13px;
	line-height: 1.5;
}
.soup-counts {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 13px;
}
.soup-counts .over {
	color: var(--danger);
	font-weight: 700;
}
.soup-errors div + div {
	margin-top: 4px;
}
.soup-cards {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}
.soup-card {
	font-size: 12px;
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--surface-2);
	border: 1px solid var(--line);
}
.rar-mythic {
	color: #e8702a;
}
.rar-rare {
	color: #c9a227;
}
.rar-uncommon {
	color: #8fa3b8;
}
.soup-rule.rar-mythic,
.soup-rule.rar-rare,
.soup-rule.rar-uncommon {
	color: var(--text-2);
}
.soup-card.rar-mythic,
.soup-card.rar-rare {
	font-weight: 700;
}
.soup-reveal {
	display: grid;
	gap: 6px;
	padding-top: 12px;
	border-top: 1px solid var(--line);
}
.soup-reveal-title {
	font-weight: 700;
	font-size: 13px;
}
.soup-reveal summary {
	cursor: pointer;
}
.soup-reveal .soup-cards {
	margin: 6px 0 10px;
}

/* home: the tagline and the format chips on one line */
@media (min-width: 1100px) {
	.home-hero .wrap {
		flex-wrap: nowrap;
	}
	.home-hero .hero-title {
		flex-wrap: nowrap;
		white-space: nowrap;
	}
	.home-hero .format-tabs {
		flex-wrap: nowrap;
		gap: 6px;
		align-self: flex-end;
		padding-bottom: 2px;
	}
}
.home-hero .format-tab .chipbtn {
	white-space: nowrap;
	font-size: 12px;
	padding: 4px 10px 4px 7px;
	gap: 6px;
}

/* home on a desktop screen: everything fits the window, the calendar weeks share the height left */
@media (min-width: 1100px) and (min-height: 620px) {
	#app:has(.home-page) {
		height: 100vh;
		height: 100dvh;
		display: flex;
		flex-direction: column;
	}
	#app:has(.home-page) > main {
		flex: 1;
		min-height: 0;
		display: flex;
		flex-direction: column;
	}
	.home-page {
		flex: 1;
		min-height: 0;
		display: flex;
		flex-direction: column;
		padding-bottom: 8px;
	}
	.home-page > .home-grid {
		flex: 1;
		min-height: 0;
		align-items: stretch;
	}
	.home-grid > .panel {
		display: flex;
		flex-direction: column;
		min-height: 0;
	}
	.home-grid > .panel > .cal {
		flex: 1;
		min-height: 0;
		grid-auto-rows: minmax(0, 1fr);
		padding: 8px 10px;
	}
	.home-grid > .panel .cal-day {
		min-height: 0;
		overflow: hidden;
		gap: 2px;
		padding: 3px 4px;
	}
	.home-grid > .panel .cal-ev {
		padding-top: 1px;
		padding-bottom: 1px;
		flex: none;
	}
	.home-grid > section:last-child {
		min-height: 0;
		overflow-y: auto;
	}
	#app:has(.home-page) > .site-footer {
		margin-top: 0;
		padding: 8px 0 10px;
	}
}

/* ---------- small screens ---------- */
@media (max-width: 1099px) {
	/* home: the format chips on one scrollable line, from the left */
	.home-hero .format-tabs {
		margin-left: 0;
		width: 100%;
		flex-wrap: nowrap;
		justify-content: flex-start;
		overflow-x: auto;
		scrollbar-width: none;
		padding-bottom: 2px;
	}
	.home-hero .format-tabs::-webkit-scrollbar {
		display: none;
	}
	.home-hero .format-tab {
		flex: none;
	}
}
@media (max-width: 640px) {
	.deck-col {
		flex-basis: 112px;
	}
	.deck-col .mtg-card + .mtg-card {
		margin-top: -128px;
	}
	.soup-rules {
		gap: 4px;
	}
	.soup-rule {
		font-size: 12px;
		padding: 3px 8px;
	}
}

/* deck window: counts, state and the Arena button wrap instead of overflowing */
.deck-summary {
	flex-wrap: wrap;
	row-gap: 8px;
}
.deck-counts {
	white-space: nowrap;
}
@media (max-width: 640px) {
	.deck-summary .spacer {
		display: none;
	}
	.deck-summary > .btn,
	.deck-summary > :last-child {
		flex-basis: 100%;
	}
}

/* table chat */
.chat .panel-title .icon {
	width: 15px;
	height: 15px;
	vertical-align: -2px;
}
.chat-list {
	max-height: 320px;
	overflow-y: auto;
	padding: 10px 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.chat-msg {
	font-size: 13.5px;
	line-height: 1.4;
	overflow-wrap: anywhere;
}
.chat-msg .who {
	font-weight: 700;
}
.chat-msg.mine .who {
	color: var(--accent);
}
.chat-msg .when {
	color: var(--text-3);
	font-size: 11px;
}
.chat-empty,
.chat-closed {
	font-size: 13px;
}
.chat-closed {
	padding: 0 14px 12px;
}
.chat-form {
	display: flex;
	gap: 6px;
	padding: 10px 14px;
	border-top: 1px solid var(--line);
}
.chat-form input {
	flex: 1;
	min-width: 0;
}

/* cube characteristics */
.cube-traits {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 6px;
}
.cube-traits .chip {
	font-size: 11.5px;
	padding: 2px 8px;
}
.chip.red {
	color: var(--danger);
	background: var(--danger-soft);
	border-color: transparent;
}

/* chaos sets you can open a pack of */
.set-chip.clickable {
	cursor: pointer;
	font-family: inherit;
}
.set-chip.clickable:hover {
	border-color: var(--accent);
	color: var(--accent);
}

/* admin statistics */
.stat-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
}
.stat-tiles .display {
	font-size: 28px;
	line-height: 1.1;
	margin: 4px 0;
}
.rate-format {
	gap: 8px;
}
table.grid .stat-group th {
	text-align: left;
	font-family: var(--serif);
	font-size: 14.5px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	color: var(--text);
	background: var(--surface-2);
	padding-top: 10px;
}

/* Discord / Google sign-in */
.oauth-buttons .btn.oauth {
	justify-content: center;
	gap: 10px;
	width: 100%;
}
.btn.oauth.discord {
	background: #5865f2;
	border-color: #5865f2;
	color: #fff;
}
.btn.oauth.google {
	background: #fff;
	border-color: #dadce0;
	color: #3c4043;
}
