/*
 * Login · "丹炉夜色" cinematic layer. Loaded after login-layout.css.
 * Background image, beams and particles inherit the original index.html layers.
 */
html.ly-login body {
    font-family: var(--ly-font);
    color: var(--ly-text);
    padding: 0;
    display: block;
    min-height: 100dvh;
    overflow-x: hidden;
}
html.ly-login * { font-family: inherit; }
html.ly-login #app { position: relative; z-index: 10; display: flex; flex-direction: column; }

/* ----- Nav ----- */
html.ly-login .login-nav {
    border-bottom: 0;
    min-height: 96px;
    flex-basis: 96px;
    animation: lyFade 1.2s var(--ly-ease) both;
}
html.ly-login .login-wordmark svg {
    fill: var(--ly-gold);
    filter: drop-shadow(0 0 14px rgba(233, 185, 110, 0.55));
}
html.ly-login .login-wordmark strong {
    font-family: var(--ly-serif);
    font-weight: 700;
    letter-spacing: 0.32em;
    color: var(--ly-text);
}
html.ly-login .login-wordmark small {
    font-family: var(--ly-font);
    color: var(--ly-muted);
    letter-spacing: 0.42em;
    font-weight: 500;
}
html.ly-login .login-nav-caption {
    color: var(--ly-muted);
    letter-spacing: 0.4em;
    font-size: 11px;
}
html.ly-login .server-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 16px 9px 14px;
    border-radius: 999px;
    border: 1px solid var(--ly-line);
    background: rgba(10, 16, 30, 0.45);
    -webkit-backdrop-filter: var(--ly-blur);
    backdrop-filter: var(--ly-blur);
    color: var(--ly-text-2);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    box-shadow: none;
}
html.ly-login .server-status .ly-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ly-jade);
    box-shadow: 0 0 0 0 rgba(143, 209, 164, 0.6);
    animation: lyPulse 2.4s ease-out infinite;
}
html.ly-login .server-status.disconnected .ly-dot { background: var(--ly-rose); animation: none; }
@keyframes lyPulse { 0% { box-shadow: 0 0 0 0 rgba(143, 209, 164, 0.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(143, 209, 164, 0); } }

/* ----- Hero ----- */
html.ly-login .auth-layout { position: relative; }
html.ly-login .auth-hero { isolation: isolate; }
html.ly-login .auth-hero .auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ly-gold);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.42em;
    animation: lyRise 1.1s 0.15s var(--ly-ease) both;
}
html.ly-login .auth-hero .auth-kicker::before {
    content: "";
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ly-gold));
}
html.ly-login .auth-hero h1 {
    font-family: var(--ly-serif);
    font-weight: 600;
    font-size: clamp(48px, 5.6vw, 96px);
    line-height: 1.12;
    letter-spacing: 0.02em;
    color: var(--ly-text);
    text-shadow: 0 10px 50px rgba(0, 0, 0, 0.55);
}
html.ly-login .auth-hero h1 > span { animation: lyRise 1.3s var(--ly-ease) both; }
html.ly-login .auth-hero h1 > span:nth-child(1) { animation-delay: 0.25s; }
html.ly-login .auth-hero h1 > span:nth-child(2) { animation-delay: 0.42s; }
html.ly-login .auth-hero h1 .login-highlight {
    position: relative;
    background: linear-gradient(100deg, #fff1d6 0%, #f6d7a0 30%, #e9a25a 62%, #f6d7a0 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: lyGoldFlow 7s ease-in-out infinite;
}
html.ly-login .auth-hero h1 .login-highlight::after {
    content: "";
    position: absolute;
    left: 0.06em;
    right: 0.06em;
    bottom: 0.02em;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--ly-gold), transparent);
    transform-origin: left;
    animation: lyLine 1.4s 1.1s var(--ly-ease) both;
}
@keyframes lyGoldFlow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
html.ly-login .auth-hero h1 em {
    font-family: var(--ly-font);
    color: var(--ly-gold);
    opacity: 0.85;
    display: inline-block;
    animation: lyNudge 3.6s 2s ease-in-out infinite;
}
@keyframes lyNudge { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(4px, -4px); } }
html.ly-login .auth-hero .login-description {
    color: var(--ly-text-2);
    font-size: 16px;
    line-height: 2;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 18px rgba(4, 6, 13, 0.9);
    animation: lyRise 1.2s 0.6s var(--ly-ease) both;
}
html.ly-login .auth-hero .login-hero-note {
    color: var(--ly-muted);
    letter-spacing: 0.5em;
    animation: lyRise 1.2s 0.72s var(--ly-ease) both;
}
html.ly-login .auth-badges { display: flex; animation: lyRise 1.2s 0.85s var(--ly-ease) both; }
html.ly-login .auth-badges span {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--ly-line);
    background: rgba(10, 16, 30, 0.38);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--ly-text-2);
    letter-spacing: 0.12em;
    transition: border-color 0.4s, color 0.4s, transform 0.5s var(--ly-ease);
}
html.ly-login .auth-badges span:hover { border-color: var(--ly-line-gold); color: var(--ly-gold-2); transform: translateY(-2px); }

/* ----- Signature: the furnace sigil (rotating astrolabe rings behind the hero) ----- */
html.ly-login .ly-sigil {
    position: absolute;
    z-index: -1;
    top: 50%;
    left: clamp(180px, 30vw, 560px);
    width: clamp(420px, 46vw, 760px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%) translate3d(calc(var(--ly-px, 0) * -26px), calc(var(--ly-py, 0) * -20px), 0);
    pointer-events: none;
    opacity: 0;
    animation: lyFade 2.4s 0.3s var(--ly-ease) forwards;
}
html.ly-login .ly-sigil svg { width: 100%; height: 100%; overflow: visible; }
html.ly-login .ly-sigil .ring { fill: none; stroke: rgba(233, 185, 110, 0.22); stroke-width: 1; }
html.ly-login .ly-sigil .ring-faint { stroke: rgba(196, 214, 238, 0.09); }
html.ly-login .ly-sigil .ticks { fill: none; stroke: rgba(233, 185, 110, 0.38); stroke-width: 6; stroke-dasharray: 1 13.6; }
html.ly-login .ly-sigil .ticks-fine { stroke: rgba(143, 211, 216, 0.28); stroke-width: 3; stroke-dasharray: 0.6 6.2; }
html.ly-login .ly-sigil .arc { fill: none; stroke: url(#lySigilArc); stroke-width: 1.6; stroke-linecap: round; }
html.ly-login .ly-sigil .glyph { fill: rgba(246, 215, 160, 0.42); font: 500 13px var(--ly-serif); letter-spacing: 0; }
html.ly-login .ly-sigil .spin-a { transform-origin: 300px 300px; animation: lySpin 90s linear infinite; }
html.ly-login .ly-sigil .spin-b { transform-origin: 300px 300px; animation: lySpin 140s linear infinite reverse; }
html.ly-login .ly-sigil .spin-c { transform-origin: 300px 300px; animation: lySpin 36s linear infinite; }
html.ly-login .ly-sigil .core {
    fill: url(#lySigilCore);
    transform-origin: 300px 300px;
    animation: lyBreathe 6s ease-in-out infinite;
}
@keyframes lySpin { to { transform: rotate(360deg); } }

/* ----- Auth card: frosted glass with a travelling gold edge ----- */
html.ly-login .auth-card {
    position: relative;
    overflow: hidden;
    min-height: 0;
    border-radius: 28px;
    border: 1px solid rgba(196, 214, 238, 0.12);
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 38%, rgba(255, 255, 255, 0) 60%),
        rgba(8, 13, 27, 0.62);
    -webkit-backdrop-filter: saturate(160%) blur(28px);
    backdrop-filter: saturate(160%) blur(28px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 0 0 1px rgba(0, 0, 0, 0.25),
        0 50px 120px -40px rgba(0, 0, 0, 0.85),
        0 0 80px -30px rgba(233, 160, 80, 0.35);
    animation: lyCardIn 1.4s 0.35s var(--ly-ease) both;
    transform: perspective(1400px) rotateY(calc(var(--ly-px, 0) * -2.2deg)) rotateX(calc(var(--ly-py, 0) * 2deg));
    transition: transform 1.2s var(--ly-ease);
}
@keyframes lyCardIn { from { opacity: 0; transform: perspective(1400px) translate3d(0, 34px, 0) rotateX(6deg); filter: blur(10px); } to { opacity: 1; filter: none; } }
html.ly-login .auth-card::before {
    /* travelling conic edge light */
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(from var(--ly-edge, 0deg), transparent 0deg, rgba(246, 215, 160, 0.9) 40deg, transparent 90deg, transparent 220deg, rgba(143, 211, 216, 0.55) 260deg, transparent 300deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.7;
    height: auto;
    inset-inline: 0;
    animation: lyEdge 9s linear infinite;
}
@property --ly-edge { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes lyEdge { to { --ly-edge: 360deg; } }
html.ly-login .auth-card::after {
    content: "";
    position: absolute;
    inset: auto -30% -40% auto;
    width: 70%;
    height: 60%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(233, 160, 80, 0.16), transparent);
    filter: blur(10px);
    pointer-events: none;
    animation: lyBreathe 7s ease-in-out infinite;
}
html.ly-login .auth-eyebrow {
    color: var(--ly-gold);
    letter-spacing: 0.36em;
    font-weight: 600;
}
html.ly-login .auth-eyebrow span:last-child { color: var(--ly-gold); opacity: 0.7; }
html.ly-login .auth-card h2 {
    font-family: var(--ly-serif);
    font-weight: 600;
    font-size: 34px;
    letter-spacing: 0.04em;
    color: var(--ly-text);
    background: none;
    -webkit-text-fill-color: currentColor;
}
html.ly-login .auth-subtitle { color: var(--ly-muted); letter-spacing: 0.04em; }

/* ----- Fields: floating hairline inputs with a focus glow ----- */
html.ly-login .input-group { position: relative; }
html.ly-login .input-group label {
    color: var(--ly-text-2);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.24em;
    margin-bottom: 10px;
}
html.ly-login .input-group input {
    border-radius: 14px;
    border: 1px solid rgba(196, 214, 238, 0.12);
    background: rgba(4, 7, 15, 0.42);
    color: var(--ly-text);
    font-size: 15px;
    letter-spacing: 0.04em;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
    transition: border-color 0.35s var(--ly-ease), background 0.35s var(--ly-ease), box-shadow 0.45s var(--ly-ease);
}
html.ly-login .input-group input::placeholder { color: rgba(138, 151, 171, 0.65); }
html.ly-login .input-group input:hover { border-color: rgba(196, 214, 238, 0.22); }
html.ly-login .input-group input:focus {
    border-color: rgba(233, 185, 110, 0.65);
    background: rgba(8, 12, 24, 0.6);
    box-shadow: 0 0 0 4px rgba(233, 185, 110, 0.1), 0 10px 30px -12px rgba(233, 160, 80, 0.45);
}
html.ly-login .input-group:focus-within label { color: var(--ly-gold-2); }

/* checkbox → minimal switch-like tick */
html.ly-login .remember { gap: 12px; align-items: center; }
html.ly-login .remember input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    min-height: 0;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0;
    border-radius: 6px;
    border: 1px solid rgba(196, 214, 238, 0.28);
    background: rgba(4, 7, 15, 0.5);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
html.ly-login .remember input[type="checkbox"]::after {
    content: "";
    width: 9px;
    height: 5px;
    border: 2px solid #1d1205;
    border-top: 0;
    border-right: 0;
    transform: rotate(-45deg) scale(0);
    margin-top: -2px;
    transition: transform 0.35s var(--ly-ease);
}
html.ly-login .remember input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #f6d7a0, #d99e55);
    border-color: transparent;
    box-shadow: 0 0 16px -4px rgba(233, 160, 80, 0.8);
}
html.ly-login .remember input[type="checkbox"]:checked::after { transform: rotate(-45deg) scale(1); }
html.ly-login .remember input[type="checkbox"]:disabled { opacity: 0.4; cursor: not-allowed; }
html.ly-login .remember label { color: var(--ly-text-2); font-weight: 500; letter-spacing: 0.04em; cursor: pointer; }
html.ly-login .auth-note { color: var(--ly-muted); margin-left: 30px; padding-left: 0; letter-spacing: 0.02em; }

/* ----- Actions ----- */
html.ly-login .login-submit.ly-btn {
    width: 100%;
    min-height: 56px;
    margin-top: 22px;
    padding: 0 12px 0 26px;
    justify-content: space-between;
    font-size: 16px;
    letter-spacing: 0.2em;
}
html.ly-login .login-submit.ly-btn span:last-child { font-size: 15px; line-height: 1; }
html.ly-login .switch {
    margin-top: 18px;
    color: var(--ly-text-2);
    letter-spacing: 0.08em;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
    transition: color 0.3s;
}
html.ly-login .switch:hover { color: var(--ly-gold-2); text-decoration: none; }
html.ly-login .error,
html.ly-login .success,
html.ly-login .pending-message {
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 13px;
    letter-spacing: 0.03em;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    animation: lyRise 0.6s var(--ly-ease) both;
}
html.ly-login .error { background: rgba(229, 143, 143, 0.1); border: 1px solid rgba(229, 143, 143, 0.32); color: #f4bcbc; }
html.ly-login .success { background: rgba(143, 209, 164, 0.1); border: 1px solid rgba(143, 209, 164, 0.32); color: #bfe8cb; }
html.ly-login .pending-message { background: rgba(233, 185, 110, 0.1); border: 1px solid rgba(233, 185, 110, 0.32); color: var(--ly-gold-2); }
html.ly-login .login-card-note {
    border-top: 1px solid var(--ly-line);
    color: var(--ly-muted);
    letter-spacing: 0.12em;
}
html.ly-login .login-card-note span { color: var(--ly-gold); }
html.ly-login .ly-entries { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
html.ly-login .offline-entry {
    margin: 0;
    min-height: 48px;
    padding: 10px 14px 10px 16px;
    border-radius: 14px;
    border: 1px solid var(--ly-line);
    background: rgba(255, 255, 255, 0.025);
    color: var(--ly-text-2);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: border-color 0.35s, background 0.35s, color 0.35s, transform 0.5s var(--ly-ease);
}
html.ly-login .offline-entry:hover {
    border-color: var(--ly-line-gold);
    background: rgba(233, 185, 110, 0.06);
    color: var(--ly-text);
    transform: translateY(-2px);
}
html.ly-login .offline-entry span:last-child { color: var(--ly-gold); font-size: 15px; transition: transform 0.5s var(--ly-ease); }
html.ly-login .offline-entry:hover span:last-child { transform: translate(2px, -2px); }

/* ----- Footer / boot ----- */
html.ly-login .site-filing {
    border-top: 1px solid var(--ly-line);
    color: var(--ly-muted);
    letter-spacing: 0.08em;
}
html.ly-login .site-filing a { color: var(--ly-muted); transition: color 0.3s; }
html.ly-login .site-filing a:hover { color: var(--ly-gold-2); }
html.ly-login .auth-boot-screen { background: var(--ly-ink); }
html.ly-login .auth-boot-card { background: transparent; border: 0; box-shadow: none; }
html.ly-login .auth-boot-title { font-family: var(--ly-serif); color: var(--ly-gold-2); letter-spacing: 0.3em; }
html.ly-login .auth-boot-subtitle { color: var(--ly-muted); }

/* ----- Responsive ----- */
@media (min-width: 901px) and (max-height: 860px) {
    html.ly-login .auth-hero h1 { font-size: clamp(44px, 4.8vw, 80px); }
    html.ly-login .auth-card { padding-block: 26px 22px; }
    html.ly-login .ly-entries { margin-top: 12px; }
    html.ly-login .login-card-note { margin-top: 16px; padding-top: 14px; }
}
@media (max-width: 900px) {
    html.ly-login .auth-badges { display: none; }
    html.ly-login .ly-sigil { left: 50%; top: 210px; width: 520px; opacity: 0.6; }
    html.ly-login .auth-card { transform: none; }
}
@media (max-width: 600px) {
    html.ly-login .login-nav { min-height: 72px; flex-basis: 72px; }
    html.ly-login .auth-hero h1 { font-size: clamp(36px, 10.4vw, 46px); line-height: 1.16; }
    html.ly-login .auth-hero .auth-kicker { letter-spacing: 0.3em; }
    html.ly-login .ly-sigil { top: 150px; width: 420px; }
    html.ly-login .auth-card { border-radius: 24px; }
    html.ly-login .auth-card h2 { font-size: 28px; }
    html.ly-login .ly-entries { grid-template-columns: 1fr; }
    html.ly-login .server-status { padding: 7px 12px 7px 10px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
    html.ly-login .auth-card { transform: none; }
    html.ly-login .ly-sigil { opacity: 0.8; }
}
