/*
 * The site's only stylesheet, served as it is. Its values are the tokens of the YMessenger design system, which
 * docs/DESIGN.md describes. The fonts are served from /fonts, and nothing is loaded from another site.
 */

@font-face {
    font-family: "Bricolage Grotesque";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url(/fonts/bricolage-grotesque-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;
}
@font-face {
    font-family: "Bricolage Grotesque";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url(/fonts/bricolage-grotesque-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Figtree";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url(/fonts/figtree-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;
}
@font-face {
    font-family: "Figtree";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url(/fonts/figtree-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url(/fonts/jetbrains-mono-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;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url(/fonts/jetbrains-mono-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Tokens */

:root {
    --ym-purple-50: #F8F1F9; --ym-purple-100: #EFDDF1; --ym-purple-200: #DDB8E2; --ym-purple-300: #C48ACC;
    --ym-purple-400: #A659B1; --ym-purple-500: #8A3194; --ym-purple-600: #73207B; --ym-purple-700: #5C1663;
    --ym-purple-800: #43104A; --ym-purple-900: #2C0931; --ym-purple-950: #1A041D;
    --ym-yellow-100: #FFF6CC; --ym-yellow-200: #FFEB94; --ym-yellow-300: #FFE066; --ym-yellow-400: #FFD21F;
    --ym-yellow-500: #FFC300; --ym-yellow-600: #E5A800; --ym-yellow-700: #A87B00;
    --ym-gray-0: #FFFFFF; --ym-gray-50: #FAF8FB; --ym-gray-100: #F3EFF5; --ym-gray-200: #E5DFE8; --ym-gray-300: #CDC5D1;
    --ym-gray-400: #A8A0AD; --ym-gray-500: #7F7785; --ym-gray-600: #5E5764; --ym-gray-700: #433D48; --ym-gray-800: #2A2530;
    --ym-gray-900: #18131C;
    --ym-blue-100: #E3F1FB; --ym-blue-500: #2F8FD0; --ym-blue-600: #1F74B0;
    --ym-red-100: #FDE7E5; --ym-red-500: #E2453C;
    --ym-green-100: #E2F5E9; --ym-green-500: #2E9E57;
    --ym-orange-500: #F28A1B;

    --surface-page: var(--ym-gray-50);
    --surface-card: var(--ym-gray-0);
    --surface-sunken: var(--ym-gray-100);
    --surface-night: var(--ym-purple-950);
    --surface-highlight: var(--ym-yellow-100);
    --surface-tint: var(--ym-purple-50);
    --text-strong: var(--ym-gray-900);
    --text-body: var(--ym-gray-700);
    --text-muted: var(--ym-gray-500);
    --text-brand: var(--ym-purple-600);
    --text-link: var(--ym-blue-500);
    --text-link-hover: var(--ym-blue-600);
    --border-subtle: var(--ym-gray-200);
    --border-default: var(--ym-gray-300);
    --border-focus: var(--ym-purple-400);
    --border-on-brand: rgba(255, 255, 255, .18);

    --gradient-brand: linear-gradient(160deg, var(--ym-purple-500) 0%, var(--ym-purple-700) 60%, var(--ym-purple-900) 100%);
    --gradient-gloss: linear-gradient(180deg, rgba(255, 255, 255, .38) 0%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, 0) 51%);
    --gradient-yellow: linear-gradient(180deg, #FFE066 0%, #FFC300 55%, #F2B200 100%);

    --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
    --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
    --ls-display: -0.03em;
    --ls-caps: 0.08em;

    --radius-s: 6px; --radius-m: 10px; --radius-l: 14px; --radius-xl: 20px; --radius-2xl: 28px; --radius-pill: 999px;
    --container-max: 1200px;
    --header-h: 64px;

    --shadow-xs: 0 1px 2px rgba(43, 9, 49, .08);
    --shadow-s: 0 1px 3px rgba(43, 9, 49, .10), 0 1px 2px rgba(43, 9, 49, .06);
    --shadow-m: 0 6px 16px -4px rgba(43, 9, 49, .16), 0 2px 4px rgba(43, 9, 49, .06);
    --shadow-l: 0 18px 40px -12px rgba(43, 9, 49, .28), 0 4px 10px rgba(43, 9, 49, .08);
    --shadow-window: 0 24px 60px -16px rgba(26, 4, 29, .45), 0 0 0 1px rgba(26, 4, 29, .35);
    --shadow-gloss: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(0, 0, 0, .12);
    --shadow-inset: inset 0 1px 2px rgba(43, 9, 49, .10);
    --ring-focus: 0 0 0 3px rgba(166, 89, 177, .35);
    --ease-out: cubic-bezier(.2, .8, .2, 1);
    --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
    --dur-fast: 120ms;
    --dur-base: 200ms;
}

/* Base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--surface-page);
    color: var(--text-body);
    font: 400 16px/1.5 var(--font-body);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--text-link); text-decoration: none; }
a:hover { color: var(--text-link-hover); text-decoration: underline; }
::selection { background: var(--ym-yellow-300); color: var(--ym-purple-900); }
img { max-width: 100%; border: 0; }
h1, h2, h3 { margin: 0; color: var(--text-strong); font-family: var(--font-display); }
p { margin: 0; }
code { font-family: var(--font-mono); }
:focus-visible { outline: 0; box-shadow: var(--ring-focus); }
a:focus-visible { border-radius: 4px; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}
.icon { width: 1em; height: 1em; flex: none; vertical-align: -0.125em; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; line-height: 1.5; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 12px); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 300px)), 1fr)); gap: var(--gap, 16px); }

/* Layout */

.site { min-height: 100vh; display: flex; flex-direction: column; }
.site > main { flex: 1; }
.container { max-width: var(--container-max); margin: 0 auto; }
.container-960 { max-width: 960px; margin: 0 auto; }
.container-prose { max-width: 720px; margin: 0 auto; }
.section { padding: 72px 32px 96px; }
.flash { display: flex; flex-direction: column; gap: 8px; padding: 24px 32px 0; }

.site-header {
    position: sticky; top: 0; z-index: 20;
    height: var(--header-h);
    display: flex; align-items: center; gap: 32px;
    padding: 0 32px;
    background: rgba(255, 255, 255, .82);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: inset 0 -1px 0 var(--border-subtle);
}
.site-header-dark {
    position: absolute; left: 0; right: 0;
    background: transparent; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
}
.logo {
    display: flex; align-items: center; gap: 8px;
    font: 800 22px/1 var(--font-display); letter-spacing: var(--ls-display);
    color: var(--ym-purple-700);
}
.logo:hover { color: var(--ym-purple-700); text-decoration: none; }
.site-header-dark .logo, .site-header-dark .logo:hover { color: #FFFFFF; }
.logo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ym-yellow-500); box-shadow: var(--shadow-gloss); }
.site-nav { display: flex; gap: 4px; flex: 1; }
.site-nav a { padding: 8px 12px; border-radius: 999px; font: 600 14px var(--font-body); color: var(--text-body); }
.site-nav a:hover { text-decoration: none; background: var(--surface-tint); color: var(--text-brand); }
.site-nav a[aria-current="page"] { background: var(--surface-tint); color: var(--text-brand); }
.site-header-dark .site-nav a { color: var(--ym-purple-200); }
.site-header-dark .site-nav a:hover, .site-header-dark .site-nav a[aria-current="page"] { background: rgba(255, 255, 255, .12); color: #FFFFFF; }
.site-actions { display: flex; gap: 8px; align-items: center; }
.site-actions form { margin: 0; }

.site-footer { background: var(--surface-night); color: var(--ym-purple-200); padding: 48px 32px 32px; }
.site-footer-inner { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
.site-footer-name { font: 800 24px var(--font-display); letter-spacing: var(--ls-display); color: #FFFFFF; margin-bottom: 8px; }
.site-footer p { font-size: 14px; }
.site-footer p a { color: var(--ym-yellow-400); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; font: 500 14px var(--font-body); }
.site-footer nav a { color: var(--ym-purple-100); }

/* Type */

.display-xl { font: 800 72px/1 var(--font-display); letter-spacing: var(--ls-display); text-wrap: balance; }
.page-title { font: 800 44px/1.08 var(--font-display); letter-spacing: var(--ls-display); }
.form-title { font: 800 30px/1.15 var(--font-display); letter-spacing: var(--ls-display); }
.card-title { font: 700 22px/1.25 var(--font-display); }
.section-title { font: 700 20px/1.25 var(--font-display); }
.item-title { font: 700 17px/1.3 var(--font-display); color: var(--text-strong); }
.eyebrow { font: 700 12px var(--font-body); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ym-purple-500); }
.lead { font-size: 17px; line-height: 1.6; }
.prose p { font-size: 17px; line-height: 1.6; }

/* Buttons */

.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 18px;
    border: 0; border-radius: var(--radius-pill);
    font: 700 15px/1 var(--font-body); letter-spacing: .005em;
    white-space: nowrap; cursor: pointer; user-select: none;
    background: var(--gradient-yellow); color: var(--ym-purple-900);
    box-shadow: var(--shadow-gloss), 0 0 0 1px rgba(168, 123, 0, .45), 0 2px 6px -2px rgba(168, 123, 0, .5);
    transition: transform var(--dur-fast) var(--ease-out), filter var(--dur-fast), background var(--dur-fast);
}
.button:hover { text-decoration: none; color: var(--ym-purple-900); filter: brightness(1.06); transform: translateY(-1px); }
.button:active { transform: translateY(1px) scale(.98); }
.button .icon { font-size: 17px; }
.button-s { height: 32px; padding: 0 14px; font-size: 13px; }
.button-s .icon { font-size: 15px; }
.button-l { height: 52px; padding: 0 26px; font-size: 17px; }
.button-l .icon { font-size: 19px; }
.button-block { display: flex; width: 100%; }
.button-brand, .button-brand:hover {
    background: var(--gradient-gloss), linear-gradient(180deg, var(--ym-purple-500), var(--ym-purple-700));
    color: #FFFFFF;
    box-shadow: var(--shadow-gloss), 0 0 0 1px var(--ym-purple-800), 0 2px 6px -2px rgba(67, 16, 74, .5);
}
.button-secondary, .button-secondary:hover { background: var(--surface-card); color: var(--text-brand); box-shadow: inset 0 0 0 1px var(--border-default), var(--shadow-xs); filter: none; }
.button-secondary:hover { background: var(--surface-tint); }
.button-ghost, .button-ghost:hover { background: transparent; color: var(--text-brand); box-shadow: none; filter: none; transform: none; }
.button-ghost:hover { background: var(--surface-tint); }
.button-on-brand, .button-on-brand:hover { background: rgba(255, 255, 255, .12); color: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); filter: none; }
.button-on-brand:hover { background: rgba(255, 255, 255, .2); }
.button-danger, .button-danger:hover { background: var(--ym-red-500); color: #FFFFFF; box-shadow: var(--shadow-gloss), 0 0 0 1px #B8322A; }
.button[disabled], .button[aria-disabled="true"] { cursor: not-allowed; opacity: .5; filter: grayscale(.6); transform: none; }

.link-button {
    padding: 0; border: 0; background: none; cursor: pointer;
    font: inherit; color: var(--text-link);
}
.link-button:hover { color: var(--text-link-hover); text-decoration: underline; }

/* Badges, tags, dots */

.badge {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    height: 22px; min-width: 22px; padding: 0 8px;
    border-radius: var(--radius-pill);
    background: var(--ym-gray-100); color: var(--ym-gray-700);
    font: 700 12px/1 var(--font-body); letter-spacing: .01em; white-space: nowrap;
}
.badge .icon { font-size: 12px; }
.badge-yellow { background: var(--ym-yellow-500); color: var(--ym-purple-900); }
.badge-success { background: var(--ym-green-100); color: var(--ym-green-500); }
.badge-info { background: var(--ym-blue-100); color: var(--ym-blue-600); }
.badge-warning { background: var(--ym-yellow-100); color: var(--ym-yellow-700); }

.tag {
    display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
    border-radius: var(--radius-pill);
    background: var(--surface-card); color: var(--text-body);
    box-shadow: inset 0 0 0 1px var(--border-default);
    font: 600 13px/1 var(--font-body);
}

.status-dot {
    display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none;
    background: var(--ym-yellow-500);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -1px 0 rgba(0, 0, 0, .15), 0 0 0 1px rgba(0, 0, 0, .12);
}

/* Cards */

.card {
    border-radius: var(--radius-l);
    padding: 24px;
    background: var(--surface-card);
    color: var(--text-body);
    box-shadow: inset 0 0 0 1px var(--border-subtle), var(--shadow-s);
}
.card-tinted { background: var(--surface-tint); box-shadow: inset 0 0 0 1px var(--ym-purple-100); }
.card-highlight { background: var(--surface-highlight); color: var(--text-strong); box-shadow: inset 0 0 0 1px var(--ym-yellow-300); }
.card-flush { padding: 0; }
.card-roomy { padding: 32px; }
.tile-icon {
    width: 44px; height: 44px; flex: none;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface-tint); color: var(--ym-purple-600);
    font-size: 22px;
}
.card-highlight .tile-icon { background: #FFFFFF; }

/* Alerts */

.alert {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px;
    border-radius: var(--radius-m);
    background: var(--ym-blue-100);
    box-shadow: inset 0 0 0 1px rgba(47, 143, 208, .22);
    font-size: 14px; line-height: 1.45;
}
.alert > .icon { font-size: 19px; margin-top: 1px; color: var(--ym-blue-500); }
.alert-title { font-weight: 700; line-height: 1.35; color: var(--text-strong); }
.alert-body { flex: 1; min-width: 0; }
.alert-title + div { margin-top: 2px; }
.alert-success { background: var(--ym-green-100); box-shadow: inset 0 0 0 1px rgba(46, 158, 87, .22); }
.alert-success > .icon { color: var(--ym-green-500); }
.alert-warning { background: var(--ym-yellow-100); box-shadow: inset 0 0 0 1px rgba(168, 123, 0, .22); }
.alert-warning > .icon { color: var(--ym-yellow-700); }
.alert-danger { background: var(--ym-red-100); box-shadow: inset 0 0 0 1px rgba(226, 69, 60, .22); }
.alert-danger > .icon { color: var(--ym-red-500); }

/* Forms */

form { margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.field-label { font: 600 13px/1.2 var(--font-body); color: var(--text-strong); }
.field-required { color: var(--ym-red-500); }
.control {
    display: flex; align-items: center; gap: 8px;
    height: 42px; padding: 0 12px;
    border-radius: var(--radius-m);
    background: var(--surface-card);
    box-shadow: inset 0 0 0 1px var(--border-default), var(--shadow-inset);
    transition: box-shadow var(--dur-fast);
}
.control > .icon { font-size: 17px; color: var(--text-muted); }
.control:focus-within { box-shadow: inset 0 0 0 1.5px var(--border-focus), var(--shadow-inset), var(--ring-focus); }
.control:focus-within > .icon { color: var(--text-brand); }
.control input {
    flex: 1; min-width: 0; height: 100%; padding: 0;
    border: 0; outline: 0; background: transparent;
    font: 400 15px/1.4 var(--font-body); color: var(--text-strong);
}
.control input:focus-visible { box-shadow: none; }
.control input[readonly] { color: var(--text-muted); }
.control .reveal { padding: 0; border: 0; background: none; cursor: pointer; color: var(--text-muted); font-size: 17px; display: flex; }
.field-hint { display: flex; gap: 5px; align-items: center; font: 500 12px/1.35 var(--font-body); color: var(--text-muted); }
.field-error { color: var(--ym-red-500); }
.field-error .icon { font-size: 13px; }
.field.has-error .control { box-shadow: inset 0 0 0 1.5px var(--ym-red-500), var(--shadow-inset); }
.fields-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; }

.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input {
    appearance: none; -webkit-appearance: none;
    width: 20px; height: 20px; margin: 1px 0 0; flex: none;
    border-radius: var(--radius-s);
    background: var(--surface-card) no-repeat center / 14px;
    box-shadow: inset 0 0 0 1.5px var(--border-default), var(--shadow-inset);
    cursor: pointer;
    transition: background-color var(--dur-fast);
}
.check input:checked {
    background-color: var(--ym-purple-600);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
    box-shadow: var(--shadow-gloss), 0 0 0 1px var(--ym-purple-800);
}
.check input:focus-visible { box-shadow: inset 0 0 0 1.5px var(--border-focus), var(--ring-focus); }
.check-text { display: flex; flex-direction: column; gap: 2px; }
.check-label { font: 500 14px/1.35 var(--font-body); color: var(--text-strong); }
.check-description { font: 400 13px/1.4 var(--font-body); color: var(--text-muted); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; padding: 0; border: 0; background: none; font: 500 14px/1.3 var(--font-body); color: var(--text-strong); text-align: left; }
.switch-track {
    position: relative; width: 40px; height: 24px; flex: none;
    border-radius: 999px;
    background: var(--ym-gray-300);
    box-shadow: var(--shadow-inset);
    transition: background var(--dur-base);
}
.switch-track::after {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 18px; height: 18px; border-radius: 50%;
    background: #FFFFFF;
    box-shadow: var(--shadow-gloss), 0 1px 3px rgba(26, 4, 29, .3);
    transition: left var(--dur-base) var(--ease-pop);
}
.switch[aria-checked="true"] .switch-track { background: var(--ym-purple-600); }
.switch[aria-checked="true"] .switch-track::after { left: 19px; background: var(--gradient-yellow); }

/* Tabs */

.tabs { display: flex; flex-wrap: wrap; gap: 0 24px; box-shadow: inset 0 -1px 0 var(--border-subtle); }
.tabs button {
    height: 42px; padding: 0; border: 0; background: none; cursor: pointer;
    font: 600 15px var(--font-body); color: var(--text-muted);
}
.tabs button[aria-selected="true"] { color: var(--text-brand); box-shadow: inset 0 -3px 0 var(--ym-yellow-500); }
.pills { display: inline-flex; flex-wrap: wrap; align-self: flex-start; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface-sunken); }
.pills button {
    height: 32px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer;
    background: transparent; color: var(--text-muted); font: 600 14px var(--font-body);
}
.pills button[aria-selected="true"] { background: var(--surface-card); color: var(--text-brand); box-shadow: var(--shadow-s); }

/* Dialog */

.dialog {
    width: 480px; max-width: calc(100% - 48px); padding: 0;
    border: 0; border-radius: var(--radius-xl);
    background: var(--surface-card); color: var(--text-body);
    box-shadow: var(--shadow-window);
}
.dialog::backdrop { background: rgba(26, 4, 29, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dialog-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 0; }
.dialog-title { flex: 1; font: 700 20px/1.25 var(--font-display); letter-spacing: -0.015em; }
.dialog-close { width: 32px; height: 32px; border: 0; border-radius: var(--radius-m); background: var(--surface-sunken); cursor: pointer; color: var(--text-muted); font-size: 16px; display: flex; align-items: center; justify-content: center; }
.dialog-body { padding: 10px 20px 20px; font-size: 15px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; background: var(--surface-page); box-shadow: inset 0 1px 0 var(--border-subtle); }

/* Home */

.hero { background: var(--gradient-brand); color: #FFFFFF; padding: 120px 32px 96px; }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 56px; align-items: center; }
.hero h1 { color: #FFFFFF; }
.hero-lead { font-size: 20px; line-height: 1.55; color: var(--ym-purple-100); max-width: 520px; text-wrap: pretty; }
.hero-stats {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px;
    max-width: 520px; padding: 14px 0;
    border-top: 1px solid var(--border-on-brand); border-bottom: 1px solid var(--border-on-brand);
}
.hero-stat { display: flex; align-items: center; gap: 8px; }
.hero-stat strong { font: 800 28px/1 var(--font-display); letter-spacing: var(--ls-display); color: #FFFFFF; }
.hero-stat .online { color: var(--ym-yellow-400); }
.hero-stat span { font: 500 14px var(--font-body); color: var(--ym-purple-100); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 18px; font: 500 13px var(--font-body); color: var(--ym-purple-200); }
.hero-facts span { display: inline-flex; align-items: center; gap: 6px; }
.hero-figure { margin: 0; display: flex; justify-content: center; }
.hero-figure img { width: 277px; height: auto; display: block; border-radius: 10px 10px 6px 6px; box-shadow: var(--shadow-window); }
.steps {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 32px;
    padding: 48px; border-radius: var(--radius-2xl); background: var(--surface-tint);
    margin: 0; list-style: none;
}
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font: 700 20px/1.2 var(--font-display); color: var(--text-strong); }
.step-head a { color: var(--text-brand); }
.step-number {
    width: 40px; height: 40px; flex: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--gradient-yellow); box-shadow: var(--shadow-gloss);
    font: 800 18px var(--font-display); color: var(--ym-purple-900);
}
.step-index { font: 800 28px var(--font-display); color: var(--ym-purple-300); }
.checklist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.5; }
.checklist .icon { color: var(--ym-purple-600); margin-top: 4px; }

/* Sign-in pages */

.auth {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    border-radius: var(--radius-2xl); overflow: hidden;
    background: var(--surface-card); box-shadow: var(--shadow-l);
}
.auth-side {
    display: flex; flex-direction: column; justify-content: flex-end; gap: 12px;
    min-height: 280px; padding: 48px;
    background: var(--gradient-brand); color: #FFFFFF;
}
.auth-side-title { font: 800 32px/1.1 var(--font-display); letter-spacing: var(--ls-display); text-wrap: balance; }
.auth-side p { font-size: 15px; line-height: 1.55; color: var(--ym-purple-100); }
.auth-main { padding: 48px; display: flex; flex-direction: column; gap: 18px; }
.auth-main ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.split { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }

/* Account */

.account-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.account-head .who { flex: 1; min-width: 0; }
.account-avatar {
    width: 72px; height: 72px; flex: none; overflow: hidden;
    border-radius: 50%; background: var(--surface-tint);
    box-shadow: inset 0 0 0 1px var(--border-subtle), var(--shadow-s);
    display: flex; align-items: center; justify-content: center;
    color: var(--ym-purple-600); font-size: 32px;
}
.account-avatar img { width: 100%; height: 100%; display: block; }
.list-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 24px; }
.list-row + .list-row, .card-head + .list-row { box-shadow: inset 0 1px 0 var(--border-subtle); }
.list-key { width: 140px; font: 600 14px var(--font-body); color: var(--text-muted); }
.list-value { flex: 1; min-width: 160px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; overflow-wrap: anywhere; font: 500 15px var(--font-body); color: var(--text-strong); }
.list-action { font: 600 14px var(--font-body); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 24px 24px 12px; }
.stat-key { font: 600 13px var(--font-body); color: var(--text-muted); }
.stat-value { margin-top: 4px; font: 800 22px/1.2 var(--font-display); letter-spacing: var(--ls-display); color: var(--text-strong); }
.session-meta { font-size: 13px; color: var(--text-muted); }
.session-ip { font: 400 13px var(--font-mono); color: var(--text-muted); }
.danger-zone summary { cursor: pointer; font-size: 13px; color: var(--text-muted); list-style: none; }
.danger-zone summary span { text-decoration: underline; }
.danger-zone summary::-webkit-details-marker { display: none; }
.danger-zone[open] summary { display: none; }

/* Profile */

/* Profile */

.container-880 { max-width: 880px; margin: 0 auto; }
.container-1040 { max-width: 1040px; margin: 0 auto; }
.section-profile { padding: 56px 32px 96px; }
.back-link { display: flex; align-items: center; gap: 6px; align-self: flex-start; font: 600 14px var(--font-body); }
.profile-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.profile-side { flex: 0 0 220px; max-width: 100%; display: flex; flex-direction: column; gap: 10px; }
.profile-side form { display: contents; }
.profile-main { flex: 1 1 360px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.profile-frame {
    width: 220px; max-width: 100%; aspect-ratio: 3 / 4; flex: none; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    border-radius: 20px; background: var(--gradient-brand); box-shadow: var(--shadow-m);
    color: rgba(255, 255, 255, .7); font-size: 72px;
}
.profile-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.profile-frame img.drawn { object-fit: contain; }
.profile-title { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.profile-title .who { flex: 1; min-width: 220px; }
.profile-name { margin: 0; font: 800 40px/1.1 var(--font-display); letter-spacing: var(--ls-display); color: var(--text-strong); overflow-wrap: anywhere; }
.profile-id { font: 400 14px var(--font-mono); color: var(--text-muted); }
.profile-visibility { display: flex; align-items: center; gap: 8px; font: 500 14px var(--font-body); color: var(--text-muted); }
.profile-bio { margin: 0; font: 400 15px/1.6 var(--font-body); white-space: pre-line; text-wrap: pretty; overflow-wrap: anywhere; }
.fact-row { display: flex; align-items: center; gap: 14px; padding: 14px 24px; }
.fact-row + .fact-row { box-shadow: inset 0 1px 0 var(--border-subtle); }
.fact-row > .icon { color: var(--ym-purple-600); font-size: 18px; flex: none; }
.fact-key { width: 110px; flex: none; font: 600 14px var(--font-body); color: var(--text-muted); }
.fact-value { flex: 1; min-width: 0; font: 500 15px var(--font-body); color: var(--text-strong); overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* A tag that is a checkbox, selected like the design system's Tag. */
label.tag { position: relative; cursor: pointer; transition: background var(--dur-fast); }
label.tag input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.tag:hover { background: var(--ym-purple-50); }
label.tag:has(input:checked) { background: var(--ym-purple-600); color: #FFFFFF; box-shadow: var(--shadow-gloss); }
label.tag:has(input:focus-visible) { box-shadow: inset 0 0 0 1px var(--border-default), var(--ring-focus); }
label.tag:has(input:disabled:not(:checked)) { opacity: .5; cursor: default; }

/* Radio cards, like the profile's "who can see" choice. */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.choice {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 12px 14px; border-radius: 12px; cursor: pointer;
    background: var(--surface-page); box-shadow: inset 0 0 0 1px var(--border-subtle);
    transition: background 120ms;
}
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice:has(input:checked) { background: var(--ym-purple-50, #F6EFF7); box-shadow: inset 0 0 0 1.5px var(--ym-purple-500); }
.choice:has(input:focus-visible) { box-shadow: inset 0 0 0 1.5px var(--ym-purple-500), var(--ring-focus); }
.choice-label { display: flex; align-items: center; gap: 8px; font: 700 14px var(--font-body); color: var(--text-strong); }
.choice-label .icon { color: var(--ym-purple-600); font-size: 16px; }
.choice-text { font: 400 12px/1.4 var(--font-body); color: var(--text-muted); }
.subhead { font: 600 13px var(--font-body); color: var(--text-muted); }
.toggle-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; box-shadow: inset 0 -1px 0 var(--border-subtle); }
.toggle-row > .icon { color: var(--ym-purple-600); font-size: 16px; }
.toggle-row .switch { flex: 1; justify-content: space-between; flex-direction: row-reverse; }

/* A switch that is a checkbox, for forms. */
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch:has(input:checked) .switch-track { background: var(--ym-purple-600); }
.switch:has(input:checked) .switch-track::after { left: 19px; background: var(--gradient-yellow); }
.switch:has(input:focus-visible) .switch-track { box-shadow: var(--shadow-inset), var(--ring-focus); }

.control-area { height: auto; padding: 10px 12px; }
.control textarea {
    flex: 1; min-width: 0; padding: 0; resize: vertical;
    border: 0; outline: 0; background: transparent;
    font: 400 15px/1.4 var(--font-body); color: var(--text-strong);
}

.preview-bar { background: var(--ym-yellow-100, #FFF6D6); box-shadow: inset 0 -1px 0 var(--border-subtle); }
.preview-bar-inner { max-width: 880px; margin: 0 auto; padding: 12px 32px; display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.preview-bar .pills { background: rgba(255, 255, 255, .6); }
.preview-bar .pills a {
    display: inline-flex; align-items: center; height: 32px; padding: 0 16px; border-radius: 999px;
    color: var(--text-muted); font: 600 14px var(--font-body); text-decoration: none;
}
.preview-bar .pills a[aria-current="true"] { background: var(--surface-card); color: var(--text-brand); box-shadow: var(--shadow-s); }
.profile-hero {
    display: flex; gap: 28px; align-items: flex-end; flex-wrap: wrap;
    padding: 28px; border-radius: 28px; background: var(--gradient-brand); box-shadow: var(--shadow-m);
}
.profile-hero .profile-frame { width: 180px; background: rgba(255, 255, 255, .08); box-shadow: none; }
.profile-hero .who { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 14px; padding-bottom: 4px; }
.profile-hero .profile-name { color: #FFFFFF; }
.profile-hero .profile-id { color: var(--ym-purple-100); }
.profile-private {
    display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
    padding: 56px 32px; border-radius: 28px; background: var(--surface-card, #FFFFFF); box-shadow: var(--shadow-m);
}
.profile-private .profile-name { font-size: 30px; line-height: 1.15; }
.locked-picture {
    position: relative; width: 112px; height: 112px; overflow: hidden;
    border-radius: 50%; background: var(--gradient-brand);
}
.locked-picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(10px) saturate(.8); transform: scale(1.15); }
.locked-picture span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(43, 9, 49, .35); color: #FFFFFF; font-size: 34px; }

/* Avatar studio */

.studio { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.studio-side { flex: 0 1 340px; min-width: 280px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 88px; }
.studio-main { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.studio-panel { display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: var(--radius-2xl); background: var(--gradient-brand); box-shadow: var(--shadow-l); }
.studio-label { font: 700 13px var(--font-body); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ym-purple-100); }
.moods { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.moods-list { display: flex; gap: 6px; }
.round-button {
    width: 36px; height: 36px; border: 0; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; background: rgba(255, 255, 255, .14); color: #FFFFFF;
    box-shadow: var(--shadow-gloss);
}
.round-button[aria-pressed="true"] { background: var(--gradient-yellow); color: var(--ym-purple-900); }
.stage { aspect-ratio: 200 / 280; border-radius: var(--radius-l); overflow: hidden; background: #FFFFFF; box-shadow: var(--shadow-m); }
.stage-inner { width: 100%; height: 100%; transform-origin: 50% 22%; transition: transform 200ms var(--ease-out); }
.stage-inner img { width: 100%; height: 100%; display: block; }
.framing { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.framing .studio-label { font-size: 12px; text-align: center; }
.framing-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.square-button {
    width: 34px; height: 34px; flex: none; border: 0; border-radius: 8px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 16px;
    background: rgba(255, 255, 255, .16); color: #FFFFFF; box-shadow: var(--shadow-gloss);
}
.square-button:hover { background: rgba(255, 255, 255, .26); }
.square-button-s { width: 28px; height: 28px; }
.dpad { position: relative; width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #FFFFFF, var(--ym-purple-100)); box-shadow: var(--shadow-gloss), var(--shadow-s); }
.dpad button {
    position: absolute; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 15px;
    background: transparent; color: var(--ym-purple-700);
}
.dpad button:hover { background: rgba(115, 32, 123, .12); }
.dpad .up { top: 2px; left: 29px; } .dpad .down { bottom: 2px; left: 29px; }
.dpad .left { left: 2px; top: 29px; } .dpad .right { right: 2px; top: 29px; }
.dpad-center { position: absolute; left: 36px; top: 36px; width: 12px; height: 12px; border-radius: 50%; background: var(--gradient-yellow); box-shadow: var(--shadow-gloss); }
.zoom-row { display: flex; align-items: center; gap: 8px; }
.zoom-row input { flex: 1; min-width: 0; accent-color: var(--ym-yellow-500); cursor: pointer; }
.studio-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.studio-status { min-height: 18px; text-align: center; font: 500 13px/1.4 var(--font-body); color: var(--ym-purple-100); }
.studio-remove { text-align: center; font-size: 13px; }
.studio-remove .link-button { color: var(--ym-purple-100); text-decoration: underline; font-size: 13px; }
.wearing-row { display: flex; align-items: center; gap: 12px; padding: 10px 20px; box-shadow: inset 0 1px 0 var(--border-subtle); }
.wearing-key { width: 84px; flex: none; font: 600 12px var(--font-body); color: var(--text-muted); }
.wearing-value { flex: 1; min-width: 0; font: 500 14px var(--font-body); color: var(--text-strong); }
.wearing-remove { border: 0; background: transparent; cursor: pointer; color: var(--text-muted); font-size: 16px; padding: 4px; display: flex; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 52px; height: 52px; border: 0; border-radius: 12px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(43, 9, 49, .12); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 6px var(--ym-yellow-500); }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 16px; }
.item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.item-fav { align-self: flex-start; display: flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; cursor: pointer; font: 600 12px var(--font-body); color: var(--text-link); }
.item-fav:hover { text-decoration: underline; }
.item-fav[aria-pressed="true"] { color: var(--ym-purple-600); }
.item-fav .icon { font-size: 13px; }
.item-body { display: flex; gap: 6px; align-items: flex-start; }
.item-try {
    position: relative; flex: 1; min-width: 0; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer;
    background: var(--surface-tint);
    box-shadow: inset 0 0 0 1px var(--border-subtle), var(--shadow-xs);
    transition: transform 120ms var(--ease-out);
}
.item-try:hover { transform: translateY(-2px); }
.item-try[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ym-yellow-500), var(--shadow-m); }
.item-try img { width: 100%; height: 100%; display: block; }
.item-try-full { aspect-ratio: 200 / 280; }
.item-try-portrait { aspect-ratio: 1 / 1; }
.item-on {
    position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--gradient-yellow); box-shadow: var(--shadow-gloss); color: var(--ym-purple-900); font-size: 13px;
}
.item-colors { display: flex; flex-direction: column; gap: 5px; padding-top: 2px; }
.item-color { width: 16px; height: 16px; padding: 0; border: 0; border-radius: 4px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(43, 9, 49, .2); }
.item-color[aria-pressed="true"] { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--ym-purple-600); }
.item-name { font: 600 13px/1.3 var(--font-body); color: var(--text-strong); text-wrap: pretty; }
.empty { padding: 32px; border-radius: var(--radius-l); background: var(--surface-tint); color: var(--text-muted); text-align: center; font-size: 15px; }

/* Small screens */

@media (max-width: 720px) {
    .site-header { gap: 12px; padding: 0 16px; }
    .site-nav { display: none; }
    .site-header .site-actions .button-ghost { display: none; }
    .hero { padding: 96px 20px 64px; }
    .display-xl { font-size: 48px; }
    .page-title { font-size: 34px; }
    .section { padding: 48px 20px 64px; }
    .auth-side, .auth-main { padding: 28px; }
    .steps { padding: 28px; }
    .studio-side { position: static; }
}
