/* ==========================================================================
   练写字APP · 品牌公共样式
   ========================================================================== */

:root {
    --lxz-bg: #ffffff;
    --lxz-ink: #101a14;
    --lxz-ink-soft: #26342b;
    --lxz-muted: #6f7a72;
    --lxz-muted-2: #8b958d;
    --lxz-line: rgba(16, 32, 22, .09);
    --lxz-green: #00d96b;
    --lxz-green-deep: #00bd5e;
    --lxz-green-dark: #009c52;
    --lxz-serif: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    --lxz-header-h: 56px;
    --lxz-footer-h: 68px;
    color-scheme: light;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--lxz-bg);
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--lxz-ink);
    background: var(--lxz-bg);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
        "Helvetica Neue", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(16, 32, 22, .028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 32, 22, .028) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(ellipse 72% 58% at 50% 12%, #000 6%, transparent 76%);
    mask-image: radial-gradient(ellipse 72% 58% at 50% 12%, #000 6%, transparent 76%);
}

a {
    color: var(--lxz-green-dark);
}

img {
    max-width: 100%;
}

/* Header ------------------------------------------------------------------ */

.lxz-header {
    position: relative;
    z-index: 20;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--lxz-line);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.lxz-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    max-width: 860px;
    height: var(--lxz-header-h);
    margin: 0 auto;
    padding: 0 16px;
}

.lxz-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: var(--lxz-green-dark);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .01em;
    text-decoration: none;
    white-space: nowrap;
}

.lxz-brand-dot {
    margin: 0 3px;
    color: var(--lxz-muted-2);
    font-weight: 400;
}

.lxz-brand-channel {
    overflow: hidden;
    color: var(--lxz-ink-soft);
    font-size: 15px;
    font-weight: 600;
    text-overflow: ellipsis;
}

.lxz-nav {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 16px;
    white-space: nowrap;
}

.lxz-nav a {
    color: var(--lxz-ink-soft);
    font-size: 14px;
    text-decoration: none;
}

.lxz-nav a:hover {
    color: var(--lxz-green-dark);
}

/* Layout ------------------------------------------------------------------ */

.lxz-wrap {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 16px;
}

.lxz-main {
    position: relative;
    z-index: 1;
    padding: 24px 0 40px;
}

.lxz-doc {
    padding-bottom: calc(var(--lxz-footer-h) + env(safe-area-inset-bottom));
}

.lxz-doc.has-qr {
    padding-bottom: calc(var(--lxz-footer-h) + 40px + env(safe-area-inset-bottom));
}

.lxz-page-title {
    margin: 0 0 16px;
    font-family: var(--lxz-serif);
    font-size: 24px;
    line-height: 1.45;
}

.lxz-page-desc {
    margin: -6px 0 20px;
    color: var(--lxz-muted);
    font-size: 14px;
    line-height: 1.7;
}

.lxz-crumb {
    margin-bottom: 14px;
    color: var(--lxz-muted);
    font-size: 13px;
    line-height: 1.6;
}

.lxz-crumb a {
    color: var(--lxz-muted);
    text-decoration: none;
}

.lxz-meta {
    margin: -6px 0 18px;
    color: var(--lxz-muted);
    font-size: 13px;
}

/* App layout -------------------------------------------------------------- */

.lxz-app-body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    padding-top: env(safe-area-inset-top);
}

.lxz-app-body .lxz-header {
    flex: 0 0 auto;
}

.lxz-app-main {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.lxz-app-body .lxz-footer {
    flex: 0 0 auto;
}

/* Footer ------------------------------------------------------------------ */

.lxz-footer {
    position: relative;
    z-index: 30;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--lxz-line);
    background: linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .97));
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.lxz-footer--doc {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
}

.lxz-footer-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 860px;
    min-height: var(--lxz-footer-h);
    margin: 0 auto;
    padding: 10px 16px;
}

.lxz-app {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.lxz-app-icon {
    display: block;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #050805;
    object-fit: cover;
}

.lxz-app-copy {
    min-width: 0;
}

.lxz-app-name {
    margin: 0;
    color: var(--lxz-ink);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.25;
}

.lxz-app-desc {
    margin: 3px 0 0;
    overflow: hidden;
    color: var(--lxz-muted-2);
    font-size: 11px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lxz-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    margin-left: auto;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #00f07f, var(--lxz-green-deep));
    box-shadow: 0 8px 22px rgba(0, 230, 118, .24), inset 0 1px 0 rgba(255, 255, 255, .36);
    color: #04150c;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.lxz-btn:hover {
    color: #04150c;
    filter: brightness(1.05);
}

.lxz-btn--large {
    height: 48px;
    padding: 0 26px;
    font-size: 15px;
}

.lxz-apple {
    width: 13px;
    height: 16px;
    margin-top: -1px;
}

.lxz-btn--large .lxz-apple {
    width: 15px;
    height: 18px;
}

.lxz-qr {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin-left: auto;
}

.lxz-qr-img {
    display: block;
    width: 56px;
    height: 56px;
    background: #fff;
    object-fit: contain;
}

.lxz-qr-text {
    margin: 0;
    color: #5c6b61;
    font-size: 9.5px;
    line-height: 1.2;
    white-space: nowrap;
}

.lxz-qr--large .lxz-qr-img {
    width: 128px;
    height: 128px;
}

.lxz-qr--large .lxz-qr-text {
    font-size: 12px;
}

/* 404 --------------------------------------------------------------------- */

.lxz-404 {
    max-width: 520px;
    margin: 0 auto;
    padding: 32px 0 48px;
    text-align: center;
}

.lxz-404-icon {
    display: block;
    width: 112px;
    height: 112px;
    margin: 0 auto 18px;
    border-radius: 24px;
    background: #050805;
    object-fit: cover;
}

.lxz-404-title {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
}

.lxz-404-desc {
    margin: 0 0 4px;
    color: var(--lxz-muted);
    font-size: 14px;
}

.lxz-404-note {
    margin: 0 0 20px;
    color: var(--lxz-muted-2);
    font-size: 12px;
}

.lxz-404-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.lxz-404-actions .lxz-btn {
    margin-left: 0;
}

.lxz-404-nav {
    display: flex;
    justify-content: center;
    gap: 18px;
    font-size: 14px;
}

.lxz-404-nav a {
    text-decoration: none;
}

/* Placeholder ------------------------------------------------------------- */

.lxz-placeholder {
    max-width: 520px;
    margin: 0 auto;
    padding: 40px 0;
    text-align: center;
}

.lxz-placeholder .lxz-btn {
    margin: 20px auto 0;
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 390px) {
    .lxz-header-inner {
        padding: 0 12px;
    }

    .lxz-brand {
        font-size: 16px;
    }

    .lxz-brand-channel {
        font-size: 14px;
    }

    .lxz-nav {
        gap: 12px;
    }

    .lxz-footer-inner {
        padding: 10px 12px;
    }

    .lxz-page-title {
        font-size: 21px;
    }
}
