/* IMPERIUM website.
   Visual language = the game's own windows: wooden frames, parchment panels,
   outlined Lilita One headings, Jost body, green buttons. Sunny sea, not dark gold. */

:root {
	--sea-0: #0b2f4f;
	--sea-1: #0f3e66;
	--sea-2: #17609a;
	--sea-3: #2a8fd0;
	--foam: #bfe7ff;
	--sun: #ffb347;
	--sun-2: #ff8a3d;
	--paper: #f6e7c6;
	--paper-2: #ead3a2;
	--paper-ink: #4a2c13;
	--wood: #8a5528;
	--wood-2: #5e3615;
	--wood-3: #3a200b;
	--green: #63c02f;
	--green-2: #3f8d1a;
	--green-3: #2a6510;
	--red: #d9483a;
	--land: #b9853f;
	--air: #4fb2e8;
	--navy: #3168c9;
	--ink: #fff8ea;
	--r: 18px;
	--ease: cubic-bezier(.2, .8, .2, 1);
	--spring: cubic-bezier(.34, 1.56, .64, 1);
	--hud-h: 64px;
	color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font: 400 17px/1.6 "Jost", system-ui, sans-serif;
	color: var(--paper-ink);
	background: var(--sea-1);
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: "Lilita One", "Jost", sans-serif; font-weight: 400; line-height: 1.05; letter-spacing: .01em; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }

/* ---------- Outlined game headings ---------- */
.outline {
	color: #fff;
	font-size: clamp(34px, 5vw, 62px);
	-webkit-text-stroke: .14em var(--wood-3);
	paint-order: stroke fill;
	text-shadow: 0 .09em 0 var(--wood-3), 0 .16em .2em rgba(0, 0, 0, .25);
	text-wrap: balance;
}
.outline.big { font-size: clamp(48px, 8vw, 104px); }
.outline.small { font-size: clamp(26px, 3vw, 36px); }
.eyebrow {
	display: inline-block;
	font: 700 13px/1 "Jost", sans-serif;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--sun);
	margin-bottom: 14px;
	padding: 7px 12px 6px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .28);
	backdrop-filter: blur(6px);
}
.eyebrow.dark { color: var(--wood-2); background: rgba(94, 54, 21, .1); }
.lede { font-size: clamp(17px, 1.5vw, 20px); max-width: 62ch; }
.fine { font-size: 14px; opacity: .75; margin-top: 18px; }
.hint { font-size: 14px; opacity: .8; }

/* ---------- Buttons (the game's green) ---------- */
.btn {
	--b: var(--green);
	position: relative;
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 14px 26px 15px;
	font: 400 20px/1 "Lilita One", sans-serif;
	letter-spacing: .02em;
	color: #fff;
	text-decoration: none;
	text-shadow: 0 2px 0 var(--green-3);
	background: linear-gradient(180deg, #8be04f 0%, var(--b) 45%, var(--green-2) 100%);
	border: 3px solid var(--green-3);
	border-radius: 14px;
	box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), 0 5px 0 var(--green-3), 0 10px 18px rgba(0, 0, 0, .25);
	cursor: pointer;
	transition: transform .15s var(--ease), box-shadow .15s var(--ease), filter .2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: inset 0 2px 0 rgba(255,255,255,.55), 0 7px 0 var(--green-3), 0 16px 24px rgba(0,0,0,.28); }
.btn:active { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 1px 0 var(--green-3), 0 4px 8px rgba(0,0,0,.25); }
.btn.big { font-size: 24px; padding: 18px 36px 19px; }
.btn.small { font-size: 16px; padding: 9px 16px 10px; border-width: 2px; border-radius: 11px; box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 3px 0 var(--green-3); }
.btn.ghost {
	background: rgba(255, 255, 255, .14);
	border-color: rgba(255, 255, 255, .7);
	text-shadow: 0 2px 0 rgba(0,0,0,.3);
	box-shadow: 0 4px 0 rgba(0, 0, 0, .25);
	backdrop-filter: blur(8px);
}
.btn.ghost.dark { color: var(--wood-2); border-color: var(--wood); background: rgba(255,255,255,.4); text-shadow: none; box-shadow: 0 4px 0 var(--wood); }
.btn[disabled] { filter: grayscale(.8) brightness(.9); cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 30px; }
.actions.center { justify-content: center; }

/* ---------- Resource icons (CSS only) ---------- */
.ico { display: inline-block; width: 22px; height: 22px; flex: none; border-radius: 50%; position: relative; vertical-align: middle; }
.ico-coin { background: radial-gradient(circle at 35% 30%, #fff6b0, #ffd23f 40%, #d99a12 75%); box-shadow: inset 0 0 0 2px #b77a0a; }
.ico-coin::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 2px solid rgba(183, 122, 10, .7); }
.ico-wood { border-radius: 6px; background: repeating-linear-gradient(0deg, #b9773b 0 5px, #8a5528 5px 7px); box-shadow: inset 0 0 0 2px #5e3615; }
.ico-wood::after { content: ""; position: absolute; right: -2px; top: 3px; width: 9px; height: 9px; border-radius: 50%; background: #e3b47a; box-shadow: 0 8px 0 #e3b47a, inset 0 0 0 2px #8a5528; }
.ico-oil { border-radius: 5px 5px 6px 6px; width: 18px; background: linear-gradient(90deg, #2a2d33, #5b616b 45%, #2a2d33); box-shadow: inset 0 4px 0 -2px #8d939c, inset 0 -4px 0 -2px #8d939c; }
.ico-ore { border-radius: 4px; transform: rotate(45deg) scale(.8); background: conic-gradient(from 45deg, #f0f4f7, #f08a3c, #ffd23f, #5c5f66, #6ed34a, #f0f4f7); box-shadow: inset 0 0 0 2px rgba(0,0,0,.35); }
.ico-pop { background: radial-gradient(circle at 50% 30%, #ffd9b0 0 28%, transparent 29%), radial-gradient(ellipse at 50% 100%, #4f8fc0 0 48%, transparent 49%); }

/* ---------- HUD (sticky header) ---------- */
.hud {
	position: fixed; inset: 0 0 auto; z-index: 50;
	height: var(--hud-h);
	display: flex; align-items: center; gap: 14px;
	padding: 0 clamp(12px, 2vw, 24px);
	background: linear-gradient(180deg, rgba(58, 32, 11, .92), rgba(58, 32, 11, .78));
	border-bottom: 3px solid var(--wood);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
	backdrop-filter: blur(10px) saturate(1.2);
	color: var(--ink);
	transform: translateY(-110%);
	transition: transform .5s var(--ease);
}
.hud.show { transform: none; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 400 22px/1 "Lilita One"; letter-spacing: .04em; color: #fff; }
.brand img { width: 40px; height: 40px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.res { list-style: none; display: flex; gap: 8px; margin: 0 auto; padding: 0; }
.r {
	display: flex; align-items: center; gap: 7px;
	padding: 4px 12px 4px 5px;
	background: linear-gradient(180deg, #2a1608, #3a200b);
	border: 2px solid #7a4a22;
	border-radius: 999px;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, .5);
	font: 400 16px/1 "Lilita One";
	min-width: 84px;
}
.r b { font-weight: 400; font-variant-numeric: tabular-nums; }
.r small { opacity: .6; font-size: 13px; margin-left: -4px; }
.r.locked { opacity: .35; }
.r.bump { animation: bump .45s var(--spring); }
@keyframes bump { 40% { transform: scale(1.18); } }
.lvl { display: flex; align-items: center; gap: 0; }
.star {
	position: relative; z-index: 1;
	width: 42px; height: 42px; display: grid; place-items: center;
	background: radial-gradient(circle at 40% 30%, #fff1a0, #ffc62e 45%, #e38a10);
	clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
	font: 400 16px/1 "Lilita One"; color: var(--wood-3);
	padding-top: 4px;
}
.star.pop { animation: starpop .7s var(--spring); }
@keyframes starpop { 30% { transform: scale(1.5) rotate(20deg); } }
.xpbar { width: 90px; height: 14px; margin-left: -10px; border-radius: 0 999px 999px 0; background: #2a1608; border: 2px solid #7a4a22; overflow: hidden; }
.xpbar i { display: block; height: 100%; width: 0; background: linear-gradient(180deg, #b6f07a, #4fb52a); transition: width .6s var(--ease); }

/* ---------- HERO ---------- */
.hero {
	position: relative;
	min-height: 100svh;
	display: grid;
	grid-template-columns: .9fr 1.1fr;
	align-items: center;
	padding: 90px clamp(20px, 5vw, 80px) 150px;
	overflow: hidden;
	color: #fff;
	isolation: isolate;
}
.hero-scene { position: absolute; inset: -30px; z-index: -1; }
.hero-img {
	width: 100%; height: 100%; object-fit: cover;
	transform: translate3d(var(--px, 0), var(--py, 0), 0) scale(1.08);
	transition: transform .8s var(--ease);
	animation: heroIn 2.4s var(--ease) both;
}
@keyframes heroIn { from { transform: scale(1.25); filter: saturate(.6) brightness(.7); } }
.hero-shade {
	position: absolute; inset: 0;
	background:
		radial-gradient(120% 80% at 75% 40%, transparent 30%, rgba(11, 47, 79, .45) 75%),
		linear-gradient(90deg, rgba(11, 47, 79, .82) 0%, rgba(11, 47, 79, .35) 50%, transparent 75%),
		linear-gradient(0deg, var(--sea-1) 0%, transparent 30%);
}
.sun {
	position: absolute; right: 18%; top: 22%; width: 34vmax; height: 34vmax;
	background: radial-gradient(circle, rgba(255, 196, 102, .55), transparent 60%);
	mix-blend-mode: screen; pointer-events: none;
	animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: .55; transform: scale(1.08); } }
.planes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; fill: rgba(30, 22, 18, .72); }
.squad { animation: fly 22s linear infinite; }
.squad.s1 { transform: translate(-200px, 210px); }
.squad.s2 { animation-duration: 30s; animation-delay: -12s; transform: translate(-200px, 120px) scale(.7); }
@keyframes fly {
	from { transform: translate(-200px, var(--y, 220px)) scale(var(--s, 1)); }
	to { transform: translate(1800px, calc(var(--y, 220px) - 140px)) scale(var(--s, 1)); }
}
.squad.s1 { --y: 230px; }
.squad.s2 { --y: 140px; --s: .7; }

.hero-copy { position: relative; max-width: 680px; }
.mega {
	display: flex;
	font-size: clamp(54px, 8.2vw, 136px);
	line-height: .9;
	letter-spacing: .01em;
	color: #fff;
	-webkit-text-stroke: .11em var(--wood-3);
	paint-order: stroke fill;
	text-shadow: 0 .07em 0 var(--wood-3), 0 .15em .25em rgba(0, 0, 0, .35);
	margin-bottom: 12px;
}
.mega-l {
	display: inline-block;
	animation: letterIn .9s var(--spring) both;
	animation-delay: calc(var(--i) * 70ms + 300ms);
}
@keyframes letterIn { from { opacity: 0; transform: translateY(60%) rotate(-12deg) scale(.6); } }
.tag { font: 400 clamp(20px, 2.3vw, 30px)/1.2 "Lilita One"; text-shadow: 0 3px 0 rgba(0,0,0,.35); margin: 0; }
.tag span { display: inline-block; animation: rise .8s var(--ease) both; }
.tag span:nth-child(1) { animation-delay: 1s; }
.tag span:nth-child(2) { animation-delay: 1.2s; color: var(--sun); }
.tag span:nth-child(3) { animation-delay: 1.4s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.hero .actions { animation: rise .8s 1.6s var(--ease) both; }

.hero-crest {
	position: relative; justify-self: center;
	width: min(40vw, 560px); aspect-ratio: 1;
	perspective: 1000px;
	animation: crestIn 1.6s .2s var(--spring) both;
}
@keyframes crestIn { from { opacity: 0; transform: translateY(80px) scale(.7) rotate(-14deg); } }
.crest-tilt {
	position: relative; width: 100%; height: 100%;
	transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
	transform-style: preserve-3d;
	transition: transform .5s var(--ease);
	animation: bob 6s ease-in-out infinite;
	border-radius: 50%;
}
@keyframes bob { 50% { translate: 0 -14px; } }
.crest-tilt img { width: 100%; height: 100%; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .5)); }
.crest-shine {
	position: absolute; inset: 0; border-radius: 50%;
	background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .45) 48%, transparent 60%);
	background-size: 250% 100%;
	mix-blend-mode: overlay;
	animation: shine 5s 2s ease-in-out infinite;
	pointer-events: none;
}
@keyframes shine { 0% { background-position: 130% 0; } 40%, 100% { background-position: -60% 0; } }
.crest-glow { position: absolute; inset: 8%; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 190, 90, .6), transparent 65%); filter: blur(30px); animation: breathe 5s ease-in-out infinite; }

.facts {
	position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%);
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
	width: min(820px, 100% - 40px); margin: 0;
	background: linear-gradient(180deg, var(--paper), var(--paper-2));
	border: 4px solid var(--wood);
	border-radius: 18px;
	box-shadow: inset 0 0 0 2px #fff3d6, 0 8px 0 var(--wood-2), 0 20px 40px rgba(0, 0, 0, .35);
	color: var(--paper-ink);
	animation: rise .9s 1.9s var(--ease) both;
}
.facts div { padding: 14px 10px 12px; text-align: center; }
.facts div + div { border-left: 2px dashed rgba(138, 85, 40, .35); }
.facts dt { font: 400 clamp(28px, 3.4vw, 44px)/1 "Lilita One"; color: var(--wood-2); font-variant-numeric: tabular-nums; }
.facts dd { margin: 4px 0 0; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.scroll-cue { position: absolute; left: 50%; bottom: 6px; width: 26px; height: 26px; transform: translateX(-50%); }
.scroll-cue span { position: absolute; inset: 0; border-right: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(45deg) scale(.6); animation: cue 1.6s infinite; }
@keyframes cue { 50% { translate: 0 6px; opacity: .4; } }

/* ---------- Parchment + wood frames ---------- */
.paper {
	background:
		radial-gradient(60% 50% at 10% 0%, rgba(255, 255, 255, .5), transparent 70%),
		radial-gradient(50% 60% at 100% 100%, rgba(183, 130, 64, .25), transparent 70%),
		linear-gradient(180deg, var(--paper), #efdcb2);
}
.sea {
	color: var(--ink);
	background:
		radial-gradient(80% 60% at 50% 0%, rgba(42, 143, 208, .5), transparent 70%),
		repeating-radial-gradient(circle at 30% 120%, transparent 0 38px, rgba(255, 255, 255, .03) 38px 40px),
		linear-gradient(180deg, var(--sea-1), var(--sea-0));
}
.window {
	position: relative;
	background:
		radial-gradient(70% 60% at 20% 10%, rgba(255, 255, 255, .55), transparent 70%),
		linear-gradient(180deg, var(--paper), var(--paper-2));
	color: var(--paper-ink);
	border-radius: 26px;
	border: 10px solid transparent;
	background-clip: padding-box;
	box-shadow:
		0 0 0 4px var(--wood-3),
		0 0 0 10px var(--wood),
		0 0 0 13px var(--wood-3),
		inset 0 0 0 3px #fff3d6,
		inset 0 0 40px rgba(138, 85, 40, .25),
		0 26px 50px rgba(0, 0, 0, .45);
	margin: 13px;
}
.window-title {
	position: absolute; left: 50%; top: -34px; transform: translateX(-50%);
	padding: 10px 40px 12px;
	background: linear-gradient(180deg, #c0392b, #8e2219);
	border: 3px solid var(--wood-3);
	border-radius: 12px;
	box-shadow: inset 0 2px 0 rgba(255,255,255,.3), 0 5px 0 var(--wood-3);
	white-space: nowrap;
}
.window-title span { font: 400 26px/1 "Lilita One"; color: #fff; -webkit-text-stroke: 5px var(--wood-3); paint-order: stroke fill; }
.window.mini { padding: 18px 20px 8px; border-width: 4px; margin: 10px; box-shadow: 0 0 0 3px var(--wood-3), 0 0 0 7px var(--wood), 0 0 0 9px var(--wood-3), inset 0 0 0 2px #fff3d6, 0 14px 24px rgba(0,0,0,.35); }
.window.mini h3 { font-size: 24px; color: var(--wood-2); margin-bottom: 8px; }

/* ---------- Advisor speech (characters) ---------- */
.advice { display: flex; align-items: flex-end; gap: 12px; margin-top: 16px; }
.advice .face {
	width: 76px; height: 76px; flex: none;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid #fff3d6;
	box-shadow: 0 0 0 3px var(--wood), 0 6px 12px rgba(0, 0, 0, .3);
	background: #f3d38c;
	transition: transform .35s var(--spring);
}
.advice.talk .face { animation: nod .5s var(--spring); }
@keyframes nod { 40% { transform: rotate(-8deg) scale(1.08); } }
.bubble {
	position: relative; margin: 0 0 8px; padding: 10px 16px 12px;
	background: #fff; color: var(--paper-ink);
	border: 3px solid var(--wood-3);
	border-radius: 18px 18px 18px 4px;
	box-shadow: 0 4px 0 var(--wood-3);
	font-size: 16px; line-height: 1.4;
}
.bubble b { display: block; font: 400 14px/1.2 "Lilita One"; letter-spacing: .04em; color: var(--red); margin-bottom: 2px; }
.bubble::before { content: ""; position: absolute; left: -14px; bottom: 6px; border: 8px solid transparent; border-right: 10px solid var(--wood-3); border-bottom-color: var(--wood-3); }
.advice.dark .bubble { background: var(--paper); }

/* ---------- LOOP ---------- */
.loop { position: relative; height: 420vh; background: linear-gradient(180deg, var(--sea-1) 0, var(--paper) 18vh); }
.loop-sticky {
	position: sticky; top: 0; height: 100svh;
	display: flex; flex-direction: column; justify-content: center;
	padding: calc(var(--hud-h) + 20px) clamp(20px, 5vw, 80px) 30px;
	background:
		radial-gradient(50% 50% at 25% 55%, rgba(255, 255, 255, .6), transparent 70%),
		linear-gradient(180deg, var(--paper), #efdcb2);
	overflow: hidden;
}
.loop-head { text-align: center; margin-bottom: clamp(16px, 3vh, 40px); }
.loop-body { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 5vw, 80px); align-items: center; width: min(1180px, 100%); margin: 0 auto; }
.wheel-wrap { position: relative; width: min(46vh, 100%, 460px); aspect-ratio: 1; justify-self: center; }
.wheel { width: 100%; height: 100%; overflow: visible; }
.w-rim { fill: var(--wood); stroke: var(--wood-3); stroke-width: 6; }
.w-rim2 { fill: var(--paper); stroke: var(--wood-3); stroke-width: 3; }
.w-track { fill: none; stroke: rgba(138, 85, 40, .2); stroke-width: 16; }
.w-prog { fill: none; stroke: var(--green); stroke-width: 16; stroke-linecap: round; stroke-dasharray: 0 100; transform: rotate(-90deg); transition: stroke-dasharray .2s linear; }
.w-hub { fill: var(--wood-2); stroke: var(--wood-3); stroke-width: 5; }
.wnode circle { fill: #fff3d6; stroke: var(--wood-3); stroke-width: 4; transition: fill .4s, transform .5s var(--spring); transform-box: fill-box; transform-origin: center; }
.wnode text { font: 400 24px "Lilita One"; fill: var(--wood-2); text-anchor: middle; dominant-baseline: central; }
.wnode.on circle { fill: var(--sun); transform: scale(1.25); }
.wnode.done circle { fill: #b6e48c; }
.wnode .lab { font: 600 13px "Jost"; letter-spacing: .1em; text-transform: uppercase; fill: var(--wood-2); }
.wheel-hub { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #fff; pointer-events: none; }
.wheel-hub span { font: 400 clamp(40px, 7vh, 64px)/1 "Lilita One"; text-shadow: 0 3px 0 var(--wood-3); }
.wheel-hub small { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; opacity: .7; }
.steps { list-style: none; margin: 0; padding: 0; position: relative; min-height: 260px; }
.step {
	position: absolute; inset: 0 0 auto;
	opacity: 0; transform: translateY(40px);
	transition: opacity .5s var(--ease), transform .6s var(--ease);
	pointer-events: none;
}
.step.is-on { opacity: 1; transform: none; pointer-events: auto; }
.step.is-past { opacity: 0; transform: translateY(-40px); }
.step .num { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 14px; border-radius: 50%; font: 400 24px/1 "Lilita One"; color: #fff; background: var(--red); border: 4px solid var(--wood-3); box-shadow: 0 4px 0 var(--wood-3); }
.step h3 { font-size: clamp(32px, 4vw, 52px); color: var(--wood-2); margin-bottom: 14px; }
.step p { font-size: clamp(17px, 1.5vw, 20px); max-width: 46ch; }

/* ---------- BUILD (playable toy) ---------- */
.build { padding: clamp(80px, 12vh, 140px) 0 clamp(60px, 10vh, 120px); }
.sec-head { text-align: center; margin-bottom: 64px; }
.sec-head .lede { margin: 18px auto 0; }
.sec-head.light .lede { color: #e4f3ff; }
#sim { padding: 34px 24px 24px; }
.sim { display: grid; grid-template-columns: 250px 1fr; gap: 24px; }
.palette { display: grid; gap: 8px; align-content: start; }
.tool {
	display: grid; grid-template-columns: 52px 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px;
	padding: 6px 10px 6px 6px;
	text-align: left; font: inherit; color: inherit;
	background: rgba(255, 255, 255, .55);
	border: 3px solid rgba(138, 85, 40, .5);
	border-radius: 14px;
	cursor: pointer;
	transition: transform .2s var(--spring), background .2s, border-color .2s;
}
.tool svg { grid-row: span 2; width: 52px; height: 52px; }
.tool .t-name { font: 400 17px/1.1 "Lilita One"; color: var(--wood-2); }
.tool .t-cost { display: flex; align-items: center; gap: 4px; font: 400 15px/1 "Lilita One"; color: var(--wood-2); }
.tool .t-cost .ico { width: 16px; height: 16px; }
.tool .t-does { grid-column: 2 / 4; font-size: 12.5px; line-height: 1.2; opacity: .75; }
.tool:hover { transform: translateX(4px); background: #fff; }
.tool.is-on { background: #fff; border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(99, 192, 47, .35); }
.tool.cant { opacity: .5; }
.board-wrap { position: relative; display: flex; flex-direction: column; }
.board { width: 100%; height: auto; cursor: crosshair; user-select: none; }
.isle-water { fill: rgba(42, 143, 208, .25); }
.isle-sand { fill: #f1d89a; stroke: #d6b46a; stroke-width: 3; }
.tile { fill: #8fcf5a; stroke: #6fae3c; stroke-width: 1.5; transition: fill .15s; }
.tile:nth-child(odd) { fill: #97d462; }
.tile:hover, .tile:focus-visible { fill: #c6f08f; }
.tile:focus { outline: none; }
.tile.used { pointer-events: none; }
.thing { animation: drop .55s var(--spring) both; }
@keyframes drop { from { transform: translateY(-60px); opacity: 0; } }
.thing.ready .rdy { opacity: 1; }
.fx { font: 400 18px "Lilita One"; text-anchor: middle; paint-order: stroke; stroke: var(--wood-3); stroke-width: 4px; animation: popUp 1.2s var(--ease) forwards; }
.fx.coins { fill: #ffd23f; }
.fx.wood { fill: #f0b878; }
.fx.oil { fill: #c7ced8; }
.fx.ore { fill: #9ff07a; }
@keyframes popUp { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-44px); opacity: 0; } }
.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---------- WAR ---------- */
.war { position: relative; padding: clamp(80px, 12vh, 140px) 0; color: var(--ink); overflow: hidden; isolation: isolate; }
.war-bg { position: absolute; inset: 0; z-index: -1; }
.war-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); }
.war-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 30, 50, .94) 0%, rgba(11, 30, 50, .82) 45%, rgba(11, 30, 50, .55)); }
.war-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.war-copy > p { max-width: 52ch; color: #dfeaf4; }
.verdict { margin: 24px 0 8px; padding: 18px 20px; background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .18); border-radius: 18px; backdrop-filter: blur(8px); }
.picked { margin: 0 0 12px; display: flex; align-items: baseline; gap: 10px; }
.picked span { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; opacity: .7; }
.picked b { font: 400 34px/1 "Lilita One"; }
.v { display: grid; grid-template-columns: 130px 1fr; gap: 10px; align-items: baseline; }
.v span { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.v p { margin: 0 0 6px; font: 400 19px/1.3 "Lilita One"; }
.v.good span { color: #9ff07a; }
.v.bad span { color: #ff8f7a; }
.battle-steps { list-style: none; counter-reset: s; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.battle-steps li { counter-increment: s; display: flex; gap: 12px; align-items: baseline; color: #dfeaf4; }
.battle-steps li::before { content: counter(s); flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sun); color: var(--wood-3); font: 400 15px/1 "Lilita One"; }
.battle-steps b { color: #fff; }
.chart-wrap { text-align: center; }
.chart { width: 100%; max-width: 560px; margin: 0 auto; overflow: visible; }
.c-ring { fill: rgba(255, 255, 255, .04); stroke: rgba(255, 255, 255, .15); stroke-width: 2; stroke-dasharray: 4 8; }
.arc { fill: none; stroke-width: 10; stroke-linecap: round; opacity: .9; }
.arc.land { stroke: var(--land); }
.arc.air { stroke: var(--air); }
.arc.sea { stroke: var(--navy); }
.arc-l { font: 400 15px "Lilita One"; letter-spacing: .3em; fill: rgba(255, 255, 255, .6); text-anchor: middle; }
.link { fill: none; stroke-width: 4; stroke-linecap: round; stroke-dasharray: var(--len) var(--len); stroke-dashoffset: var(--len); animation: draw .7s var(--ease) forwards; animation-delay: var(--d); }
.link.good { stroke: #8be04f; filter: drop-shadow(0 0 6px rgba(139, 224, 79, .7)); }
.link.bad { stroke: #ff6b55; stroke-dasharray: 2 10; stroke-dashoffset: 0; opacity: 0; animation: fadeIn .5s var(--ease) forwards; animation-delay: var(--d); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: .95; } }
.cnode { cursor: pointer; }
.cnode circle { stroke: #fff; stroke-width: 3; transition: transform .4s var(--spring), stroke-width .2s; transform-box: fill-box; transform-origin: center; }
.cnode.land circle { fill: var(--land); }
.cnode.air circle { fill: var(--air); }
.cnode.sea circle { fill: var(--navy); }
.cnode text { font: 400 14px "Lilita One"; fill: #fff; text-anchor: middle; paint-order: stroke; stroke: rgba(0, 0, 0, .6); stroke-width: 4px; pointer-events: none; }
.cnode .glyph { stroke: none; font-size: 20px; }
.cnode:hover circle { transform: scale(1.12); }
.cnode.on circle { transform: scale(1.3); stroke: var(--sun); stroke-width: 5; }
.cnode.good circle { stroke: #8be04f; stroke-width: 5; }
.cnode.bad circle { stroke: #ff6b55; stroke-width: 5; }
.cnode.dim { opacity: .45; }
.cnode:focus { outline: none; }
.cnode:focus-visible circle { stroke: var(--sun); stroke-width: 6; }

/* ---------- ORE + MARKET ---------- */
section.ore { padding: clamp(80px, 12vh, 140px) 0; }
.draw { text-align: center; margin-bottom: 80px; }
.gems { display: flex; justify-content: center; gap: clamp(10px, 3vw, 40px); margin-bottom: 30px; flex-wrap: wrap; }
.gem { margin: 0; width: clamp(80px, 12vw, 130px); transition: transform .4s var(--spring), opacity .4s, filter .4s; }
.gem svg { width: 100%; filter: drop-shadow(0 10px 0 rgba(94, 54, 21, .25)); }
.gem figcaption { font: 400 18px "Lilita One"; color: var(--wood-2); margin-top: 6px; }
.gem[data-ore="aluminum"] { --g1: #eef3f7; --g2: #b8c4cf; --g3: #8796a4; }
.gem[data-ore="copper"] { --g1: #ffb37a; --g2: #e0702c; --g3: #a64a14; }
.gem[data-ore="gold"] { --g1: #fff2a0; --g2: #ffcf2e; --g3: #c78e00; }
.gem[data-ore="iron"] { --g1: #a7abb3; --g2: #6c7079; --g3: #3e4148; }
.gem[data-ore="uranium"] { --g1: #c8ff9e; --g2: #6ed34a; --g3: #2f8a1a; }
.g-base { fill: var(--g2); stroke: var(--wood-3); stroke-width: 4; stroke-linejoin: round; }
.g-top { fill: var(--g1); }
.g-side { fill: var(--g3); }
.gem.flash { transform: translateY(-14px) scale(1.12); }
.gem.mine { transform: translateY(-20px) scale(1.25); filter: drop-shadow(0 0 24px var(--g2)); }
.gem.mine figcaption::after { content: " · yours"; color: var(--green-2); }
.gem.other { opacity: .55; transform: scale(.9); }
.draw-out { min-height: 1.6em; margin-top: 18px; font: 400 20px/1.4 "Lilita One"; color: var(--wood-2); }
.market-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.framed { margin: 0; border-radius: 22px; overflow: hidden; border: 8px solid var(--wood); box-shadow: 0 0 0 3px var(--wood-3), 0 24px 40px rgba(94, 54, 21, .35); }
.framed img { width: 100%; height: auto; transition: transform 1.2s var(--ease); }
.tilt { transform: rotate(-2deg); transition: transform .6s var(--spring); }
.tilt:hover { transform: rotate(0) scale(1.02); }
.tilt:hover img { transform: scale(1.06); }
.market-copy .outline.small { margin-bottom: 14px; }
.ticks { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border-radius: 50%; background: var(--green) radial-gradient(circle, transparent 0, transparent 0); box-shadow: inset 0 0 0 2px var(--green-3); }
.ticks li::after { content: ""; position: absolute; left: 6px; top: 8px; width: 5px; height: 9px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.listing { background: #fff; border: 3px solid var(--wood); border-radius: 14px; overflow: hidden; box-shadow: 0 6px 0 var(--wood-2); }
.l-row { display: grid; grid-template-columns: 22px 1fr auto auto auto; gap: 12px; align-items: center; padding: 10px 14px; animation: slideIn .6s var(--ease) both; }
.l-row + .l-row { border-top: 2px dashed rgba(138, 85, 40, .25); }
.l-row span { font: 400 17px "Lilita One"; color: var(--wood-2); }
.l-row em { font-style: normal; font-size: 14px; opacity: .7; }
.l-row b { font: 400 17px "Lilita One"; color: var(--green-2); }
.l-buy { padding: 4px 12px; border-radius: 8px; background: var(--green); color: #fff !important; font-size: 14px !important; box-shadow: 0 3px 0 var(--green-3); }
.dot { width: 18px; height: 18px; border-radius: 4px; transform: rotate(45deg) scale(.85); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .3); }
.dot.copper { background: #e0702c; } .dot.uranium { background: #6ed34a; } .dot.gold { background: #ffcf2e; }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } }

/* ---------- RISE (horizontal road) ---------- */
.rise { position: relative; height: 380vh; }
.rise-sticky {
	position: sticky; top: 0; height: 100svh; overflow: hidden;
	display: flex; flex-direction: column; justify-content: center; gap: clamp(20px, 4vh, 44px);
	padding: calc(var(--hud-h) + 10px) 0 20px;
	color: var(--ink);
	background:
		radial-gradient(70% 50% at 50% 100%, rgba(42, 143, 208, .45), transparent 70%),
		linear-gradient(180deg, var(--sea-0), var(--sea-1));
}
.rise-head { text-align: center; padding: 0 20px; }
.rise-pop { margin: 16px 0 0; font: 400 20px "Lilita One"; letter-spacing: .06em; color: #cfe8fa; }
.rise-pop b { font-weight: 400; font-size: 44px; color: #fff; margin-left: 8px; font-variant-numeric: tabular-nums; text-shadow: 0 3px 0 var(--wood-3); }
.road { position: relative; padding: 30px 0; }
.road-line { position: absolute; left: 0; right: 0; top: 50%; height: 14px; margin-top: -7px; background: rgba(255, 255, 255, .12); border-block: 2px solid rgba(255, 255, 255, .2); }
.road-line i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sun), #ffd76a); box-shadow: 0 0 20px rgba(255, 179, 71, .7); }
.milestones { list-style: none; margin: 0; padding: 0 50vw 0 50vw; display: flex; gap: 40px; width: max-content; will-change: transform; }
.milestones li {
	position: relative; width: 200px; flex: none;
	padding: 16px 16px 14px;
	background: linear-gradient(180deg, var(--paper), var(--paper-2));
	color: var(--paper-ink);
	border: 4px solid var(--wood);
	border-radius: 16px;
	box-shadow: 0 6px 0 var(--wood-2);
	transform: translateY(var(--off, -62px)) scale(.92);
	opacity: .55;
	transition: transform .5s var(--spring), opacity .4s, filter .4s;
	filter: grayscale(.7);
}
.milestones li:nth-child(even) { --off: 62px; }
.milestones li.hit { opacity: 1; filter: none; transform: translateY(var(--off, -62px)) scale(1); }
.milestones li.hit::after { background: var(--sun); box-shadow: 0 0 0 5px rgba(255, 179, 71, .3); }
.milestones li::after { content: none; }
.milestones li:nth-child(odd)::after { bottom: -51px; }
.milestones li:nth-child(even)::after { top: -51px; }
.milestones b { display: block; font: 400 30px/1 "Lilita One"; color: var(--red); }
.milestones span { display: block; font: 400 20px/1.1 "Lilita One"; color: var(--wood-2); margin: 4px 0 2px; }
.milestones small { font-size: 13.5px; line-height: 1.3; display: block; opacity: .8; }
.energy { width: min(980px, 100% - 40px); margin: 0 auto; display: flex; align-items: flex-end; gap: 30px; flex-wrap: wrap; justify-content: center; }
.energy p { max-width: 34ch; margin: 0; color: #cfe8fa; }
.energy p b { color: #6fd0ff; }
.e-bars { display: flex; align-items: flex-end; gap: 10px; height: 110px; }
.e-bars div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; width: 44px; }
.e-bars i { width: 100%; height: calc((var(--v) - 15) * 3px); border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #8fe3ff, #2a8fd0); box-shadow: 0 0 14px rgba(111, 208, 255, .5); transform-origin: bottom; transform: scaleY(0); transition: transform .8s var(--spring); }
.e-bars div:nth-child(n) i { transition-delay: calc(var(--v) * 8ms); }
.energy.in .e-bars i { transform: none; }
.e-bars b { font: 400 16px "Lilita One"; order: -1; margin-bottom: 4px; }
.e-bars span { font-size: 12px; opacity: .7; margin-top: 4px; }

/* ---------- STORY + ROSTER ---------- */
.story { position: relative; padding: clamp(90px, 14vh, 160px) 0 clamp(80px, 12vh, 140px); color: var(--ink); overflow: hidden; isolation: isolate; background: #2a1608; }
.story-bg { position: absolute; inset: 0; z-index: -1; }
.story-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; transform: translateY(var(--sy, 0)) scale(1.15); }
.story-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(42, 22, 8, .55) 0%, rgba(42, 22, 8, .78) 45%, rgba(30, 15, 5, .96) 100%); }
.story-inner { text-align: center; }
.story-lede { max-width: 62ch; margin: 22px auto 0; font-size: clamp(17px, 1.5vw, 20px); color: #f6e7c6; }
.side-title { margin: 70px 0 34px; font-size: 22px; letter-spacing: .3em; text-transform: uppercase; color: var(--sun); display: flex; align-items: center; justify-content: center; gap: 18px; }
.side-title::before, .side-title::after { content: ""; height: 3px; width: min(120px, 15vw); background: linear-gradient(90deg, transparent, var(--sun)); }
.side-title::after { transform: scaleX(-1); }
.roster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; perspective: 1200px; }
.card {
	position: relative; text-align: left;
	background: linear-gradient(180deg, var(--paper), var(--paper-2));
	color: var(--paper-ink);
	border-radius: 22px;
	border: 6px solid var(--wood);
	box-shadow: 0 0 0 3px var(--wood-3), inset 0 0 0 2px #fff3d6, 0 20px 40px rgba(0, 0, 0, .5);
	overflow: hidden;
	transform: translateY(60px) rotateX(18deg);
	opacity: 0;
	transition: transform .9s var(--spring), opacity .6s var(--ease), box-shadow .3s;
}
.card:nth-child(2) { transition-delay: .12s; }
.card:nth-child(3) { transition-delay: .24s; }
.roster.in .card { transform: none; opacity: 1; }
.roster.in .card:hover, .roster.in .card:focus-visible { transform: translateY(-10px) rotate(-1deg); box-shadow: 0 0 0 3px var(--wood-3), inset 0 0 0 2px #fff3d6, 0 34px 50px rgba(0, 0, 0, .55); }
.card-art { position: relative; aspect-ratio: 1.25; overflow: hidden; background: #e9c47a; border-bottom: 5px solid var(--wood); }
.card-art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 120%, rgba(255, 179, 71, .5), transparent 60%); mix-blend-mode: soft-light; }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card-art img { transform: scale(1.08); }
.card-body { padding: 18px 20px 20px; }
.card-role { display: inline-block; margin: 0 0 6px; padding: 3px 10px; font: 700 11px/1.4 "Jost"; letter-spacing: .18em; text-transform: uppercase; color: #fff; background: var(--red); border-radius: 999px; }
.card:nth-child(3) .card-role { background: var(--green-2); }
.card h4 { font-size: 28px; color: var(--wood-2); margin-bottom: 8px; }
.card p { font-size: 15.5px; line-height: 1.5; }
.card blockquote { margin: 0; padding: 10px 14px; font: 400 16px/1.35 "Lilita One"; color: var(--wood-2); background: rgba(255, 255, 255, .6); border-left: 4px solid var(--sun); border-radius: 0 10px 10px 0; }
.also { margin: 36px auto 0; max-width: 60ch; font-size: 15px; color: #e8d3a8; opacity: .85; }

/* ---------- IMP ---------- */
.imp { padding: clamp(80px, 12vh, 140px) 0; }
.imp-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(30px, 6vw, 90px); align-items: center; }
.coin3d { position: relative; width: min(320px, 70vw); aspect-ratio: 1; margin: 0 auto; perspective: 900px; }
.coin-spin { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: spin 8s linear infinite; }
.coin-spin .face { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; }
.coin-spin .back { transform: rotateY(180deg); }
.coin-spin .edge { position: absolute; inset: 3%; border-radius: 50%; background: #8a5528; transform: translateZ(-6px); }
@keyframes spin { to { transform: rotateY(360deg); } }
.coin-shadow { position: absolute; left: 15%; right: 15%; bottom: -30px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .35); filter: blur(10px); animation: shad 8s linear infinite; }
@keyframes shad { 25%, 75% { transform: scaleX(.3); } }
.imp .outline { margin-bottom: 20px; }
.pts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 22px -10px; }
.imp p { color: #dfeaf4; }
.imp .window p { color: var(--paper-ink); }
.notice { display: inline-block; padding: 10px 14px; border-radius: 12px; background: rgba(255, 179, 71, .14); border: 2px solid rgba(255, 179, 71, .5); color: #ffe1b0 !important; font-size: 15px; }
.link { color: var(--sun); font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- COMMUNITY ---------- */
.community { margin-top: 46px; }
.community > p { font: 400 22px "Lilita One"; color: var(--wood-2); margin: 0 0 14px; letter-spacing: .02em; }
.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.soc { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 11px; border-radius: 14px; border: 2px solid var(--wood); background: rgba(255,255,255,.55); color: var(--wood-2); font-weight: 600; text-decoration: none; box-shadow: 0 4px 0 var(--wood); transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.soc svg { width: 20px; height: 20px; }
.soc:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--wood); }
.soc:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--wood); }
.foot-social { display: flex; gap: 10px; }
.foot-social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.08); border: 2px solid var(--wood); color: #e8d3a8; }
.foot-social a:hover { color: var(--sun); border-color: var(--sun); }
.foot-social svg { width: 18px; height: 18px; }

/* ---------- CONTRACT ADDRESS ---------- */
.ca { margin: 22px 0 16px; padding: 16px 18px 14px; border-radius: 16px; background: rgba(0, 0, 0, .28); border: 2px solid rgba(255, 179, 71, .55); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.ca-label { display: block; font: 400 15px "Lilita One"; letter-spacing: .06em; text-transform: uppercase; color: var(--sun); margin-bottom: 10px; }
.ca-row { display: flex; align-items: center; gap: 12px; }
.ca-addr { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: #fff8ea; font: 600 15px ui-monospace, "SF Mono", Menlo, monospace; overflow-wrap: anywhere; user-select: all; }
.ca-copy { flex: none; }
.ca-scan { display: inline-block; margin-top: 10px; font-size: 15px; }
.foot-ca { color: inherit; text-decoration: none; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.foot-ca:hover { color: var(--sun); }
.foot nav { flex-wrap: wrap; row-gap: 8px; }
@media (max-width: 560px) { .ca-row { flex-direction: column; align-items: stretch; } .ca-addr { font-size: 13px; text-align: center; } }

/* ---------- LAST ---------- */
.last { padding: clamp(90px, 14vh, 160px) 0; text-align: center; }
.last.paper, .last { background: radial-gradient(60% 60% at 50% 0%, rgba(255, 255, 255, .55), transparent 70%), linear-gradient(180deg, var(--paper), #ecd6a6); }
.last-inner > p { font-size: 19px; margin-top: 18px; }
.your-run { display: inline-block; padding: 8px 18px; border-radius: 999px; background: var(--wood-2); color: #fff; font: 400 16px "Lilita One"; letter-spacing: .04em; margin-bottom: 20px !important; }
.your-run b { color: var(--sun); font-weight: 400; }
.center-adv { justify-content: center; margin: 0 auto 26px; }
.foot { background: var(--wood-3); color: #e8d3a8; padding: 30px 0; border-top: 4px solid var(--wood); }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 22px; }
.foot nav a { text-decoration: none; font-weight: 600; }
.foot nav a:hover { color: var(--sun); }
.foot p { margin: 0; font-size: 14px; opacity: .7; }

/* ---------- Toast ---------- */
.toast {
	position: fixed; left: 50%; top: calc(var(--hud-h) + 16px); z-index: 60;
	transform: translate(-50%, -30px) scale(.8); opacity: 0;
	padding: 12px 22px 13px;
	background: linear-gradient(180deg, #ffd76a, #ffb347);
	border: 3px solid var(--wood-3);
	border-radius: 14px;
	box-shadow: 0 5px 0 var(--wood-3), 0 14px 30px rgba(0, 0, 0, .35);
	font: 400 20px/1 "Lilita One"; color: var(--wood-3);
	pointer-events: none;
	transition: transform .5s var(--spring), opacity .3s;
}
.toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; }

/* ---------- Reveal ---------- */
.rv { opacity: 0; transform: translateY(40px); transition: opacity .8s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.res .r.pop { display: none; }
}
@media (max-width: 980px) {
	.hero { grid-template-columns: minmax(0, 1fr); text-align: center; padding-top: 90px; padding-bottom: 60px; gap: 10px; }
	.hero-copy { min-width: 0; max-width: 100%; }
	.facts { position: relative; left: auto; bottom: auto; transform: none; width: 100%; margin-top: 34px; }
	.hero-crest { order: -1; width: min(62vw, 340px); }
	.hero-copy { margin: 0 auto; }
	.mega { justify-content: center; }
	.hero .actions { justify-content: center; }
	.hero-shade { background: linear-gradient(0deg, var(--sea-1) 0%, rgba(11, 47, 79, .55) 40%, rgba(11, 47, 79, .7) 100%); }
	.facts { grid-template-columns: repeat(2, 1fr); }
	.scroll-cue { display: none; }
	.facts div:nth-child(3) { border-left: 0; }
	.facts div:nth-child(n+3) { border-top: 2px dashed rgba(138, 85, 40, .35); }
	.loop-body { grid-template-columns: 1fr; gap: 16px; text-align: center; }
	.wheel-wrap { width: min(34vh, 80vw); }
	.step p { margin-inline: auto; }
	.steps { min-height: 230px; }
	.sim { grid-template-columns: 1fr; }
	.palette { grid-template-columns: repeat(3, 1fr); }
	.tool { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 8px 4px; }
	.tool svg { grid-row: auto; }
	.tool .t-does { display: none; }
	.war-grid, .market-grid, .imp-grid { grid-template-columns: 1fr; }
	.roster { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
	.pts { grid-template-columns: 1fr; margin-left: 0; }
}
@media (max-width: 720px) {
	:root { --hud-h: 56px; }
	.brand span, .xpbar, .r.ore, .r.oil { display: none; }
	.r { min-width: 0; padding-right: 9px; font-size: 14px; }
	.hud .btn.small { font-size: 14px; padding: 8px 12px; }
	.v { grid-template-columns: 1fr; gap: 0; }
	.milestones li { width: 170px; }
	.window-title span { font-size: 20px; }
	#sim { padding: 30px 10px 14px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
	.squad { display: none; }
}
