@font-face {
	font-family: 'Bricolage';
	font-style: normal;
	font-display: swap;
	font-weight: 200 800;
	font-stretch: 75% 100%;
	src: url(/fonts/bricolage-latin-ext.woff2) format('woff2-variations');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Bricolage';
	font-style: normal;
	font-display: swap;
	font-weight: 200 800;
	font-stretch: 75% 100%;
	src: url(/fonts/bricolage-latin.woff2) format('woff2-variations');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--bg: #0e0e0f;
	--surface: #1b1b1d;
	--surface-2: #29292c;
	--ink: #ffffff;
	--muted: #a8a8ad;
	--lime: #c8ff2e;
	--pink: #ff4fa0;
	--blue: #4a5cff;
	--orange: #ff7a1a;
	--red: #ff5a5f;
	color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	min-height: 100dvh;
	background: var(--bg);
	color: var(--ink);
	font: 16px/1.45 'Bricolage', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	display: flex;
	flex-direction: column;
}
a { color: var(--ink); text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }

.top { display: flex; align-items: center; justify-content: space-between; padding: max(14px, env(safe-area-inset-top)) 16px 4px; max-width: 540px; width: 100%; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -0.6px; }
.mark { position: relative; width: 34px; height: 22px; }
.mark i { position: absolute; top: 0; width: 22px; height: 22px; border-radius: 50%; }
.mark i:first-child { left: 0; background: var(--pink); }
.mark i:last-child { right: 0; background: var(--lime); mix-blend-mode: difference; }
.lang { background: var(--surface-2); border: 0; border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 13px; cursor: pointer; }

main { flex: 1; width: 100%; max-width: 540px; margin: 0 auto; padding: 4px 16px 24px; }
.screen[hidden] { display: none; }

.tag { display: inline-block; background: var(--surface-2); color: var(--lime); border-radius: 999px; padding: 5px 12px; font-weight: 700; font-size: 13px; margin: 22px 0 14px; }
h1 { font-size: clamp(54px, 16.5vw, 84px); line-height: 0.9; letter-spacing: -0.045em; margin: 0 0 16px; font-weight: 800; }
h1 .hl { color: var(--lime); display: inline-block; }
h2 { font-size: 30px; line-height: 1.02; letter-spacing: -0.03em; margin: 28px 0 6px; font-weight: 800; }
h3 { margin: 0 0 4px; font-size: 21px; letter-spacing: -0.02em; }
.lead { font-size: 18px; color: #d9d9dc; margin: 0 0 22px; max-width: 30em; }
.hint, .small { color: var(--muted); margin: 0 0 12px; }
.small { font-size: 14px; }

/* Upload: a flat colour block like a recap story card */
.drop { display: block; position: relative; background: var(--pink); color: #120612; border-radius: 16px; padding: 20px 18px 18px; cursor: pointer; overflow: hidden; transition: transform 0.12s; }
.drop:active { transform: scale(0.985); }
.drop::after { content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: var(--orange); right: -60px; top: -70px; }
.drop > * { position: relative; z-index: 1; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; z-index: 2; }
.drop:focus-within { outline: 3px solid var(--lime); outline-offset: 3px; }
.drop b { display: block; font-size: 27px; line-height: 1; letter-spacing: -0.03em; max-width: 12em; }
.drop .shots { display: flex; gap: 10px; margin: 16px 0 14px; }
.drop .shots span { flex: 1; aspect-ratio: 9 / 15; border-radius: 8px; display: flex; align-items: flex-end; padding: 7px; font-size: 12px; font-weight: 800; line-height: 1.05; }
.drop .shots span:nth-child(1) { background: #120612; color: var(--lime); transform: rotate(-4deg); }
.drop .shots span:nth-child(2) { background: var(--blue); color: #fff; }
.drop .shots span:nth-child(3) { background: var(--lime); color: #120612; transform: rotate(4deg); }
.drop small { font-size: 14px; display: block; font-weight: 600; margin-top: 12px; }
.pick-btn { display: inline-block; margin-top: 12px; background: #120612; color: #fff; border-radius: 999px; padding: 11px 18px; font-weight: 800; }
.alt { display: block; margin: 18px auto 0; font-weight: 700; background: none; border: 0; padding: 6px; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; font-size: 16px; }
.fine { color: var(--muted); font-size: 13px; margin: 24px 0 0; text-align: center; }

/* Reading */
.bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 22px 0 12px; }
.bar i { display: block; height: 100%; width: 0; background: var(--lime); border-radius: 999px; transition: width 0.25s; }
.found { background: var(--surface); border-left: 4px solid var(--lime); border-radius: 8px; padding: 11px 14px; margin: 14px 0 0; font-weight: 600; }
.found.warn { border-left-color: var(--orange); }

.btn { appearance: none; border: 0; cursor: pointer; font-weight: 800; border-radius: 999px; padding: 13px 22px; background: var(--lime); color: #0e0e0f; font-size: 16px; line-height: 1.15; transition: transform 0.08s, opacity 0.15s; }
.btn:hover { transform: scale(1.02); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.btn.big { font-size: 18px; padding: 16px 24px; width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px #ffffff66; }
.btn.danger { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red); }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.row .btn { flex: 1 1 140px; }

.picker { position: relative; }
input[type='search'], .field input { width: 100%; font-size: 16px; background: var(--surface-2); border: 2px solid transparent; border-radius: 8px; padding: 13px 14px; }
input:focus { outline: none; border-color: var(--ink); }
.suggest { list-style: none; margin: 6px 0 0; padding: 4px 0; background: #2f2f33; border-radius: 8px; overflow: hidden; position: absolute; left: 0; right: 0; z-index: 5; box-shadow: 0 16px 32px #000a; }
.suggest:empty { display: none; }
.suggest li { padding: 10px 14px; cursor: pointer; font-weight: 700; }
.suggest li:hover { background: #ffffff14; }
.suggest small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.suggest .status { color: var(--muted); cursor: default; font-weight: 400; }
.chips { list-style: none; counter-reset: n; padding: 0; margin: 10px 0 0; display: grid; gap: 2px; }
.chips li { counter-increment: n; display: flex; align-items: center; gap: 14px; border-radius: 6px; padding: 8px 4px 8px 6px; font-weight: 700; }
.chips li:hover { background: var(--surface); }
.chips li::before { content: counter(n); color: var(--muted); font-weight: 600; width: 16px; text-align: right; }
.chips li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips li em { display: block; font-style: normal; color: var(--muted); font-weight: 400; font-size: 14px; }
.chips button { border: 0; background: transparent; color: var(--muted); width: 34px; height: 34px; border-radius: 50%; font-size: 20px; cursor: pointer; flex: none; }
.chips button:hover { color: var(--ink); background: var(--surface-2); }

.sticky-cta { position: sticky; bottom: 0; padding: 14px 0 max(12px, env(safe-area-inset-bottom)); background: linear-gradient(#0e0e0f00, var(--bg) 30%); display: grid; gap: 10px; margin-top: 14px; }

.switch, .check { display: flex; gap: 12px; align-items: center; font-weight: 700; padding: 14px; background: var(--surface); border-radius: 8px; margin: 14px 0; cursor: pointer; }
.switch input, .check input { width: 22px; height: 22px; accent-color: var(--lime); flex: none; }
.field { display: grid; gap: 6px; margin: 14px 0; font-weight: 700; }
.field small { color: var(--muted); font-weight: 400; }
.error { color: var(--red); font-weight: 700; }

/* Results */
.hero-match { background: var(--lime); color: #0e0e0f; border-radius: 16px; padding: 20px 18px; margin: 8px 0 18px; position: relative; overflow: hidden; }
.hero-match::after { content: ''; position: absolute; width: 150px; height: 150px; border-radius: 50%; background: var(--blue); right: -50px; bottom: -60px; }
.hero-match > * { position: relative; z-index: 1; }
.hero-match .label { font-weight: 800; font-size: 14px; }
.hero-match .pct { font-size: 96px; line-height: 0.9; font-weight: 800; letter-spacing: -0.05em; margin: 6px 0 4px; }
.hero-match .who { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.hero-match .who a { color: #0e0e0f; font-size: 17px; margin-left: 4px; }
.hero-match .shared { font-weight: 600; margin-top: 6px; max-width: 80%; }
.vibe-row { color: var(--muted); font-weight: 600; margin: 0 0 4px; }
.vibe { font-size: 40px; margin: 0 0 14px; color: var(--ink); }
.list-head { color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin: 18px 0 4px; }
.match { display: grid; grid-template-columns: 22px 1fr auto; gap: 0 14px; align-items: center; padding: 10px 6px; border-radius: 6px; }
.match:hover { background: var(--surface); }
.match .n { color: var(--muted); text-align: right; }
.match .who { font-weight: 700; overflow-wrap: anywhere; }
.match .who a { color: var(--muted); font-weight: 600; font-size: 14px; margin-left: 6px; }
.match .shared { grid-column: 2; color: var(--muted); font-size: 14px; }
.match .pct { grid-row: span 2; grid-column: 3; font-weight: 800; color: var(--lime); }
.empty { background: var(--blue); border-radius: 16px; padding: 18px; margin: 8px 0 16px; }
.empty p { color: #e6e8ff; }
.card-preview { margin: 26px auto 0; max-width: 260px; }
.card-preview canvas { width: 100%; height: auto; border-radius: 12px; display: block; box-shadow: 0 18px 40px #000c; }
.mine { margin: 26px 0 8px; padding: 16px; background: var(--surface); border-radius: 12px; }
#again { width: 100%; margin-top: 8px; }

.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); }
.foot p { margin: 4px 0; }
.foot a { color: var(--muted); }
.prose { line-height: 1.6; }
.prose h1 { font-size: 46px; }
.prose li { margin: 6px 0; }

/* Twin step + extras */
.file-btn { position: relative; display: block; text-align: center; margin: 4px 0 8px; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.lines { margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lines .small, .lines .bar { flex-basis: 100%; margin: 4px 0; }
.lines .line { background: var(--surface-2); border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 700; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lines .line.on { background: var(--lime); color: #0e0e0f; }
.invite { background: var(--blue); border-radius: 12px; padding: 12px 14px; margin: 18px 0 0; font-weight: 700; }

/* Twin, compare, race */
.twin-box { background: var(--surface); border-radius: 16px; padding: 16px 18px; margin: 8px 0 14px; }
.twin-box.here { background: var(--pink); color: #120612; }
.twin-box .label { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.twin-box p { margin: 6px 0 0; color: var(--muted); }
.twin-person { margin-top: 10px; font-size: 18px; }
.twin-person a { color: #120612; font-weight: 700; }
.twin-person span { display: block; font-size: 14px; font-weight: 600; }
.hero-match.blue { background: var(--blue); color: #fff; }
.hero-match.blue::after { background: var(--pink); }
.hero-match .report { position: relative; z-index: 1; margin-top: 8px; }
.report { background: none; border: 0; padding: 0; color: inherit; opacity: 0.6; font-size: 13px; text-decoration: underline; cursor: pointer; }
.race { margin: 22px 0 6px; }
.race-pos { font-size: 22px; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.02em; }
.match.me { background: var(--surface); }
.match.me em { color: var(--lime); font-style: normal; }
.btn.wide { width: 100%; margin-top: 4px; }

/* Chat */
.alt.left { margin: 14px 0 0; display: inline-block; text-decoration: none; padding-left: 0; }
.msgs { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; min-height: 120px; }
.msg { align-self: flex-start; max-width: 80%; background: var(--surface-2); padding: 9px 13px; border-radius: 16px 16px 16px 4px; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: var(--lime); color: #0e0e0f; border-radius: 16px 16px 4px 16px; }
.msg.insta { background: var(--pink); color: #120612; font-weight: 700; }
.msg.insta a { color: inherit; }
.chat-form { display: flex; gap: 8px; position: sticky; bottom: 0; padding: 10px 0 max(10px, env(safe-area-inset-bottom)); background: var(--bg); }
.chat-form input { flex: 1; font-size: 16px; background: var(--surface-2); border: 2px solid transparent; border-radius: 999px; padding: 12px 16px; }
.chat-btn { background: var(--lime); color: #0e0e0f; border: 0; border-radius: 999px; padding: 6px 14px; font-weight: 800; cursor: pointer; margin-right: 8px; font-size: 14px; }
.chat-btn.dark { background: #120612; color: #fff; margin-top: 8px; }
.hero-match .chat-btn { position: relative; z-index: 1; background: #0e0e0f; color: var(--lime); margin-top: 10px; }
.inbox-row { width: 100%; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.inbox-row .n { color: var(--pink); }
.house { background: var(--surface); border-radius: 16px; padding: 16px 18px; margin: 22px 0 6px; }
.house p { margin: 0 0 12px; color: #d9d9dc; }
.house:empty { display: none; }
.fine-print { margin-top: 10px; font-size: 13px; }
