:root {
    --oto-bg: #f4f7fb;
    --oto-surface: rgba(255, 255, 255, 0.88);
    --oto-surface-strong: #ffffff;
    --oto-surface-soft: #eef4fa;
    --oto-ink: #17191f;
    --oto-muted: #5e6778;
    --oto-quiet: #8690a2;
    --oto-line: rgba(188, 198, 212, 0.72);
    --oto-line-strong: rgba(158, 171, 189, 0.9);
    --oto-accent: #2f7fa7;
    --oto-accent-strong: #1d5f83;
    --oto-accent-soft: rgba(47, 127, 167, 0.1);
    --oto-accent-warm: #dd7a5a;
    --oto-shadow-soft: 0 18px 48px rgba(19, 33, 48, 0.08);
    --oto-shadow-header: 0 10px 30px rgba(19, 33, 48, 0.05);
    --oto-shell-width: 1180px;
}

body.oto-ui-page {
    min-height: 100vh;
    color: var(--oto-ink);
    background:
        radial-gradient(circle at top left, rgba(84, 182, 220, 0.12), transparent 36%),
        radial-gradient(circle at top right, rgba(237, 174, 221, 0.16), transparent 34%),
        linear-gradient(180deg, #f7f9fc 0%, var(--oto-bg) 52%, #edf2f8 100%);
}

[hidden] {
    display: none !important;
}

.oto-shell {
    width: min(var(--oto-shell-width), calc(100% - 40px));
    margin: 0 auto;
}

.oto-header {
    position: sticky;
    top: 0;
    z-index: 120;
    background: rgba(247, 249, 252, 0.8);
    border-bottom: 1px solid var(--oto-line);
    backdrop-filter: blur(18px);
    box-shadow: var(--oto-shadow-header);
}

.oto-header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 14px 18px;
    flex-wrap: wrap;
    padding: 14px 0;
}

.oto-header-utility {
    display: flex;
    align-items: center;
    gap: 10px;
}

.oto-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.oto-brand-wordmark {
    max-width: min(100%, 320px);
    width: auto;
    height: 34px;
    display: block;
}

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

.oto-nav-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    color: var(--oto-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.oto-nav-link:hover,
.oto-nav-link:focus-visible {
    color: var(--oto-ink);
    background: rgba(255, 255, 255, 0.64);
    border-color: var(--oto-line);
    transform: translateY(-1px);
    outline: none;
}

.oto-nav-link.is-current {
    color: var(--oto-accent-strong);
    background: var(--oto-accent-soft);
    border-color: rgba(47, 127, 167, 0.22);
}

.oto-actions {
    margin-left: auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.oto-btn,
.oto-chip,
.oto-user-chip {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.oto-btn:hover,
.oto-btn:focus-visible,
.oto-chip:hover,
.oto-chip:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.oto-btn-primary {
    color: #ffffff;
    background: var(--oto-accent);
    border: 1px solid var(--oto-accent);
    box-shadow: 0 10px 22px rgba(47, 127, 167, 0.16);
}

.oto-btn-primary:hover,
.oto-btn-primary:focus-visible {
    background: var(--oto-accent-strong);
    border-color: var(--oto-accent-strong);
    box-shadow: 0 14px 28px rgba(29, 95, 131, 0.2);
}

.oto-btn-secondary {
    color: var(--oto-accent-strong);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--oto-line-strong);
}

.oto-btn-secondary:hover,
.oto-btn-secondary:focus-visible {
    background: #ffffff;
    border-color: var(--oto-accent);
}

.oto-btn-discord {
    color: #ffffff;
    background: #5865f2;
    border: 1px solid #5865f2;
    box-shadow: 0 10px 22px rgba(88, 101, 242, 0.16);
}

.oto-btn-discord:hover,
.oto-btn-discord:focus-visible {
    background: #4752c4;
    border-color: #4752c4;
}

.oto-chip {
    color: var(--oto-accent-strong);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--oto-line-strong);
}

.oto-chip-accent {
    background: rgba(47, 127, 167, 0.08);
    border-color: rgba(47, 127, 167, 0.22);
}

.oto-user-chip {
    padding: 5px 14px 5px 5px;
    color: var(--oto-ink);
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid var(--oto-line);
    box-shadow: 0 10px 24px rgba(19, 33, 48, 0.08);
}

.oto-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex: 0 0 auto;
    box-shadow: 0 0 0 1px rgba(188, 198, 212, 0.88);
}

.oto-user-name {
    max-width: 152px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.oto-page-intro {
    width: min(var(--oto-shell-width), calc(100% - 40px));
    margin: 28px auto 18px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.oto-page-intro-copy {
    display: grid;
    gap: 8px;
    max-width: 760px;
}

.oto-page-kicker {
    color: var(--oto-quiet);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.oto-page-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.03;
}

.oto-page-copy {
    color: var(--oto-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.oto-page-intro-actions,
.oto-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.oto-surface-panel {
    background: var(--oto-surface);
    border: 1px solid var(--oto-line);
    border-radius: 8px;
    box-shadow: var(--oto-shadow-soft);
    backdrop-filter: blur(16px);
}

.oto-home-main {
    padding-top: 0;
}

.oto-home-hero {
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 56px 0 64px;
}

.oto-hero-copy {
    max-width: 720px;
    color: var(--oto-muted);
    font-size: 1.08rem;
    line-height: 1.7;
    margin: 0 auto;
}

.oto-home-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 920px) {
    .oto-nav {
        order: 3;
        width: 100%;
    }

    .oto-page-intro {
        align-items: start;
    }
}

@media (max-width: 720px) {
    .oto-shell,
    .oto-page-intro {
        width: min(var(--oto-shell-width), calc(100% - 28px));
    }

    .oto-header-inner {
        gap: 12px;
        padding: 12px 0;
    }

    .oto-brand-wordmark {
        height: 28px;
    }

    .oto-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
        order: 4;
    }

    .oto-actions > * {
        flex: 1 1 auto;
        justify-content: center;
    }

    .oto-user-chip {
        justify-content: flex-start;
    }

    .oto-page-intro {
        margin-top: 22px;
        margin-bottom: 14px;
        gap: 14px;
    }

    .oto-page-copy {
        font-size: 0.96rem;
        line-height: 1.55;
    }

    .oto-page-intro-actions,
    .oto-hero-actions {
        width: 100%;
    }

    .oto-page-intro-actions > *,
    .oto-hero-actions > * {
        flex: 1 1 calc(50% - 10px);
        justify-content: center;
    }

    .oto-surface-panel {
        border-radius: 20px;
    }

    .oto-home-hero {
        min-height: calc(100vh - 154px);
        padding: 32px 0 48px;
    }
}

@media (max-width: 520px) {
    .oto-header-inner {
        align-items: start;
    }

    .oto-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .oto-nav::-webkit-scrollbar {
        display: none;
    }

    .oto-home-links,
    .oto-page-intro-actions,
    .oto-hero-actions {
        width: 100%;
    }

    .oto-home-links > *,
    .oto-page-intro-actions > *,
    .oto-hero-actions > * {
        flex: 1 1 100%;
        justify-content: center;
    }
}
