:root {
    --theme-navy: #043873;
    --theme-navy-2: #0b4f9e;
    --theme-blue: #4f9cf9;
    --theme-blue-2: #2f7fe8;
    --theme-gold: #ffe492;
    --theme-gold-2: #f4c95d;
    --theme-bg: #f4f8ff;
    --theme-bg-soft: #eef5ff;
    --theme-panel: #ffffff;
    --theme-line: #d8e6f8;
    --theme-line-strong: #c8dbf5;
    --theme-text: #17355f;
    --theme-text-soft: #5f748f;
    --theme-green: #2b9964;
    --theme-shadow: 0 16px 36px rgba(4, 56, 115, 0.10);
    --theme-shadow-hover: 0 20px 42px rgba(4, 56, 115, 0.16);
    --danger-bg: #fff1f3;
    --danger-line: #f2b8c0;
    --danger-text: #8a2940;
    --info-bg: #ecf7ff;
    --info-line: #a8d4f4;
    --info-text: #17547e;
    --focus: #ffe492;
    --radius: 16px;
    --radius-small: 10px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 8% 18%, rgba(79, 156, 249, 0.13), transparent 27rem),
        radial-gradient(circle at 91% 74%, rgba(255, 228, 146, 0.18), transparent 31rem),
        linear-gradient(180deg, #f8fbff 0%, #edf4ff 100%);
    color: var(--theme-text);
    font-family: 'National Park', Tahoma, Verdana, Arial, sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.45;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button,
summary,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.login-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--theme-line-strong);
    background: rgba(247, 250, 255, 0.94);
    box-shadow: var(--theme-shadow);
}

/* Header deliberately mirrors the signed-in application shell. */
.login-header,
.app-header {
    position: sticky;
    top: 0;
    z-index: 40;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    color: #fff;
    background: linear-gradient(180deg, var(--theme-navy) 0%, var(--theme-navy-2) 100%);
    border-bottom: 1px solid #022a59;
}

.login-header-top,
.app-header-top,
.login-header-bottom,
.app-header-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 14px;
}

.login-header-top {
    min-height: 76px;
}

.login-header-bottom,
.app-header-bottom {
    min-height: 48px;
    color: var(--theme-text);
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    border-bottom: 1px solid var(--theme-line);
}

.brand-area,
.primary-nav,
.profile-nav,
.app-header-right,
.public-user-summary {
    display: flex;
    align-items: center;
}

.brand-area {
    min-width: 0;
    gap: 10px;
}

.brand-mark,
.brand-logo {
    min-width: 110px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
}

.brand-mark img,
.brand-logo img {
    display: block;
    width: auto;
    height: 72px;
    max-width: 270px;
    object-fit: contain;
}

.brand-fallback,
.brand-logo-fallback {
    display: none;
    min-width: 88px;
    height: 50px;
    padding: 0 14px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(180deg, var(--theme-blue) 0%, var(--theme-blue-2) 100%);
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}

.primary-nav,
.profile-nav {
    gap: 2px;
    flex-wrap: wrap;
}

.nav-pill,
.secondary-nav-pill {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #eef5ff;
    background: transparent;
    box-shadow: none;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.nav-pill:hover,
.secondary-nav-pill:hover,
.nav-pill.is-active,
.secondary-nav-pill.is-active {
    background: rgba(255, 255, 255, 0.14);
}

.nav-pill:hover,
.secondary-nav-pill:hover {
    transform: translateY(-1px);
}

.nav-pill.is-active {
    position: relative;
    background: rgba(255, 255, 255, 0.16);
}

.nav-pill.is-active::after {
    content: '';
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 3px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--theme-gold), #fff3b7);
}

.nav-icon {
    font-size: 15px;
    line-height: 1;
    filter: saturate(0.9);
}

.public-profile-nav {
    justify-content: flex-end;
    flex: 0 0 auto;
}

.join-pill {
    color: #273245;
    background: linear-gradient(180deg, var(--theme-gold) 0%, var(--theme-gold-2) 100%);
    border-color: rgba(255, 228, 146, 0.8);
    box-shadow: 0 8px 18px rgba(255, 228, 146, 0.19);
}

.join-pill:hover {
    color: #273245;
    background: linear-gradient(180deg, #ffecaa 0%, #f7cf68 100%);
}

.community-online {
    position: relative;
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 3px;
    border: 1px solid rgba(255, 228, 146, 0.42);
    border-radius: 999px;
    background: rgba(255, 228, 146, 0.12);
    color: var(--theme-gold);
    font-size: 18px;
}

.community-online-dot {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 9px;
    height: 9px;
    border: 2px solid var(--theme-navy-2);
    border-radius: 50%;
    background: #6ed58d;
    box-shadow: 0 0 0 2px rgba(110, 213, 141, 0.15);
}

.login-header-note {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--theme-text-soft);
    font-size: 14px;
    font-weight: 700;
}

.public-user-summary {
    justify-content: flex-end;
    gap: 9px;
    margin-left: auto;
}

.avatar,
.public-avatar {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid var(--theme-line-strong);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 12px rgba(4, 56, 115, 0.10);
}

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

.public-user-copy {
    display: grid;
    line-height: 1.1;
}

.public-user-copy strong {
    color: var(--theme-text);
    font-size: 15px;
}

.public-user-copy span {
    margin-top: 3px;
    color: var(--theme-text-soft);
    font-size: 12px;
}

.public-register-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid var(--theme-line-strong);
    border-radius: 999px;
    color: var(--theme-navy);
    background: var(--theme-bg-soft);
    font-size: 13px;
    font-weight: 800;
    transition: transform 0.15s ease, background 0.15s ease;
}

.public-register-link:hover {
    transform: translateX(2px);
    background: #e2efff;
}

.page-shell {
    width: min(1500px, 100%);
    margin: 0 auto;
    padding: 18px;
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(370px, 470px);
    align-items: start;
    gap: 18px;
}

.hero-panel,
.auth-panel,
.mini-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--theme-line);
    border-radius: var(--radius);
    background: var(--theme-panel);
    box-shadow: 0 12px 28px rgba(4, 56, 115, 0.06);
}

.hero-panel {
    min-height: 590px;
    padding: 24px;
    isolation: isolate;
}

.hero-panel::before,
.hero-panel::after {
    content: '';
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
}

.hero-panel::before {
    width: 280px;
    height: 280px;
    right: -110px;
    top: 30px;
    background: radial-gradient(circle, rgba(79, 156, 249, 0.18), transparent 68%);
}

.hero-panel::after {
    width: 240px;
    height: 240px;
    left: -100px;
    bottom: -80px;
    background: radial-gradient(circle, rgba(255, 228, 146, 0.25), transparent 68%);
}

.kicker {
    margin: -24px -24px 22px;
    padding: 11px 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--theme-navy) 0%, var(--theme-navy-2) 100%);
    border-bottom: 1px solid #0a4d9a;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.015em;
}

.auth-panel .kicker,
.mini-card .kicker {
    margin: -20px -20px 18px;
}

.hero-panel h1 {
    max-width: 790px;
    color: var(--theme-text);
    font-size: clamp(36px, 4.2vw, 62px);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.hero-panel h1 .accent-word {
    position: relative;
    display: inline-block;
    color: var(--theme-blue-2);
}

.hero-panel h1 .accent-word::after {
    content: '';
    position: absolute;
    left: 2px;
    right: 0;
    bottom: -3px;
    height: 7px;
    z-index: -1;
    border-radius: 999px;
    background: rgba(255, 228, 146, 0.8);
    transform: rotate(-1deg);
}

.hero-copy {
    max-width: 780px;
    margin-top: 16px;
    color: var(--theme-text-soft);
    font-size: clamp(17px, 1.5vw, 21px);
}

.chat-burst {
    margin-top: 26px;
    display: grid;
    gap: 9px;
    overflow: hidden;
    border: 1px solid var(--theme-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 30px rgba(4, 56, 115, 0.08);
}

.mini-chat-head {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    color: var(--theme-text-soft);
    background: var(--theme-bg-soft);
    border-bottom: 1px solid var(--theme-line);
    font-size: 13px;
    font-weight: 700;
}

.mini-chat-head > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--theme-text);
}

.mini-live-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    border-radius: 50%;
    background: #58c47a;
    box-shadow: 0 0 0 4px rgba(88, 196, 122, 0.13);
}

.bubble-line {
    width: calc(100% - 18px);
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 9px;
    padding: 9px 12px;
    border: 1px solid #e2ebf8;
    border-radius: 12px;
    color: #263f61;
    background: #f8fbff;
    font-size: 15px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bubble-line:last-child {
    margin-bottom: 9px;
}

.bubble-line:hover {
    transform: translateX(3px);
    box-shadow: 0 8px 18px rgba(4, 56, 115, 0.08);
}

.bubble-line strong {
    display: block;
    color: var(--theme-text);
    font-size: 13px;
}

.bubble-avatar {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--theme-blue), var(--theme-blue-2));
    font-size: 14px;
    font-weight: 800;
}

.bubble-green .bubble-avatar {
    background: linear-gradient(135deg, #69c793, #2b9964);
}

.bubble-gold .bubble-avatar {
    color: #5b4200;
    background: linear-gradient(135deg, var(--theme-gold), var(--theme-gold-2));
}

.simple-features {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.feature-chip {
    min-height: 138px;
    padding: 14px;
    border: 1px solid var(--theme-line);
    border-radius: 14px;
    background: linear-gradient(180deg, #fff 0%, #f7faff 100%);
    box-shadow: 0 10px 22px rgba(4, 56, 115, 0.04);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.feature-chip:hover {
    transform: translateY(-3px);
    border-color: #b9d5f6;
    box-shadow: var(--theme-shadow-hover);
}

.feature-chip .emoji {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 9px;
    border: 1px solid var(--theme-line);
    border-radius: 12px;
    background: var(--theme-bg-soft);
    font-size: 19px;
}

.feature-chip strong {
    display: block;
    margin-bottom: 5px;
    color: var(--theme-text);
    font-size: 16px;
}

.feature-chip span:not(.emoji) {
    display: block;
    color: var(--theme-text-soft);
    font-size: 14px;
}

.community-strip {
    margin-top: 16px;
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 11px;
    border: 1px solid var(--theme-line);
    border-radius: 14px;
    background: var(--theme-bg-soft);
}

.stat-pill {
    color: var(--theme-text);
    font-size: 14px;
    font-weight: 800;
}

.member-faces {
    display: flex;
    align-items: center;
    padding-left: 7px;
}

.member-face {
    width: 36px;
    height: 36px;
    margin-left: -7px;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    border: 3px solid #fff;
    border-radius: 12px;
    background: #dcecff;
    color: var(--theme-navy);
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 0 0 1px var(--theme-line-strong);
    transition: transform 0.15s ease;
}

.member-face:hover {
    z-index: 2;
    transform: translateY(-3px) rotate(-2deg);
}

.member-face img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.auth-stack {
    display: grid;
    gap: 18px;
}

.auth-panel,
.mini-card {
    padding: 20px;
}

.auth-panel h2,
.mini-card h3 {
    color: var(--theme-text);
    line-height: 1.12;
}

.auth-panel h2 {
    font-size: 31px;
}

.mini-card h3 {
    font-size: 22px;
}

.panel-copy {
    margin-top: 7px;
    color: var(--theme-text-soft);
    font-size: 15px;
}

.form-grid {
    margin-top: 18px;
    display: grid;
    gap: 14px;
}

.field-group {
    display: grid;
    gap: 6px;
}

.field-group label {
    color: var(--theme-text);
    font-size: 14px;
    font-weight: 800;
}

.field-group input {
    width: 100%;
    min-height: 46px;
    padding: 9px 12px;
    color: var(--theme-text);
    border: 1px solid var(--theme-line-strong);
    border-radius: 10px;
    background: #f9fbff;
    box-shadow: inset 0 1px 2px rgba(4, 56, 115, 0.05);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.field-group input:hover {
    border-color: #9fc4ef;
    background: #fff;
}

.field-group input:focus {
    border-color: var(--theme-blue-2);
    outline: 3px solid rgba(79, 156, 249, 0.17);
    outline-offset: 1px;
    background: #fff;
}

.button-row,
.join-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.primary-btn,
.secondary-btn {
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 17px;
    border: 1px solid #efc44c;
    border-radius: 10px;
    cursor: pointer;
    color: #273245;
    background: linear-gradient(180deg, var(--theme-gold) 0%, var(--theme-gold-2) 100%);
    box-shadow: 0 10px 20px rgba(255, 228, 146, 0.30);
    font-size: 16px;
    font-weight: 800;
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.primary-btn:hover,
.secondary-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 13px 24px rgba(255, 228, 146, 0.38);
}

.secondary-btn {
    color: #fff;
    border-color: #276dc7;
    background: linear-gradient(180deg, var(--theme-blue) 0%, var(--theme-blue-2) 100%);
    box-shadow: 0 10px 20px rgba(79, 156, 249, 0.24);
}

.auth-panel .primary-btn,
.join-actions .primary-btn {
    min-width: 138px;
}

.error,
.info {
    margin-top: 14px;
    padding: 11px 12px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 14px;
}

.error {
    color: var(--danger-text);
    border-color: var(--danger-line);
    background: var(--danger-bg);
}

.info {
    color: var(--info-text);
    border-color: var(--info-line);
    background: var(--info-bg);
}

.reset-details {
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid var(--theme-line);
    border-radius: 12px;
    background: #fff;
}

.reset-summary {
    min-height: 43px;
    display: flex;
    align-items: center;
    padding: 9px 12px;
    cursor: pointer;
    color: var(--theme-text);
    background: var(--theme-bg-soft);
    border-bottom: 1px solid transparent;
    font-size: 14px;
    font-weight: 800;
    list-style-position: inside;
}

.reset-summary:hover {
    background: #e3efff;
}

.reset-details[open] .reset-summary {
    border-bottom-color: var(--theme-line);
}

.reset-body {
    padding: 13px;
}

.join-actions {
    margin-top: 15px;
}

.registered-only-note {
    margin-top: 13px;
    padding-top: 11px;
    border-top: 1px solid var(--theme-line);
    color: var(--theme-text-soft);
    font-size: 13px;
}

.seo-links {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--theme-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
}

.seo-links a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border: 1px solid var(--theme-line);
    border-radius: 999px;
    background: #fff;
    color: var(--theme-navy);
    font-size: 13px;
    font-weight: 700;
    transition: transform 0.15s ease, background 0.15s ease;
}

.seo-links a:hover {
    transform: translateY(-1px);
    background: var(--theme-bg-soft);
}

/* Matches the signed-in room-tab bar. */
.login-status-bar {
    min-height: 48px;
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 10px 0;
    color: #eef5ff;
    background: linear-gradient(180deg, #05346b 0%, #032752 100%);
    border-top: 1px solid #022149;
    font-size: 13px;
}

.login-status-state,
.login-status-bar > span {
    min-height: 31px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.login-status-state {
    padding: 0 13px;
    border: 1px solid var(--theme-line-strong);
    border-radius: 12px 12px 0 0;
    color: var(--theme-text);
    background: linear-gradient(180deg, #fff 0%, #eef5ff 100%);
    font-weight: 800;
}

.login-status-bar > span:last-child {
    color: rgba(238, 245, 255, 0.78);
}

.login-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #63d484;
    box-shadow: 0 0 0 3px rgba(99, 212, 132, 0.15);
}

.server-mod-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(8, 18, 28, 0.55);
    backdrop-filter: blur(4px);
}

.server-mod-modal-card {
    width: min(520px, calc(100vw - 36px));
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--theme-line-strong);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 58px rgba(7, 18, 30, 0.30);
}

.server-mod-modal-card h2 {
    margin: -20px -20px 16px;
    padding: 12px 15px;
    color: #fff;
    background: linear-gradient(180deg, var(--theme-navy) 0%, var(--theme-navy-2) 100%);
    border-bottom: 1px solid #022a59;
    font-size: 23px;
}

.server-mod-modal-card p {
    margin-bottom: 17px;
    color: var(--theme-text-soft);
}

@media (max-width: 1260px) {
    .public-primary-nav .nav-icon {
        display: none;
    }

    .nav-pill,
    .secondary-nav-pill {
        padding-inline: 12px;
        font-size: 15px;
    }
}

@media (max-width: 1080px) {
    .login-header-top {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .brand-area {
        width: 100%;
    }

    .public-primary-nav {
        flex: 1 1 auto;
    }

    .public-profile-nav {
        width: 100%;
        justify-content: flex-end;
    }

    .page-shell {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        min-height: auto;
    }

    .auth-stack {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
    }
}

@media (max-width: 760px) {
    body {
        font-size: 16px;
    }

    .login-header {
        position: relative;
    }

    .login-header-top,
    .login-header-bottom {
        padding-inline: 10px;
    }

    .brand-area {
        align-items: flex-start;
        flex-direction: column;
    }

    .brand-mark,
    .brand-logo {
        height: 52px;
    }

    .brand-mark img,
    .brand-logo img {
        height: 60px;
        max-width: 68vw;
    }

    .public-primary-nav {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 5px;
    }

    .nav-pill {
        min-width: 0;
        padding: 0 7px;
        font-size: 13px;
    }

    .nav-pill:nth-of-type(5),
    .nav-pill:nth-of-type(6),
    .nav-pill:nth-of-type(7) {
        grid-column: span 1;
    }

    .community-online {
        display: none;
    }

    .public-profile-nav {
        justify-content: stretch;
    }

    .public-profile-nav .secondary-nav-pill {
        flex: 1 1 0;
    }

    .login-header-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .public-user-summary {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .public-register-link {
        margin-left: auto;
    }

    .page-shell {
        padding: 10px;
    }

    .hero-panel,
    .auth-panel,
    .mini-card {
        border-radius: 14px;
    }

    .hero-panel {
        padding: 20px;
    }

    .kicker {
        margin: -20px -20px 18px;
    }

    .simple-features,
    .auth-stack {
        grid-template-columns: 1fr;
    }

    .hero-panel h1 {
        font-size: clamp(32px, 10vw, 46px);
    }

    .mini-chat-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .login-status-bar {
        min-height: 54px;
        align-items: flex-start;
        flex-direction: column;
        gap: 0;
        padding-bottom: 5px;
    }
}

@media (max-width: 470px) {
    .public-primary-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .nav-pill {
        font-size: 12px;
    }

    .login-header-note {
        font-size: 13px;
    }

    .public-user-copy span {
        display: none;
    }

    .hero-panel h1 {
        letter-spacing: -0.035em;
    }

    .bubble-line {
        align-items: flex-start;
    }

    .button-row,
    .join-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .primary-btn,
    .secondary-btn,
    .join-actions a {
        width: 100%;
    }

    .seo-links {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .seo-links a {
        justify-content: center;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Registration page shares the public application shell and adds only form-specific details. */
.register-page-shell {
    grid-template-columns: minmax(0, 1fr) minmax(420px, 510px);
}

.register-hero {
    min-height: 720px;
}

.register-auth-stack {
    align-content: start;
}

.register-panel .form-grid {
    gap: 13px;
}

.field-group select {
    width: 100%;
    min-height: 46px;
    padding: 9px 38px 9px 12px;
    color: var(--theme-text);
    border: 1px solid var(--theme-line-strong);
    border-radius: 10px;
    background-color: #f9fbff;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--theme-navy) 50%),
        linear-gradient(135deg, var(--theme-navy) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 20px,
        calc(100% - 13px) 20px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    appearance: none;
    box-shadow: inset 0 1px 2px rgba(4, 56, 115, 0.05);
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.field-group select:hover {
    border-color: #9fc4ef;
    background-color: #fff;
}

.field-group select:focus {
    border-color: var(--theme-blue-2);
    outline: 3px solid rgba(79, 156, 249, 0.17);
    outline-offset: 1px;
    background-color: #fff;
}

.field-hint {
    color: var(--theme-text-soft);
    font-size: 12px;
    line-height: 1.35;
}

.field-hint.pending {
    color: #8a6500;
}

.field-hint.success {
    color: var(--theme-green);
    font-weight: 700;
}

.field-hint.error {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--danger-text);
    background: transparent;
    font-weight: 700;
}

.register-password-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.referral-banner {
    margin-top: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid #efd67b;
    border-radius: 12px;
    color: #594710;
    background: linear-gradient(180deg, #fff9df 0%, #fff4c5 100%);
}

.referral-banner-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(89, 71, 16, 0.12);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.7);
}

.referral-banner strong,
.referral-banner span {
    display: block;
}

.referral-banner strong {
    font-size: 14px;
}

.referral-banner div > span {
    margin-top: 3px;
    font-size: 12px;
}

.registration-promise {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 11px;
    border: 1px solid var(--theme-line);
    border-radius: 10px;
    color: var(--theme-text-soft);
    background: var(--theme-bg-soft);
    font-size: 12px;
}

.register-button-row {
    margin-top: 2px;
}

.register-login-btn {
    min-width: auto;
    text-align: center;
}

.register-community-strip {
    justify-content: space-between;
}

@media (max-width: 1080px) {
    .register-page-shell {
        grid-template-columns: 1fr;
    }

    .register-hero {
        min-height: auto;
    }

    .register-auth-stack {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
    }
}

@media (max-width: 760px) {
    .register-auth-stack,
    .register-password-grid {
        grid-template-columns: 1fr;
    }

    .register-community-strip {
        justify-content: flex-start;
    }
}
