/* Shared public sign-in surface. Uses the site's existing Lemon tokens. */
.lemon-auth-page,
.lemon-auth-overlay {
    --entry-surface: #fff;
    --entry-text: var(--ui-text, #22271e);
    --entry-muted: #697064;
    --entry-border: #dce1d6;
    --entry-accent: var(--ui-accent, #dce96b);
    --entry-ink: var(--ui-accent-ink, #2b3518);
    color: var(--entry-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color-scheme: light;
}
.lemon-auth-page,
.lemon-auth-page * ,
.lemon-auth-overlay * { box-sizing: border-box; }
body.lemon-auth-page {
    display: block;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    background: #fff;
}
.lemon-auth-page .auth-entry-main {
    width: min(100%, 460px);
    margin: 0 auto;
    padding: 68px 24px 48px;
}
.lemon-auth-page .auth-entry-back {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 24px 0 0 28px;
    padding: 8px 2px;
    color: var(--entry-muted);
    font-size: 14px;
    text-decoration: none;
}
.auth-entry-header { text-align: center; margin: 0 0 36px; }
.auth-entry-header img { width: 58px; height: 58px; object-fit: contain; margin: 0 0 20px; }
.auth-entry-header h1,
.auth-entry-header h2 { margin: 0; color: var(--entry-text); font-size: 28px; font-weight: 760; line-height: 1.35; letter-spacing: -.04em; }
.auth-entry-header p { margin: 12px 0 0; color: var(--entry-muted); font-size: 15px; line-height: 1.5; }
.auth-entry-header a { color: var(--entry-text); font-weight: 650; margin-left: 7px; text-decoration: none; }
.auth-entry-form { width: 100%; margin: 0; }
.auth-entry-field { display: block; margin: 0 0 18px; }
.auth-entry-field > label { display: block; margin: 0 0 8px; color: var(--entry-text); font-size: 14px; font-weight: 600; }
.auth-entry-field input:not([type="checkbox"]) {
    display: block;
    width: 100%;
    min-width: 0;
    height: 54px;
    padding: 0 16px;
    border: 1px solid var(--entry-border);
    border-radius: 14px;
    background: var(--entry-surface);
    color: var(--entry-text);
    font: inherit;
    font-size: 16px;
    outline: 0;
    box-shadow: none;
    transition: border-color .16s, box-shadow .16s;
}
.auth-entry-field input::placeholder { color: #767d72; opacity: 1; }
.auth-entry-field input:focus { border-color: #97a645; box-shadow: 0 0 0 3px rgb(151 166 69 / 16%); }
.auth-entry-password { position: relative; }
.auth-entry-password input { padding-right: 54px !important; }
.auth-entry-eye {
    position: absolute;
    top: 5px;
    right: 5px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--entry-muted);
    cursor: pointer;
    font-size: 18px;
}
.auth-entry-eye:hover { background: #f5f6f1; }
.auth-entry-submit {
    display: block;
    width: 100%;
    min-height: 52px;
    margin: 30px 0 0;
    padding: 13px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--entry-accent);
    color: var(--entry-ink);
    font: inherit;
    font-size: 17px;
    font-weight: 720;
    white-space: nowrap;
    cursor: pointer;
    transition: background .16s;
}
.auth-entry-submit:hover { background: var(--ui-accent-hover, #e8f27c); }
.auth-entry-submit:disabled { opacity: .56; cursor: not-allowed; }
.auth-entry-divider { display: flex; align-items: center; gap: 17px; margin: 25px 0 20px; color: var(--entry-muted); font-size: 13px; }
.auth-entry-divider::before,
.auth-entry-divider::after { content: ""; height: 1px; flex: 1; background: #e6e8e1; }
.auth-entry-providers { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
.auth-entry-provider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 0;
    height: 62px;
    padding: 0 12px;
    border: 1px solid #e0e4da;
    border-radius: 16px;
    background: #fff;
    color: var(--entry-text);
    font: inherit;
    font-size: 13px;
    font-weight: 550;
    cursor: pointer;
}
.auth-entry-provider[hidden] { display: none; }
.auth-entry-provider:hover { border-color: #b8c19d; background: #f9faf6; }
.auth-entry-provider:disabled { cursor: wait; opacity: .65; }
.auth-entry-provider svg,
.auth-entry-provider img { display: block; width: 30px; height: 30px; flex: 0 0 30px; object-fit: contain; }
.auth-entry-provider[data-auth-provider="google"] svg { color: #4285f4; }
.auth-entry-provider[data-auth-provider="telegram"] svg { color: #1d98cf; font-size: 24px; }
.auth-entry-x { font-family: Arial, sans-serif; font-size: 24px; font-weight: 500; line-height: 1; }
.auth-entry-footer { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin: 24px 0 0; font-size: 13px; }
.auth-entry-footer a { color: var(--entry-muted); text-decoration: none; line-height: 1.7; }
.auth-entry-footer a:hover,
.auth-entry-back:hover,
.auth-entry-header a:hover { color: var(--entry-text); text-decoration: underline; }
.auth-entry-footer a + a { padding-left: 16px; border-left: 1px solid #dce1d6; }
.auth-entry-message { margin: 0 0 18px; padding: 11px 13px; border-radius: 10px; background: #fff1ef; color: #973f34; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.auth-entry-message[data-kind="success"] { background: #f0f5de; color: #4b5b26; }
.auth-entry-message:empty { display: none; }
.auth-entry-helper { margin: 8px 0 0; color: var(--entry-muted); font-size: 12px; line-height: 1.6; }
.auth-entry-code-row { display: flex; align-items: center; gap: 10px; }
.auth-entry-code-row input { flex: 1; }
.auth-entry-code-button { flex: 0 0 auto; min-height: 48px; border: 0; border-radius: 10px; padding: 0 11px; background: #f1f4e7; color: #4e5d25; font: inherit; font-size: 13px; font-weight: 620; cursor: pointer; }
.auth-entry-code-button:disabled { opacity: .65; cursor: wait; }
.auth-entry-terms { display: flex; align-items: flex-start; gap: 9px; margin: 23px 0 0; color: var(--entry-muted); font-size: 12px; line-height: 1.7; cursor: pointer; }
.auth-entry-terms input { appearance: auto; width: 16px; height: 16px; margin: 2px 0 0; flex: 0 0 auto; accent-color: #758629; }
.auth-entry-terms a { color: var(--entry-text); text-decoration: none; }
.auth-entry-terms a:hover { text-decoration: underline; }
.auth-entry-social-message { margin-top: 14px; margin-bottom: 0; }
.lemon-auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 22000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgb(0 0 0 / 54%);
    overscroll-behavior: contain;
    animation: auth-entry-fade .16s ease-out;
}
.lemon-auth-overlay[hidden] { display: none !important; }
.lemon-auth-sheet {
    position: relative;
    width: min(100%, 460px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 42px 34px 30px;
    border-radius: 24px;
    background: var(--entry-surface);
    box-shadow: 0 20px 70px rgb(0 0 0 / 17%);
    animation: auth-entry-rise .2s ease-out;
}
.lemon-auth-sheet .auth-entry-header { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 8px 0 32px; }
.lemon-auth-sheet .auth-entry-header img { width: 30px; height: 30px; margin: 0; }
.lemon-auth-sheet .auth-entry-header h2 { font-size: 21px; letter-spacing: -.035em; }
.auth-entry-close { position: absolute; top: 9px; right: 10px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--entry-muted); font-size: 19px; cursor: pointer; }
.auth-entry-close:hover { background: #f3f5ee; }
.auth-entry-handle { display: none; }
.auth-entry-visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.lemon-auth-overlay :focus-visible,
.lemon-auth-page :focus-visible { outline: 3px solid rgb(117 134 41 / 35%); outline-offset: 3px; }
.lemon-auth-overlay input:focus-visible,
.lemon-auth-page input:focus-visible { outline: 0; }
@keyframes auth-entry-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes auth-entry-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 640px) {
    .lemon-auth-page .auth-entry-main { padding: 44px 26px 32px; }
    .lemon-auth-page .auth-entry-back { margin: 14px 0 0 22px; }
    .auth-entry-header { margin-bottom: 30px; }
    .auth-entry-header h1 { font-size: 27px; }
    .lemon-auth-overlay { align-items: end; padding: 0; }
    .lemon-auth-sheet { width: 100%; max-height: calc(100dvh - 30px); border-radius: 25px 25px 0 0; padding: 34px 24px calc(26px + env(safe-area-inset-bottom, 0px)); }
    .auth-entry-handle { display: block; position: absolute; width: 40px; height: 4px; border-radius: 99px; background: #d5d8d0; top: 10px; left: calc(50% - 20px); }
    .lemon-auth-sheet .auth-entry-header { margin: 17px 0 28px; }
    .lemon-auth-sheet .auth-entry-header h2 { font-size: clamp(18px, 5.1vw, 21px); }
    .auth-entry-close { top: 18px; right: 8px; width: 28px; height: 28px; font-size: 16px; }
    .lemon-auth-sheet .auth-entry-header img { width: 26px; height: 26px; }
    .auth-entry-providers { gap: 10px; }
    .auth-entry-provider { padding: 0 8px; gap: 6px; font-size: 12px; }
}
@media (max-height: 620px) and (max-width: 640px) {
    .lemon-auth-sheet { padding-top: 26px; padding-bottom: 18px; }
    .lemon-auth-sheet .auth-entry-header { margin: 8px 0 18px; }
    .lemon-auth-sheet .auth-entry-field { margin-bottom: 12px; }
    .lemon-auth-sheet .auth-entry-submit { margin-top: 18px; }
    .lemon-auth-sheet .auth-entry-divider { margin: 18px 0 14px; }
    .lemon-auth-sheet .auth-entry-footer { margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .lemon-auth-overlay, .lemon-auth-sheet { animation: none; }
    .auth-entry-field input, .auth-entry-submit { transition: none; }
}

.auth-entry-eye svg { width: 20px; height: 20px; }
.auth-entry-close svg { width: 16px; height: 16px; }
.auth-entry-back svg { width: 14px; height: 14px; }
