@font-face {
    font-family: 'PingFangSC-Regular.woff2';
    src: url('/fonts/PingFangSC-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'PingFangSC-Semibold.woff2';
    src: url('/fonts/PingFangSC-Semibold.woff2') format('woff2');
}

:root {
    --bg: #a8d4ec;
    --ink: #1c2430;
    --muted: #4a5f70;
    --panel: #f7fafc;
    --line: #b7cddb;
    --accent: #228b22;
    --accent-hover: #1b6e1b;
    --warn: #b42318;
    --font-display: 'PingFangSC-Semibold.woff2', "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-body: 'PingFangSC-Regular.woff2', "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
    height: 100%;
}
body {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-body);
    background:
        radial-gradient(1200px 500px at 10% -10%, #d4eef8 0%, transparent 55%),
        radial-gradient(900px 420px at 100% 0%, #c5e4f4 0%, transparent 50%),
        var(--bg);
    min-height: 100vh;
}

.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 20px 32px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.topbar { margin-bottom: 18px; flex-shrink: 0; }
.product-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 650;
    letter-spacing: 0.02em;
    color: var(--ink);
    font-size: clamp(1.45rem, 2.6vw, 1.9rem);
    line-height: 1.3;
}

.entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
    gap: 22px;
    align-items: stretch;
    margin-bottom: 16px;
    flex: 1;
}
@media (max-width: 860px) {
    .entry { grid-template-columns: 1fr; }
    .entry-intro { grid-template-rows: auto auto; }
}

.entry-intro {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 12px;
    min-width: 0;
    min-height: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 14px;
}
.entry-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 0.92rem;
}
.entry-visual {
    margin: 0;
    line-height: 0;
    min-width: 0;
    min-height: 0;
    background: #f4ebe0;
    border-radius: 8px;
    overflow: hidden;
}
.entry-visual img {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    max-height: min(58vh, 520px);
    object-fit: contain;
    object-position: center center;
}

.entry-side {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.auth-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 14px 16px;
    margin-bottom: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.auth-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.auth-tabs .tab {
    background: #fff;
    border: 1px solid var(--line);
    padding: 8px 12px;
    min-height: 40px;
    min-width: 0;
    cursor: pointer;
    font: inherit;
    color: var(--ink);
}
.auth-tabs .tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-family: var(--font-display);
}

label {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 0.86rem;
    color: var(--muted);
}
input, button {
    font: inherit;
    color: var(--ink);
}
input {
    padding: 9px 10px;
    border: 1px solid var(--line);
    background: #fff;
    width: 100%;
}
button.primary {
    width: 100%;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    padding: 11px 14px;
    cursor: pointer;
    font-family: var(--font-display);
    margin-top: 4px;
}
button.primary:hover:not(:disabled) {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}
button.primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 4px 0 10px;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--muted);
}
.consent input {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin: 3px 0 0;
    padding: 0;
    accent-color: var(--accent);
}
.consent a { color: var(--accent); }

.auth-note, .hint {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.45;
}
.hint { margin: 0 0 12px; }
.auth-note { margin-top: auto; padding-top: 12px; }
.auth-note.err { color: var(--warn); }
.auth-note.ok { color: var(--accent); }

.site-footer {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.5;
}
.footer-copy {
    margin: 0 0 4px;
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.82rem;
}
.footer-meta { margin: 0; opacity: 0.85; }

.terms-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px;
}
.terms-page h1 { margin: 0 0 8px; font-size: 1.6rem; }
.terms-page h2 { margin: 22px 0 8px; font-size: 1.05rem; }
.terms-page p, .terms-page li {
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.95rem;
}
.terms-page a { color: var(--accent); }
