/* Yumil PW player panel. Tokens and components from yumil-design-kit/design-system.md */

@font-face { font-family: 'Onest'; font-style: normal; font-display: swap; font-weight: 100 900;
	src: url(/fonts/onest-cyrillic-ext.woff2) format('woff2');
	unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Onest'; font-style: normal; font-display: swap; font-weight: 100 900;
	src: url(/fonts/onest-cyrillic.woff2) format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-display: swap; font-weight: 100 900;
	src: url(/fonts/onest-latin-ext.woff2) format('woff2');
	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: 'Onest'; font-style: normal; font-display: swap; font-weight: 100 900;
	src: url(/fonts/onest-latin.woff2) format('woff2');
	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; }

/* ------------------------------------------------------------ tokens */

:root {
	--bg: #fbf1f6; --orb1: #f9bfd3; --orb2: #dccbff; --orb3: #ffe0a3;
	--glass: rgba(255,255,255,.55); --glass2: rgba(255,255,255,.70); --tint: rgba(251,204,218,.45);
	--stroke: rgba(255,255,255,.8); --hl: rgba(255,255,255,.9); --hair: rgba(43,26,51,.09);
	--field: rgba(255,255,255,.75); --track: rgba(43,26,51,.06); --seg: #fff;
	--ink: #2b1a33; --strong: #4a3552; --muted: #6a5470;
	--shadow: 0 12px 40px rgba(110,50,100,.13);
	--ok: #1f7a45; --okbg: rgba(47,163,90,.14); --hi: rgba(242,182,42,.18);
	--bad: #b3261e; --badbg: rgba(207,68,35,.10);
	--accent: #cf4423; --accent-text: #c23d1d; --accent-soft: rgba(207,68,35,.10);
	--coin: radial-gradient(circle at 35% 30%, #ffe08a, #f2b62a 60%, #c98a0c);
	--seg-sh: 0 2px 8px rgba(60,20,70,.10);
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="day"]) {
		--bg: #110a17; --orb1: #6b2a5f; --orb2: #2f2a72; --orb3: #5c3b12;
		--glass: rgba(40,26,54,.55); --glass2: rgba(255,255,255,.07); --tint: rgba(251,204,218,.10);
		--stroke: rgba(255,255,255,.12); --hl: rgba(255,255,255,.08); --hair: rgba(255,255,255,.08);
		--field: rgba(0,0,0,.25); --track: rgba(255,255,255,.06); --seg: rgba(255,255,255,.16);
		--ink: #f6ecf3; --strong: #e3d2e2; --muted: #bda8c8;
		--shadow: 0 12px 40px rgba(0,0,0,.45);
		--ok: #8fe0aa; --okbg: rgba(143,224,170,.12); --hi: rgba(242,182,42,.14);
		--bad: #ff9a8a; --badbg: rgba(255,138,92,.12);
		--accent-text: #ff8a5c; --accent-soft: rgba(255,138,92,.14);
		--seg-sh: 0 2px 8px rgba(0,0,0,.25);
		color-scheme: dark;
	}
}
:root[data-theme="night"] {
	--bg: #110a17; --orb1: #6b2a5f; --orb2: #2f2a72; --orb3: #5c3b12;
	--glass: rgba(40,26,54,.55); --glass2: rgba(255,255,255,.07); --tint: rgba(251,204,218,.10);
	--stroke: rgba(255,255,255,.12); --hl: rgba(255,255,255,.08); --hair: rgba(255,255,255,.08);
	--field: rgba(0,0,0,.25); --track: rgba(255,255,255,.06); --seg: rgba(255,255,255,.16);
	--ink: #f6ecf3; --strong: #e3d2e2; --muted: #bda8c8;
	--shadow: 0 12px 40px rgba(0,0,0,.45);
	--ok: #8fe0aa; --okbg: rgba(143,224,170,.12); --hi: rgba(242,182,42,.14);
	--bad: #ff9a8a; --badbg: rgba(255,138,92,.12);
	--accent-text: #ff8a5c; --accent-soft: rgba(255,138,92,.14);
	--seg-sh: 0 2px 8px rgba(0,0,0,.25);
	color-scheme: dark;
}

/* ------------------------------------------------------------ base */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
	margin: 0; min-height: 100vh; position: relative; background: var(--bg); color: var(--ink);
	font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 15px; line-height: 1.4;
	overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
img { display: block; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.strong { color: var(--strong); }
.link { font-weight: 600; font-size: 14px; color: var(--ink); }
.hint { font-size: 13px; color: var(--muted); }
.accent-text { color: var(--accent-text) !important; }

/* absolute, as on the website: a fixed layer at the screen edges is what iOS 26 Safari colours its bars from */
.bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg i { position: absolute; border-radius: 50%; }
.bg .o1 { width: 640px; height: 640px; left: -220px; top: -240px; background: var(--orb1); filter: blur(100px); }
.bg .o2 { width: 560px; height: 560px; right: -200px; top: 16%; background: var(--orb2); filter: blur(100px); }
.bg .o3 { width: 620px; height: 620px; left: 30%; bottom: -320px; background: var(--orb3); filter: blur(110px); opacity: .8; }
/* iOS Safari paints the bands above and below the page in the page colour (--bg = theme-color):
   the orbs fade into it at the page's top and bottom edges, so the bands continue the page */
.bg::before, .bg::after { content: ""; position: absolute; left: 0; right: 0; z-index: 1; }
.bg::before { top: 0; height: 140px; background: linear-gradient(var(--bg), transparent); }
.bg::after { bottom: 0; height: 160px; background: linear-gradient(transparent, var(--bg)); }

/* ------------------------------------------------------------ components */

.glass {
	background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
	border: 1px solid var(--stroke); box-shadow: var(--shadow), inset 0 1px 0 var(--hl); border-radius: 28px;
}
.glass.tint { background: var(--tint); border-radius: 30px; }
.card { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.card h3 { font-size: 18px; font-weight: 700; }
.h-card { font-size: 18px; font-weight: 700; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.card-head > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.card > div:first-child:not([class]) { display: flex; flex-direction: column; gap: 2px; }
.card .muted { font-size: 14px; }
.sect-head { display: flex; flex-direction: column; gap: 2px; padding-top: 20px; border-top: 1px solid var(--hair); }
.sect-line { padding-top: 18px; border-top: 1px solid var(--hair); flex-wrap: nowrap; }
.sect-line > div:first-child { min-width: 0; }
.sect-line b { font-weight: 700; font-size: 16px; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
	font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; color: var(--ink);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(207,68,35,.30), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-primary:hover:not(:disabled) { background: #bf3c1d; }
.btn-primary:disabled { opacity: .5; box-shadow: none; }
.btn-secondary { background: var(--seg); border: 1px solid var(--stroke); }
.btn-secondary:hover { box-shadow: var(--seg-sh); }
.btn-glass { background: var(--glass); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); border: 1px solid var(--stroke); }
.btn-lg { min-height: 52px; font-size: 16px; }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 14px; }
.btn-soft {
	display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 999px;
	background: var(--accent-soft); color: var(--accent-text); text-decoration: none; font-weight: 600; font-size: 14px;
}
.btn-soft svg { width: 14px; height: 14px; stroke-width: 2.4; }

.round {
	width: 44px; height: 44px; flex: 0 0 44px; border-radius: 999px; display: grid; place-items: center; padding: 0;
	background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
	border: 1px solid var(--stroke); box-shadow: inset 0 1px 0 var(--hl); color: var(--ink);
	font-weight: 700; font-size: 13px;
}
.round svg { stroke-width: 2.1; }
.pill {
	display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 700;
	background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
	border: 1px solid var(--stroke); box-shadow: inset 0 1px 0 var(--hl); border-radius: 999px;
}
.coin { width: 28px; height: 28px; border-radius: 999px; background: var(--coin); box-shadow: inset 0 0 0 2px rgba(255,255,255,.4); flex: 0 0 auto; }

.seg { display: flex; background: var(--track); border-radius: 999px; padding: 4px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
	flex: 0 0 auto; border: 0; border-radius: 999px; background: transparent; color: var(--muted);
	font-weight: 600; font-size: 14px; min-height: 40px; min-width: 44px; padding: 0 16px; white-space: nowrap;
}
.seg button[aria-pressed="true"], .seg button[aria-selected="true"], .seg button[aria-checked="true"] {
	background: var(--seg); color: var(--ink); box-shadow: var(--seg-sh);
}
.seg[data-lang-seg] button { font-size: 13px; min-height: 36px; padding: 0; }
.seg-full { display: grid; grid-template-columns: 1fr 1fr; }
.seg-full button { min-height: 42px; }
.glass-seg { background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--stroke); }

.switch { position: relative; flex: 0 0 auto; width: 52px; height: 32px; border: 0; border-radius: 999px; background: var(--track); padding: 0; transition: background .2s; box-shadow: inset 0 0 0 1px var(--hair); }
.switch span { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 999px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: left .2s; }
.switch[aria-checked="true"] { background: #2fa35a; box-shadow: none; }
.switch[aria-checked="true"] span { left: 23px; }
.switch-row { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 14px; min-height: 44px; cursor: pointer; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field-row label { font-weight: 600; font-size: 14px; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-pair { display: flex; flex-wrap: wrap; gap: 12px; }
.field-pair .field { flex: 1 1 150px; }
.inp {
	min-height: 50px; width: 100%; border: 1px solid var(--hair); border-radius: 16px; padding: 0 16px;
	background: var(--field); color: var(--ink); outline: none;
}
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.inp[aria-invalid="true"] { border-color: var(--bad); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; min-height: 40px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: #cf4423; flex: 0 0 auto; }
.form-err { font-size: 14px; font-weight: 600; color: var(--bad); min-height: 0; }
.form-err:empty { display: none; }
.form-err.ok { color: var(--ok); }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 5px 10px; white-space: nowrap; background: var(--track); }
.chip-ok { background: var(--okbg); color: var(--ok); }
.chip-gold { background: rgba(242,182,42,.32); color: #6b4600; }
.chip-warn { background: var(--badbg); color: var(--accent-text); }
.chip canvas { width: 16px; height: 16px; }

.bubble {
	background: var(--glass2); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
	border: 1px solid var(--stroke); box-shadow: 0 6px 20px rgba(60,20,70,.08);
	border-radius: 18px; padding: 12px 16px; font-weight: 600; font-size: 15px; line-height: 1.35; max-width: 260px;
}
.bubble-r { border-radius: 18px 18px 6px 18px; }

.notice { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 22px; background: var(--tint); }
.notice img { flex: 0 0 72px; width: 72px; height: 72px; object-fit: contain; }
.notice > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.notice b { font-weight: 600; font-size: 15px; }
.notice span { font-size: 14px; color: var(--strong); line-height: 1.45; }
.notice.ok { background: var(--okbg); }
.notice.ok b { color: var(--ok); }
.notice.hi { background: var(--hi); }
.notice.bad { background: var(--badbg); }
.notice.bad b { color: var(--bad); }
.steps { display: flex; gap: 6px; margin-top: 8px; }
.steps i { flex: 1; height: 6px; border-radius: 999px; background: var(--track); }
.steps i.gold { background: #f2b62a; }
.steps i.green { background: var(--ok); }
.steps i.now { animation: step-now 1.6s ease-in-out infinite; }
@keyframes step-now { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .steps i.now { animation: none; } }
.steps-t { display: flex; gap: 6px; }
.steps-t span { flex: 1; font-size: 12px; color: var(--muted); }
.reqs { display: flex; flex-direction: column; gap: 12px; }
.req { display: flex; gap: 10px; align-items: flex-start; }
.req-mark { width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; flex: 0 0 auto; background: var(--track); color: var(--muted); }
.req-mark svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.req.ok .req-mark { background: var(--okbg); color: var(--ok); }
.req.bad .req-mark { background: var(--badbg); color: var(--bad); }
.req.wait .req-mark { background: rgba(242,182,42,.32); color: #6b4600; }
.req-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.req-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.req-top b { font-size: 14px; font-weight: 700; }
.req-val { font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.req-val:empty { display: none; }
.req.bad .req-val { color: var(--bad); }
.req-val .coin { width: 14px; height: 14px; }
.req small { font-size: 13px; color: var(--muted); line-height: 1.4; }
.req small:empty { display: none; }
.btn-pay { gap: 0; }
.btn-price { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.45); }
.btn-price .coin { width: 16px; height: 16px; }
.amt-plus { color: var(--ok); }
.amt-minus { color: var(--accent-text); }

.state { padding: 28px 24px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.state img { width: 132px; height: 132px; object-fit: contain; margin: 4px 0 6px; }
.state h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.state p { font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 340px; }
.state .btn { margin-top: 8px; }
.state-kind { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.state-kind:empty { display: none; }
.state-wide { padding-bottom: 40px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions .btn { flex: 1 1 auto; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 16px 20px; }
.tile { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile span { font-size: 13px; color: var(--muted); }
.tile b { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.tile small { font-size: 13px; color: var(--muted); font-weight: 500; }

.ava { position: relative; flex: 0 0 46px; width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #2b1a33; }
.ava-lg { flex-basis: 64px; width: 64px; height: 64px; border-radius: 20px; font-size: 20px; }
.ava-sm { flex-basis: 30px; width: 30px; height: 30px; border-radius: 999px; font-size: 11px; }

.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 0; }
.row + .row { border-top: 1px solid var(--hair); }
.row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row b { font-weight: 600; font-size: 15px; }
.row .muted { font-size: 13px; }
.row-ic { flex: 0 0 40px; height: 40px; border-radius: 12px; background: var(--track); display: grid; place-items: center; }
.row .chip { margin-right: 6px; }
.row > div > .chip { align-self: flex-start; margin: 4px 0 0; }

.community { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.community .btn { min-height: 48px; font-size: 14px; background: var(--glass2); }

.px { image-rendering: pixelated; image-rendering: crisp-edges; }

/* ------------------------------------------------------------ boot state */

.boot { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: calc(24px + env(safe-area-inset-top)) calc(24px + env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) calc(24px + env(safe-area-inset-left)); }
.boot .state { width: 100%; max-width: 380px; min-height: 360px; }

/* ------------------------------------------------------------ login */

.login { position: relative; z-index: 1; min-height: 100vh; padding: calc(28px + env(safe-area-inset-top)) calc(32px + env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) calc(32px + env(safe-area-inset-left)); display: flex; flex-direction: column; }
.login-head, .login-mid { width: 100%; max-width: 1040px; margin: 0 auto; }
.login-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.login-tools { display: flex; gap: 10px; align-items: center; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo img { width: 40px; height: 40px; }
.logo span { font-weight: 800; font-size: 23px; letter-spacing: -.03em; }
.logo b { font-weight: 800; color: var(--accent-text); }
.login-mid { flex: 1; display: flex; align-items: center; justify-content: center; gap: 56px; padding: 24px 0; }
.login-cat { flex: 0 1 300px; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.login-cat img { width: 210px; height: auto; }
.login-card { flex: 0 1 440px; width: 100%; border-radius: 32px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form-head { display: flex; flex-direction: column; gap: 4px; }
.form-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.form-head .muted { font-size: 14px; }
.picks { gap: 8px; }
.picks .row.pick { min-height: 60px; padding: 10px 14px; border: 1px solid var(--hair); border-radius: 16px; cursor: pointer; background: var(--glass2); }
.picks .row.pick + .row.pick { border-top: 1px solid var(--hair); }
.picks .row.pick:has(input:checked) { background: var(--seg); border-color: var(--stroke); box-shadow: var(--shadow); }
.picks .row.pick input { width: 20px; height: 20px; margin: 0; accent-color: #cf4423; flex: 0 0 auto; }
.picks .row.pick .muted { overflow-wrap: anywhere; }
.captcha { min-height: 65px; }                        /* the Turnstile widget: no jump when it appears */
.gift { font-size: 14px; font-weight: 600; padding: 10px 14px; border-radius: 14px; background: var(--hi); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; padding-top: 2px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--hair); }

/* ------------------------------------------------------------ shell */

.shell { position: relative; z-index: 1; max-width: 1392px; margin: 0 auto; padding: calc(24px + env(safe-area-inset-top)) calc(24px + env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) calc(24px + env(safe-area-inset-left)); display: flex; gap: 24px; align-items: flex-start; }
.main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 20px; min-height: calc(100vh - 48px); min-height: calc(100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }

.sidebar { flex: 0 0 248px; position: sticky; top: calc(24px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 14px; min-height: calc(100vh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.sidebar .logo { padding: 6px 8px 10px; }
.sidebar .logo img { width: 36px; height: 36px; }
.sidebar .logo span { font-size: 22px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a, .side-out {
	display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: 14px;
	text-decoration: none; color: var(--strong); font-weight: 600; font-size: 15px; border: 0; background: transparent; text-align: left;
}
.side-nav a:hover { background: var(--track); }
.side-nav a[aria-current="page"] { background: var(--seg); color: var(--ink); box-shadow: 0 6px 18px rgba(60,20,70,.12); }
.help { border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.help-top { display: flex; gap: 10px; align-items: center; }
.help-top img { width: 52px; height: 52px; object-fit: contain; flex: 0 0 52px; }
.help-top div { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.help-top b { color: var(--ink); font-size: 14px; }
.help-links { display: grid; gap: 8px; }
.help-links .btn { padding: 0 8px; min-height: 40px; font-size: 13px; }
.side-out { margin-top: auto; color: var(--muted); }
.side-out:hover { background: var(--track); }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.top-mark { display: none; }
.top-mark img { width: 40px; height: 40px; }
.top-title { align-self: stretch; display: flex; flex-direction: column; gap: 2px; padding-top: 4px; min-width: 0; }
.top-title h1 { font-weight: 700; font-size: 28px; line-height: 34px; letter-spacing: -.02em; }
.top-title span, .top-title-m span { font-size: 14px; }
.top-title-m { display: none; }
.top-tools { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.coins { padding: 6px 14px 6px 6px; min-height: 44px; }
.coins .muted { font-weight: 500; }
.profile { gap: 10px; padding: 4px 14px 4px 4px; font-weight: 600; min-height: 44px; }
.avatar { width: 36px; height: 36px; border-radius: 999px; background: var(--tint); display: grid; place-items: center; font-weight: 700; }
.lang-round { display: none; }
.mobile-only { display: none; }

.tabbar { display: none; }
.page { display: flex; flex-direction: column; gap: 20px; }
.foot { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); padding: 4px 4px 8px; }
.foot a { color: var(--muted); font-weight: 600; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }

/* ------------------------------------------------------------ home */

.hero { padding: 26px 30px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.hero-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.hero h2 { font-weight: 700; font-size: 36px; line-height: 1.1; letter-spacing: -.025em; overflow-wrap: anywhere; }
.hero p { font-size: 15px; line-height: 1.5; max-width: 560px; }
.hero h3 { font-size: 24px; letter-spacing: -.02em; }
.hero .actions .btn { flex: 0 0 auto; min-width: 220px; }
.hero-news { align-self: flex-start; margin-top: 2px; }
.tip { flex: 0 0 auto; margin: 0; display: flex; align-items: center; gap: 12px; }
.tip .bubble { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; flex: 0 1 260px; }
.tip-cat { border: 0; padding: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tip-cat img, .tip-img { width: 150px; height: 150px; object-fit: contain; }
.dots { display: flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--hair); transition: width .2s; }
.dots i.on { width: 16px; background: var(--accent-text); }

.home-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; align-items: stretch; }
.vote-total { display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
.vote-total b { font-size: 28px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.card .vote-total .muted { font-size: 13px; }
.vote-sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.vote-site {
	display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 20px; min-width: 0;
	background: var(--seg); border: 1px solid var(--stroke); box-shadow: 0 2px 10px rgba(60,20,70,.06);
}
.vote-site.ready { border-color: var(--accent); }
.vs-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vs-head b { font-size: 17px; font-weight: 700; }
.card .vote-site .muted { font-size: 13px; }
.vote-id { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.card .vote-id .muted { font-size: 14px; }
.copy-chip {
	display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 10px; border-radius: 10px; cursor: pointer;
	font: 700 14px ui-monospace, 'Cascadia Mono', Consolas, monospace; color: var(--ink); background: var(--field); border: 1px solid var(--hair);
}
.copy-chip:hover { border-color: var(--accent); }
.copy-chip svg { width: 14px; height: 14px; color: var(--muted); }
.vote-site .btn { margin-top: auto; width: 100%; }
.vote-site .btn-secondary { background: var(--track); border-color: transparent; }
.card .vote-note { font-size: 13px; margin: 0; }

.news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.news-item {
	display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 10px 10px 16px; border-radius: 20px; color: inherit;
	text-decoration: none; background: var(--seg); border: 1px solid var(--stroke); box-shadow: 0 2px 10px rgba(60,20,70,.06);
}
.news-item:hover { border-color: var(--accent); }
.news-pic { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--track); }
.news-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-pic.auto { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(255,140,170,.25), rgba(170,140,255,.25)); }
.news-pic.auto img { width: auto; height: 86%; object-fit: contain; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 0 6px; }
.card .news-meta .muted { font-size: 13px; }
.news-item > b { font-size: 16px; font-weight: 700; line-height: 1.3; padding: 0 6px; }
.card .news-item > .muted { font-size: 14px; line-height: 1.45; padding: 0 6px; }
.news-announce { background: var(--badbg); color: var(--accent-text); }
.news-devlog { background: rgba(150,110,240,.2); }
.news-patch { background: var(--okbg); color: var(--ok); }
.promo-box { display: flex; flex-wrap: wrap; gap: 10px; }
.promo-box .promo { flex: 999 1 200px; min-width: 0; }
.promo-box .btn { flex: 1 0 120px; }
.promo { font-weight: 600; letter-spacing: .05em; min-height: 48px; border-radius: 14px; }
.rw-to { display: flex; flex-direction: column; gap: 6px; }
.card .rw-to .muted { font-size: 13px; }
.rw-sel { min-height: 46px; font-weight: 600; cursor: pointer; }


/* ------------------------------------------------------------ characters */

.chars { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.char-list { flex: 1 1 280px; display: flex; flex-direction: column; gap: 10px; }
.char-item {
	display: flex; align-items: center; gap: 14px; padding: 12px 14px; min-height: 72px; border-radius: 22px; text-align: left; color: var(--ink);
	background: var(--glass); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
	border: 1px solid transparent; box-shadow: inset 0 1px 0 var(--hl);
}
.char-item[aria-selected="true"] { background: var(--seg); border-color: var(--stroke); box-shadow: var(--shadow); }
.char-item > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.char-item b { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.char-item .muted { font-size: 13px; }
.slots { display: flex; gap: 12px; align-items: center; padding: 4px 14px; }
.slots img { flex: 0 0 56px; width: 56px; height: auto; }
.slots div { display: flex; flex-direction: column; gap: 2px; }
.slots b { font-weight: 600; font-size: 15px; }
.slots span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.char-detail { flex: 3 1 480px; min-width: 0; border-radius: 30px; padding: 26px; gap: 20px; }
.cd-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--hair); }
.cd-name { display: flex; flex-direction: column; gap: 4px; flex: 1 1 220px; min-width: 0; }
.cd-title { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cd-title h2 { font-weight: 700; font-size: 26px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.cd-title > span { display: flex; flex-wrap: wrap; gap: 6px; }
.cd-name .strong { font-size: 15px; }
.cd-guild { display: flex; align-items: center; gap: 6px; }
.cd-guild a { font-weight: 600; color: var(--ink); }
.cd-guild canvas { width: 16px; height: 16px; }
.note { font-size: 14px; font-weight: 600; padding: 12px 16px; border-radius: 16px; background: var(--track); }
.note.ok { background: var(--okbg); color: var(--ok); }
.note.bad { background: var(--badbg); color: var(--accent-text); }

/* ------------------------------------------------------------ guild */

#guild-view { display: flex; flex-direction: column; gap: 20px; }
.g-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.g-pick-item {
	display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; min-height: 64px; border-radius: 20px; text-align: left; color: var(--ink);
	background: var(--glass); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
	border: 1px solid transparent; box-shadow: inset 0 1px 0 var(--hl);
}
.g-pick-item:hover { background: var(--glass2); }
.g-pick-item[aria-selected="true"] { background: var(--seg); border-color: var(--stroke); box-shadow: var(--shadow); }
.g-pick-item > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.g-pick-item b { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.g-pick-item .muted { font-size: 13px; }
.g-pick-item .muted span { white-space: nowrap; }
.g-mini { flex: 0 0 44px; height: 44px; border-radius: 14px; background: #2b1a33; display: grid; place-items: center; color: #fbccda; }
.g-mini canvas { width: 32px; height: 32px; }
.g-mini svg { width: 22px; height: 22px; }

.guild-head { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.g-icon { flex: 0 0 84px; height: 84px; border-radius: 24px; background: #2b1a33; display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.15); color: #fbccda; }
.g-icon canvas { width: 48px; height: 48px; }
.g-icon svg { width: 44px; height: 44px; }
.g-name { flex: 1 1 220px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.g-name h2 { font-weight: 700; font-size: 30px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.icon-card { border-radius: 30px; padding: 26px; }
.icon-card p.muted { font-size: 14px; }
.icon-work { display: flex; flex-direction: column; gap: 16px; }
.drop {
	position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1.5px dashed var(--hair);
	border-radius: 18px; background: var(--track); cursor: pointer; text-align: left;
}
.drop-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--seg); display: grid; place-items: center; flex: 0 0 auto; }
.drop svg { width: 20px; height: 20px; }
.drop-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.drop b { font-weight: 600; font-size: 15px; }
.drop .muted { font-size: 13px; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop-off { cursor: default; border-style: solid; }
.drop-off img { width: 40px; height: 40px; object-fit: contain; flex: 0 0 auto; }
.icon-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; align-items: start; }
.icon-prev, .icon-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.game-tiles { display: flex; gap: 10px; flex-wrap: wrap; }
.game-tile { flex: 1 1 130px; min-height: 120px; background: #1c1222; border-radius: 20px; padding: 16px; }
.scales { display: flex; align-items: flex-end; gap: 14px; }
.x1 { width: 16px; height: 16px; }
.x2 { width: 32px; height: 32px; }
.x4 { width: 64px; height: 64px; }
.plate { display: flex; flex-direction: column; justify-content: center; gap: 4px; color: #f3dde6; font-size: 14px; }
.plate-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.plate-guild { color: #8fd6ff; font-weight: 600; overflow-wrap: anywhere; }
.plate-char { font-weight: 600; }
.plate-note { font-size: 12px; color: #b9a5c4; }
.icon-opts { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }

/* ------------------------------------------------------------ settings */

.settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.settings > .stack > :last-child { flex: 1; }   /* both columns end at one line */
.meter { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.meter-bars { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.meter-bars i { height: 5px; border-radius: 999px; background: var(--track); }
.meter span { font-size: 13px; font-weight: 600; }

/* ------------------------------------------------------------ dialog, toasts */

.dlg { color: var(--ink); padding: 28px 24px 24px; width: min(400px, calc(100vw - 32px)); background: var(--bg); }
.dlg::backdrop { background: rgba(20,8,24,.35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dlg form { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.dlg img { width: 96px; height: 96px; object-fit: contain; }
.dlg h2 { font-size: 20px; font-weight: 700; }
.dlg p { font-size: 14px; line-height: 1.5; color: var(--muted); }
.dlg .actions { width: 100%; margin-top: 10px; }
button.link { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.form-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
.inp-code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 18px; letter-spacing: .12em; }

/* two-step sign-in dialog */
.tfa-dlg { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; }
.tfa-dlg form { align-items: stretch; text-align: left; gap: 14px; }
.tfa-dlg form > img, .tfa-dlg form > h2 { align-self: center; text-align: center; }
.tfa-dlg #tfa-codes > p, .tfa-dlg #tfa-off > p { text-align: center; }
.tfa-dlg .actions { margin-top: 4px; }
.tfa-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.5; }
.tfa-steps li::marker { font-weight: 700; color: var(--accent-text); }
.tfa-steps li > span { display: block; }
.tfa-qr { margin: 10px 0 8px; padding: 6px; width: max-content; max-width: 100%; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--hair); }
.tfa-qr canvas { display: block; max-width: 100%; height: auto !important; image-rendering: pixelated; }
.tfa-key { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.tfa-key code { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 12px; background: var(--field); border: 1px solid var(--hair); }
.tfa-list { list-style: none; margin: 0; padding: 14px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; border-radius: 16px; background: var(--field); border: 1px solid var(--hair); }
.tfa-list li { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 15px; font-weight: 600; text-align: center; }
#tfa-off button[type=submit] { background: var(--bad); box-shadow: none; }

.toasts { position: fixed; z-index: 50; right: calc(24px + env(safe-area-inset-right)); bottom: calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast {
	pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 380px; padding: 10px 16px 10px 10px;
	border-radius: 22px; animation: toast-in .25s ease-out;
}
.toast img { width: 48px; height: 48px; object-fit: contain; flex: 0 0 48px; }
.toast div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.toast b { font-size: 15px; font-weight: 700; }
.toast span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ narrow desktop */

@media (max-width: 1100px) {
	.settings, .home-row { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ mobile */

@media (max-width: 759px) {
	.news-list { grid-template-columns: 1fr; gap: 10px; }
	.news-item { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 6px 12px; padding: 8px; border-radius: 16px; }
	.news-pic { grid-row: 1 / span 2; aspect-ratio: 4 / 3; border-radius: 10px; }
	.news-meta, .news-item > b { padding: 0; grid-column: 2; }
	.news-meta { align-self: end; }
	.news-item > b { align-self: start; font-size: 15px; }
	.card .news-item > .muted { display: none; }
	.desk { display: none !important; }
	.mobile-only { display: flex; }
	.login { padding: calc(14px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left)); }
	.login-mid { flex-direction: column; gap: 14px; padding: 12px 0 20px; }
	.login-cat { flex: 0 0 auto; flex-direction: row; }
	.login-cat img { width: 84px; order: 1; }
	.login-cat .bubble { order: 2; border-radius: 18px 18px 18px 6px; }
	.login-card { padding: 22px; }

	.shell { padding: calc(14px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) calc(112px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left)); display: block; }
	.main { min-height: calc(100vh - 126px); min-height: calc(100dvh - 126px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
	.sidebar { display: none; }
	.main, .page { gap: 14px; }
	.topbar { min-height: 48px; }
	.top-mark { display: flex; }
	.top-title { display: none; }
	.top-title-m { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
	.top-title-m h1 { font-weight: 700; font-size: 24px; letter-spacing: -.02em; }
	.top-tools { gap: 8px; }
	.lang-round { display: grid; }
	.profile { padding: 4px; }
	.coins { padding-right: 12px; }

	.tabbar {
		display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; position: fixed; left: calc(12px + env(safe-area-inset-left)); right: calc(12px + env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20;
		padding: 6px; background: var(--glass); -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%);
		border: 1px solid var(--stroke); box-shadow: var(--shadow), inset 0 1px 0 var(--hl); border-radius: 26px;
	}
	.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; border-radius: 20px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; min-width: 0; text-align: center; }
	.tabbar a svg { width: 22px; height: 22px; }
	.tabbar a[aria-current="page"] { background: var(--seg); color: var(--ink); box-shadow: 0 4px 12px rgba(60,20,70,.10); }

	.card, .icon-card { padding: 18px; }
	.char-detail { padding: 18px; }
	.char-detail .actions .btn-primary { flex-basis: 100%; }
	#guild-view { gap: 14px; }
	.hero { padding: 18px; }
	.hero h2 { font-size: 28px; }
	.tip { order: -1; flex: 1 1 100%; }
	.tip .bubble { order: 2; flex: 1 1 auto; border-radius: 18px 18px 18px 6px; }
	.tip-cat img, .tip-img { width: 92px; height: 92px; }
	.settings, .stack { gap: 14px; }
	.toasts { left: calc(12px + env(safe-area-inset-left)); right: calc(12px + env(safe-area-inset-right)); bottom: calc(96px + env(safe-area-inset-bottom)); align-items: stretch; }
	.toast { max-width: none; }
	.g-name h2 { font-size: 24px; }
	.guild-head { flex-wrap: nowrap; gap: 14px; }
	.g-icon { flex-basis: 60px; height: 60px; border-radius: 18px; }
	.g-icon canvas { width: 32px; height: 32px; }
	.g-icon svg { width: 30px; height: 30px; }
	.g-name { flex: 1 1 0; }
	.hero .actions .btn { flex: 1 1 auto; }
	.chars { gap: 14px; }
	.home-row { gap: 14px; }
	#votes .card-head { flex-wrap: wrap; }
	.vote-total { flex-direction: row; align-items: baseline; gap: 8px; }
	.vote-total b { font-size: 22px; }
	.vote-sites { grid-template-columns: 1fr; }
}
