/* Remote-fight link page (/j/*), rendered by worker/join.js, and the invite page (/i/*, worker/invite.js). Tokens copied from src/app.css. */
:root {
	--ink: #0b0b0c;
	--acid: #c6ff3d;
	--hot: #ff5436;
	--warn: #ffb23d;
	--white: #ffffff;
	--muted: rgba(255, 255, 255, 0.62);
	--faint: rgba(255, 255, 255, 0.14);
	--plate: rgba(11, 11, 12, 0.55);
	--display: 'Rubik', 'Arial Black', system-ui, sans-serif;
	--body: 'Golos Text', system-ui, -apple-system, sans-serif;
}
/* Rubik and Golos have no kana or kanji: Japanese falls back to Noto Sans JP glyph by glyph
   (worker/join.js fonts() loads it for ja only). */
:root:lang(ja) {
	--display: 'Rubik', 'Noto Sans JP', 'Hiragino Sans', sans-serif;
	--body: 'Golos Text', 'Noto Sans JP', 'Hiragino Sans', sans-serif;
}
/* Japanese has no spaces: break headlines between phrases, not inside a word (Chrome; others ignore it). */
:lang(ja) h1 { word-break: auto-phrase; }
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
	margin: 0;
	background: var(--ink);
	color: var(--white);
	font-family: var(--body);
	font-size: 17px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
/* Mobile first: on a ~390×700 viewport (a messenger's in-app browser, its toolbar over the
   bottom) both buttons sit above the fold — the fighter takes what the rest leaves. */
.join {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 14px;
	max-width: 440px;
	min-height: 100vh;
	min-height: 100svh;
	margin-inline: auto;
	padding: max(16px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
	text-align: center;
}
.brand, .kicker, .fighter-name, h1, .primary, .secondary { font-family: var(--display); text-transform: uppercase; }
/* The landing's mobile header: the brand on the left over a full-width rule (to the column's
   edges — on a desktop the page stays a phone-wide column). The brand leads home. */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; box-sizing: border-box; height: calc(68px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); margin-top: calc(-1 * max(16px, env(safe-area-inset-top))); margin-inline: calc(-1 * max(20px, env(safe-area-inset-left))); padding-inline: max(20px, env(safe-area-inset-left)); border-bottom: 2px solid var(--faint); }
/* Exactly the landing's brand (Nav.svelte): mark 44 px, ARBEEF 22 px Rubik 900. */
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; font-weight: 900; font-size: 22px; letter-spacing: -0.03em; }
.brand .mark { width: 44px; height: 44px; overflow: visible; flex-shrink: 0; }
.slogan { font-family: var(--body); font-weight: 600; font-size: 13px; letter-spacing: 0.02em; color: var(--acid); text-align: right; }
/* The landing hero's top air on a phone (45 px from the header rule to the first line): 14 px gap + 31. */
.call { display: grid; gap: 6px; margin-top: 31px; }
.kicker { margin: 0; font-weight: 800; font-size: 12px; letter-spacing: 0.2em; color: var(--acid); }
/* The host's fighter above the headline, red, like the guest's callout in the app. */
.fighter-name { margin: 0; font-weight: 800; font-size: 15px; letter-spacing: 0.04em; color: var(--hot); overflow-wrap: anywhere; }
h1 { margin: 0; font-weight: 900; font-size: clamp(32px, 10vw, 48px); line-height: 0.95; letter-spacing: -0.02em; text-wrap: balance; overflow-wrap: anywhere; }
.fighter {
	display: block;
	width: auto;
	max-width: 100%;
	height: clamp(150px, calc(100svh - 445px), 320px);
	margin-inline: auto;
	object-fit: contain;
}
.actions { display: grid; gap: 12px; }
.primary, .secondary {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px 20px;
	text-align: center;
	text-decoration: none;
	letter-spacing: -0.01em;
	/* One line in every language's copy (worker/copy.js); if a label still wraps, two even lines with room. */
	line-height: 1.15;
	text-wrap: balance;
}
.primary { min-height: 58px; background: var(--acid); color: var(--ink); border: 3px solid var(--ink); box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.6); font-weight: 900; font-size: 18px; }
.primary:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.6); }
.secondary { min-height: 52px; background: var(--plate); color: var(--white); border: 3px solid var(--white); font-weight: 800; font-size: 16px; }
.secondary:active { transform: scale(0.97); }
a:focus-visible { outline: 3px solid var(--acid); outline-offset: 3px; }
.note { margin: 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.lead { margin: 0 0 16px; font-size: 17px; line-height: 1.45; color: var(--muted); max-width: 32ch; margin-inline: auto; }
.gone .kicker { color: var(--hot); }
/* The dead link: one block — call-out, the knocked-out fighter (trimmed to its body, so no
   empty rows), the text, the buttons — centred under the header, the text close to the body. */
.gone .call { margin-top: auto; padding-top: 28px; }
.gone .fighter { width: min(78%, 320px); height: auto; max-height: 200px; margin-block: 6px; }
.gone .actions { margin-bottom: auto; margin-top: 8px; }
/* Without a card the page has room: the call-out sits lower, closer to the buttons. */
.join:not(.has-card) .call { margin-block: auto 8px; }
.join:not(.has-card) .note { margin-bottom: auto; }

/* The landing's footer (app.css), in the page's phone-wide column — its rule as wide as the header's. */
.foot { font-size: 13px; color: var(--muted); }
.foot-wrap { max-width: 440px; margin-inline: auto; border-top: 2px solid var(--faint); box-sizing: border-box; padding: 24px max(20px, env(safe-area-inset-left)) calc(24px + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 16px; }
.foot a { color: var(--muted); }
/* The language switch next to the brand: the current code, the list opens upwards (the footer is the page's end). */
.foot-brand { display: inline-flex; align-items: center; gap: 12px; }
.foot-lang { position: relative; font-family: var(--display); font-weight: 800; font-size: 11px; letter-spacing: 0.08em; }
.foot-lang summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 4px 8px; border: 2px solid var(--faint); color: var(--white); user-select: none; }
.foot-lang summary::-webkit-details-marker { display: none; }
.foot-lang summary::after { content: ''; border: 4px solid transparent; border-bottom-color: var(--acid); border-top-width: 0; }
.foot-lang[open] summary::after { border-bottom-width: 0; border-top: 4px solid var(--acid); }
.foot-lang summary:hover, .foot-lang[open] summary { border-color: var(--acid); }
.foot-lang ul { position: absolute; left: 0; bottom: calc(100% + 6px); margin: 0; padding: 6px 0; list-style: none; min-width: 190px; background: var(--ink); border: 2px solid var(--faint); box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.5); z-index: 5; }
.foot-lang li a, .foot-lang li span { display: block; padding: 8px 14px; font-family: var(--body); font-weight: 600; font-size: 14px; letter-spacing: 0; text-decoration: none; color: var(--muted); white-space: nowrap; }
.foot-lang li a:hover { color: var(--white); background: rgba(255, 255, 255, 0.06); }
.foot-lang li span { color: var(--acid); }

/* Who is in the room: two chips, an acid dot for online, a red one for offline. */
.presence { margin: 0; display: flex; justify-content: center; gap: 18px; font-size: 13px; font-weight: 600; color: var(--muted); }
.presence span { display: inline-flex; align-items: center; gap: 7px; }
.presence i { width: 8px; height: 8px; border-radius: 50%; background: var(--hot); }
.presence .on { color: var(--white); }
.presence .on i { background: var(--acid); box-shadow: 0 0 0 3px rgba(198, 255, 61, 0.18); }

/* The referral invite page (/i/*, worker/invite.js; artboard RefLanding) and the creator code page
   (/c/*, worker/creator.js): the code to copy, three steps, the same buttons. It is taller than the
   fight link, so it scrolls on a phone. */
.acid { color: var(--acid); }
.invite .fighter { height: clamp(120px, calc(100svh - 685px), 170px); margin-block: 14px; }
.code { display: flex; align-items: center; justify-content: space-between; gap: 12px; box-sizing: border-box; min-height: 58px; padding: 0 4px 0 14px; background: transparent; border: 3px solid rgba(255, 255, 255, 0.2); color: var(--white); text-align: left; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.code:focus-visible { outline: 3px solid var(--acid); outline-offset: 3px; }
.code:active { transform: scale(0.98); }
.code-label { font-family: var(--display); font-weight: 800; font-size: 12px; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; }
.code-box { display: flex; align-items: center; }
.code-value { font-family: var(--display); font-weight: 900; font-size: 26px; letter-spacing: 0.08em; }
.code-value.long { font-size: 19px; letter-spacing: 0.04em; }
.code-icon { width: 44px; height: 44px; margin-left: -2px; display: flex; align-items: center; justify-content: center; color: var(--white); }
.code .ic-tick, .code.copied .ic-copy { display: none; }
.code.copied .ic-tick { display: block; }
.code.copied .code-icon { color: var(--acid); }
.steps { margin: 10px 0; padding: 0; list-style: none; display: grid; gap: 10px; text-align: left; }
.steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.35; }
.steps .n { width: 26px; height: 26px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--acid); color: var(--ink); font-family: var(--display); font-weight: 900; font-size: 15px; }
.steps .muted { color: var(--muted); }
.invite .actions { margin-top: 4px; }
.ended .lead { margin-bottom: 0; }

/* Startup beef pages (/s/<domain>, worker/startup.js; board SuWebStartup): left-aligned, the same
   phone-wide column on a desktop. */
.su { text-align: left; gap: 18px; }
/* The column and the footer share one screen: the column fills what the footer leaves (so a short
   page ends with the footer at the bottom edge), instead of the link pages' full screen above it. */
.su-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.su-page .join { flex: 1 0 auto; min-height: 0; width: 100%; box-sizing: border-box; }
.su h1 { font-size: clamp(34px, 11vw, 46px); line-height: 0.92; text-wrap: pretty; overflow-wrap: break-word; }
/* The startup page's head: its site's title, smaller (titles run long), the domain linked under it. */
.su h1.su-name { font-size: clamp(24px, 7vw, 34px); line-height: 1; overflow-wrap: break-word; }
.su-board-link { font-family: var(--display); font-weight: 800; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--acid); text-decoration: none; }
.su-board-link:hover { color: var(--white); }
.su-head { margin-top: 14px; }
.su .lead { margin: 10px 0 0; max-width: none; }
.su-site { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 8px 0 0; font-size: 14px; }
.su-site a { color: rgba(255, 255, 255, 0.85); overflow-wrap: anywhere; }
.su-site a:hover { color: var(--acid); }
.su-chip { padding: 1px 7px; border: 1px solid var(--muted); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.su-chip.on { border-color: var(--acid); color: var(--acid); }
.su-chip.warn { border-color: var(--warn); color: var(--warn); }
/* The fighter on a dim floor light; the turntable keeps the sprite's frame aspect (set by its script). */
.su-stage { position: relative; height: clamp(300px, 96vw, 380px); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 18px; background: radial-gradient(circle at 50% 75%, #24242a, #121214 70%); overflow: hidden; }
.su-fighter { display: block; height: calc(100% - 30px); max-width: 100%; object-fit: contain; }
.su-spin { aspect-ratio: 3 / 4; background-repeat: no-repeat; background-position: 0 0; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.su-spin:active { cursor: grabbing; }
.su-stage model-viewer { width: 100%; height: 100%; margin-bottom: -18px; --poster-color: transparent; }
.su-progress { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--acid); transform: scaleX(0); transform-origin: left; transition: transform 0.2s ease-out, opacity 0.3s 0.2s; pointer-events: none; z-index: 1; }
.su-progress.done { opacity: 0; }
.su-hint { position: absolute; left: 10px; top: 10px; font-size: 10px; letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.55); text-transform: uppercase; pointer-events: none; }
.su-3d { position: absolute; right: 10px; bottom: 10px; height: 40px; padding: 0 14px; background: rgba(11, 11, 12, 0.7); border: 2px solid var(--white); color: var(--white); font-family: var(--display); font-weight: 800; font-size: 12px; text-transform: uppercase; cursor: pointer; }
.su-3d:focus-visible { outline: 3px solid var(--acid); outline-offset: 3px; }
.su-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.su-stat { display: grid; gap: 2px; padding: 10px; border: 2px solid var(--faint); min-width: 0; }
.su-stat-value { font-family: var(--display); font-weight: 900; font-size: 26px; line-height: 1.1; overflow-wrap: anywhere; }
.su-stat > span { font-size: 11px; line-height: 1.3; color: var(--muted); }
.su-blurb { display: grid; gap: 8px; padding: 14px; border: 2px solid var(--warn); }
.su-blurb b { font-family: var(--display); font-weight: 900; font-size: 18px; line-height: 1.1; text-transform: uppercase; }
.su-blurb p { margin: 0; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, 0.75); }
.su-beefs h2 { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; }
.su-beefs ul { margin: 0; padding: 0; list-style: none; }
.su-beef { display: flex; align-items: center; gap: 10px; min-height: 48px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); color: var(--white); text-decoration: none; font-size: 14px; }
.su-beef:hover .su-line { color: var(--acid); }
.su-delta { flex-shrink: 0; min-width: 44px; font-family: var(--display); font-weight: 900; font-size: 13px; }
.su-delta.win { color: var(--acid); }
.su-delta.loss { color: var(--hot); }
.su-delta.unrated { font-family: var(--body); font-weight: 600; font-size: 11px; color: var(--muted); }
.su-line { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.su-when { flex-shrink: 0; font-size: 12px; color: rgba(255, 255, 255, 0.55); }
.su-empty { margin: 0; font-size: 14px; color: var(--muted); }
.su-cta { display: grid; gap: 12px; margin-top: auto; padding-top: 8px; }
/* The buttons stay on screen while the page scrolls and settle in their place above the footer at
   the end (sticky inside the full-height column); a fade keeps the content under them readable. */
.su-cta, .su-card, .su-plate { position: sticky; bottom: 0; z-index: 2; }
/* The startup page's acid plate (board SuWebStartup): QR + title + line, one link. The QR is for a desktop
   visitor; on a phone the plate itself is the tap target, so it shows the «tap» line instead. */
.su-plate { margin-top: auto; display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--acid); color: var(--ink); text-decoration: none; box-shadow: 0 12px 0 var(--ink), 0 -20px 20px var(--ink); }
.su-plate:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.su-plate-qr { display: none; flex-shrink: 0; width: 92px; height: 92px; padding: 4px; background: #fff; }
.su-plate-qr svg { display: block; width: 100%; height: 100%; }
.su-plate-text { display: grid; gap: 4px; min-width: 0; }
.su-plate-text b { font-family: var(--display); font-weight: 900; font-size: 20px; line-height: 1; text-transform: uppercase; overflow-wrap: break-word; }
.su-plate-text span { font-size: 14px; line-height: 1.4; color: rgba(11, 11, 12, 0.75); }
.su-plate .scan { display: none; }
@media (min-width: 768px) {
	.su-plate-qr, .su-plate .scan { display: block; }
	.su-plate .tap { display: none; }
}
/* A phone: the plate runs edge to edge, its text on the page's own left and right edges. */
@media (max-width: 767px) {
	.su-plate {
		margin-inline: calc(-1 * max(20px, env(safe-area-inset-left))) calc(-1 * max(20px, env(safe-area-inset-right)));
		padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right));
	}
}
.su-cta { margin-inline: calc(-1 * max(20px, env(safe-area-inset-left))); padding: 20px max(20px, env(safe-area-inset-left)) calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, rgba(11, 11, 12, 0), var(--ink) 20px); }
.su-w { color: var(--acid); }
.su-l { color: var(--hot); }
.su-report { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; }
.su-report a { color: rgba(255, 255, 255, 0.85); white-space: nowrap; }
/* The leaderboard /startups (board SuWebBoard): rows are whole-row links; places 1-3 in acid. */
.su-rows { margin: 0; padding: 0; list-style: none; }
.su-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); color: var(--white); text-decoration: none; }
.su-row:hover .su-who b { color: var(--acid); }
.su-row:focus-visible { outline: 3px solid var(--acid); outline-offset: 2px; }
.su-place { flex-shrink: 0; width: 28px; font-family: var(--display); font-weight: 900; font-size: 22px; text-align: center; color: var(--muted); }
.su-place.top { color: var(--acid); }
/* The fighter's face close up (board SuWebBoard): its square face.webp, from the top. */
.su-thumb { position: relative; flex-shrink: 0; width: 48px; height: 56px; background: radial-gradient(circle at 50% 75%, #24242a, #121214 70%); overflow: hidden; }
.su-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.su-who { flex: 1; min-width: 0; display: grid; gap: 2px; }
.su-who b { font-family: var(--display); font-weight: 800; font-size: 16px; line-height: 1.15; overflow-wrap: anywhere; }
.su-who span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-nums { flex-shrink: 0; display: grid; gap: 2px; justify-items: end; text-align: right; }
.su-nums b { font-family: var(--display); font-weight: 900; font-size: 20px; line-height: 1.1; }
.su-nums > span { font-size: 12px; color: var(--muted); }
.su-unranked-lead { margin: 0 0 4px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.su-unranked h2 { margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; }
.su-card { display: grid; gap: 10px; margin-top: auto; padding: 16px; border: 2px solid var(--acid); background: var(--ink); box-shadow: 0 12px 0 var(--ink), 0 -20px 20px var(--ink); }
.su-card b { font-family: var(--display); font-weight: 900; font-size: 22px; line-height: 1.05; text-transform: uppercase; }
.su-card p { margin: 0; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, 0.8); }
/* The missing and unavailable pages: the message centred between the header and the buttons. */
.su-plain .su-note { margin-block: auto 8px; text-align: center; }
.su-plain .su-note .lead { margin-top: 14px; }
.su-plain .su-cta { position: static; margin: 0 0 auto; padding: 0; background: none; }
/* Beef page /b/<id>: the VS card (diagonal, as the landing's Beefs) with KO between the stances. */
.su-vs { --gap: 3px; position: relative; height: clamp(260px, 80vw, 340px); background: #121214; overflow: hidden; }
.su-side { position: absolute; inset: 0; }
.su-side.l { background: radial-gradient(circle at 30% 80%, rgba(198, 255, 61, 0.28), #17171a 70%); clip-path: polygon(0 0, calc(58% - var(--gap)) 0, calc(42% - var(--gap)) 100%, 0 100%); }
.su-side.r { background: radial-gradient(circle at 70% 80%, rgba(255, 84, 54, 0.3), #17171a 70%); clip-path: polygon(calc(58% + var(--gap)) 0, 100% 0, 100% 100%, calc(42% + var(--gap)) 100%); }
.su-pose { position: absolute; bottom: 0; display: block; height: 92%; max-width: 46%; object-fit: contain; }
.su-side.l .su-pose { left: 4%; }
.su-side.r .su-pose { right: 4%; }
.su-side.lost .su-pose { filter: grayscale(0.7) brightness(0.8); }
.su-ko { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; display: flex; align-items: center; justify-content: center; border: 4px solid var(--white); border-radius: 50%; background: var(--ink); font-family: var(--display); font-weight: 900; font-size: 26px; }
.su-result { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; text-align: center; }
/* A long domain («GETWOWLINK.COM WINS») fits the column: smaller type, and the column never grows past it. */
.su-result h1 { margin: 0; font-size: clamp(24px, 7vw, 38px); }
.su-names { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; font-size: 15px; overflow-wrap: anywhere; }
.su-names a { color: var(--white); }
.su-names a:hover { color: var(--acid); }
.su-vs-word { color: var(--muted); text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; align-self: center; }
.su-rating { margin: 0; font-family: var(--display); font-weight: 900; font-size: 20px; color: var(--acid); }
.su-rating.unrated { font-family: var(--body); font-weight: 600; font-size: 12px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
