/* RON RO portal theme (themes/ron): soft pastel cards, purple accent, light and dark */

:root {
	--bg: #fdf7f3;
	--dot: #eadfe7;
	--surface: #ffffff;
	--surface-2: #fbf4f8;
	--line: #eee2ea;
	--ink: #2b2340;
	--ink-2: #5e5672;
	--ink-3: #6e6685;
	--accent: #8e4fc3;
	--accent-text: #7a3fb0;
	--accent-ink: #ffffff;
	--accent-2: #a46bd3;
	--accent-soft: #f3e9fb;
	--gold: #f0b443;
	--gold-soft: #fdf1d8;
	--good: #17744c;
	--good-soft: #e3f6ec;
	--bad: #c0392b;
	--bad-soft: #fde8e8;
	--radius: 22px;
	--radius-s: 14px;
	--shadow: 0 12px 34px rgba(90, 50, 120, 0.08);
	--edge: rgba(90, 50, 120, 0.22);
	--header-h: 76px;
	--wrap: 1180px;
	--font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
	color-scheme: light;
}

:root[data-theme='dark'] {
	--bg: #14111c;
	--dot: #221d2e;
	--surface: #1d1828;
	--surface-2: #241e31;
	--line: #322a44;
	--ink: #f1ecf8;
	--ink-2: #c3b9d6;
	--ink-3: #8f86a6;
	--accent: #b68af0;
	--accent-text: #b68af0;
	--accent-ink: #1a1426;
	--accent-2: #c9a6f5;
	--accent-soft: #2c2140;
	--gold-soft: #3a2f1a;
	--good: #3ccf8e;
	--good-soft: #17352a;
	--bad: #ff7b7b;
	--bad-soft: #3d1f24;
	--shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
	--edge: rgba(0, 0, 0, 0.55);
	color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
	margin: 0;
	background-color: var(--bg);
	background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
	background-size: 24px 24px;
	color: var(--ink);
	font: 500 16px/1.6 var(--font);
	-webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), calc(100% - 32px)); margin: 0 auto; }

/* ── Header ─────────────────────────────────────────── */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--line);
}
.site-header .bar { display: flex; align-items: center; gap: 18px; min-height: 76px; }
.brand { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; min-height: 44px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 4px 12px rgba(142, 79, 195, 0.25); }
.brand b { display: block; font-size: 21px; font-weight: 900; line-height: 1.05; white-space: nowrap; }
.brand small { display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.14em; color: var(--ink-3); white-space: nowrap; }

.main-nav { display: flex; gap: 0; margin-left: 4px; }
.main-nav a {
	padding: 8px 10px;
	white-space: nowrap;
	border-radius: 999px;
	color: var(--ink);
	font-weight: 700;
	font-size: 15px;
}
.main-nav a:hover { background: var(--accent-soft); text-decoration: none; }
.main-nav a.on { color: var(--accent-text); background: var(--accent-soft); }
.main-nav a.shop { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
/* a flex box exactly as tall as its button, so the button is centred with the pill and "Play now" */
.header-actions .account-links { display: flex; }
.header-actions .account-links .btn { display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; line-height: 34px; }
.online-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--good-soft);
	color: var(--good);
	font-weight: 800;
	font-size: 14px;
	white-space: nowrap;
}
.online-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 25%, transparent); animation: pulse 2s infinite; }
.online-pill.down { background: var(--bad-soft); color: var(--bad); }
.online-pill.down i { background: var(--bad); animation: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--good) 0%, transparent); } }

.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--surface);
	color: var(--ink);
	font-size: 17px;
	cursor: pointer;
}
.nav-toggle { display: none; }

/* ── Buttons, chips ─────────────────────────────────── */
.btn, input[type='submit'], input[type='reset'], input[type='button'], button.btn, .flux button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 0 22px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: var(--surface);
	color: var(--ink);
	font: 800 15px var(--font);
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition: transform 0.1s, box-shadow 0.15s;
}
.btn:hover, input[type='submit']:hover, input[type='reset']:hover, input[type='button']:hover, .flux button:hover { text-decoration: none; box-shadow: var(--shadow); }
.btn:active, input[type='submit']:active, input[type='reset']:active, input[type='button']:active, .flux button:active { transform: scale(0.97); }
.btn.primary, input[type='submit'], .flux button[type='submit'] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.flux button strong { font-weight: inherit; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #3a2603; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent-text);
	font-size: 13px;
	font-weight: 800;
}
.chip.gold { background: var(--gold-soft); color: #8a5a00; }
:root[data-theme='dark'] .chip.gold { color: var(--gold); }
.chip.big { font-size: 15px; padding: 8px 16px; }
.page-hero .chip { border-radius: 14px; line-height: 1.35; }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.plain { background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
	color: var(--accent);
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.eyebrow .dot.down { background: var(--bad); }

/* ── Cards, sections ────────────────────────────────── */
.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 26px;
}
.section { padding: 64px 0 8px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 900; margin: 0; }
.section-head p { margin: 0; color: var(--ink-2); max-width: 360px; text-align: right; }
.section-head p.eyebrow, .page-hero p.eyebrow { color: var(--accent); }
a.go { display: inline-flex; align-items: center; min-height: 44px; font-weight: 900; }
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }

/* ── Home hero ──────────────────────────────────────── */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 48px; padding: 64px 0 40px; }
.hero h1 { font-size: clamp(44px, 6.4vw, 80px); font-weight: 900; letter-spacing: -0.03em; margin-bottom: 22px; }
.hero h1 em { display: block; font-style: normal; color: var(--accent-2); }
.hero .intro { font-size: 18px; color: var(--ink-2); max-width: 520px; margin-bottom: 28px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.hero .tags { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-art { position: relative; }
.hero-art .frame {
	position: relative;
	overflow: hidden;
	border-radius: 260px 260px 32px 32px;
	box-shadow: 0 24px 60px rgba(120, 70, 160, 0.22);
	border: 6px solid var(--surface);
	aspect-ratio: 4 / 4.2;
	background: var(--accent-soft);
}
.hero-art .frame picture { display: block; width: 100%; height: 100%; }
.hero-art .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-art .caption {
	position: absolute;
	left: 18px;
	right: 18px;
	bottom: 18px;
	padding: 12px 16px;
	border-radius: 16px;
	background: color-mix(in srgb, var(--surface) 86%, transparent);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	text-align: center;
	font-style: italic;
	color: var(--ink-2);
}
.hero-art .badge {
	position: absolute;
	top: 18px;
	left: 50%;
	transform: translateX(-50%);
	padding: 7px 16px;
	border-radius: 999px;
	background: var(--surface);
	color: var(--accent);
	font-weight: 900;
	font-size: 13px;
	letter-spacing: 0.08em;
	white-space: nowrap;
	box-shadow: var(--shadow);
}
.hero-online {
	position: absolute;
	right: -10px;
	top: 38%;
	padding: 14px 18px;
	border-radius: 18px;
	background: var(--surface);
	box-shadow: var(--shadow);
	border: 1px solid var(--line);
	text-align: center;
}
.hero-online b { display: block; font-size: 30px; font-weight: 900; color: var(--good); line-height: 1; }
.hero-online span { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; color: var(--ink-3); text-transform: uppercase; }

.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.strip > div { padding: 22px 26px; border-left: 1px solid var(--line); }
.strip > div:first-child { border-left: 0; }
.strip small { display: block; font-size: 11.5px; font-weight: 900; letter-spacing: 0.16em; color: var(--ink-3); text-transform: uppercase; margin-bottom: 6px; }
.strip b { font-size: 17px; font-weight: 900; }
.strip .sub { display: block; font-size: 13px; color: var(--ink-3); font-weight: 600; }

.step .num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 12px;
	background: var(--accent-soft);
	color: var(--accent-text);
	font-weight: 900;
	white-space: nowrap;
	margin-bottom: 18px;
}
.step h3 { font-size: 22px; font-weight: 900; }
.step p { color: var(--ink-2); font-size: 15px; min-height: 72px; }
.step a.go { font-weight: 900; }

.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature .ico {
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	background: var(--accent-soft);
}
.feature h4 { margin: 2px 0 4px; font-size: 17px; font-weight: 900; }
.feature p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

.event-card { position: relative; overflow: hidden; }
.event-card .when { font-size: 28px; font-weight: 900; margin: 6px 0 2px; }
.event-card .count { color: var(--good); font-weight: 900; }
.event-card ul { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); }
.event-card p > a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; }

.cta-band {
	margin: 70px 0 10px;
	padding: 42px;
	border-radius: 28px;
	background: linear-gradient(135deg, #6b3aa0, #8e4fc3);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	box-shadow: 0 20px 50px rgba(142, 79, 195, 0.3);
}
.cta-band h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 900; margin: 0 0 6px; }
.cta-band p { margin: 0; }
.cta-band .btn { background: #fff; border-color: #fff; color: #6b3aa0; }

/* ── Inner pages ────────────────────────────────────── */
.page-hero { padding: 48px 0 26px; }
.page-hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 900; letter-spacing: -0.02em; }
.page-hero p { color: var(--ink-2); font-size: 18px; max-width: 720px; }
.page-card { margin: 26px 0 40px; }

.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.kv div { padding: 16px 18px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); }
.kv small { display: block; color: var(--ink-3); font-weight: 800; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.kv b { font-size: 20px; font-weight: 900; }

.list-clean { list-style: none; padding: 0; margin: 0; }
.list-clean li { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.list-clean li:last-child { border-bottom: 0; }

.timeline { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.timeline > li { position: relative; padding: 0 0 26px 62px; }
.timeline > li::before {
	counter-increment: step;
	content: counter(step);
	position: absolute;
	left: 0;
	top: 0;
	width: 42px;
	height: 42px;
	border-radius: 13px;
	background: var(--accent-soft);
	color: var(--accent);
	font-weight: 900;
	display: flex;
	align-items: center;
	justify-content: center;
}
.timeline > li::after { content: ''; position: absolute; left: 20px; top: 48px; bottom: 6px; width: 2px; background: var(--line); }
.timeline > li:last-child::after { display: none; }
.timeline h3 { font-size: 19px; font-weight: 900; margin: 6px 0 4px; }
.timeline p { color: var(--ink-2); margin: 0 0 6px; }
.where { display: inline-block; padding: 2px 9px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 800; color: var(--ink-2); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tabs a { padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-weight: 800; font-size: 14px; }
.tabs a.on, .tabs a:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); text-decoration: none; }

/* ── Shop ───────────────────────────────────────────── */
.cp-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 16px; margin-top: 22px; }
.cp-pack { display: flex; align-items: center; gap: 14px; padding: 18px 20px; color: inherit; text-decoration: none; }
.cp-packs .cp-pack { flex-direction: column; align-items: flex-start; gap: 10px; }
.cp-packs .cp-pack .btn { align-self: stretch; text-align: center; }
a.cp-pack:hover { text-decoration: none; border-color: var(--accent); }
.cp-pack > div { flex: 1 1 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.cp-pack b, .cp-pack .price { white-space: nowrap; }
.cp-pack b { font-size: 24px; font-weight: 900; }
.cp-pack .price { font-size: 16px; }
.cp-coin {
	flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
	font-weight: 900; font-size: 14px; color: #573b00;
	background: radial-gradient(circle at 35% 30%, #ffeab0, var(--gold) 72%); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .14);
}
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.shop-item { display: flex; flex-direction: column; padding: 20px; }
.shop-item .top { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.shop-item .pic {
	flex: 0 0 auto;
	width: 64px;
	height: 64px;
	border-radius: 16px;
	background: var(--surface-2);
	border: 1px solid var(--line);
	display: flex;
	align-items: center;
	justify-content: center;
}
.shop-item .pic img { width: 32px; height: 32px; image-rendering: pixelated; }
.shop-item h3 { font-size: 17px; font-weight: 900; margin: 0 0 4px; }
.shop-item .desc { color: var(--ink-2); font-size: 13.5px; line-height: 1.5; flex: 1 1 auto; margin-bottom: 14px; }
.shop-item .desc p { margin: 0 0 2px; }
.shop-item .buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-size: 22px; font-weight: 900; color: var(--accent); }
.collection { float: right; margin: 0 0 10px 16px; width: 75px; image-rendering: pixelated; border-radius: 10px; }

.checkout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: start; }
.pay-option {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border: 2px solid var(--line);
	border-radius: var(--radius-s);
	margin-bottom: 10px;
	cursor: pointer;
	font-weight: 800;
}
.pay-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.checkout input[type='checkbox'], .checkout input[type='radio'] { flex: 0 0 auto; width: 20px; height: 20px; accent-color: var(--accent); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.qty button { width: 40px; height: 40px; border: 0; background: var(--surface-2); color: var(--ink); font-size: 18px; cursor: pointer; }
.qty input { width: 56px; height: 40px; border: 0; text-align: center; font: 800 16px var(--font); background: var(--surface); color: var(--ink); }
.status-done { color: var(--good); font-weight: 900; }
.status-wait { color: #8a5a00; font-weight: 900; }
:root[data-theme='dark'] .status-wait { color: var(--gold); }
.status-bad { color: var(--bad); font-weight: 900; }

/* ── FluxCP pages inside the card (account, rankings, database...) ── */
.flux { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin: 30px 0 46px; overflow-x: auto; }
.flux h2 { font-size: 28px; font-weight: 900; }
.flux h3 { font-size: 20px; font-weight: 900; margin-top: 1.2em; }
.flux table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 10px 0 18px; font-size: 15px; }
.flux table th, .flux table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.flux table th { background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 900; letter-spacing: 0.04em; }
.flux table.vertical-table th, .flux table.generic-form-table th { width: 32%; background: transparent; }
.flux table tr:last-child td, .flux table tr:last-child th { border-bottom: 0; }
.flux .horizontal-table, .flux .vertical-table { border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.flux input[type='text'], .flux input[type='password'], .flux input[type='email'], .flux input[type='number'], .flux select, .flux textarea,
.field input, .field select, .field textarea {
	width: 100%;
	max-width: 420px;
	min-height: 44px;
	padding: 10px 14px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--surface);
	color: var(--ink);
	font: 600 16px var(--font);
	outline: none;
}
.flux input:focus, .flux select:focus, .field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.flux .message, .note-box {
	padding: 12px 16px;
	border-radius: 12px;
	background: var(--accent-soft);
	color: var(--accent-text);
	font-weight: 800;
}
.note-box.gold { background: var(--gold-soft); color: #8a5a00; }
:root[data-theme='dark'] .note-box.gold { color: #f2c063; }
main > .wrap > .message { margin: 16px 0 0; }
.flux .red, .flux .error { color: var(--bad); font-weight: 800; }
.flux .green { color: var(--good); font-weight: 800; }
.flux .notice { padding: 10px 14px; border-radius: 12px; background: var(--gold-soft); }
.flux .not-applicable { color: var(--ink-3); font-style: italic; }
.flux .pages, .flux .pagination { margin: 14px 0; }
.flux .pages a, .flux .pages span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; margin: 2px; padding: 4px 10px; border-radius: 10px; border: 1px solid var(--line); }
.flux .submenu, .flux .pagemenu { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.flux .submenu a, .flux .pagemenu a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 40px; margin: 0; padding: 0 14px; white-space: nowrap; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); font-weight: 800; font-size: 14px; }
.flux .submenu a:hover, .flux .pagemenu a:hover { border-color: var(--accent); text-decoration: none; }
.flux .submenu a.current-sub-menu { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.flux .submenu + .pagemenu { margin-top: -6px; padding-top: 14px; border-top: 1px dashed var(--line); }
.flux .toggler a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 800; }
.flux .toggler a:hover { text-decoration: none; border-color: var(--accent); }
.flux .search-form { margin: 0 0 16px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2); }
.flux .action { font-size: 14px !important; }
.flux .action a { display: inline-flex; align-items: center; min-height: 40px; }
.flux .date-field { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.flux .date-field select { width: auto; flex: 0 0 auto; }
/* forms (register): year, month and day share one row of up to 420px, each wide enough for its value */
.flux .generic-form-table .date-field { display: flex; flex-wrap: nowrap; max-width: 420px; }
.flux .generic-form-table .date-field select { flex: 1 1 0; min-width: 0; max-width: none; }
.flux input[type='radio'], .flux input[type='checkbox'] { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); vertical-align: -4px; }
.flux td label:has(> input[type='radio']), .flux td label:has(> input[type='checkbox']) { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-right: 16px; cursor: pointer; }
.flux .form-hint { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.flux .form-notes { font-weight: 600; color: var(--ink); }
.flux .form-notes b { color: var(--accent-text); }
.flux .form-notes ul { margin: 6px 0 0; padding-left: 20px; }
.flux .scroll-hint { display: flex; align-items: center; gap: 6px; margin: 4px 0 -4px; color: var(--ink-2); font-size: 14px; font-weight: 800; }
.flux { overflow-wrap: break-word; }
.flux img { image-rendering: auto; }
.flux img.emblem { vertical-align: middle; margin-right: 8px; }
.flux .security-code img { border-radius: 10px; }

/* ── Footer ─────────────────────────────────────────── */
.site-footer { margin-top: 70px; border-top: 1px solid var(--line); padding: 34px 0 44px; color: var(--ink-3); }
.site-footer .cols { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.site-footer b { color: var(--ink); font-size: 18px; font-weight: 900; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer nav a { color: var(--ink-2); font-weight: 700; font-size: 14px; }

/* ── WoE schedule ───────────────────────────────────── */
.sched { margin: 0 -12px; }
.sched li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 14px; align-items: start; padding: 10px 12px; }
.sched .day { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 26px; }
.sched .day .chip { padding: 1px 9px; }
.sched .slot { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.sched .slot + .slot { margin-top: 8px; }
.sched .where { white-space: nowrap; }
.sched .what { flex: 1 1 200px; min-width: 0; }
.sched li.today { background: var(--accent-soft); border-radius: 12px; margin: 4px 0; padding: 12px; border-bottom: 0; }
.castle-day { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 10px; }
.back-top { margin: 14px 0 0; text-align: right; }
.back-top a { display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; font-weight: 800; }

/* ── Phones / tablets ───────────────────────────────── */
@media (max-width: 1280px) {
	.main-nav { margin-left: 0; }
	.main-nav a { padding: 8px 9px; font-size: 14.5px; }
	.brand small { display: none; }
}
@media (max-width: 1240px) {
	.header-actions .online-pill .lbl { display: none; }
}
/* the full nav needs about 1,100px: below that the header switches to the menu button */
@media (max-width: 1100px) {
	.header-actions .btn.primary { padding: 0 14px; }
	.nav-toggle { display: inline-flex; }
	.header-actions .account-links { display: none; }
	.header-actions .online-pill .lbl { display: inline; }
	.main-nav {
		display: none;
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		flex-direction: column;
		gap: 2px;
		margin: 0;
		padding: 12px 16px 18px;
		max-height: calc(100vh - var(--header-h));
		max-height: calc(100dvh - var(--header-h));
		overflow-y: auto;
		overscroll-behavior: contain;
		background: var(--bg);
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow);
	}
	.main-nav .mobile-only { display: block; }
	body.nav-open .main-nav { display: flex; }
	/* dim the page under the open menu: a tap there only closes the menu (footer.php stops the tap) */
	body.nav-open::after { content: ''; position: fixed; inset: var(--header-h) 0 0; z-index: 40; background: rgba(20, 12, 30, 0.3); }
	.main-nav a { flex: 0 0 auto; padding: 12px 14px; font-size: 16px; }
	.main-nav .nav-sep { flex: 0 0 auto; height: 1px; margin: 8px 14px; background: var(--line); }
	.main-nav a.nav-signin { color: var(--accent-text); }
	.main-nav .nav-theme { display: none; }
}
@media (max-width: 920px) {
	.grid.three > :last-child:nth-child(odd) { grid-column: 1 / -1; }
	.tabs a { display: inline-flex; align-items: center; min-height: 42px; }
	.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
	.site-footer nav { gap: 0 18px; }
	.cp-packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cp-packs .cp-pack { flex-direction: row; align-items: center; gap: 14px; }
	.cp-packs .cp-pack .btn { align-self: center; flex: 0 0 auto; }
	.cp-packs > :last-child:nth-child(odd) { grid-column: 1 / -1; }

	/* stock FluxCP tables: each wide table scrolls on its own, the page and the card stay put */
	.flux table.horizontal-table,
	.flux table.vertical-table {
		display: block;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-x: contain;
		background:
			linear-gradient(to left, var(--surface) 40%, transparent) right center / 36px 100% no-repeat local,
			radial-gradient(farthest-side at 100% 50%, var(--edge), transparent) right center / 16px 100% no-repeat scroll,
			var(--surface);
	}
	.flux table.horizontal-table > tbody,
	.flux table.vertical-table > tbody { display: table; width: 100%; }
	.flux table.horizontal-table th, .flux table.horizontal-table td,
	.flux table.vertical-table:not(:has(> tbody > tr > th + td)) th,
	.flux table.vertical-table:not(:has(> tbody > tr > th + td)) td { white-space: nowrap; }
	.flux table.horizontal-table td { background: transparent; }
	/* keep the name next to the numbers while the table is swiped (the ranking/character and
	   ranking/guild templates put a guild's emblem inside the name cell, so column 2 is the name everywhere) */
	.m-ranking .flux table.horizontal-table tr > :nth-child(2),
	.m-account.a-view .flux table.vertical-table:not(:has(> tbody > tr > th + td)) tr > :nth-child(2) {
		position: sticky;
		left: 0;
		z-index: 1;
		background: var(--surface);
		box-shadow: 1px 0 0 var(--line);
	}
	.m-ranking.a-mvp .flux table.horizontal-table tr > :nth-child(2) { position: static; box-shadow: none; }
	.m-ranking .flux table.horizontal-table tr > th:nth-child(2),
	.m-account.a-view .flux table.vertical-table tr > th:nth-child(2) { background: var(--surface-2); }
	.hero { grid-template-columns: 1fr; gap: 34px; padding-top: 34px; }
	.hero-art { max-width: 460px; margin: 0 auto; }
	.hero-online { right: 0; }
	.strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.strip > div:nth-child(3) { border-left: 0; }
	.strip > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
	.grid.three, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.checkout { grid-template-columns: 1fr; }
	.section-head { flex-direction: column; align-items: flex-start; }
	.section-head p { text-align: left; }
}
/* links inside the stock tables (account, character...) get a finger-sized height on tablets and phones */
@media (max-width: 920px), (pointer: coarse) {
	.flux table td a { display: inline-flex; align-items: center; min-height: 40px; }
}
@media (max-width: 600px) {
	:root { --header-h: 64px; }
	.site-header .bar { min-height: 64px; gap: 10px; }
	.brand img { width: 38px; height: 38px; }
	.brand b { font-size: 18px; }
	.brand small { display: none; }
	.online-pill { padding: 5px 10px; font-size: 13px; }
	.header-actions .btn.primary { min-height: 40px; padding: 0 12px; font-size: 14px; }
	.header-actions .theme-toggle { display: none; }
	.grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
	.card, .flux { padding: 20px; }
	.cta-band { flex-direction: column; align-items: flex-start; padding: 28px; }
	.section { padding-top: 46px; }
	.step p { min-height: 0; }
	.hero h1 { font-size: 46px; }
	.flux table th, .flux table td { padding: 9px 8px; font-size: 14px; }

	/* header + phone menu */
	.main-nav .nav-theme {
		display: flex;
		align-items: center;
		gap: 10px;
		flex: 0 0 auto;
		width: 100%;
		min-height: 48px;
		padding: 12px 14px;
		border: 0;
		border-radius: 999px;
		background: none;
		color: var(--ink);
		font: 700 16px var(--font);
		text-align: left;
		cursor: pointer;
	}
	.main-nav .nav-theme:hover { background: var(--accent-soft); }
	:root[data-theme='dark'] .nav-theme .when-light, :root:not([data-theme='dark']) .nav-theme .when-dark { display: none; }

	/* home */
	.hero { gap: 24px; }
	.hero .eyebrow { align-items: flex-start; letter-spacing: 0.1em; }
	.hero .eyebrow .dot { flex: 0 0 auto; margin-top: 0.55em; }
	.hero .cta .btn { flex: 1 1 100%; }
	.hero-art .frame { aspect-ratio: 4 / 3; border-radius: 160px 160px 24px 24px; }
	.hero-online { display: none; }
	.strip > div { padding: 16px 18px; }
	.strip .sub { font-size: 14px; }
	.strip small, .kv small { font-size: 12.5px; }
	.card.step { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 14px; padding: 18px; }
	.step .num { margin: 0; }
	.step h3 { font-size: 19px; margin: 0; }
	.step p, .step a.go { grid-column: 1 / -1; }
	.step p { margin: 10px 0 0; }
	.step a.go { justify-self: start; }
	.cta-band { margin-top: 50px; }

	/* inner pages */
	.page-hero { padding: 34px 0 20px; }
	.page-hero p { font-size: 17px; }
	.where { font-size: 14px; }
	.kv { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.kv div { padding: 12px 14px; }
	.kv b { font-size: 18px; }
	.timeline > li { padding-left: 48px; }
	.timeline > li::before { width: 34px; height: 34px; border-radius: 11px; }
	.timeline > li::after { left: 16px; top: 40px; }
	.sched li { grid-template-columns: minmax(0, 1fr); }
	.castle-day { grid-template-columns: 92px minmax(0, 1fr); }

	/* shop */
	.cp-packs { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.cp-packs .cp-pack { padding: 14px 16px; }
	.cp-pack b { font-size: 20px; }
	#items .tabs {
		position: sticky;
		top: calc(var(--header-h) - 1px);
		z-index: 5;
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		scroll-snap-type: x proximity;
		scroll-padding: 0 16px;
		margin: 0 -16px 12px;
		padding: 8px 16px;
		background: color-mix(in srgb, var(--bg) 94%, transparent);
		-webkit-backdrop-filter: blur(10px);
		backdrop-filter: blur(10px);
		border-bottom: 1px solid var(--line);
	}
	#items .tabs::-webkit-scrollbar { display: none; }
	#items .tabs a { flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap; min-height: 44px; }
	.shop-item { padding: 16px; }
	.shop-item .pic { width: 52px; height: 52px; }
	.shop-item .top .muted.small { display: none; }
	.shop-item .desc { font-size: 14.5px; }

	/* footer */
	.site-footer { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
	.site-footer nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; width: 100%; }
	.site-footer nav a { display: flex; min-height: 44px; font-size: 15px; border-bottom: 1px solid var(--line); }

	/* stock FluxCP pages */
	.flux { margin: 22px 0 36px; }
	.flux h2 { font-size: 24px; }
	.flux table.generic-form-table,
	.flux table.generic-form-table > tbody,
	.flux table.generic-form-table > tbody > tr,
	.flux table.generic-form-table > tbody > tr > th,
	.flux table.generic-form-table > tbody > tr > td { display: block; width: 100% !important; }
	.flux table.generic-form-table > tbody > tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
	.flux table.generic-form-table > tbody > tr:last-child { border-bottom: 0; }
	.flux table.generic-form-table > tbody > tr > th,
	.flux table.generic-form-table > tbody > tr > td { padding: 4px 0; border: 0; text-align: left; }
	.flux table.generic-form-table > tbody > tr > th { font-size: 14px; }
	.flux table.generic-form-table > tbody > tr > td:empty { display: none; }
	.flux table.generic-form-table input:not([type='radio']):not([type='checkbox']),
	.flux table.generic-form-table select { max-width: none; }
	.flux table.generic-form-table > tbody > tr > td[rowspan],
	.flux table.generic-form-table > tbody > tr > td:last-child > p { font-size: 14px; color: var(--ink-2); }
	.flux table.generic-form-table > tbody > tr > td[rowspan] p { margin: 4px 0 0; }
	.flux table.generic-form-table input[type='submit'],
	.flux table.generic-form-table button { width: 100%; }
	/* birth date: one row of three equal selects; the "-" separators are dropped for the room */
	.flux .generic-form-table .date-field { max-width: none; gap: 0; font-size: 0; }
	.flux .generic-form-table .date-field select { padding-inline: 10px; }
	.flux .generic-form-table .date-field select + select { margin-left: 8px; }
	/* item / monster lists: the search form waits behind "Search..." (footer.php opens it after a search) */
	.flux .search-form { display: none; }
	/* rankings: a long name is cut short so the numbers fit beside it; experience totals and emblems are left out */
	.m-ranking .flux table.horizontal-table td:nth-child(2) > strong { display: block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
	.m-ranking .flux table.horizontal-table td:nth-child(2) > strong > a { display: inline; min-height: 0; }
	.m-ranking .flux table.horizontal-table .rk-exp,
	.m-ranking .flux img.emblem { display: none; }
	/* label / value tables (account, character): one pair per line */
	.flux table.vertical-table:has(> tbody > tr > th + td) { display: block; overflow: visible; background: var(--surface); }
	.flux table.vertical-table:has(> tbody > tr > th + td) > tbody { display: block; }
	.flux table.vertical-table:has(> tbody > tr > th + td) > tbody > tr { display: flex; flex-wrap: wrap; align-items: baseline; }
	.flux table.vertical-table:has(> tbody > tr > th + td) > tbody > tr > th,
	.flux table.vertical-table:has(> tbody > tr > th + td) > tbody > tr > td { display: block; width: auto !important; border: 0; white-space: normal; overflow-wrap: anywhere; }
	.flux table.vertical-table:has(> tbody > tr > th + td) > tbody > tr > th { flex: 0 0 38%; overflow-wrap: break-word; }
	.flux table.vertical-table:has(> tbody > tr > th + td) > tbody > tr > td { flex: 1 1 0; min-width: 40%; }
	.flux table.vertical-table:has(> tbody > tr > th + td) > tbody > tr > td:has(> img:only-child):not([rowspan]) { flex: 0 0 auto; min-width: 0; }
	.flux table.vertical-table:has(> tbody > tr > th + td) > tbody > tr > td[rowspan],
	.flux table.vertical-table:has(> tbody > tr > th + td) > tbody > tr > td:has(> table) { flex-basis: 100%; text-align: center; }
	.flux table.character-stats { margin: 0; border: 0; }
	.flux table.character-stats td { padding: 6px 4px; border: 0; text-align: left; }
	.flux .search-form p, .flux .search-form2 p { display: flex; flex-wrap: wrap; align-items: center; font-size: 0; margin: 0 0 6px; }
	.flux .search-form label, .flux .search-form2 label { flex: 0 0 100%; margin: 10px 0 4px; font-size: 14px; font-weight: 800; color: var(--ink-2); }
	.flux .search-form select[name$='_op'] { flex: 0 0 132px; width: 132px; margin-right: 8px; }
	.flux .search-form select[name$='_op'] + input { flex: 1 1 0; width: auto; min-width: 0; }
	.flux .search-form input[type='submit'], .flux .search-form input[type='button'], .flux .search-form input[type='reset'],
	.flux .search-form2 input[type='submit'], .flux .search-form2 input[type='button'], .flux .search-form2 input[type='reset'] { flex: 1 1 0; margin: 12px 0 0; }
	.flux .search-form input[type='submit'] + input, .flux .search-form2 input[type='submit'] + input { margin-left: 8px; }
}
@media (max-width: 440px) {
	.header-actions .online-pill .lbl { display: none; }
	.online-pill { gap: 6px; padding: 5px 10px; }
}
@media (max-width: 400px) {
	.site-header .bar { gap: 8px; }
	.brand { gap: 8px; }
	.brand img { width: 34px; height: 34px; }
	.brand b { font-size: 16px; }
	.online-pill { padding: 5px 9px; font-size: 13px; }
	.header-actions { gap: 6px; }
	.header-actions .btn.primary { padding: 0 10px; font-size: 13px; }
}
.mobile-only { display: none; }
