/* =====================================================================
   ASCEND — FluxCP theme
   Change the colours below to re-skin the whole site.
   ===================================================================== */
:root {
	--ink:        #13284b;   /* headings, nav text */
	--text:       #4a5a75;   /* body text */
	--muted:      #7d8aa3;
	--primary:    #1f5fbf;   /* buttons, links, second hero line */
	--primary-dk: #174a97;
	--primary-lt: #eaf2ff;
	--gold:       #e9b52b;   /* active underline, rank #1, accents */
	--gold-lt:    #fff4d6;
	--bg:         #f8fafd;
	--card:       #ffffff;
	--line:       #e3e9f3;
	--success:    #1f9d63;
	--danger:     #d0453b;
	--radius:     14px;
	--radius-sm:  8px;
	--shadow:     0 10px 30px -12px rgba(19, 40, 75, .18);
	--shadow-lg:  0 24px 60px -20px rgba(19, 40, 75, .28);
	--serif:      "DM Serif Display", Georgia, "Times New Roman", serif;
	--sans:       "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
	--wrap:       1180px;
	--fallback:   linear-gradient(160deg, #dcebff 0%, #eef5ff 45%, #fdf6e3 100%);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.6;
	color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
table { font-family: var(--sans); font-size: 14px; }
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-dk); }
a img { border: 0; }
img { max-width: 100%; }
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .5em; line-height: 1.15; }
h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; letter-spacing: -.2px; }
h3 { font-size: 18px; font-weight: 800; }
h4 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }

.eyebrow {
	display: inline-flex; align-items: center; gap: 10px;
	font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--ink);
}
.eyebrow.small { font-size: 11px; letter-spacing: .16em; color: var(--primary); margin-bottom: 6px; }
.eyebrow.light { color: #ffe39a; }
.diamond { width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); display: inline-block; }

/* ---------- Buttons ---------- */
.btn, input[type=submit], input[type=button], input[type=reset], button.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	font-family: var(--sans); font-weight: 800; font-size: 14px; line-height: 1;
	padding: 12px 22px; border-radius: var(--radius-sm); border: 1.5px solid transparent;
	cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, color .15s;
	white-space: nowrap;
}
.btn-primary, input[type=submit] {
	background: var(--primary); color: #fff; box-shadow: 0 8px 18px -8px rgba(31, 95, 191, .7);
}
.btn-primary:hover, input[type=submit]:hover { background: var(--primary-dk); color: #fff; transform: translateY(-1px); }
.btn-outline, input[type=button], input[type=reset] { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover, input[type=button]:hover, input[type=reset]:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover, .btn-ghost.is-active { color: var(--primary); background: var(--primary-lt); }
.btn-lg { padding: 16px 26px; font-size: 15px; }
.chev { font-size: 20px; line-height: 0; font-weight: 400; margin-top: -2px; }
.ico-dl {
	width: 14px; height: 14px; display: inline-block; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12m0 0l-5-5m5 5l5-5M4 20h16'/%3E%3C/svg%3E") center/contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12m0 0l-5-5m5 5l5-5M4 20h16'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ---------- Top navigation ---------- */
.topbar {
	position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92);
	backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
	border-bottom: 1px solid transparent; transition: box-shadow .2s, border-color .2s;
}
.topbar.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px -14px rgba(19, 40, 75, .35); }
.topbar-inner { display: flex; align-items: center; gap: 32px; height: 76px; }
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 52px; width: auto; display: block; }
.brand-text { font-family: var(--serif); font-size: 26px; color: var(--ink); }
.nav-panel { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-links { list-style: none; margin: 0 auto; padding: 0; display: flex; gap: 6px; }
.nav-links > li { position: relative; }
.nav-links > li > a {
	display: block; padding: 10px 14px; font-weight: 700; font-size: 14.5px; color: var(--ink); position: relative;
}
.nav-links > li > a::after {
	content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 3px; border-radius: 3px;
	background: var(--gold); transform: scaleX(0); transition: transform .2s;
}
.nav-links > li > a:hover { color: var(--primary); }
.nav-links > li > a.is-active { color: var(--primary); }
.nav-links > li > a.is-active::after, .nav-links > li > a:hover::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.caret { display: inline-block; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; margin-left: 4px; vertical-align: middle; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }

.has-drop { position: relative; }
.drop {
	display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px; max-height: 70vh; overflow: auto;
	list-style: none; margin: 0; padding: 8px; background: #fff; border: 1px solid var(--line);
	border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 60;
}
.drop-right { left: auto; right: 0; }
.has-drop.is-open > .drop { display: block; }
.drop li a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); font-weight: 600; font-size: 14px; }
.drop li a:hover { background: var(--primary-lt); color: var(--primary); }
.drop li.sep { height: 1px; background: var(--line); margin: 6px 4px; }

.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 72px; }
.hero::before {
	content: ""; position: absolute; inset: 0; z-index: -2;
	background: var(--hero-img, none) center 60%/cover no-repeat, var(--fallback);
	opacity: .7; filter: saturate(.9);
}
.hero::after {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background:
		linear-gradient(90deg, rgba(248, 250, 253, .97) 0%, rgba(248, 250, 253, .88) 38%, rgba(248, 250, 253, .35) 70%, rgba(248, 250, 253, .55) 100%),
		linear-gradient(180deg, rgba(248, 250, 253, 0) 65%, var(--bg) 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 5.6vw, 68px); line-height: 1.02; letter-spacing: -1px; margin: 18px 0 22px; }
.hero h1 span { display: block; }
.hero h1 .line-2 { color: var(--primary); }
.hero .lead { font-size: 16.5px; max-width: 440px; color: var(--text); margin-bottom: 26px; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.hero-links { display: flex; gap: 10px; align-items: center; font-size: 14px; margin-bottom: 8px; }
.hero-links a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.hero-links span { color: var(--muted); }
.hero-req { font-size: 12.5px; color: var(--muted); max-width: 460px; }
.hero-req a { text-decoration: underline; text-underline-offset: 2px; }

.hero-art { position: relative; aspect-ratio: 1 / .92; border-radius: 36px 36px 36px 120px; overflow: hidden; background: var(--fallback); box-shadow: var(--shadow-lg); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .65); pointer-events: none; }
.hero-art.is-cutout { background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.hero-art.is-cutout::after { display: none; }
.hero-art.is-cutout img { object-fit: contain; filter: drop-shadow(0 24px 30px rgba(19, 40, 75, .25)); }
.chip {
	position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px;
	background: rgba(255, 255, 255, .95); border-radius: 999px; font-size: 13px; font-weight: 800; color: var(--ink);
	box-shadow: var(--shadow);
}
.chip-online { left: 22px; bottom: 22px; }
.hero-art.is-cutout .chip-online { left: 50%; bottom: -30px; transform: translateX(-50%); white-space: nowrap; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: #2bc67a; box-shadow: 0 0 0 4px rgba(43, 198, 122, .22); }

/* ---------- Home body ---------- */
.home-body { max-width: 1020px; }
.section { margin: 64px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 22px; }
.section-head h2 { font-size: 34px; margin: 0; }
.section-aside { font-size: 14px; color: var(--muted); text-align: right; margin: 0 0 6px; }
.empty { color: var(--muted); }

/* Community goal */
.goal-card {
	background: linear-gradient(180deg, #f2f7ff, #eaf2ff); border: 1px solid #d9e6fb; border-top: 3px solid var(--gold);
	border-radius: var(--radius); padding: 24px 26px 20px; margin-top: 8px; box-shadow: var(--shadow);
}
.goal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.goal-head h2 { font-size: 26px; margin: 0; }
.goal-count { display: flex; align-items: baseline; gap: 6px; font-size: 13px; color: var(--text); margin: 12px 0 10px; }
.goal-count strong { font-size: 24px; color: var(--primary); font-weight: 800; }
.goal-status { margin-left: auto; font-size: 12px; color: var(--muted); }
.progress { height: 8px; background: #d5e3f8; border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #3a86ef); border-radius: inherit; }
.milestones { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 18px 0 12px; }
.milestone { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid #c9daf5; border-radius: 10px; background: rgba(255, 255, 255, .55); opacity: .6; }
.milestone.is-unlocked { opacity: 1; background: #e3eeff; }
.milestone strong { display: block; color: var(--primary); font-size: 17px; line-height: 1.1; }
.milestone small { font-size: 11px; color: var(--muted); }
.gift { width: 26px; height: 26px; background: var(--primary); flex: none;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 10h18v4H3zM4 14h7v8H4zM13 14h7v8h-7zM11 10h2v12h-2zM12 9C9 9 6 8 7 5.5S11 5 12 9zm0 0c3 0 6-1 5-3.5S13 5 12 9z'/%3E%3C/svg%3E") center/contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 10h18v4H3zM4 14h7v8H4zM13 14h7v8h-7zM11 10h2v12h-2zM12 9C9 9 6 8 7 5.5S11 5 12 9zm0 0c3 0 6-1 5-3.5S13 5 12 9z'/%3E%3C/svg%3E") center/contain no-repeat; }
.goal-note { font-size: 12px; color: var(--muted); margin: 0; }

/* Quick links */
.quick-links { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 32px 0; }
.quick { display: flex; align-items: center; gap: 14px; padding: 20px 18px; color: var(--ink); transition: background .15s; }
.quick + .quick { border-left: 1px solid var(--line); }
.quick:hover { background: #fff; color: var(--ink); }
.quick strong { display: block; font-size: 14.5px; }
.quick small { display: block; color: var(--muted); font-size: 13px; }
.quick .chev { margin-left: auto; color: var(--muted); }
.qi { width: 36px; height: 36px; flex: none; background: var(--primary); }
.qi-map  { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 6l6-3 8 3 6-3v15l-6 3-8-3-6 3zM8 5v13M16 7v13' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 6l6-3 8 3 6-3v15l-6 3-8-3-6 3zM8 5v13M16 7v13' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.qi-trophy { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3h10v6a5 5 0 01-10 0zM7 5H3v2a4 4 0 004 4M17 5h4v2a4 4 0 01-4 4M12 14v4M8 21h8M9 18h6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3h10v6a5 5 0 01-10 0zM7 5H3v2a4 4 0 004 4M17 5h4v2a4 4 0 01-4 4M12 14v4M8 21h8M9 18h6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; background: var(--gold); }
.qi-key { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='8' r='5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M11.5 11.5L21 21M17 17l2-2M15 19l2-2' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='8' r='5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M11.5 11.5L21 21M17 17l2-2M15 19l2-2' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; }

/* About strip */
.about-strip {
	background: linear-gradient(110deg, #1d57b3 0%, #2470d6 60%, #3a86ef 100%); color: #fff;
	border-radius: var(--radius); padding: 22px 28px 26px; box-shadow: 0 20px 40px -18px rgba(31, 95, 191, .7);
}
.about-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 4px; }
.about-item { padding: 6px 22px; }
.about-item:first-child { padding-left: 0; }
.about-item + .about-item { border-left: 1px solid rgba(255, 255, 255, .25); }
.about-item strong { display: block; font-size: 22px; font-weight: 800; line-height: 1.25; }
.about-item small { display: block; font-size: 12px; opacity: .8; margin-top: 4px; }

/* Top players */
.top-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.top-card {
	position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 8px 18px;
	padding: 24px 22px; border-radius: 12px; background: #fff; border: 1px solid var(--line); min-height: 160px; box-shadow: var(--shadow);
}
.top-card.rank-1 { background: var(--gold-lt); border-color: #f3dfa3; }
.top-card .rank { font-weight: 800; font-size: 13px; color: var(--gold); padding-top: 3px; }
.top-card.rank-2 .rank { color: #8a97ad; }
.top-card.rank-3 .rank { color: #c27a43; }
.top-name strong { display: block; color: var(--ink); font-size: 17px; }
.top-name small { color: var(--muted); font-size: 13px; }
.top-stat { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; align-self: end; }
.top-stat b { font-size: 26px; color: var(--primary); font-weight: 800; }
.top-stat b.sub { font-size: 18px; margin-left: 10px; color: var(--ink); }
.top-stat span { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* World split */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: start; }
.shot { aspect-ratio: 16 / 7; border-radius: 10px; overflow: hidden; background: var(--fallback); margin-bottom: 22px; box-shadow: var(--shadow); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.h3-serif { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 4px 0 12px; }
.split-right { padding-top: 26px; }
.link-list { list-style: none; padding: 0; margin: 18px 0 0; }
.link-list li { border-top: 1px solid var(--line); }
.link-list li:last-child { border-bottom: 1px solid var(--line); }
.link-list a { display: flex; align-items: center; gap: 14px; padding: 14px 4px; color: var(--ink); }
.link-list a:hover { background: #fff; }
.link-list strong { display: block; color: var(--primary); font-size: 14.5px; }
.link-list small { display: block; color: var(--muted); font-size: 12px; }
.link-list .chev { margin-left: auto; color: var(--muted); }
.li-ico { width: 22px; height: 22px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.li-up { background: var(--primary); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 13l6-6 6 6M6 19l6-6 6 6'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 13l6-6 6 6M6 19l6-6 6 6'/%3E%3C/svg%3E") center/contain no-repeat; }
.li-zeny { border: 2px solid var(--gold); border-radius: 50%; color: var(--gold); font-weight: 800; font-size: 12px; }
.li-guild { background: var(--primary); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l8 3v6c0 5-3.5 9-8 11-4.5-2-8-6-8-11V5z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l8 3v6c0 5-3.5 9-8 11-4.5-2-8-6-8-11V5z'/%3E%3C/svg%3E") center/contain no-repeat; }

/* ---------- Inner pages ---------- */
.page-banner { position: relative; overflow: hidden; padding: 46px 0 70px; }
.page-banner::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--banner-img, none) center 40%/cover no-repeat, var(--fallback); opacity: .5; }
.page-banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(248, 250, 253, .96) 20%, rgba(248, 250, 253, .6) 100%), linear-gradient(180deg, transparent 60%, var(--bg)); }
.page-banner h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4vw, 48px); margin: 10px 0 0; }
.page { margin-top: -40px; margin-bottom: 70px; }
.page-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 34px; box-shadow: var(--shadow); overflow-x: auto; }
.page-card > h2 { font-size: 28px; }
.page-card h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; text-transform: none; border: 0; margin-top: 24px; }
.page-card h3:first-letter { font-weight: inherit; }
.lead-muted { font-size: 16px; color: var(--muted); margin-bottom: 24px; }

/* Sub menu tabs */
#submenu.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; margin: 0 0 22px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
#submenu .sub-menu-item { padding: 8px 14px; border-radius: 8px; font-weight: 700; font-size: 13.5px; color: var(--text); }
#submenu .sub-menu-item:hover { background: #fff; color: var(--primary); }
#submenu .current-sub-menu { background: #fff; color: var(--primary); box-shadow: 0 2px 8px -3px rgba(19, 40, 75, .25); }
#pagemenu { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 20px; padding: 0; border: 0; background: none; }
#pagemenu .pagemenu-label { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
#pagemenu a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--ink); background: #fff; }
#pagemenu a:hover { border-color: var(--primary); color: var(--primary); }

/* Messages */
.message, .notice, .red, .green {
	padding: 12px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; margin: 0 0 18px;
}
.message { background: var(--primary-lt); color: var(--primary-dk); border: 1px solid #cfe0fb; }
.home .message { margin-top: 18px; }
.notice { background: var(--gold-lt); color: #8a6411; border: 1px solid #f3dfa3; }
p.red, .red { background: #fdeceb; color: var(--danger); border: 1px solid #f6cfcb; display: block; }
p.green, .green { background: #e7f7ef; color: var(--success); border: 1px solid #bfe9d4; display: block; }
td .red, td .green, span.red, span.green { display: inline; padding: 0; background: none; border: 0; }
.note { color: var(--muted); font-size: 13px; }
.not-applicable { color: var(--muted); font-style: italic; }
.up, .online { color: var(--success); font-weight: 700; }
.down, .offline { color: var(--danger); font-weight: 700; }
.state-pending { color: #b98500; }
.state-banned, .state-permanently-banned { color: var(--danger); }
.keyword { background: var(--gold-lt); padding: 0 3px; border-radius: 3px; }

/* Tables */
.horizontal-table, .vertical-table, .generic-form-table, .install_table {
	width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 20px;
	border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff;
}
.horizontal-table th, .horizontal-table td, .vertical-table th, .vertical-table td { padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.horizontal-table tr:last-child td, .vertical-table tr:last-child td, .vertical-table tr:last-child th { border-bottom: 0; }
.horizontal-table th { background: #f3f7fd; color: var(--ink); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.horizontal-table th a { color: var(--ink); }
.horizontal-table tr:hover td { background: #f8fbff; }
.horizontal-table tr.top-ranked td { background: var(--gold-lt); font-weight: 700; }
.horizontal-table tr.empty-row td { height: 8px; padding: 0; }
.vertical-table th { width: 220px; background: #f7f9fd; color: var(--ink); font-weight: 700; font-size: 13.5px; }
.req-table th { width: 200px; }
.generic-form-table { border: 0; background: transparent; overflow: visible; max-width: 640px; }
.generic-form-table th, .generic-form-table td { padding: 8px 10px 8px 0; border: 0; text-align: left; vertical-align: middle; }
.generic-form-table th { width: 200px; font-weight: 700; color: var(--ink); font-size: 14px; }
.generic-form-table th label { cursor: pointer; }

/* Forms */
input[type=text], input[type=password], input[type=email], input[type=number], input[type=file], input[type=date], textarea, select {
	font-family: var(--sans); font-size: 14.5px; color: var(--ink); padding: 11px 14px; min-height: 44px;
	border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; outline: none;
	transition: border-color .15s, box-shadow .15s; max-width: 100%;
}
select { padding-right: 34px; -webkit-appearance: none; appearance: none; cursor: pointer;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d8aa3' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 10px center/14px no-repeat; }
.generic-form-table input[type=text], .generic-form-table input[type=password], .generic-form-table input[type=email] { width: 100%; max-width: 380px; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(31, 95, 191, .12); }
textarea { min-height: 120px; width: 100%; }
label:hover { cursor: pointer; }
.search-form, .search-form2 { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 0 0 20px; }
.search-form p, .search-form2 p { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 8px; }
.search-form p:last-child, .search-form2 p:last-child { margin: 0; }
.search-form label, .search-form2 label { font-weight: 700; color: var(--ink); font-size: 13.5px; }
.toggler a { font-weight: 700; }
.security-code img { border-radius: 8px; border: 1px solid var(--line); }

/* Login + register pages: centred card */
.module-account.action-login .page-card, .module-account.action-create .page-card { max-width: 720px; margin: 0 auto; }

/* Pagination */
.pages { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 16px 0; }
.pages a, .pages span { padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 13px; }
.pages .current-page { background: var(--primary); color: #fff; border-color: var(--primary); }
.info-text { color: var(--muted); font-size: 13px; margin-bottom: 12px; }

/* Misc Flux bits */
.credit-balance { display: inline-flex; gap: 10px; padding: 10px 16px; margin-bottom: 18px; background: var(--gold-lt); border: 1px solid #f3dfa3; border-radius: 10px; }
.credit-balance .balance-amount { font-weight: 800; color: var(--ink); }
.character-stats td { padding: 4px 10px; }
.shop-table { width: 100%; border-collapse: collapse; }
.shop-table td { padding: 14px; border-bottom: 1px solid var(--line); }
.shop-item-name { font-weight: 800; color: var(--ink); font-size: 15px; }
.request, .fs-path, .raw-txn-log, .script-line { font-family: Consolas, monospace; font-size: 12.5px; background: var(--bg); border-radius: 6px; padding: 2px 6px; }
.sortable { cursor: pointer; }
#server_status { width: 100%; border-collapse: collapse; }
#server_status th, #server_status td { padding: 10px 12px; border-bottom: 1px solid var(--line); }

/* Download page */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-bottom: 36px; }
.dl-card { border: 1px solid var(--line); border-radius: 14px; padding: 26px; background: #fff; display: flex; flex-direction: column; align-items: flex-start; }
.dl-card.is-main { background: linear-gradient(180deg, #f2f7ff, #e8f1ff); border-color: #d2e2fa; }
.dl-card h3 { font-family: var(--sans); font-weight: 800; font-size: 19px; margin: 12px 0 6px; }
.dl-card p { font-size: 14px; flex: 1; }
.dl-ico { width: 40px; height: 40px; background: var(--primary); }
.dl-win { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5l8-1v8H3zM13 3.8L21 3v9h-8zM3 13h8v7.8L3 20zM13 13h8v8l-8-1.2z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5l8-1v8H3zM13 3.8L21 3v9h-8zM3 13h8v7.8L3 20zM13 13h8v8l-8-1.2z'/%3E%3C/svg%3E") center/contain no-repeat; }
.dl-android { background: var(--success); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 10h14v8a2 2 0 01-2 2H7a2 2 0 01-2-2zM5 9a7 7 0 0114 0zM8 2l1.5 2.5M16 2l-1.5 2.5' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 10h14v8a2 2 0 01-2 2H7a2 2 0 01-2-2zM5 9a7 7 0 0114 0zM8 2l1.5 2.5M16 2l-1.5 2.5' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center/contain no-repeat; }
.dl-patch { background: var(--gold); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l9 5v10l-9 5-9-5V7z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l9 5v10l-9 5-9-5V7z'/%3E%3C/svg%3E") center/contain no-repeat; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 30px; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.steps li::before { content: counter(s); grid-row: 1 / 3; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-lt); color: var(--primary); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps strong { color: var(--ink); }
.steps span { font-size: 14px; }
.help-line { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { position: relative; isolation: isolate; padding: 0 0 26px; background: var(--bg); overflow: hidden; }
.footer-scene { position: relative; height: 340px; margin-bottom: -150px; z-index: -1; pointer-events: none; }
.footer-scene::before { content: ""; position: absolute; inset: 0; background: var(--footer-img, none) center 38%/cover no-repeat; opacity: .55; filter: saturate(.85); }
.footer-scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgba(248, 250, 253, .55) 40%, rgba(248, 250, 253, .35) 65%, rgba(248, 250, 253, .9) 100%); }
.is-inner .footer-scene { height: 260px; margin-bottom: -120px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand strong { display: block; color: var(--ink); font-weight: 800; }
.footer-brand span { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 0; margin: 0; }
.footer-links a { color: var(--text); font-size: 13.5px; }
.footer-links a:hover { color: var(--primary); }
.footer-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: 12.5px; color: var(--muted); }
.footer-tools { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 16px; font-size: 12px; color: var(--muted); }
.footer-tools:empty { display: none; }
.footer-tools select { min-height: 32px; padding: 4px 30px 4px 10px; font-size: 12px; margin-left: 6px; }

/* Image failed -> soft gradient stays visible */
.img-failed { background: var(--fallback); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.nav-toggle { display: block; }
	.topbar-inner { height: 68px; }
	.brand img { height: 44px; }
	.nav-panel {
		display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
		background: #fff; border-bottom: 1px solid var(--line); padding: 12px 20px 20px; box-shadow: var(--shadow-lg);
	}
	.topbar.is-open .nav-panel { display: flex; }
	.nav-links { flex-direction: column; margin: 0; }
	.nav-links > li > a::after { display: none; }
	.nav-links > li > a.is-active { background: var(--primary-lt); border-radius: 8px; }
	.drop { position: static; box-shadow: none; border: 0; padding-left: 12px; }
	.nav-actions { justify-content: stretch; }
	.nav-actions > .btn { flex: 1; }
	.hero-grid { grid-template-columns: 1fr; }
	.hero-art { max-width: 520px; width: 100%; margin: 0 auto; }
	.about-grid { grid-template-columns: repeat(2, 1fr); gap: 16px 0; }
	.about-item:nth-child(3) { padding-left: 0; border-left: 0; }
	.split { grid-template-columns: 1fr; }
	.split-right { padding-top: 0; }
}
@media (max-width: 680px) {
	.footer-scene, .is-inner .footer-scene { height: 200px; margin-bottom: -90px; }
	body { font-size: 14.5px; }
	.wrap { padding: 0 16px; }
	.quick-links { grid-template-columns: 1fr; }
	.quick + .quick { border-left: 0; border-top: 1px solid var(--line); }
	.section-head { flex-direction: column; align-items: flex-start; }
	.section-aside { text-align: left; }
	.goal-head { flex-direction: column; }
	.milestones { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.milestone { padding: 12px; gap: 10px; }
	.about-grid { grid-template-columns: 1fr; }
	.about-item { padding-left: 0 !important; border-left: 0 !important; }
	.page-card { padding: 22px 18px; }
	.vertical-table th, .generic-form-table th { width: auto; }
	.generic-form-table, .generic-form-table tbody, .generic-form-table tr, .generic-form-table th, .generic-form-table td { display: block; width: 100%; }
	.footer-inner, .footer-meta { align-items: flex-start; }
	.footer-tools { justify-content: flex-start; flex-wrap: wrap; }
}
