:root {
    --bg: #f3ede2;
    --bg-accent: #efe4d3;
    --surface: rgba(255, 252, 247, 0.84);
    --surface-strong: #fffaf2;
    --surface-muted: rgba(130, 101, 58, 0.08);
    --line: rgba(92, 68, 34, 0.14);
    --line-strong: rgba(92, 68, 34, 0.22);
    --text: #24190f;
    --muted: #6b5a47;
    --brand: #b85c38;
    --brand-strong: #934421;
    --brand-soft: rgba(184, 92, 56, 0.14);
    --shadow: 0 24px 80px rgba(60, 38, 17, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --container: 1120px;
    --font-ui: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --font-display: "Iowan Old Style", "Palatino Linotype", "Songti SC", serif;
    --body-background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.75), transparent 28%),
        radial-gradient(circle at 85% 10%, rgba(184, 92, 56, 0.12), transparent 22%),
        linear-gradient(180deg, #f7f2e8 0%, var(--bg) 44%, #efe7d8 100%);
    --body-orb-1: rgba(184, 92, 56, 0.14);
    --body-orb-2: rgba(222, 177, 103, 0.12);
    --topbar-border: rgba(255, 255, 255, 0.6);
    --topbar-bg: rgba(255, 249, 241, 0.72);
    --topbar-shadow: 0 12px 34px rgba(74, 50, 24, 0.08);
    --hero-bg:
        linear-gradient(135deg, rgba(255, 250, 244, 0.92), rgba(244, 231, 213, 0.86)),
        #fff;
    --hero-border: rgba(255, 255, 255, 0.56);
    --hero-orb: radial-gradient(circle, rgba(184, 92, 56, 0.18), transparent 68%);
    --nav-bg: rgba(255, 255, 255, 0.66);
    --nav-border: rgba(92, 68, 34, 0.1);
    --nav-hover-bg: rgba(184, 92, 56, 0.08);
    --nav-hover-border: rgba(184, 92, 56, 0.24);
    --feature-bg:
        linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(247, 237, 226, 0.88)),
        #fff;
    --feature-shadow-hover: 0 16px 30px rgba(60, 38, 17, 0.08);
    --endpoint-bg: rgba(255, 255, 255, 0.56);
    --code-bg: #1f1a15;
    --code-text: #f7efe3;
    --input-bg: rgba(255, 255, 255, 0.86);
    --table-bg: rgba(255, 255, 255, 0.86);
    --table-head-bg: rgba(184, 92, 56, 0.08);
    --footer-bg: rgba(255, 250, 244, 0.72);
    --footer-border: rgba(255, 255, 255, 0.52);
}

:root[data-theme="classic"] {
    --bg: #f7f9fc;
    --bg-accent: #e9eff8;
    --surface: #ffffff;
    --surface-strong: #ffffff;
    --surface-muted: rgba(74, 144, 226, 0.08);
    --line: rgba(74, 144, 226, 0.16);
    --line-strong: rgba(74, 144, 226, 0.28);
    --text: #333333;
    --muted: #5f6b7a;
    --brand: #4a90e2;
    --brand-strong: #357ab8;
    --brand-soft: rgba(74, 144, 226, 0.12);
    --shadow: 0 16px 36px rgba(21, 56, 100, 0.08);
    --radius-xl: 14px;
    --radius-lg: 10px;
    --radius-md: 8px;
    --radius-sm: 6px;
    --font-ui: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    --font-display: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    --body-background: linear-gradient(180deg, #f7f9fc 0%, #eef4fb 100%);
    --body-orb-1: rgba(74, 144, 226, 0.08);
    --body-orb-2: rgba(74, 144, 226, 0.06);
    --topbar-border: rgba(74, 144, 226, 0.12);
    --topbar-bg: #4a90e2;
    --topbar-shadow: 0 8px 20px rgba(53, 122, 184, 0.18);
    --hero-bg: #ffffff;
    --hero-border: rgba(74, 144, 226, 0.12);
    --hero-orb: radial-gradient(circle, rgba(74, 144, 226, 0.12), transparent 70%);
    --nav-bg: rgba(255, 255, 255, 0.16);
    --nav-border: rgba(255, 255, 255, 0.2);
    --nav-hover-bg: rgba(255, 255, 255, 0.24);
    --nav-hover-border: rgba(255, 255, 255, 0.34);
    --feature-bg: #ffffff;
    --feature-shadow-hover: 0 10px 24px rgba(21, 56, 100, 0.08);
    --endpoint-bg: #ffffff;
    --code-bg: #f5f5f5;
    --code-text: #333333;
    --input-bg: #ffffff;
    --table-bg: #ffffff;
    --table-head-bg: #f5f5f5;
    --footer-bg: #ffffff;
    --footer-border: rgba(74, 144, 226, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-ui);
    color: var(--text);
    background: var(--body-background);
    transition: background-color 180ms ease, color 180ms ease, background 180ms ease;
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    border-radius: 999px;
    filter: blur(6px);
    pointer-events: none;
}

body::before {
    top: -80px;
    right: -20px;
    width: 260px;
    height: 260px;
    background: var(--body-orb-1);
}

body::after {
    bottom: 10%;
    left: -120px;
    width: 320px;
    height: 320px;
    background: var(--body-orb-2);
}

a {
    color: inherit;
}

.page-shell {
    width: min(calc(100% - 32px), var(--container));
    margin: 0 auto;
}

.site-header {
    padding: 24px 0 12px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border: 1px solid var(--topbar-border);
    background: var(--topbar-bg);
    backdrop-filter: blur(14px);
    border-radius: 999px;
    box-shadow: var(--topbar-shadow);
}

.brand-link,
.brand-block {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    min-width: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(184, 92, 56, 0.18), rgba(184, 92, 56, 0.32)),
        #fff;
    color: var(--brand-strong);
    font-size: 22px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

:root[data-theme="classic"] .brand-title,
:root[data-theme="classic"] .brand-subtitle,
:root[data-theme="classic"] .nav-pill {
    color: #fff;
}

:root[data-theme="classic"] .brand-mark {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    box-shadow: none;
}

.brand-copy {
    min-width: 0;
}

.brand-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.brand-subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.nav-pill,
.button,
.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.98rem;
    font-weight: 600;
    text-decoration: none;
    transition:
        transform 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.nav-pill {
    color: var(--text);
    background: var(--nav-bg);
    border-color: var(--nav-border);
}

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

.button,
.action-button {
    width: auto;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 14px 30px rgba(184, 92, 56, 0.24);
}

.button.secondary,
.nav-pill:hover {
    background: var(--nav-hover-bg);
    color: var(--brand-strong);
    border-color: var(--nav-hover-border);
    box-shadow: none;
}

:root[data-theme="classic"] .nav-pill:hover {
    color: #fff;
}

.version-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(92, 68, 34, 0.12);
    background: rgba(255, 255, 255, 0.62);
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.version-chip.current {
    background: var(--brand-soft);
    color: var(--brand-strong);
    border-color: rgba(184, 92, 56, 0.18);
}

.page-main {
    padding: 18px 0 48px;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 5vw, 56px);
    border: 1px solid var(--hero-border);
    border-radius: 36px;
    background: var(--hero-bg);
    box-shadow: var(--shadow);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -80px -90px auto;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: var(--hero-orb);
}

:root[data-theme="classic"] .hero,
:root[data-theme="classic"] .card {
    border-radius: 10px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
    gap: 24px;
    align-items: end;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    line-height: 0.98;
}

.hero-text,
.section-text {
    margin: 16px 0 0;
    max-width: 52rem;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-panel {
    position: relative;
    padding: 22px;
    border: 1px solid rgba(92, 68, 34, 0.1);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(10px);
}

.hero-panel-title,
.section-title,
.card-title,
.result-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
}

.hero-panel-title {
    font-size: 1.2rem;
}

.hero-list,
.inline-list {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.hero-list li,
.inline-list li {
    position: relative;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.7;
}

.hero-list li + li,
.inline-list li + li {
    margin-top: 10px;
}

.hero-list li::before,
.inline-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.78em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.card {
    position: relative;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-xl);
    background: var(--surface);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 40px rgba(60, 38, 17, 0.08);
}

.card[data-span="4"] {
    grid-column: span 4;
}

.card[data-span="5"] {
    grid-column: span 5;
}

.card[data-span="6"] {
    grid-column: span 6;
}

.card[data-span="7"] {
    grid-column: span 7;
}

.card[data-span="12"] {
    grid-column: span 12;
}

.card-title {
    font-size: 1.5rem;
}

.card-text {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.feature-link {
    display: block;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--feature-bg);
    text-decoration: none;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.feature-link:hover {
    transform: translateY(-2px);
    border-color: rgba(184, 92, 56, 0.28);
    box-shadow: var(--feature-shadow-hover);
}

.feature-title {
    margin: 16px 0 0;
    font-size: 1.2rem;
}

.feature-meta,
.small-label {
    color: var(--muted);
    font-size: 0.93rem;
}

.icon-badge {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 1.2rem;
}

.endpoint {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--endpoint-bg);
}

.endpoint + .endpoint {
    margin-top: 18px;
}

.endpoint h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}

.endpoint p,
.endpoint strong,
label {
    color: var(--muted);
}

.endpoint strong,
label {
    display: inline-block;
    margin-top: 10px;
    margin-bottom: 6px;
    font-weight: 700;
}

pre,
code,
textarea,
select,
button,
input {
    font-family: "SFMono-Regular", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

pre {
    margin: 8px 0 0;
    padding: 18px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--code-bg);
    color: var(--code-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

code {
    font-size: 0.92rem;
}

.workspace {
    display: grid;
    gap: 18px;
}

.workspace-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 8px;
}

.workspace-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.workspace-subtitle {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.workspace-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.editor-shell,
.result-shell {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.field-hint {
    color: var(--muted);
    font-size: 0.9rem;
}

textarea,
select,
button {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--line);
    outline: none;
}

textarea,
select {
    padding: 16px 18px;
    font-size: 15px;
    color: var(--text);
    background: var(--input-bg);
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

textarea {
    min-height: 240px;
    resize: vertical;
    line-height: 1.7;
}

textarea:focus,
select:focus {
    border-color: rgba(184, 92, 56, 0.44);
    box-shadow: 0 0 0 5px rgba(184, 92, 56, 0.12);
}

button {
    min-height: 52px;
    padding: 0 22px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 14px 30px rgba(184, 92, 56, 0.24);
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

.control-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.45fr);
    gap: 16px;
    margin-top: 18px;
}

.result-shell:empty {
    display: none;
}

.result-title {
    font-size: 1.32rem;
}

.result-shell table {
    margin-top: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--table-bg);
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(92, 68, 34, 0.08);
    text-align: left;
    vertical-align: top;
    line-height: 1.75;
}

th {
    background: var(--table-head-bg);
    font-weight: 700;
}

tr:last-child td {
    border-bottom: none;
}

.site-footer {
    padding: 0 0 42px;
}

.footer-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border: 1px solid var(--footer-border);
    border-radius: 24px;
    background: var(--footer-bg);
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.footer-links a {
    color: var(--brand-strong);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .topbar,
    .workspace-head,
    .footer-card {
        border-radius: 28px;
    }

    .topbar,
    .workspace-head,
    .footer-card,
    .hero-grid,
    .control-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links,
    .workspace-actions {
        justify-content: flex-start;
    }

    .card[data-span],
    .card[data-span="4"],
    .card[data-span="5"],
    .card[data-span="6"],
    .card[data-span="7"],
    .card[data-span="12"] {
        grid-column: span 12;
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(calc(100% - 20px), var(--container));
    }

    .site-header {
        padding-top: 10px;
    }

    .topbar,
    .hero,
    .card,
    .editor-shell,
    .result-shell,
    .endpoint,
    .footer-card {
        padding: 18px;
    }

    .brand-link,
    .brand-block {
        align-items: flex-start;
    }

    .version-chip {
        width: 100%;
        justify-content: center;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .workspace-title {
        font-size: 2rem;
    }
}
