@font-face {
    font-family: "Roboto Echo";
    src: url("/Roboto-Medium.ttf") format("truetype");
    font-weight: 500;
    font-display: swap;
}

:root {
    --background: #184f39;
    --page: #184f39;
    --panel: rgba(16, 54, 39, .66);
    --card: rgba(28, 95, 68, .2);
    --well: rgba(28, 95, 68, .2);
    --raised: rgba(117, 230, 185, .12);
    --raised-hot: rgba(124, 243, 196, .17);
    --raised-on: rgba(255, 255, 255, .12);
    --header: rgba(255, 255, 255, .12);
    --header-hot: rgba(255, 255, 255, .16);
    --line: rgba(255, 255, 255, .16);
    --line-soft: rgba(255, 255, 255, .096);
    --rim-light: rgba(255, 255, 255, .1);
    --shadow: rgba(0, 0, 0, .35);
    --text: #e7f5ef;
    --muted: #c6dbd2;
    --accent: #38ba86;
    --accent-hot: #63c9a0;
    --accent-soft: rgba(56, 186, 134, .16);
    --button: rgba(195, 255, 231, .1);
    --button-hot: rgba(195, 255, 231, .16);
    --button-down: rgba(195, 255, 231, .13);
    --button-face: rgba(117, 230, 185, .12);
    --button-face-hot: rgba(124, 243, 196, .17);
    --button-face-down: rgba(255, 255, 255, .17);
    --button-edge: 0 0 #0000;
    --button-edge-hot: 0 0 #0000;
    --button-inner: none;
    --ring: rgba(56, 186, 134, .35);
    --ring-hot: rgba(56, 186, 134, .55);
    --tick: #184f39;
    --knob: #f3faf7;
    --track: rgba(124, 243, 196, .17);
    --band: #289b6b;

    --rim: linear-gradient(rgba(255, 255, 255, .16), rgba(255, 255, 255, .16));
    --rim-line: linear-gradient(rgba(255, 255, 255, .16), rgba(255, 255, 255, .16));
    --topbar: rgba(24, 79, 57, .72);
    --claims: #f2b347;
    --bad: #ff5c70;
    --round: 8px;
    --round-card: 12px;
    --round-window: 16px;
    --glass: blur(5px);
    --ease: cubic-bezier(.16, 1, .3, 1);
    --ease-time: .28s;
    color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
    background: var(--page);
    background-attachment: fixed;
    color: var(--text);
    font: 500 16px/1.5 "Roboto Echo", Roboto, system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hot); }

button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

main { flex: 1; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--topbar);
    backdrop-filter: var(--glass);
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--rim-line); pointer-events: none; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 24px; line-height: 1; white-space: nowrap; flex: none; }
.brand:hover { color: var(--text); }
.brand img { border-radius: 8px; display: block; }
.brand em { font-style: normal; color: var(--accent); }

.menu { display: contents; }
.menu-button { display: none; place-items: center; width: 44px; height: 44px; margin-left: auto; border: 0; border-radius: var(--round); background: transparent; color: var(--text); cursor: pointer; }
.menu-button:hover, .topbar.open .menu-button { background: var(--raised); }
.sections { display: flex; gap: 4px; margin-right: auto; margin-left: 20px; }
.sections a { color: var(--muted); padding: 7px 13px; border-radius: var(--round); transition: background-color var(--ease-time) var(--ease), color var(--ease-time) var(--ease); }
.sections a:hover { color: var(--text); background: var(--raised); }
.sections a[aria-current=page] { color: var(--text); background: var(--header); box-shadow: inset 0 1px 0 var(--rim-light); }

.side-stack { display: grid; gap: 16px; }
.side-stack .panel + .panel { margin-top: 0; }
.discord-link { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; margin-right: 6px; border-radius: var(--round); color: var(--muted); }
.discord-link:hover { color: #fff; background: #5865f2; }
.discord-link span { display: none; }
.nav { display: flex; align-items: center; gap: 2px; color: var(--muted); font-size: 15px; }
.nav .who { display: inline-flex; align-items: center; gap: 8px; padding-right: 12px; margin-right: 6px; border-right: 1px solid var(--line); }
.nav .btn.ghost { padding: 0 8px; }

.btn {
    backdrop-filter: var(--glass);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: var(--round);
    background: var(--button-face);
    box-shadow: var(--button-edge);
    outline: var(--button-inner);
    outline-offset: -4px;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color var(--ease-time) var(--ease), box-shadow var(--ease-time) var(--ease), transform var(--ease-time) var(--ease);
}
.btn:hover { background: var(--button-face-hot); box-shadow: var(--button-edge-hot); color: var(--text); }
.btn:active { background: var(--button-face-down); transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; background: var(--button-face); box-shadow: var(--button-edge); transform: none; }
.btn.primary { background: color-mix(in srgb, var(--accent) 30%, transparent); box-shadow: var(--button-edge), inset 0 1px 0 var(--rim-light); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 42%, transparent); box-shadow: var(--button-edge-hot), inset 0 1px 0 var(--rim-light); }
.btn.primary svg { color: var(--accent); }
.btn.ghost { background: transparent; box-shadow: none; outline: none; color: var(--muted); }
.btn.ghost:hover { background: var(--raised); color: var(--text); }
.btn.danger { background: rgba(255, 92, 112, .14); box-shadow: none; outline: none; color: var(--bad); }
.btn.danger:hover { background: rgba(255, 92, 112, .24); color: #ff8a98; }
.btn.small { height: 34px; padding: 0 12px; font-size: 14px; }
.btn.big { height: 48px; font-size: 17px; }
.btn.wide { width: 100%; }

.hero { padding: 36px 0 28px; }
.hero .container { display: flex; align-items: center; gap: 10px; }
.hero .search { flex: 1; min-width: 0; }
.hero .search input { height: 44px; font-size: 16px; }
.hero .toolbar { margin-top: 0; flex-wrap: nowrap; }
.hero .toolbar .spacer { display: none; }
.hero .pill, .hero select { height: 44px; font-size: 15px; padding-left: 14px; }

.search { position: relative; }
.search input {
    width: 100%;
    height: 58px;
    padding: 0 20px 0 52px;
    border-radius: var(--round);
    border: 0;
    background: var(--raised);
    backdrop-filter: var(--glass);
    font-size: 17px;
    outline: none;
    transition: box-shadow var(--ease-time) var(--ease), background-color var(--ease-time) var(--ease);
}
.search input::placeholder { color: var(--muted); }
.search input:hover { background: var(--raised-hot); }
.search input:focus { box-shadow: inset 0 0 0 1px var(--accent); }
.search svg { position: absolute; z-index: 1; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.pill {
    backdrop-filter: var(--glass);
    height: 36px;
    padding: 0 14px;
    border-radius: var(--round);
    border: 0;
    background: var(--raised);
    color: var(--muted);
    cursor: pointer;
    font-size: 14px;
    transition: background-color var(--ease-time) var(--ease), color var(--ease-time) var(--ease);
}
.pill:hover { color: var(--text); background: var(--raised-hot); }
.pill[aria-pressed=true] { background: var(--header-hot); color: var(--text); box-shadow: inset 0 1px 0 var(--rim-light); }

.pill.switch { display: inline-flex; align-items: center; gap: 12px; padding: 0 10px 0 14px; color: var(--text); }
.pill.switch[aria-pressed=true] { background: var(--raised); box-shadow: none; }
.pill.switch:hover { background: var(--raised-hot); }

select {
    backdrop-filter: var(--glass);
    height: 36px;
    padding: 0 34px 0 14px;
    border-radius: var(--round);
    border: 0;
    background-color: var(--raised);
    color: var(--text);
    font-size: 14px;
    appearance: none;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%23c6dbd2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    transition: background-color var(--ease-time) var(--ease);
}
select:hover, select:focus-visible { background-color: var(--raised-hot); }
select option { background: var(--background); color: var(--text); }
.toolbar .spacer { flex: 1; }

.results { padding: 8px 0 72px; }
.results-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.results-head h2 { font-size: 22px; font-weight: 500; margin: 0; }
.results-head .count { color: var(--muted); white-space: nowrap; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }

.macro {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px 16px 12px;
    border-radius: var(--round-card);
    background: var(--card);
    backdrop-filter: var(--glass);
    border: 1px solid var(--line);
    color: var(--text);
    transition: border-color var(--ease-time) var(--ease), transform var(--ease-time) var(--ease), background-color var(--ease-time) var(--ease);
}
.macro:hover { border-color: color-mix(in srgb, var(--line), white 12%); background: color-mix(in srgb, var(--card), var(--text) 4%); transform: translateY(-2px); color: var(--text); }
.macro-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.macro h3 { font-size: 19px; font-weight: 500; margin: 0; overflow-wrap: anywhere; line-height: 1.3; }
.macro .level { color: var(--muted); font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.macro-top .tags { flex: none; justify-content: flex-end; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--round); font-size: 12.5px; line-height: 1; white-space: nowrap; }
.tag.verified { background: var(--accent-soft); color: var(--accent-hot); }
.tag.claims { background: color-mix(in srgb, var(--claims) 16%, transparent); color: var(--claims); }
.tag.physics { background: var(--raised); color: var(--muted); }
.stats { display: flex; flex-wrap: wrap; gap: 6px; }
.stat { display: inline-flex; align-items: baseline; gap: 6px; background: var(--raised); border-radius: var(--round); padding: 4px 9px; font-size: 13.5px; }
.stat b { font-weight: 500; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); }
.macro-foot b { font-weight: 500; color: var(--text); }
.foot-info { display: inline-flex; align-items: center; gap: 10px; flex: none; white-space: nowrap; }
.foot-info .downloads { color: var(--text); }
.downloads { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; margin: -3px -6px; border-radius: var(--round); cursor: pointer; }
.downloads:hover { color: var(--accent); background: var(--accent-soft); }

.back { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px 6px 6px; margin: 0 0 6px -6px; border: 0; border-radius: var(--round); background: none; color: var(--muted); font-size: 14px; cursor: pointer; }
.back:hover { color: var(--text); background: var(--raised); }
.auth .back { margin-bottom: 12px; }

.item-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.item-head-main { min-width: 0; }
.item-head-actions { display: flex; gap: 10px; flex: none; }
.item-head .level a { color: var(--accent); white-space: nowrap; }
.stats.big { margin: 0 0 4px; gap: 8px; }
.stats.big .stat { padding: 8px 14px; font-size: 15px; }
.item-side { display: grid; gap: 14px; }
.item-side .facts { background: var(--card); backdrop-filter: var(--glass); border: 1px solid var(--line); border-radius: var(--round-card); padding: 6px 18px; }
.item-side .facts b { font-weight: 500; }
.verification { margin: 0; padding: 10px 14px; border-radius: var(--round); background: var(--raised); color: var(--muted); font-size: 14px; }
.verification.yes { background: var(--accent-soft); color: var(--accent); }
.item-actions { display: flex; gap: 8px; }
.item-actions .btn { flex: 1; }
.item-side .hint { margin: 0; }
.theme-view .theme-shot { border-radius: var(--round-card); }
.theme-view .hint { margin-top: 10px; }
.link-button { justify-self: start; padding: 0; border: 0; background: none; color: var(--muted); font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-button:hover { color: var(--bad); }
.macro-foot { display: flex; align-items: center; gap: 12px; justify-content: space-between; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line-soft); padding-top: 11px; margin-top: auto; line-height: 1.3; }

.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 28px; color: var(--muted); }

.empty { color: var(--muted); text-align: center; padding: 56px 16px; border: 1px dashed var(--line); border-radius: var(--round-card); }
.error { color: var(--bad); }

.page-head { padding: 32px 0; }
.page-head .container > :first-child { margin-top: 0; }
.page-head .container > :last-child { margin-bottom: 0; }
.crumb { color: var(--muted); font-size: 14px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent); }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 500; letter-spacing: -.01em; margin: 10px 0 6px; overflow-wrap: anywhere; }
.page-head .level { color: var(--muted); font-size: 17px; overflow-wrap: anywhere; }
.page-head .tags { margin-top: 14px; }

.detail { display: grid; grid-template-columns: 1fr 360px; gap: 24px; padding: 28px 0 72px; align-items: start; }
.detail:has(> .comments) { grid-template-rows: auto 1fr; }
.detail:has(> .comments) > :first-child { grid-column: 1; grid-row: 1; min-width: 0; }
.detail:has(> .comments) > .item-side { grid-column: 2; grid-row: 1 / span 2; }
.detail > .comments { grid-column: 1; grid-row: 2; min-width: 0; }

.panel { background: var(--card); backdrop-filter: var(--glass); border: 1px solid var(--line); border-radius: var(--round-card); padding: 18px 20px 20px; }
.panel h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; color: var(--text); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.panel + .panel { margin-top: 16px; }

.notes { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font: inherit; color: var(--text); }
.notes.none { color: var(--muted); }
textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 14px;
    border-radius: var(--round);
    border: 0;
    background: var(--raised);
    resize: vertical;
    outline: none;
}
textarea:focus { box-shadow: inset 0 0 0 1px var(--accent); }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 0 16px; margin: 0; }
.facts dt { color: var(--text); }
.facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; color: var(--muted); }
.facts dt, .facts dd { padding: 10px 0; border-top: 1px solid var(--line-soft); }
.facts dt:first-of-type, .facts dt:first-of-type + dd { border-top: 0; }
.actions { display: grid; gap: 10px; margin-top: 20px; }
.hint { color: var(--muted); font-size: 14px; margin: 12px 0 0; }

.auth { display: grid; place-items: center; padding: 72px 0; }
.auth .panel { width: 100%; max-width: 440px; padding: 32px; }
.auth h1 { font-size: 28px; font-weight: 500; margin: 0 0 8px; }
.auth p { color: var(--muted); margin: 0 0 24px; }
.steps { color: var(--muted); padding-left: 20px; margin: 0 0 24px; }
.steps li + li { margin-top: 6px; }
.code-input {
    width: 100%;
    height: 60px;
    border-radius: var(--round);
    border: 0;
    background: var(--raised);
    text-align: center;
    font-size: 26px;
    letter-spacing: .3em;
    text-transform: uppercase;
    outline: none;
    margin-bottom: 12px;
}
.code-input:focus { box-shadow: inset 0 0 0 1px var(--accent); }

.admin { padding: 40px 0 72px; }
.admin h1 { font-size: 32px; font-weight: 500; margin: 0 0 6px; }
.admin > .container > p { color: var(--muted); margin: 0 0 20px; }
.admin .search { margin-bottom: 16px; }
table.users { width: 100%; border-collapse: collapse; }
table.users th { color: var(--muted); font-weight: 500; text-align: left; font-size: 14px; padding: 0 12px 10px; }
.user-actions { display: flex; gap: 6px; justify-content: flex-end; }
.role-cell { display: flex; align-items: center; gap: 12px; }
.beta-check { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
table.users td { padding: 12px; border-top: 1px solid var(--line-soft); }


.tabs { display: flex; width: fit-content; max-width: 100%; padding: 3px; border-radius: var(--round); background: var(--raised); backdrop-filter: var(--glass); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; padding: 6px 16px; border-radius: 6px; color: var(--muted); white-space: nowrap; transition: background-color var(--ease-time) var(--ease), color var(--ease-time) var(--ease); }
.tab + .tab::before { content: ""; position: absolute; left: 0; top: 30%; bottom: 30%; width: 1px; background: var(--line); }
.tab[aria-selected=true]::before, .tab[aria-selected=true] + .tab::before { display: none; }
.tab:hover { color: var(--text); }
.tab[aria-selected=true] { color: var(--text); background: var(--header-hot); box-shadow: inset 0 1px 0 var(--rim-light); }

.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.stat-tile { background: var(--card); backdrop-filter: var(--glass); border: 1px solid var(--line); border-radius: var(--round-card); padding: 18px; }
.stat-tile b { display: block; font-size: 28px; font-weight: 500; line-height: 1.2; }
.stat-tile span { color: var(--muted); font-size: 14px; }

.admin-list { padding: 6px 0; }
.admin-row { display: flex; align-items: center; gap: 16px; padding: 14px 20px; }
.admin-row + .admin-row { border-top: 1px solid var(--line-soft); }
.admin-row-main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.admin-row-title { color: var(--text); font-size: 17px; }
.admin-row-sub { flex-basis: 100%; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.admin-row-actions { display: flex; gap: 8px; flex: none; }

.sound-row { display: flex; flex-wrap: wrap; gap: 6px; }
.play {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--round);
    background: var(--raised);
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    transition: background .12s;
}
.play:hover { background: var(--raised-hot); }
.play, .btn { line-height: 1; }
.play::before { content: ""; flex: none; border-left: 8px solid var(--accent); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.play.hit { background: var(--header-hot); }
.play.big { height: 44px; padding: 0 18px; font-size: 16px; background: var(--accent); color: var(--tick); }
.play.big::before { border-left-color: var(--tick); }
.play.big:hover { background: var(--accent-hot); }
.play .count { color: var(--muted); }
.play.big .count { color: var(--button); }
.listen { display: grid; gap: 16px; }
.volume { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.volume input { flex: 1; max-width: 220px; accent-color: var(--accent); }
.sound-families { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 560px) { .sound-families { grid-template-columns: 1fr; } }
.sound-family { background: var(--well); border: 1px solid var(--line-soft); border-radius: var(--round-card); padding: 10px 12px; }
.sound-family h3, .sound-group h3 { margin: 0 0 8px; font-size: 14px; font-weight: 500; color: var(--text); }
.sound-line { display: flex; align-items: center; gap: 12px; }
.sound-line + .sound-line { margin-top: 6px; }
.sound-line-label { width: 70px; flex: none; color: var(--muted); font-size: 13px; }
.sound-groups { display: grid; gap: 14px; }
.sound-group h3 { margin: 0 0 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.sound-group .sound-row .play { height: 28px; padding: 0 10px; font-size: 13px; }
.upload-form { display: grid; gap: 12px; }
.upload-form input[type=text], .upload-form input[type=file] {
    width: 100%; padding: 10px 14px; border-radius: var(--round); border: 0; background: var(--raised); outline: none;
}
.upload-form input[type=text]:focus { box-shadow: inset 0 0 0 1px var(--accent); }
.upload-form.upload-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.upload-row input[type=text] { flex: 1 1 180px; width: auto; min-width: 0; }
.upload-row input[type=file] { flex: 1 1 240px; width: auto; min-width: 0; }
.upload-row > .btn { flex: none; }
.upload-row > .hint { flex-basis: 100%; margin: 0; }
.upload-row > .hint:empty { display: none; }
.upload-form input[type=file]::file-selector-button { margin-right: 12px; height: 30px; padding: 0 12px; border: 0; border-radius: 6px; background: var(--raised-hot); color: var(--text); font: inherit; cursor: pointer; }
.replay-upload { gap: 16px; }
.replay-upload .field input[type=text], .replay-upload .field input[type=url] { height: 42px; padding: 0 14px; }
.replay-upload .field input[type=url] { width: 100%; }
.replay-upload .field input[type=url]:focus { box-shadow: inset 0 0 0 1px var(--accent); }
.upload-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.level-found b { color: var(--text); font-weight: 500; }
.upload-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.upload-check input { flex: none; margin: 1px 0 0; }
.upload-check small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.upload-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.upload-actions .hint { margin: 0; }
@media (max-width: 640px) { .upload-columns { grid-template-columns: 1fr; } }

.mock {
    --t-text: #fff; --t-muted: #999; --t-window: #111; --t-child: #222; --t-border: #333; --t-frame: #333; --t-check: #0f0;
    --t-slider: #0f0; --t-button: #333; --t-header: #444; --t-progress: #0f0; --t-round-window: 14px; --t-round-child: 10px; --t-round-frame: 7px;
    background: var(--t-window);
    border-radius: var(--t-round-window);
    padding: 14px;
    color: var(--t-text);
    font-size: 14px;
    display: grid;
    gap: 9px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 12px 32px rgba(0, 0, 0, .35);
}
.mock-title { display: flex; justify-content: space-between; align-items: center; }
.mock-title span:last-child { color: var(--t-muted); }
.mock-card { background: var(--t-child); border: 1px solid var(--t-border); border-radius: var(--t-round-child); padding: 10px; display: grid; gap: 8px; }
.mock-label { color: var(--t-muted); display: flex; align-items: center; gap: 6px; }
.mock-label::before { content: ""; width: 3px; height: 11px; border-radius: 2px; background: var(--t-check); }
.mock-check { display: flex; align-items: center; gap: 8px; }
.mock-check i { width: 20px; height: 20px; border-radius: var(--t-round-frame); background: var(--t-frame); display: block; }
.mock-check i.on { background: var(--t-check); }
.mock-slider { height: 20px; border-radius: var(--t-round-frame); background: var(--t-frame); position: relative; overflow: hidden; }
.mock-slider::after { content: ""; position: absolute; inset: 0 45% 0 0; background: var(--t-slider); opacity: .55; }
.mock-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mock-button { height: 24px; border-radius: var(--t-round-frame); background: var(--t-button); display: grid; place-items: center; }
.mock-row { padding: 4px 8px; border-radius: var(--t-round-frame); }
.mock-row.picked { background: var(--t-header); }
.mock.small { font-size: 12px; padding: 10px; gap: 6px; }
.mock.small .mock-card { padding: 8px; gap: 6px; }
.mock.small .mock-check i { width: 16px; height: 16px; }
.mock.small .mock-button { height: 20px; }
.mock.small .mock-slider { height: 14px; }
.theme-shot { display: block; width: 100%; height: auto; border-radius: var(--round-card); }
.theme-crop {
    height: 210px; overflow: hidden; border-radius: var(--round-card) var(--round-card) 0 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent), linear-gradient(to right, #000 72%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to bottom, #000 45%, transparent), linear-gradient(to right, #000 72%, transparent);
    mask-composite: intersect;
}
.theme-crop .theme-shot { width: 165%; max-width: none; border-radius: 0; }
.theme-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.changelog { display: grid; gap: 28px; }
.release h3 { font-size: 16px; font-weight: 500; margin: 0 0 8px; color: var(--text); }
.release .release-version { font-size: 20px; color: var(--accent); }
.release p { margin: 0 0 8px; color: var(--muted); }
.changes { margin: 0 0 12px; padding-left: 20px; }
.older-releases { display: grid; gap: 8px; }
.older-title { font-size: 14px; font-weight: 500; color: var(--muted); margin: 4px 0 2px; }
details.release { border: 1px solid var(--line-soft); border-radius: var(--round); padding: 0 14px; background: var(--well); }
details.release summary { cursor: pointer; padding: 11px 0; list-style: none; display: flex; align-items: center; justify-content: space-between; }
details.release summary::-webkit-details-marker { display: none; }
details.release summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-top: -4px; }
details.release[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
details.release summary .release-version { font-size: 16px; color: var(--text); }
details.release[open] { padding-bottom: 6px; }
.changes li + li { margin-top: 6px; }
.changes li::marker { color: var(--muted); }

@media (max-width: 860px) {
    .detail { grid-template-columns: 1fr; }
    .detail:has(> .comments) { grid-template-rows: none; }
    .detail:has(> .comments) > :first-child, .detail:has(> .comments) > .item-side, .detail > .comments { grid-column: auto; grid-row: auto; }
    .grid { grid-template-columns: 1fr; }
    .hero .container { flex-wrap: wrap; }
    .hero .search { flex-basis: 100%; }
    .hero .toolbar { flex: 1; flex-wrap: wrap; }
    .hero .pill, .hero select { flex: 1 1 auto; }
}

body::after {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 96px;
    background: linear-gradient(to bottom, transparent, var(--background) 85%);
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s;
    z-index: 5;
}
.more-below body::after { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    body::after { transition: none; }
}

.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 40px; padding: 8px 0 72px; align-items: start; }
.guide { max-width: 760px; padding: 28px 32px; border: 1px solid var(--line); border-radius: var(--round-card); background: var(--card); backdrop-filter: var(--glass); line-height: 1.6; color: color-mix(in srgb, var(--text) 78%, transparent); }
.guide h2, .guide h3 { color: var(--text); }
.guide .guide-page { font-size: 26px; font-weight: 500; margin: 44px 0 6px; padding-top: 16px; border-top: 1px solid var(--line-soft); scroll-margin-top: 80px; }
.guide .guide-page:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.guide .guide-sub { font-size: 19px; font-weight: 500; margin: 26px 0 6px; }
.guide h3 { font-size: 16px; font-weight: 500; color: var(--accent); margin: 22px 0 6px; }
.guide p { margin: 8px 0; }
.guide strong { font-weight: 500; color: var(--text); }
.guide code { font-family: ui-monospace, Consolas, monospace; font-size: .88em; padding: 1px 6px; border-radius: 5px; background: var(--raised); }
.guide-list { margin: 6px 0 10px; padding-left: 22px; }
.guide-list li { margin: 4px 0; }
.guide-list li::marker { color: var(--muted); }
.guide-note { color: var(--muted); font-size: 14px; }
.guide-tip { margin: 12px 0; padding: 10px 16px; border: 1px solid var(--line-soft); border-radius: var(--round-card); background: var(--card); box-shadow: inset 0 1px 0 var(--rim-light); }
.guide-tip p { margin: 4px 0; }
.guide-code { margin: 12px 0; padding: 12px 16px; border: 1px solid var(--line-soft); border-radius: var(--round-card); background: var(--well); overflow-x: auto; }
.guide .guide-code code { display: block; padding: 0; background: none; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.guide-toc { position: sticky; top: 88px; padding: 16px 18px; border: 1px solid var(--line-soft); border-radius: var(--round-card); background: var(--card); backdrop-filter: var(--glass); box-shadow: inset 0 1px 0 var(--rim-light); }
.guide-toc h2 { font-size: 14px; font-weight: 500; color: var(--muted); margin: 0 0 8px; }
.guide-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.guide-toc a { display: block; padding: 4px 8px; margin: 0 -8px; border-radius: var(--round); color: var(--text); font-size: 14px; }
.guide-toc a:hover { background: var(--raised); color: var(--text); }
.guide > :first-child { margin-top: 0; }

@media (max-width: 760px) {
    .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 0; }
    .guide-layout > * { min-width: 0; }
    .guide-toc { position: sticky; top: 60px; z-index: 4; order: -1; margin: 0 -16px; padding: 8px 16px; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; background: var(--background); }
    .guide-toc h2 { display: none; }
    .guide-toc ol { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
    .guide-toc ol::-webkit-scrollbar { display: none; }
    .guide-toc li { flex: none; }
    .guide-toc a { margin: 0; padding: 7px 12px; white-space: nowrap; background: var(--card); border: 1px solid var(--line-soft); }
    .guide .guide-page { scroll-margin-top: 130px; }
    .item-head { flex-direction: column; align-items: stretch; }
    .item-head-actions .btn { flex: 1; }
}

@media (max-width: 960px) {
    .topbar-inner { height: 60px; }
    .menu-button { display: grid; }
    .menu { display: none; }
    .topbar.open .menu {
        display: flex;
        flex-direction: column;
        gap: 6px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 10px 16px 16px;
        background: var(--topbar-solid, var(--background));
        border-bottom: 1px solid var(--line-soft);
    }
    .topbar.open .sections { flex-direction: column; gap: 2px; margin: 0; }
    .topbar.open .sections a { padding: 12px; }
    .topbar.open .discord-link { display: flex; align-items: center; gap: 10px; width: auto; height: auto; margin: 0; padding: 12px; color: var(--muted); }
    .topbar.open .discord-link span { display: inline; }
    .topbar.open .nav { flex-direction: column; align-items: stretch; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
    .topbar.open .nav .who { padding: 4px 12px 6px; color: var(--text); border-right: 0; }
    .topbar.open .nav .btn { justify-content: flex-start; padding: 0 12px; }
}

@media (max-width: 560px) {
    .container { padding: 0 16px; }
    .hero { padding: 20px 0 16px; }
        .hero .toolbar { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .hero .toolbar > :only-child, .hero .toolbar > .spacer + select:last-child { grid-column: 1 / -1; }
    .search input, select, textarea, .upload-form input[type=text], .code-input { font-size: 16px; }
    .btn { height: 44px; }
    .btn.small { height: 38px; }
    .play { height: 38px; }
    .macro { padding: 16px; }
    .stats { gap: 6px; }
    .page-head { padding: 24px 0; }
    .detail { padding: 20px 0 56px; }
    .detail > aside { order: -1; }
    .detail > aside.item-side { order: 0; }
    .detail > .side-stack { order: -1; }
    .admin-row { flex-direction: column; align-items: stretch; }
    .admin-row-actions { flex-wrap: wrap; }
    .stat-tiles { grid-template-columns: 1fr 1fr; }
    table.users { display: block; overflow-x: auto; }
}

.sections a[data-section=under-the-hood] { white-space: nowrap; }
.post { max-width: 728px; margin: 0 auto; padding: 56px 24px 88px; }
.post-head h1 { font-size: clamp(32px, 5vw, 44px); font-weight: 500; line-height: 1.15; letter-spacing: -.015em; margin: 0 0 14px; }
.post-subtitle { font-size: 21px; line-height: 1.5; color: var(--muted); margin: 0 0 28px; }
.post-byline { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.post-byline img { border-radius: 50%; }
.post-byline div { display: grid; line-height: 1.35; }
.post-byline strong { font-weight: 500; color: var(--text); }
.post-byline span { font-size: 14px; color: var(--muted); }
.post-body { max-width: none; margin-top: 36px; font-size: 18px; line-height: 1.75; }
.post-body p { margin: 14px 0; }
.post-body .guide-page { font-size: 28px; line-height: 1.25; margin: 56px 0 14px; padding-top: 40px; }
.post-body .guide-list li { margin: 8px 0; }
.post-body .guide-code { margin: 20px 0; }
.post-foot { margin-top: 56px; padding: 28px; border: 1px solid var(--line-soft); border-radius: var(--round-card); background: var(--card); box-shadow: inset 0 1px 0 var(--rim-light); text-align: center; }
.post-foot p { font-size: 20px; margin: 0; }
.post-foot .actions { display: flex; flex-wrap: wrap; justify-content: center; }
.code-line { display: block; padding-left: 2em; text-indent: -2em; min-height: 1lh; }
.code-comment { color: var(--muted); font-style: italic; }
.code-string { color: var(--claims); }
.code-keyword { color: var(--accent); }
.code-number { color: #ff9e7a; }
.code-scope { color: #c3a6ff; }
.code-call { color: #7cc7ff; }
.ticket-text code.code-path { color: var(--claims); }
@media (max-width: 560px) {
    .post { padding: 32px 16px 64px; }
    .post-subtitle { font-size: 18px; }
    .post-body { font-size: 17px; }
    .post-body .guide-page { font-size: 24px; margin-top: 40px; padding-top: 28px; }
    .post-foot { padding: 22px 16px; }
}

.dev { padding: 36px 0 72px; --info: #8fc8ff; }
.dev-head h1 { font-size: 32px; font-weight: 500; margin: 0 0 4px; }
.dev-head p { color: var(--muted); margin: 0 0 18px; }
.tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 8px; border-radius: 10px; background: var(--claims); color: var(--background); font-size: 12px; line-height: 1; }

.dev-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 22px; }
.dev-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 16px 18px; border-radius: var(--round-card); border: 1px solid var(--line-soft); background: var(--card); box-shadow: inset 0 1px 0 var(--rim-light); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.dev-tile:hover { border-color: var(--line); transform: translateY(-1px); }
.dev-tile.static { cursor: default; }
.dev-tile.static:hover { border-color: var(--line-soft); background: var(--card); transform: none; }
.dev-tile b { font-size: 30px; font-weight: 500; line-height: 1.15; font-variant-numeric: tabular-nums; }
.dev-tile span { color: var(--muted); font-size: 14px; }
.dev-tile small { color: var(--muted); font-size: 12.5px; opacity: .8; }
.dev-tile.hot b { color: var(--claims); }
.dev-tile.bad b { color: var(--bad); }

.dev-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.segmented { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; padding: 3px; gap: 0; border-radius: var(--round); background: var(--raised); }
.segmented .pill { position: relative; display: inline-flex; align-items: center; height: 30px; border-radius: 6px; background: transparent; }
.segmented .pill + .pill::before { content: ""; position: absolute; left: 0; top: 30%; bottom: 30%; width: 1px; background: var(--line); }
.segmented .pill[aria-pressed=true]::before, .segmented .pill[aria-pressed=true] + .pill::before { display: none; }
.segmented .pill:hover { background: var(--raised); }
.segmented .pill[aria-pressed=true] { background: var(--header-hot); }
.dev-filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.dev-search { flex: 1 1 260px; min-width: 0; }
.dev-search input { height: 36px; padding-left: 40px; font-size: 14px; }
.dev-search svg { left: 12px; width: 18px; height: 18px; }

.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; line-height: 1; white-space: nowrap; }
.badge.kind-bug { color: #ff8a98; border-color: rgba(255, 92, 112, .45); }
.badge.kind-suggestion { color: var(--claims); border-color: rgba(242, 179, 71, .45); }
.badge.kind-question { color: var(--info); border-color: rgba(143, 200, 255, .4); }
.badge.status-open { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.badge.status-in_progress { color: var(--background); background: var(--info); border-color: var(--info); }
.badge.status-solved { color: var(--background); background: var(--accent); border-color: var(--accent); }
.badge.status-wont_fix, .badge.status-duplicate { color: var(--muted); border-style: dashed; }
.badge.priority-critical { color: #fff; background: var(--bad); border-color: var(--bad); }
.badge.priority-high { color: var(--background); background: var(--claims); border-color: var(--claims); }
.badge.priority-low { opacity: .7; }

.ticket-list { display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: var(--round-card); background: var(--card); box-shadow: inset 0 1px 0 var(--rim-light); overflow: hidden; transition: opacity .15s; }
.ticket-list.loading { opacity: .55; }
.ticket-list > .empty { padding: 40px 20px; }
.ticket-row { position: relative; display: flex; align-items: center; gap: 16px; padding: 14px 18px 14px 22px; color: var(--text); transition: background .12s; }
.ticket-row + .ticket-row { border-top: 1px solid var(--line-soft); }
.ticket-row:hover { background: var(--raised); color: var(--text); }
.ticket-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: transparent; }
.ticket-row.priority-critical::before { background: var(--bad); }
.ticket-row.priority-high::before { background: var(--claims); }
.ticket-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ticket-row-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ticket-id { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.ticket-row-title { font-size: 16.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-row-preview { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-row-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 13px; opacity: .85; }
.ticket-row-side { display: flex; align-items: center; gap: 6px; flex: none; }
.dev-foot { color: var(--muted); font-size: 13px; margin-top: 18px; opacity: .8; overflow-wrap: anywhere; }

.ticket-head { margin-bottom: 20px; }
.ticket-head .back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.ticket-head .back:hover { color: var(--text); }
.ticket-title { font-size: 26px; font-weight: 500; line-height: 1.3; margin: 0 0 10px; overflow-wrap: anywhere; }
.ticket-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--muted); font-size: 14px; }
.ticket-message { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--round); background: var(--accent-soft); color: var(--accent); }
.ticket-resolution { margin-top: 12px; padding: 10px 14px; border-left: 3px solid var(--line); color: var(--muted); white-space: pre-wrap; }
.ticket-resolution b { color: var(--text); font-weight: 500; }

.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.ticket-main .panel + .panel, .ticket-main .panel + details.panel { margin-top: 14px; }
.ticket-side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 14px; }
.ticket-side .panel { padding: 18px; }
.ticket-side .panel + .panel { margin-top: 0; }
.ticket-text { overflow-wrap: anywhere; }
.ticket-text > :first-child { margin-top: 0; }
.ticket-text > :last-child { margin-bottom: 0; }
.ticket-text p { margin: 0 0 10px; }
.ticket-text ul, .ticket-text ol { margin: 0 0 10px; padding-left: 22px; }
.ticket-text li + li { margin-top: 6px; }
.ticket-text code { padding: 1px 6px; border-radius: 5px; background: var(--raised); font-size: .9em; }
.ticket-text pre { margin: 10px 0; overflow-x: auto; }
.ticket-text pre code { padding: 0; background: none; font-size: 13.5px; }
.ticket-text h3 { font-size: 16px; font-weight: 500; margin: 14px 0 6px; }
.ticket-note + .ticket-note { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.ticket-note-head { display: flex; gap: 10px; align-items: baseline; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.ticket-note-head b { color: var(--text); font-weight: 500; }
details.ticket-transcript summary { cursor: pointer; color: var(--muted); }
details.ticket-transcript summary:hover { color: var(--text); }
details.ticket-transcript pre { margin: 14px 0 0; max-height: 520px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.55; color: var(--muted); }

.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.status-grid .pill { padding: 0 8px; }
.priority-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.priority-row .pill { padding: 0 4px; }
.priority-pill.priority-critical[aria-pressed=true] { color: var(--bad); border-color: var(--bad); background: rgba(255, 92, 112, .12); }
.priority-pill.priority-high[aria-pressed=true] { color: var(--claims); border-color: var(--claims); background: rgba(242, 179, 71, .12); }
.ticket-side textarea { width: 100%; padding: 10px 12px; margin-bottom: 10px; border-radius: var(--round); border: 0; background: var(--raised); resize: vertical; outline: none; font-size: 14px; line-height: 1.45; }
.ticket-side textarea:focus, .ticket-dup:focus { box-shadow: inset 0 0 0 1px var(--accent); }
.ticket-check { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--muted); font-size: 14px; cursor: pointer; }
.ticket-check[hidden] { display: none; }

.ticket-dup { width: 110px; height: 32px; padding: 0 10px; border-radius: var(--round); border: 0; background: var(--raised); outline: none; }
.ticket-reply { margin-bottom: 12px; padding: 10px 12px; border-radius: var(--round); background: var(--raised); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-links { display: flex; flex-direction: column; gap: 8px; }
.ticket-files { display: flex; flex-wrap: wrap; gap: 8px; }
.ticket-file { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--round); background: var(--raised); color: var(--text); font-size: 14px; max-width: 100%; }
.ticket-file:hover { background: var(--raised-hot); color: var(--text); }
.ticket-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-file small { color: var(--muted); flex: none; }

.fact-tabs { margin-bottom: 12px; }
.fact-list { display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: var(--round-card); background: var(--card); box-shadow: inset 0 1px 0 var(--rim-light); overflow: hidden; margin-top: 14px; }
.fact-list > .empty { padding: 40px 20px; }
.fact-row { display: flex; align-items: center; gap: 16px; padding: 14px 18px; }
.fact-row + .fact-row { border-top: 1px solid var(--line-soft); }
.fact-row.done { opacity: .5; }
.fact-row.done .fact-text { text-decoration: line-through; }
.fact-main { flex: 1; min-width: 0; }
.fact-text { overflow-wrap: anywhere; }
.fact-meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.fact-actions { display: flex; gap: 6px; flex: none; }

@media (max-width: 960px) {
    .ticket-layout { grid-template-columns: 1fr; }
    .ticket-side { position: static; order: -1; }
}
@media (max-width: 640px) {
    .dev-tiles { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .dev-tile { padding: 10px 12px; }
    .dev-tile b { font-size: 22px; }
    .dev-tile span { font-size: 12.5px; line-height: 1.3; }
    .dev-tile small { display: none; }
    .dev-tile.static { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 8px; }
    .ticket-row { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 14px 12px 18px; }
    .ticket-row-side { justify-content: flex-start; }
    .ticket-row-top { flex-wrap: wrap; }
    .ticket-row-title { flex-basis: 100%; white-space: normal; }
    .fact-row { flex-direction: column; align-items: stretch; }
    .dev-filter-row select { flex: 1 1 45%; }
}

.discord-button { background: #5865f2; color: #fff; margin: 4px 0 0; }
.discord-button:hover { background: #6b77f4; color: #fff; }
.discord-button svg { width: 20px; height: 20px; }
.auth .or { display: flex; align-items: center; gap: 12px; margin: 22px 0 6px; color: var(--muted); font-size: 14px; }
.auth .or::before, .auth .or::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.hint.error { color: var(--bad); }
.users-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }

.uploader { cursor: pointer; }
.uploader:hover, .uploader:focus-visible { color: var(--accent); text-decoration: underline; outline: none; }
.discord-name { white-space: nowrap; }
/* centered on the height of capitals and digits, the middle of the line for most names */
.discord-mark { display: inline-block; margin-left: .3em; vertical-align: -.07em; line-height: 0; color: #8c9eff; }
.discord-mark svg { display: block; width: .85em; height: .85em; }
[data-tone=light] .discord-mark { color: #5865f2; }
a.who { color: var(--text); }
a.who:hover { color: var(--accent); }

.profile { padding: 40px 0 72px; }
.profile-head { display: flex; align-items: center; gap: 20px; }
.profile-stats { margin-top: 26px; }
.profile-avatar { display: grid; place-items: center; width: 76px; height: 76px; flex: none; }
.profile-name { min-width: 0; }
.profile-name h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 32px; font-weight: 500; line-height: 1.2; margin: 0 0 8px; overflow-wrap: anywhere; }
.profile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--muted); font-size: 14px; }
.profile-stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 28px; }
.tab-number { margin-left: 8px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.tab[aria-selected=true] .tab-number { color: var(--accent); }
.profile-more { margin-top: 20px; }
@media (max-width: 560px) {
    .profile-head { gap: 14px; }
    .profile-avatar, .avatar.big { width: 58px; height: 58px; }
    .profile-name h1 { font-size: 25px; }
    .profile-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .profile-stats .stat-tile { padding: 12px; }
    .profile-stats .stat-tile b { font-size: 22px; }
}
[hidden] { display: none !important; }

.avatar { display: inline-grid; place-items: center; flex: none; object-fit: contain; }
.avatar.tiny { width: 22px; height: 22px; font-size: 12px; border-radius: 6px; }
.avatar.big { width: 76px; height: 76px; font-size: 34px; border-radius: 20px; }
.avatar.letter { background: linear-gradient(135deg, var(--button-hot), var(--raised)); border: 1px solid var(--line); color: var(--accent); }
.avatar.discord { border-radius: 50%; object-fit: cover; }
.avatar.gd { border-radius: 0; }
.user-cell { display: inline-flex; align-items: center; gap: 8px; }

.avatar.small { width: 32px; height: 32px; font-size: 15px; border-radius: 9px; }
.avatar.small.gd, .avatar.tiny.gd, .avatar.big.gd { border-radius: 0; }
.avatar.small.discord, .avatar.tiny.discord, .avatar.big.discord { border-radius: 50%; object-fit: cover; }
.tag.small { height: 20px; padding: 0 7px; font-size: 11.5px; }

.votes { display: inline-flex; gap: 4px; }
.vote { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 0; border-radius: var(--round); background: var(--raised); color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; cursor: pointer; }
.vote:hover:not(:disabled) { color: var(--text); background: var(--raised-hot); }
.vote.up[aria-pressed=true] { color: var(--accent-hot); background: var(--accent-soft); }
.vote.down[aria-pressed=true] { color: var(--bad); background: rgba(255, 92, 112, .14); }
.vote:disabled { cursor: default; opacity: .7; }
.side-votes { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); backdrop-filter: var(--glass); border: 1px solid var(--line); border-radius: var(--round-card); padding: 12px 14px 12px 12px; }
.side-votes .vote { height: 36px; padding: 0 14px; font-size: 15px; }
.foot-info .likes { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.foot-info .likes svg { width: 13px; height: 13px; }
.macro-foot .credit { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.comments-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.comments-head h2 { margin: 0; }
.comments-head select { height: 34px; padding: 0 30px 0 10px; font-size: 14px; }
.comment-count { margin-left: 2px; color: var(--text); font-variant-numeric: tabular-nums; }
.comment-form { display: grid; gap: 8px; margin-bottom: 6px; }
.comment-form-row { display: flex; gap: 12px; align-items: flex-start; }
.comment-form textarea { min-height: 72px; }
.comment-form-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.comment-left { margin: 0; }
.comment-signin { margin: 0 0 6px; }
.comment-list { display: grid; margin-top: 8px; }
.comment { padding: 16px 0; border-top: 1px solid var(--line-soft); }
.comment:first-child { border-top: 0; }
.comment.held { padding: 16px 14px; margin: 4px 0; border: 1px dashed var(--claims); border-radius: var(--round); }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.comment-author { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.comment-author b { font-weight: 500; }
.comment-author:hover { color: var(--accent); }
.comment-time { color: var(--muted); font-size: 13px; }
.comment-body { margin: 8px 0 10px 30px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.comment-held { margin: 8px 0 0 30px; color: var(--claims); font-size: 13px; }
.comment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-left: 30px; }
.comment-actions .vote { height: 26px; padding: 0 8px; font-size: 12.5px; }
.comment .hint { margin: 6px 0 0 30px; }
.comment-edit { margin: 8px 0 10px 30px; display: grid; gap: 8px; }
.comment-edit textarea { min-height: 80px; }
.comment-edit-actions { display: flex; gap: 8px; }
.comment.buried { padding: 10px 0; }
.comment-buried { padding: 0; border: 0; background: none; color: var(--muted); font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.comment-none { margin: 4px 0 0; }
.link-button.plain { font-size: 13px; text-decoration: none; }
.link-button.plain:hover { color: var(--text); text-decoration: underline; }

.edit-panel summary { cursor: pointer; color: var(--muted); font-weight: 500; list-style: none; display: flex; align-items: center; gap: 8px; }
.edit-panel summary::-webkit-details-marker { display: none; }
.edit-panel summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.edit-panel[open] summary::before { transform: rotate(45deg); }
.edit-panel summary:hover { color: var(--text); }
.edit-panel[open] summary { margin-bottom: 18px; color: var(--text); }
.edit-form { display: grid; gap: 16px; }
.edit-form > .btn { justify-self: start; }
.field { display: grid; gap: 6px; }
.field > span { color: var(--muted); font-size: 14px; }
.field small { color: var(--muted); font-size: 13px; }
.field input[type=text], .field input[type=url], .code-input.small {
    width: 100%; height: 42px; padding: 0 14px; border-radius: var(--round); border: 0; background: var(--raised); outline: none;
}
.field input:focus, .code-input.small:focus { box-shadow: inset 0 0 0 1px var(--accent); }
.field textarea { min-height: 90px; }
.avatar-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-choice { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border: 1px solid transparent; border-radius: var(--round); background: var(--raised); cursor: pointer; font-size: 14px; }
.avatar-choice input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.avatar-choice:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--accent-soft); }
.avatar-choice.off { opacity: .45; cursor: not-allowed; }

html, body, .topbar, .panel, .macro, .stat, .btn, .tag, .avatar.letter { transition: background-color .25s, border-color .25s, color .25s; }
.profile-head { position: relative; padding: 24px; border-radius: var(--round-window); background: var(--card); backdrop-filter: var(--glass); border: 1px solid var(--line); }
.profile-edit-button { height: 40px; padding: 0 18px; font-size: 15px; }

.profile-name { flex: 1; }
.profile-name h1 { margin-bottom: 4px; }
.profile-name h1 .tag { font-size: 12.5px; }
.profile-meta { margin-top: 6px; }
.profile-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; align-self: flex-start; flex: none; }
.profile-joined { color: var(--muted); font-size: 14px; white-space: nowrap; line-height: 24px; }
.role-badge { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px 0 8px; border-radius: 13px; font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; letter-spacing: .01em; }
.role-badge.small { height: 20px; gap: 4px; padding: 0 7px 0 6px; border-radius: 10px; font-size: 11.5px; }
.role-badge.small svg { width: 11px; height: 11px; }
.role-badge.admin { background: rgba(255, 214, 92, .12); color: #ffd65c; }
.role-badge.mod { background: rgba(143, 200, 255, .12); color: #8fc8ff; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.badge-dot { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--raised); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: transform .15s; }
.badge-dot:hover { transform: translateY(-2px); }
.badge-dot.top { background: radial-gradient(circle at 35% 30%, rgba(255, 214, 92, .3), rgba(255, 164, 92, .1)); color: #ffd65c; box-shadow: inset 0 0 0 1.5px rgba(255, 214, 92, .7); }
.achievements { margin: 0 0 28px; }
.achievements h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 18px; font-weight: 500; }
.achievement-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 24px; padding: 4px 18px; border-radius: var(--round-card); background: var(--card); border: 1px solid var(--line); }
.achievement { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 11px 0; }
.achievement > div { min-width: 0; }
.achievement b { display: block; font-size: 14.5px; font-weight: 500; line-height: 1.3; }
.achievement div span { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; }
.achievement-icon { display: grid; place-items: center; width: 22px; flex: none; color: var(--muted); }
.achievement-icon svg { width: 17px; height: 17px; }
.achievement.top .achievement-icon { color: #ffd65c; }
.achievements:not(.open) .achievement:nth-child(n+9) { display: none; }
.achievements-more { margin-top: 10px; }
.achievements.few .achievements-more { display: none; }
.avatar-shuffle { align-self: center; gap: 6px; }
.profile-bio { margin: 12px 0 0; max-width: 640px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.profile-youtube { display: inline-flex; align-items: center; gap: 6px; }
.customize { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 0; margin: 14px 0 0; padding: 0; overflow: hidden; }
.customize > section { padding: 22px; min-width: 0; }
.customize > section + section { border-left: 1px solid var(--line-soft); }
.customize h3 { margin: 0 0 14px; font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.customize .field + .field { margin-top: 16px; }
.customize textarea { min-height: 84px; }
.save-state { min-height: 20px; margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.save-state.bad { color: var(--bad); }
.linked-steps { margin: 4px 0 12px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.linked-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.linked-row:last-of-type { margin-bottom: 4px; }
.linked-row > span { color: var(--muted); }
.linked-row b { font-weight: 500; overflow-wrap: anywhere; }
.name-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 14px; }
.name-choice:empty { display: none; }
.name-option { display: inline-flex; align-items: center; gap: 6px; color: var(--text); cursor: pointer; }
.name-option input { margin: 0; accent-color: var(--accent); }
.linked-row b.muted { color: var(--muted); font-weight: 400; }
.linked-row .btn { margin-left: auto; }
.gd-mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: var(--raised); color: var(--accent) !important; font-size: 10px; font-weight: 700; }
.link-form { display: flex; gap: 8px; }
.link-form .code-input.small { flex: 1; margin: 0; font-size: 17px; text-align: left; letter-spacing: .12em; }

.toolbar a.pill { display: inline-flex; align-items: center; }
.admin-next { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.admin-next:empty { display: none; }
.admin-split { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.admin-quote { flex-basis: 100%; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.admin-row-title.quote { font-size: 15px; }
.automod h2 { margin-bottom: 10px; }
.word-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-bottom: 14px; }
.word-form input { width: 100%; min-width: 0; height: 38px; padding: 0 12px; border-radius: var(--round); border: 0; background: var(--raised); outline: none; }
.word-form input:focus { box-shadow: inset 0 0 0 1px var(--accent); }
.word-form select { height: 38px; width: auto; min-width: 0; padding-right: 30px; font-size: 14px; }
.word-form .btn { grid-column: 1 / -1; }
.word-list { display: flex; flex-wrap: wrap; gap: 6px; }
.word { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: var(--round); background: var(--raised); font-size: 14px; }
.word small { color: var(--muted); font-size: 11px; }
.word.block small { color: var(--bad); }
.word button { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 5px; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; }
.word button:hover { background: rgba(255, 92, 112, .14); color: var(--bad); }

@media (max-width: 900px) {
    .admin-split { grid-template-columns: 1fr; }
    .customize { grid-template-columns: 1fr; }
    .customize > section + section { border-left: 0; border-top: 1px solid var(--line-soft); }
}
@media (max-width: 640px) {
    .comment-body, .comment-held, .comment-actions, .comment .hint, .comment-edit { margin-left: 0; }
    .comment-form-row .avatar { display: none; }
    .field input[type=text], .field input[type=url], .code-input.small, .word-form input { font-size: 16px; }
    .profile-head { padding: 16px; flex-wrap: wrap; align-items: flex-start; gap: 14px; }
    .profile-avatar, .avatar.big { width: 58px; height: 58px; font-size: 26px; }
    .profile-name { flex-basis: calc(100% - 72px); }
    .profile-side { order: 3; width: 100%; flex-direction: row; justify-content: space-between; align-items: center; }
    .profile-side .profile-edit-button { margin-left: auto; }
    .achievement-grid { grid-template-columns: 1fr; gap: 8px; }
    .achievement { padding: 10px 12px; }
    .achievements:not(.open) .achievement:nth-child(n+5) { display: none; }
    .achievements.few .achievements-more { display: inline-flex; }
}

.tag.fails { border: 1px solid var(--bad); color: var(--bad); }
.btn.fails { background: rgba(255, 92, 112, .1); color: var(--bad); box-shadow: inset 0 0 0 1px rgba(255, 92, 112, .35); }
.btn.fails:hover { background: rgba(255, 92, 112, .18); color: var(--bad); }
.verification.no { background: rgba(255, 92, 112, .1); color: var(--bad); }
.item-actions { flex-wrap: wrap; }
.comment.pending, .word.pending { opacity: .55; pointer-events: none; }

.toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 50; max-width: min(520px, calc(100vw - 32px));
    padding: 11px 16px; border-radius: var(--round-card); background: var(--topbar-solid, var(--background)); color: var(--text); border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 var(--rim-light), 0 10px 30px rgba(0, 0, 0, .45); font-size: 14.5px;
    transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
}
.toast.shown { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: rgba(255, 92, 112, .5); color: #ffb3bd; }

.bell { position: relative; order: 1; flex-shrink: 0; }
.bell[hidden] { display: none; }
.menu > .nav, .menu-button { order: 2; }
.bell-button { position: relative; display: grid; place-items: center; width: 40px; height: 40px; margin-right: 4px; border: 0; border-radius: var(--round); background: transparent; color: var(--muted); cursor: pointer; }
.bell-button:hover, .bell-button[aria-expanded=true] { background: var(--raised); color: var(--text); }
.bell-count {
    position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--accent); color: var(--tick); box-shadow: 0 0 0 2px var(--background); font-size: 11px; line-height: 18px; text-align: center;
}
.bell-count[hidden] { display: none; }
.bell-panel {
    position: absolute; top: calc(100% + 12px); right: -8px; z-index: 20; width: 380px; max-height: min(560px, calc(100vh - 96px));
    display: flex; flex-direction: column; overflow: hidden;
    border: 1px solid transparent; border-radius: var(--round-window); background: linear-gradient(var(--topbar-solid, var(--background)), var(--topbar-solid, var(--background))) padding-box, var(--rim) border-box;
    box-shadow: inset 0 1px 0 var(--rim-light), 0 18px 44px rgba(0, 0, 0, .5);
}
.bell-panel[hidden] { display: none; }
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 11px 16px; border-bottom: 1px solid var(--line); }
.bell-head h2 { margin: 0; font-size: 16px; font-weight: 500; color: var(--text); }
.bell-read-all { padding: 4px 8px; border: 0; border-radius: var(--round); background: none; color: var(--accent); font-size: 13.5px; cursor: pointer; }
.bell-read-all:hover { background: var(--accent-soft); }
.bell-read-all[hidden] { display: none; }
.bell-list { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.bell-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); color: var(--text); font-size: 14px; line-height: 1.4; }
.bell-item:last-child { border-bottom: 0; }
a.bell-item:hover { background: var(--raised); color: var(--text); }
.bell-item.unread { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.bell-item p { margin: 0; overflow-wrap: anywhere; }
.bell-item strong { font-weight: 500; }
.bell-title { color: var(--accent); }
.bell-quote { margin-top: 3px !important; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-item time { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.bell-echo { border-radius: 9px; }
.bell-empty { margin: 0; padding: 36px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.bell-empty.error { color: var(--bad); }
.bell-more { align-self: center; margin: 8px 0 10px; }
.bell-more[hidden] { display: none; }
@media (max-width: 960px) {
    .bell { margin-left: auto; }
    .bell:not([hidden]) + .menu-button { margin-left: 0; }
    .bell-panel { position: fixed; top: 64px; left: 8px; right: 8px; width: auto; max-height: calc(100dvh - 80px); }
}

.theme-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.theme-tile { display: grid; gap: 4px; min-width: 0; padding: 4px 4px 5px; border: 1px solid transparent; border-radius: var(--round); background: transparent; cursor: pointer; }
.theme-tile:hover { background: var(--raised); }
.theme-tile[aria-checked=true] { border-color: var(--line); background: var(--header); }
.theme-tile:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-name { overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.theme-tile[aria-checked=true] .theme-name { color: var(--text); }
.theme-look { position: relative; display: block; height: 36px; overflow: hidden; isolation: isolate; border-radius: 6px; background: var(--page); box-shadow: inset 0 0 0 1px var(--line-soft); }
.theme-look-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.theme-look-bar { position: absolute; left: 5px; right: 5px; bottom: 5px; height: 17px; border-radius: 4px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line-soft); }
.theme-look-bar::after { content: ""; position: absolute; left: 5px; top: 7px; width: 30%; height: 3px; border-radius: 2px; background: var(--text); opacity: .75; }
.theme-look-button { position: absolute; right: 8px; bottom: 9px; width: 16px; height: 9px; border-radius: 5px; background: radial-gradient(circle 3.5px at 11.5px 50%, transparent 2.2px, var(--knob) 2.6px, var(--knob) 3.4px, transparent 3.6px), var(--accent); }
.theme-follow { display: inline-flex; align-items: center; gap: 8px; justify-self: start; margin: 2px 0 4px; font-size: 14px; cursor: pointer; }
.theme-follow input { margin: 0; }
.theme-tile:disabled { opacity: .4; cursor: default; }
.theme-tile:disabled:hover { border-color: var(--line-soft); background: transparent; }
.theme-link { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; margin-right: 6px; padding: 0; border: 0; border-radius: var(--round); background: transparent; color: var(--muted); cursor: pointer; }
.theme-link:hover, .theme-link[aria-expanded=true] { color: var(--text); background: var(--raised); }
.theme-link span { display: none; }
.theme-menu { position: absolute; top: calc(100% + 8px); right: max(12px, calc(50% - 578px)); width: 340px; padding: 16px; border: 1px solid transparent; border-radius: var(--round-window);
    background: linear-gradient(var(--topbar-solid, var(--background)), var(--topbar-solid, var(--background))) padding-box, var(--rim) border-box; box-shadow: inset 0 1px 0 var(--rim-light), 0 16px 40px rgba(0, 0, 0, .4); }
.theme-menu h3 { margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); font-size: 15px; font-weight: 500; color: var(--text); }
.theme-menu .hint { margin: 12px 0 0; font-size: 13px; }
@media (max-width: 960px) {
    .topbar.open .theme-link { display: flex; align-items: center; gap: 10px; width: auto; height: auto; margin: 0; padding: 12px; }
    .topbar.open .theme-link span { display: inline; }
    .theme-menu { left: 12px; right: 12px; width: auto; }
}

.scene { position: fixed; top: 0; left: 0; z-index: -1; width: 100%; height: 100vh; height: 100lvh; pointer-events: none; }
.scene[hidden] { display: none; }
[data-scene] body::after { display: none; }
[data-scene] .topbar { backdrop-filter: none; background: color-mix(in srgb, var(--panel) 94%, transparent); }
[data-scene] .tabs { background: color-mix(in srgb, var(--panel) 90%, transparent); }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }

.rim-light {
    position: fixed;
    z-index: 20;
    padding: 1px;
    pointer-events: none;
    background: radial-gradient(var(--reach) circle at var(--light-x) var(--light-y), rgba(255, 255, 255, .6), transparent);
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    opacity: 0;
    transition: opacity var(--ease-time) var(--ease);
}
.rim-light.shown { opacity: 1; }
.rim-light.pane { --reach: 150px; }
.rim-light.control { --reach: 70px; }

input[type=checkbox], .toggle {
    appearance: none;
    position: relative;
    display: inline-block;
    flex: none;
    width: 42px;
    height: 20px;
    margin: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .1);
    cursor: pointer;
    transition: background-color var(--ease-time) var(--ease);
}
input[type=checkbox]:hover, .pill:hover > .toggle { background: rgba(255, 255, 255, .17); }
input[type=checkbox]:checked, [aria-pressed=true] > .toggle { background: color-mix(in srgb, var(--accent) 90%, transparent); }
input[type=checkbox]:checked:hover, [aria-pressed=true]:hover > .toggle { background: var(--accent); }
[data-tone=light] input[type=checkbox], [data-tone=light] .toggle { background: rgba(0, 0, 0, .1); }
[data-tone=light] input[type=checkbox]:hover, [data-tone=light] .pill:hover > .toggle { background: rgba(0, 0, 0, .16); }

input[type=checkbox]::before, .toggle::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    box-shadow: inset 0 0 0 2px #fff;
    transition: transform var(--ease-time) var(--ease), width .12s var(--ease), background-color var(--ease-time) var(--ease);
}
input[type=checkbox]:checked::before, [aria-pressed=true] > .toggle::before { transform: translateX(22px); background: color-mix(in srgb, var(--accent), #fff 35%); }
input[type=checkbox]:active::before, .pill:active > .toggle::before { width: 20px; background-color: rgba(255, 255, 255, .74); }
input[type=checkbox]:checked:active::before, [aria-pressed=true]:active > .toggle::before { transform: translateX(18px); background: color-mix(in srgb, var(--accent), #fff 35%); }
input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

[data-tone=light] .role-badge.admin { background: rgba(214, 150, 20, .14); color: #8a5a00; box-shadow: inset 0 0 0 1px rgba(170, 115, 0, .4); }
[data-tone=light] .role-badge.mod { background: rgba(40, 110, 200, .1); color: #1f5fae; box-shadow: inset 0 0 0 1px rgba(40, 110, 200, .35); }
[data-tone=light] .badge-chip.top { background: rgba(214, 150, 20, .14); color: #8a5a00; box-shadow: inset 0 0 0 1px rgba(170, 115, 0, .35); }
[data-tone=light] .badge-chip.top svg { color: #a86d00; }
[data-tone=light] .toast.bad { color: var(--bad); }

.customize > .customize-themes { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr; gap: 32px; border-bottom: 1px solid var(--line-soft); }
.theme-tiles.big { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.theme-tiles.big .theme-tile { gap: 7px; padding: 6px 6px 8px; border-radius: var(--round-card); }
.theme-tiles.big .theme-look { height: 84px; border-radius: 7px; }
.theme-tiles.big .theme-look-bar { left: 10px; right: 10px; bottom: 10px; height: 30px; border-radius: 8px; }
.theme-tiles.big .theme-look-bar::after { left: 10px; top: 13px; width: 32%; height: 4px; }
.theme-tiles.big .theme-look-button { right: 18px; bottom: 18px; width: 28px; height: 14px; border-radius: 7px;
    background: radial-gradient(circle 6px at 21px 50%, transparent 3.8px, var(--knob) 4.3px, var(--knob) 5.6px, transparent 6px), var(--accent); }
.theme-tiles.big .theme-name { font-size: 13.5px; text-align: center; }
.customize > .customize-themes + section { border-left: 0; }
.customize-themes .field { align-content: start; }
.customize-themes .field + .field { margin-top: 0; }
.customize-themes h3 { margin: 0; }
.customize-themes .theme-tiles { margin-top: 6px; }
@media (max-width: 900px) {
    .customize > .customize-themes { grid-template-columns: 1fr; gap: 24px; }
    .customize > .customize-themes + section { border-top: 0; }
    .customize-themes .theme-tiles.big { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
    .customize-themes .theme-tiles.big .theme-look { height: 62px; }
}

.script-code {
    --code-font: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
    overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--round-card); background: var(--well);
    font-family: var(--code-font); font-size: 13px; line-height: 1.6; tab-size: 4;
    scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.script-lines { width: max-content; min-width: 100%; padding: 10px 0; }
.script-line { display: flex; }
.script-line:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.script-number {
    position: sticky; left: 0; flex: none; box-sizing: content-box; width: var(--number-width); padding: 0 12px 0 10px; text-align: right;
    border-right: 1px solid var(--line-soft); background: var(--background); color: color-mix(in srgb, var(--muted) 75%, transparent); user-select: none;
}
.script-line:hover .script-number { color: var(--muted); }
.script-line code { padding: 0 18px 0 14px; white-space: pre; color: var(--text); font: inherit; }
.script-code .code-keyword { color: var(--accent); }
.script-code .code-comment { color: color-mix(in srgb, var(--muted) 90%, transparent); font-style: italic; }
.script-code .code-string { color: #f2c46d; }
.script-code .code-number { color: #ff9e7a; }
.script-code .code-scope { color: #c3a6ff; }
.script-code .code-call { color: #7cc7ff; }
[data-tone=light] .script-code .code-keyword { color: #b0245e; }
[data-tone=light] .script-code .code-string { color: #9a5b00; }
[data-tone=light] .script-code .code-number { color: #c2410c; }
[data-tone=light] .script-code .code-scope { color: #6d3fc9; }
[data-tone=light] .script-code .code-call { color: #0b62a3; }

.script-source { padding: 18px; }
.script-source-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.script-file { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.script-file b { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.script-file span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.script-source-actions { display: flex; gap: 6px; }
.btn.done svg { color: var(--accent); }
.script-about > :first-child { margin-top: 0; }
.script-about > :last-child { margin-bottom: 0; }

.script-card { gap: 10px; min-width: 0; }
.script-shot-note {
    display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 20px; border: 1px dashed var(--line-soft); border-radius: var(--round-card);
    color: var(--muted); font-size: 14px; text-align: center; overflow-wrap: anywhere;
}
.script-shot-note.small { aspect-ratio: auto; height: 210px; }
.script-shot-note.error { color: var(--bad); }
.script-shot { margin-bottom: 16px; }
.script-summary { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.script-peek { min-width: 0; overflow: hidden; pointer-events: none; }
.script-peek .script-code { overflow: hidden; height: calc(5lh + 18px); font-size: 12px; line-height: 1.55; mask-image: linear-gradient(90deg, #000 82%, transparent); }
.script-peek .script-lines { padding: 8px 0; }
.script-peek .script-number { padding: 0 8px 0 8px; }
.script-peek .script-line code { padding: 0 10px; }

.script-section { margin-bottom: 56px; padding-bottom: 28px; border-bottom: 1px solid var(--line-soft); }
.results-head h2.with-tag { display: flex; align-items: center; gap: 10px; }
.script-upload select { width: 100%; height: 42px; }
.script-editor {
    min-height: 260px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px; line-height: 1.55; tab-size: 4;
    white-space: pre; overflow-wrap: normal; overflow-x: auto;
}
.script-size.error { color: var(--bad); }
.script-upload textarea { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
@media (max-width: 560px) {
    .script-code { font-size: 12px; }
    .script-editor { font-size: 14px; }
    .script-source { padding: 14px; }
}

.docs-kicker { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--muted); font-size: 14px; }
.docs-kicker a { color: var(--muted); }
.docs-kicker a:hover { color: var(--accent); }
.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; padding: 8px 0 72px; align-items: start; }
.docs-side { position: sticky; top: 88px; max-height: calc(100vh - 108px); overflow-y: auto; padding: 14px; border: 1px solid var(--line-soft); border-radius: var(--round-card); background: var(--card); backdrop-filter: var(--glass); box-shadow: inset 0 1px 0 var(--rim-light); scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.docs-search { width: 100%; height: 38px; padding: 0 12px; border-radius: var(--round); border: 0; background: var(--raised); color: var(--text); font-size: 14px; outline: none; }
.docs-search::placeholder { color: var(--muted); }
.docs-search:focus { box-shadow: inset 0 0 0 1px var(--accent); }
.docs-nav { margin-top: 12px; }
.docs-pages, .docs-sections, .docs-results { list-style: none; margin: 0; padding: 0; }
.docs-pages { display: grid; gap: 2px; }
.docs-page-link { display: block; padding: 6px 10px; border-radius: var(--round); color: var(--text); font-size: 14.5px; }
.docs-page-link:hover { background: var(--raised); }
.docs-page-link[aria-current=page] { background: var(--header); box-shadow: inset 0 1px 0 var(--rim-light); }
.version-picker .docs-page-link small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.docs-sections { margin: 4px 0 8px 10px; padding-left: 8px; border-left: 1px solid var(--line-soft); display: grid; gap: 1px; }
.docs-sections a { display: block; padding: 3px 8px; border-radius: var(--round); color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.docs-sections a:hover { background: var(--raised); color: var(--text); }
.docs-sections a[aria-current] { color: var(--accent); }
.docs-subsections { display: none; list-style: none; margin: 1px 0 4px 10px; padding: 0; }
.docs-sections li.open > .docs-subsections { display: grid; gap: 1px; }
.docs-subsections a { font-size: 13px; padding: 2px 8px; }
.docs-results { margin-top: 10px; display: grid; gap: 2px; }
.docs-result { display: grid; gap: 1px; padding: 6px 10px; border-radius: var(--round); color: var(--text); }
.docs-result:hover, .docs-result:focus-visible { background: var(--raised); }
.docs-result-name { font-size: 14px; overflow-wrap: anywhere; }
.docs-result-name.code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--accent); }
.docs-result small { color: var(--muted); font-size: 12px; }
.docs-empty { padding: 6px 10px; color: var(--muted); font-size: 14px; }
.docs-article { max-width: 860px; padding: 28px 32px; border: 1px solid var(--line); border-radius: var(--round-card); background: var(--card); backdrop-filter: var(--glass); }
.docs-article .docs-h2 { font-size: 23px; font-weight: 500; margin: 40px 0 8px; padding-top: 18px; border-top: 1px solid var(--line-soft); scroll-margin-top: 80px; }
.docs-article .docs-h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.docs-article .docs-h3 { font-size: 17px; scroll-margin-top: 80px; }
.docs-article h2 code, .docs-article h3 code { font-size: .9em; }
.docs-anchor { margin-left: 8px; color: var(--muted); font-weight: 400; opacity: 0; transition: opacity .15s; }
.docs-article h2:hover .docs-anchor, .docs-article h3:hover .docs-anchor, .docs-anchor:focus-visible { opacity: 1; }
.docs-anchor:hover { color: var(--accent); }
.docs-article a:not(.docs-anchor):not(.docs-pager-link) { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
.docs-table { margin: 12px 0 16px; overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--round-card); background: var(--card); scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.docs-table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.docs-table th { text-align: left; font-weight: 500; color: var(--text); background: color-mix(in srgb, var(--raised) 60%, transparent); }
.docs-table th, .docs-table td { padding: 8px 12px; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.docs-table tr:last-child td { border-bottom: 0; }
.docs-table td:first-child { min-width: 120px; }
.docs-table code { overflow-wrap: anywhere; }
.docs-table tr[id] { scroll-margin-top: 90px; }
.docs-flash { animation: docs-flash 1.6s ease-out; }
@keyframes docs-flash { from { background: var(--accent-soft); } to { background: transparent; } }
.docs-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.docs-pager-link { display: grid; gap: 2px; padding: 12px 16px; min-width: 160px; border: 1px solid var(--line-soft); border-radius: var(--round-card); background: var(--card); color: var(--text); }
.docs-pager-link:hover { border-color: var(--line); background: var(--raised); color: var(--text); }
.docs-pager-link small { color: var(--muted); font-size: 12.5px; }
.docs-pager-link.next { text-align: right; }

@media (max-width: 900px) {
    .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 0; }
    .docs-side { position: static; max-height: none; overflow: visible; padding: 10px; }
    .docs-sections { display: none; }
    .docs-pages { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
    .docs-pages::-webkit-scrollbar { display: none; }
    .docs-pages li { flex: none; }
    .docs-page-link { white-space: nowrap; border: 1px solid var(--line-soft); }
    .docs-article .docs-h2, .docs-article .docs-h3, .docs-table tr[id] { scroll-margin-top: 70px; }
    .docs-pager-link { min-width: 0; flex: 1; }
}
