/* draft.ogreclan.com: colours follow the browser's light or dark mode */
:root {
	--bg: #f3f5f9;
	--panel: #ffffff;
	--panel-2: #f7f8fb;
	--text: #1d2330;
	--muted: #667085;
	--border: #d6dbe4;
	--accent: #2b4a8b;
	--accent-soft: rgba(43, 74, 139, 0.1);
	--accent-text: #ffffff;
	--good: #2f9e52;
	--good-bg: #d8f2df;
	--warn: #b98a00;
	--warn-bg: #fbf0c8;
	--bad: #c6372f;
	--bad-bg: #f9d9d6;
	--you: rgba(43, 108, 210, 0.12);
	--shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #14171d;
		--panel: #1d222b;
		--panel-2: #232934;
		--text: #e6e9ef;
		--muted: #9aa3b2;
		--border: #333a47;
		--accent: #6d93e0;
		--accent-soft: rgba(109, 147, 224, 0.15);
		--accent-text: #0e1420;
		--good: #6fd18e;
		--good-bg: #1f4a2c;
		--warn: #f0c84a;
		--warn-bg: #4a3e12;
		--bad: #ff8077;
		--bad-bg: #57211d;
		--you: rgba(77, 140, 240, 0.18);
		--shadow: none;
		color-scheme: dark;
	}
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
	font: 15px/1.5 -apple-system, "Segoe UI", Roboto, Verdana, sans-serif;
	background: var(--bg);
	color: var(--text);
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 26px; margin: 0 0 4px; }
h2 { font-size: 19px; margin: 24px 0 10px; }
h3 { font-size: 16px; margin: 16px 0 8px; }
p { margin: 8px 0; }
code { font: 13px ui-monospace, Menlo, Consolas, monospace; background: var(--panel-2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }
.boot { text-align: center; color: #667085; margin-top: 30vh; font-family: sans-serif; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.spacer { flex: 1; }

/* the frame */
.top {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 10px 20px;
	background: var(--panel);
	border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none; }
.brand img { width: 26px; height: 26px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 6px 10px; border-radius: 6px; color: var(--text); text-decoration: none; }
.nav a:hover { background: var(--panel-2); }
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.who { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.who img { width: 28px; height: 28px; border-radius: 50%; }
main { max-width: 1180px; margin: 0 auto; padding: 20px 20px 60px; }
footer { max-width: 1180px; margin: 0 auto; padding: 0 20px 30px; color: var(--muted); font-size: 12px; }

/* pieces */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stack > * + * { margin-top: 10px; }
button, .button, select, input, textarea {
	font: inherit;
	color: inherit;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 7px;
	padding: 6px 12px;
}
textarea { width: 100%; font: 13px ui-monospace, Menlo, Consolas, monospace; }
button, .button { cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button:hover:not(:disabled), .button:hover { border-color: var(--accent); }
button:disabled { opacity: 0.55; cursor: default; }
button.primary, .button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
button.danger { color: var(--bad); border-color: var(--bad); }
button.small, .button.small { padding: 2px 8px; font-size: 13px; }
button.link { border: none; background: none; padding: 0; color: var(--accent); text-decoration: underline; }
input[type="checkbox"] { width: auto; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
label.field > input, label.field > select, label.field > textarea { color: var(--text); font-size: 15px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); }
.badge.good { background: var(--good-bg); color: var(--good); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.notice { padding: 10px 14px; border-radius: 8px; background: var(--accent-soft); margin: 10px 0; }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.good { background: var(--good-bg); color: var(--good); }
.empty { color: var(--muted); font-style: italic; }
.code-big { font: 700 30px ui-monospace, Menlo, Consolas, monospace; letter-spacing: 4px; }

/* tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); font-weight: 600; }
tr.you td { background: var(--you); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Pokémon */
.mon { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.mon img { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; margin: -6px -2px; }
.mon .name { font-weight: 600; }
.mon.stacked .text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mon.stacked img { margin: -4px -2px; }
.types { display: inline-flex; gap: 3px; }
.type { display: inline-block; min-width: 46px; padding: 0 4px; border-radius: 4px; color: #fff; font-size: 11px; font-weight: 700; text-align: center; text-shadow: 0 1px 1px rgba(0,0,0,.35); }
.type-Normal { background: #a8a878; } .type-Fire { background: #f08030; } .type-Water { background: #6890f0; }
.type-Electric { background: #e0b820; } .type-Grass { background: #78c850; } .type-Ice { background: #78c8c8; }
.type-Fighting { background: #c03028; } .type-Poison { background: #a040a0; } .type-Ground { background: #d0a848; }
.type-Flying { background: #a890f0; } .type-Psychic { background: #f85888; } .type-Bug { background: #a8b820; }
.type-Rock { background: #b8a038; } .type-Ghost { background: #705898; } .type-Dragon { background: #7038f8; }
.type-Dark { background: #705848; } .type-Steel { background: #a8a8c0; } .type-Fairy { background: #e890a8; }
.roster { list-style: none; padding: 0; margin: 8px 0 0; }
.roster li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid var(--border); }
.roster li:first-child { border-top: none; }
.pts { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.star { color: #d4a017; }

/* league */
.league-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tabs a { padding: 8px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.clock { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 10px; background: var(--accent-soft); margin-bottom: 16px; }
.clock.yours { background: var(--good-bg); }
.clock .big { font-size: 18px; font-weight: 700; }
.board td { min-width: 120px; }
.board td.skipped { color: var(--muted); font-style: italic; }
.board td.next { outline: 2px solid var(--accent); outline-offset: -2px; }
.picker-list { max-height: 520px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.picker-list table td { border-bottom-color: var(--border); }
.picker-list tr.cant td { opacity: 0.5; }
.history li { margin: 4px 0; }

/* toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { padding: 10px 14px; border-radius: 8px; background: var(--panel); border: 1px solid var(--border); box-shadow: 0 4px 16px rgba(0,0,0,.15); white-space: pre-line; }
.toast.bad { border-color: var(--bad); }
.toast.good { border-color: var(--good); }

/* the planner, from the extension, in its own box */
.planner-host { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; min-height: 70vh; }

@media (max-width: 700px) {
	.top { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
	main { padding: 14px 12px 50px; }
	.card { padding: 12px; }
	h1 { font-size: 22px; }
}
