:root {
    color-scheme: dark;
    --bg: #050507;
    --bg-soft: #0a0b0f;
    --surface: #111216;
    --surface-2: #17191f;
    --surface-3: #1d2028;
    --line: #2b2e38;
    --line-soft: rgba(255, 255, 255, 0.08);
    --text: #f5f7fb;
    --muted: #9da3ad;
    --faint: #6f7683;
    --primary: rgb(0, 155, 255);
    --cyan: #7ddcff;
    --blue: rgb(0, 155, 255);
    --green: #3bea57;
    --yellow: #fbbf24;
    --danger: #ec3b47;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --motion-fast: 140ms;
    --motion: 220ms;
    --motion-slow: 360ms;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        var(--bg);
    background-size: 44px 44px;
    color: var(--text);
    font-family: var(--font);
}

body.page-leaving .shell {
    opacity: 0;
    transform: translateY(8px);
}

body.home-page {
    --home-topbar-height: 62px;
    height: 100vh;
    overflow: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(5, 5, 7, 0.82);
}

a {
    color: var(--blue);
    text-decoration: none;
    transition: color var(--motion-fast) ease, border-color var(--motion-fast) ease, background var(--motion-fast) ease;
}

a:hover {
    color: var(--text);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 18px;
    min-height: 62px;
    padding: 0 clamp(18px, 4vw, 46px);
    background: rgba(5, 5, 7, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    transition: background var(--motion) ease, border-color var(--motion) ease;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 900;
    min-width: 0;
}

.brand:hover {
    color: var(--text);
    text-decoration: none;
}

.brand-logo {
    width: 34px;
    height: 34px;
    display: block;
    flex: 0 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 155, 255, 0.2));
    transition: filter var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out);
}

.brand:hover .brand-logo {
    filter: drop-shadow(0 10px 22px rgba(0, 155, 255, 0.34));
    transform: translateY(-1px);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.nav a,
.link-button {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
    transition:
        color var(--motion-fast) ease,
        border-color var(--motion-fast) ease,
        background var(--motion-fast) ease,
        transform var(--motion-fast) ease;
}

.nav a:hover,
.nav a.active,
.link-button:hover {
    border-color: var(--line);
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
}

.nav a:hover,
.link-button:hover {
    transform: translateY(-1px);
}

.shell {
    width: min(1140px, calc(100% - 36px));
    margin: 0 auto;
    padding: 34px 0 68px;
    animation: page-in var(--motion-slow) var(--ease-out) both;
    transition: opacity 180ms ease, transform 180ms ease;
}

.hero,
.auth-layout,
.page-head,
.grid,
.metric-grid {
    display: grid;
    gap: 18px;
}

.hero {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
    align-items: center;
    min-height: calc(100vh - 150px);
}

.landing-hero {
    grid-template-columns: 1fr;
    max-width: 760px;
}

.home-page .topbar {
    position: fixed;
    left: 0;
    right: 0;
    overflow: hidden;
}

.home-page .nav {
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.home-page .nav::-webkit-scrollbar {
    display: none;
}

.home-page .shell {
    width: 100%;
    max-width: none;
    height: 100vh;
    padding: var(--home-topbar-height) clamp(18px, 4vw, 46px) 0;
    overflow: hidden;
}

.home-page .landing-hero {
    position: relative;
    min-height: 100%;
    max-width: none;
    align-items: center;
    padding: clamp(28px, 5vh, 58px) 0 clamp(20px, 4vh, 44px);
}

.auth-layout {
    grid-template-columns: minmax(0, 0.95fr) minmax(330px, 440px);
    align-items: center;
    min-height: calc(100vh - 170px);
}

.grid.two {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
    align-items: start;
}

.page-head {
    grid-template-columns: 1fr auto;
    align-items: end;
    margin-bottom: 20px;
}

.dashboard-head,
.compact-head {
    margin-bottom: 16px;
}

.identity-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.identity-title h1 {
    margin-bottom: 0;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 12px;
    font-size: 4rem;
    line-height: 0.98;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 14px;
    font-size: 1rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

p {
    line-height: 1.55;
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--blue);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.lede {
    max-width: 590px;
    color: #c6ccd6;
    font-size: 1.08rem;
    line-height: 1.65;
}

.muted,
.empty,
small {
    color: var(--muted);
}

.small-text {
    font-size: 0.9rem;
}

.panel,
.table-panel,
.metric,
.notice,
.flash,
.profile-cover {
    background: rgba(17, 18, 22, 0.94);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition:
        border-color var(--motion) ease,
        background var(--motion) ease,
        box-shadow var(--motion) ease,
        transform var(--motion) var(--ease-out);
}

.panel {
    padding: 22px;
    margin-bottom: 18px;
}

.panel:hover,
.table-panel:hover,
.profile-cover:hover {
    border-color: rgba(0, 155, 255, 0.32);
}

.table-panel {
    overflow-x: auto;
}

.notice,
.flash {
    padding: 12px 14px;
    margin-bottom: 14px;
    animation: flash-in var(--motion-slow) var(--ease-out) both;
}

.notice {
    border-color: rgba(0, 155, 255, 0.45);
    background: rgba(0, 155, 255, 0.1);
}

.flash-stack {
    margin-bottom: 18px;
}

.flash.success {
    border-color: rgba(59, 234, 87, 0.5);
}

.flash.danger {
    border-color: rgba(236, 59, 71, 0.55);
}

.flash.warning {
    border-color: rgba(251, 191, 36, 0.55);
}

.actions,
.badge-row,
.section-title,
.comment-top,
.action-row,
.moderation-row,
.search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.section-title,
.comment-top {
    justify-content: space-between;
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid rgba(0, 155, 255, 0.72);
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 155, 255, 0.18);
    transition:
        border-color var(--motion-fast) ease,
        background var(--motion-fast) ease,
        color var(--motion-fast) ease,
        box-shadow var(--motion-fast) ease,
        transform var(--motion-fast) var(--ease-out);
}

.button:hover,
button:hover {
    border-color: var(--text);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(0, 155, 255, 0.24);
}

.button:active,
button:active {
    transform: translateY(0);
    box-shadow: 0 8px 24px rgba(0, 155, 255, 0.16);
}

.button.ghost,
.link-button {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    box-shadow: none;
}

.button.danger {
    border-color: rgba(236, 59, 71, 0.65);
    background: var(--danger);
}

.button.small,
.small {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.85rem;
}

.button.wide {
    width: 100%;
}

.link-button {
    min-height: 34px;
    cursor: pointer;
}

.inline {
    display: inline;
}

.hero-copy {
    padding-left: 4px;
}

.home-page .hero-copy {
    position: relative;
    z-index: 3;
    max-width: min(560px, 46vw);
    text-shadow: 0 6px 28px rgba(0, 0, 0, 0.66);
}

.home-mascot-frame {
    position: fixed;
    right: clamp(-120px, -5vw, -34px);
    bottom: clamp(-44px, -2.6vh, -14px);
    z-index: 1;
    width: fit-content;
    height: clamp(560px, 99vh, 1040px);
    max-width: none;
    pointer-events: none;
    animation: mascot-arrive 640ms var(--ease-out) both;
}

.home-mascot {
    display: block;
    width: auto;
    height: 100%;
    max-width: none;
    /* filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.48)) drop-shadow(0 0 24px rgba(0, 155, 255, 0.16)); */
    transform-origin: 50% 100%;
    animation: mascot-idle 5.2s ease-in-out 700ms infinite;
}

.form-panel,
.settings-form {
    display: grid;
    gap: 16px;
}

.auth-copy {
    max-width: 530px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #08090d;
    color: var(--text);
    font: inherit;
    outline: none;
    transition:
        border-color var(--motion-fast) ease,
        box-shadow var(--motion-fast) ease,
        background var(--motion-fast) ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 155, 255, 0.16);
}

textarea {
    resize: vertical;
}

.code-area {
    width: 100%;
    min-height: 280px;
    padding: 14px;
    border-color: #2f333d;
    background: #101116;
    color: #d4d4d4;
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 0.92rem;
    line-height: 1.55;
    tab-size: 4;
}

.code-area.compact {
    min-height: 190px;
}

.code-area.tall {
    min-height: 520px;
}

.output-area {
    background: #0b0c10;
}

.inline-code {
    padding: 4px 7px;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    background: #08090d;
    color: #c8d0dd;
    overflow-wrap: anywhere;
}

.search-row {
    margin-bottom: 16px;
}

.search-row input {
    flex: 1 1 260px;
}

.captcha-wrap {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.captcha-wrap .h-captcha {
    max-width: 100%;
    transform-origin: center;
}

.metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-bottom: 18px;
}

.metric {
    padding: 18px;
    background: rgba(23, 25, 31, 0.92);
}

.metric:hover {
    transform: translateY(-2px);
}

.metric span {
    display: block;
    color: var(--text);
    font-size: 2rem;
    font-weight: 950;
}

.metric small {
    display: block;
    margin-top: 4px;
}

.metric:nth-child(2n) {
    border-color: rgba(0, 155, 255, 0.28);
}

.metric:nth-child(3n) {
    border-color: rgba(125, 220, 255, 0.26);
}

.details {
    display: grid;
    gap: 10px;
    margin: 0;
}

.details div {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line-soft);
}

.details dt {
    color: var(--muted);
    font-weight: 900;
}

.details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid rgba(0, 155, 255, 0.4);
    border-radius: 999px;
    background: rgba(0, 155, 255, 0.13);
    color: var(--text);
    font-size: 0.76rem;
    font-weight: 900;
}

.badge:nth-child(2n) {
    border-color: rgba(0, 155, 255, 0.35);
    background: rgba(0, 155, 255, 0.1);
}

.badge.warning {
    border-color: rgba(251, 191, 36, 0.42);
    background: rgba(251, 191, 36, 0.12);
}

.badge.danger {
    border-color: rgba(236, 59, 71, 0.5);
    background: rgba(236, 59, 71, 0.13);
}

.badge-img {
    width: 34px;
    height: 34px;
    display: block;
    filter: drop-shadow(0 8px 18px rgba(0, 155, 255, 0.22));
    cursor: help;
    transition: filter var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out);
}

.badge-img:hover {
    filter: drop-shadow(0 10px 22px rgba(0, 155, 255, 0.34));
    transform: translateY(-1px) scale(1.04);
}

.small-badge-img {
    width: 28px;
    height: 28px;
}

.badge-admin-grid {
    margin-bottom: 18px;
}

.badge-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.badge-card,
.badge-assignment-row {
    display: grid;
    align-items: center;
    gap: 12px;
}

.badge-card {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(23, 25, 31, 0.82);
}

.badge-card p {
    margin-bottom: 4px;
}

.badge-preview {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #08090d;
}

.badge-assignment-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
}

.badge-manager {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
}

.permission-grid {
    margin-bottom: 18px;
}

.permission-card p {
    margin-bottom: 8px;
}

.permission-grant-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.permission-manager {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
}

.key {
    display: block;
    margin: 14px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #08090d;
    color: #c8d0dd;
    overflow-wrap: anywhere;
}

.secret-key {
    filter: blur(6px);
    user-select: none;
    transition: filter 160ms ease, color 160ms ease;
}

.secret-key:hover,
.secret-key:focus {
    filter: none;
    user-select: text;
}

.compact-key {
    margin: 0;
}

.script-panel {
    margin-bottom: 18px;
}

.lua-box {
    margin: 0;
    padding: 16px;
    border: 1px solid #2f333d;
    border-radius: 8px;
    background: #1e1e1e;
    color: #d4d4d4;
    overflow-x: auto;
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 0.94rem;
    transition: border-color var(--motion) ease, box-shadow var(--motion) ease;
}

.lua-box:hover {
    border-color: rgba(0, 155, 255, 0.38);
    box-shadow: inset 0 0 0 1px rgba(0, 155, 255, 0.08);
}

.lua-box .secret-key {
    display: inline-block;
    padding: 0 4px;
    border-radius: 4px;
    color: #ce9178;
}

.lua-call {
    color: #dcdcaa;
}

.lua-global {
    color: #4fc1ff;
}

.lua-method {
    color: #dcdcaa;
}

.lua-string {
    color: #ce9178;
}

.lua-punc {
    color: #d4d4d4;
}

.copy-script-button {
    margin-left: auto;
}

.list {
    display: grid;
    gap: 12px;
}

.list-item {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(23, 25, 31, 0.82);
    transition:
        border-color var(--motion-fast) ease,
        background var(--motion-fast) ease,
        transform var(--motion-fast) var(--ease-out);
}

.list-item:hover {
    border-color: rgba(0, 155, 255, 0.28);
    background: rgba(27, 30, 38, 0.9);
    transform: translateY(-1px);
}

.list-item p:last-child {
    margin-bottom: 0;
}

.comment-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
}

.comment-body {
    min-width: 0;
}

.comment-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.text-action {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.text-action:hover {
    color: var(--text);
}

.danger-text:hover {
    color: var(--danger);
}

.comment-avatar {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #07080b;
    color: var(--text);
    font-weight: 950;
    transition: border-color var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out);
}

.comment-avatar:hover {
    border-color: rgba(0, 155, 255, 0.42);
    transform: scale(1.03);
}

.comment-avatar img,
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.small-avatar,
.table-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
}

.user-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 900;
}

.comment-form {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.moderation-row,
.action-row {
    margin-top: 12px;
}

.moderation-row input,
.action-row input {
    flex: 1 1 180px;
}

.action-row select {
    flex: 0 1 150px;
    width: auto;
}

.admin-script-grid {
    margin-bottom: 18px;
}

.editor-panel {
    display: grid;
    gap: 14px;
}

.danger-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.danger-zone h2 {
    margin-bottom: 6px;
}

.danger-zone p {
    margin-bottom: 0;
}

button:disabled,
.button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
    box-shadow: none;
}

.obfuscator-form {
    margin-bottom: 18px;
}

.obfuscator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 18px;
    align-items: start;
}

.options-panel {
    position: sticky;
    top: 84px;
    display: grid;
    gap: 14px;
}

.checkbox-grid {
    display: grid;
    gap: 10px;
    padding-top: 4px;
}

.checkbox-grid label {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 9px;
    color: var(--text);
    font-size: 0.86rem;
}

.checkbox-grid input[type="checkbox"] {
    width: 16px;
    min-height: 16px;
    height: 16px;
    flex: 0 0 auto;
    accent-color: var(--primary);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px;
    border-bottom: 1px solid var(--line-soft);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.025);
}

td {
    transition: background var(--motion-fast) ease;
}

.setting-row {
    grid-template-columns: minmax(190px, 0.55fr) minmax(220px, 1fr);
    align-items: center;
}

.bio {
    white-space: pre-wrap;
}

.centered {
    max-width: 560px;
    margin-inline: auto;
    text-align: center;
}

.profile-panels {
    margin-bottom: 18px;
}

.about-panel {
    width: 100%;
}

.about-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    margin-bottom: 14px;
}

.about-header h2 {
    margin-bottom: 0;
}

.bio-card {
    min-height: 88px;
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
}

.bio-card .bio {
    margin-bottom: 0;
    color: #dce6f1;
}

.profile-cover {
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
}

.cover-art {
    height: 150px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(0, 155, 255, 0.34), transparent 46%),
        linear-gradient(45deg, rgba(0, 155, 255, 0.28), transparent 52%),
        #15161b;
}

.profile-main {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
}

.avatar {
    display: grid;
    place-items: center;
    width: 104px;
    height: 104px;
    flex: 0 0 auto;
    border: 4px solid var(--surface);
    border-radius: 50%;
    overflow: hidden;
    background: #07080b;
    color: var(--text);
    font-size: 2.5rem;
    font-weight: 950;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
    transition:
        border-color var(--motion) ease,
        box-shadow var(--motion) ease,
        transform var(--motion) var(--ease-out);
}

.avatar:hover {
    border-color: rgba(0, 155, 255, 0.34);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.52);
    transform: translateY(-2px);
}

.avatar-large {
    width: 108px;
    height: 108px;
    border-radius: 50%;
}

.edit-profile-panel {
    width: fit-content;
    margin-left: auto;
}

.edit-profile-panel summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 900;
    cursor: pointer;
    margin-left: auto;
    transition:
        border-color var(--motion-fast) ease,
        background var(--motion-fast) ease,
        transform var(--motion-fast) var(--ease-out);
}

.edit-profile-panel summary:hover {
    transform: translateY(-1px);
}

.edit-profile-panel summary::-webkit-details-marker {
    display: none;
}

.edit-profile-panel[open] summary {
    border-color: rgba(0, 155, 255, 0.5);
    background: rgba(255, 255, 255, 0.03);
}

.edit-profile-panel[open] {
    grid-column: 1 / -1;
    width: 100%;
}

.edit-profile-panel form {
    width: 100%;
    margin-top: 10px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(17, 18, 22, 0.94);
    box-shadow: var(--shadow);
}

.avatar-upload-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.cursor-tooltip {
    position: fixed;
    z-index: 1000;
    max-width: 260px;
    padding: 7px 9px;
    border: 1px solid rgba(0, 155, 255, 0.42);
    border-radius: 8px;
    background: rgba(7, 9, 13, 0.96);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 900;
    pointer-events: none;
    opacity: 0;
    transform: translate(12px, 14px);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.36);
    transition: opacity var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out);
}

.cursor-tooltip.visible {
    opacity: 1;
    transform: translate(12px, 10px);
}

@keyframes page-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes flash-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mascot-arrive {
    from {
        opacity: 0;
        transform: translate(18px, 24px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
}

@keyframes mascot-idle {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    35% {
        transform: translateY(-7px) rotate(-1.2deg);
    }

    68% {
        transform: translateY(-2px) rotate(1deg);
    }
}

@media (max-width: 900px) {
    h1 {
        font-size: 3rem;
    }

    .hero,
    .auth-layout,
    .grid.two,
    .page-head,
    .obfuscator-layout {
        grid-template-columns: 1fr;
    }

    .options-panel {
        position: static;
    }

    .auth-layout,
    .hero {
        min-height: auto;
    }

    .page-head {
        align-items: start;
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .details div,
    .setting-row {
        grid-template-columns: 1fr;
    }

    .home-page .hero-copy {
        max-width: min(520px, 56vw);
    }

    .home-mascot-frame {
        right: clamp(-170px, -14vw, -64px);
        bottom: clamp(-44px, -3.2vh, -16px);
        height: clamp(520px, 96vh, 860px);
    }
}

@media (max-width: 560px) {
    body.home-page {
        --home-topbar-height: 116px;
    }

    .topbar {
        position: static;
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .nav {
        justify-content: flex-start;
    }

    .shell {
        width: min(100% - 22px, 1140px);
        padding-top: 22px;
    }

    h1 {
        font-size: 2.35rem;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .button,
    button {
        width: 100%;
    }

    .nav .button,
    .nav button,
    .link-button,
    .text-action {
        width: auto;
    }

    .profile-main {
        align-items: flex-start;
        flex-direction: column;
    }

    .danger-zone {
        align-items: stretch;
        flex-direction: column;
    }

    .code-area.tall {
        min-height: 380px;
    }

    .about-header {
        grid-template-columns: 1fr;
    }

    .captcha-wrap .h-captcha {
        transform: scale(0.92);
    }

    .home-page .shell {
        padding-inline: 11px;
    }

    .home-page .landing-hero {
        align-items: start;
        padding: clamp(24px, 6vh, 44px) 0 0;
    }

    .home-page .hero-copy {
        max-width: 100%;
        padding-left: 0;
    }

    .home-page .lede {
        max-width: 19rem;
    }

    .home-page .actions {
        max-width: 260px;
    }

    .home-mascot-frame {
        right: clamp(-130px, -24vw, -62px);
        bottom: -28px;
        height: clamp(470px, 91vh, 700px);
        opacity: 0.88;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }

    body.page-leaving .shell,
    .button:hover,
    button:hover,
    .nav a:hover,
    .link-button:hover,
    .metric:hover,
    .badge-img:hover,
    .list-item:hover,
    .comment-avatar:hover,
    .avatar:hover,
    .edit-profile-panel summary:hover {
        transform: none;
    }

    .home-mascot-frame,
    .home-mascot {
        animation: none !important;
    }
}
