:root {
    --mx-bg: #f8f6ec;
    --mx-surface: rgba(255, 252, 247, 0.9);
    --mx-surface-strong: rgba(255, 255, 255, 0.97);
    --mx-border: rgba(96, 137, 126, 0.18);
    --mx-text: #273f3a;
    --mx-muted: #657c76;
    --mx-jade: #6b9185;
    --mx-jade-deep: #365f56;
    --mx-aqua: #55cfc1;
    --mx-gold: #c59a54;
    --mx-coral: #e6aa8d;
    --mx-shadow: 0 30px 80px rgba(49, 71, 64, 0.13), 0 16px 46px rgba(191, 145, 77, 0.1);
    --mx-radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--mx-text);
    background: var(--module-page-bg, linear-gradient(142deg, #fffaf1 0%, #eefaf4 42%, #f7f0ff 72%, #fff6eb 100%));
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: -18%;
    background: var(--module-page-overlay,
        radial-gradient(ellipse 44% 30% at 18% 10%, rgba(255, 244, 210, 0.72), transparent 70%),
        radial-gradient(ellipse 46% 34% at 86% 16%, rgba(87, 211, 196, 0.3), transparent 72%),
        radial-gradient(ellipse 38% 28% at 70% 78%, rgba(214, 190, 237, 0.24), transparent 70%),
        linear-gradient(120deg, rgba(255,255,255,0.2), rgba(255,255,255,0)));
    background-size: 118% 118%, 112% 112%, 116% 116%, 100% 100%;
    animation: moduleAuroraDrift 18s cubic-bezier(0.45, 0, 0.25, 1) infinite;
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.42), rgba(255,255,255,0) 28%, rgba(86, 205, 193, 0.08) 55%, rgba(255,255,255,0) 78%),
        repeating-linear-gradient(112deg, rgba(255,255,255,0.1) 0 1px, transparent 1px 42px);
    opacity: 0.5;
    pointer-events: none;
    z-index: -1;
}

@keyframes moduleAuroraDrift {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.86; }
    42% { transform: translate3d(-2.2%, 1.4%, 0) scale(1.045); opacity: 1; }
    72% { transform: translate3d(1.8%, -1.2%, 0) scale(1.025); opacity: 0.94; }
}

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
}

.module-shell {
    width: min(1280px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 34px 0 58px;
}

.formal-page-head {
    text-align: center;
    margin: 36px auto 34px;
    padding: 8px 0 0;
}

.formal-page-head h1 {
    margin-bottom: 14px;
    text-shadow: 0 18px 42px rgba(81, 151, 137, 0.12);
}

.formal-page-lead {
    max-width: min(820px, 100%);
    margin: 0 auto;
    color: var(--mx-muted);
    font-size: 1rem;
    line-height: 1.95;
}

.formal-page-head .module-manifesto {
    max-width: min(820px, 100%);
    margin: 18px auto 0;
    color: var(--module-manifesto-color, #8A673E);
    text-align: left;
}

.module-maintenance-notice {
    margin: 0 auto 22px;
    padding: 14px 18px;
    border: 1px solid rgba(184, 149, 107, 0.2);
    border-radius: 18px;
    background: rgba(255, 248, 237, 0.88);
    color: var(--mx-jade-deep);
    line-height: 1.75;
    text-align: center;
}

.module-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.module-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--mx-jade-deep);
    font-weight: 700;
    letter-spacing: 0.12em;
}

.module-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--mx-gold);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.module-back-link:hover {
    color: var(--mx-jade-deep);
    opacity: 0.9;
}

.module-back-link svg {
    width: 18px;
    height: 18px;
    color: inherit;
}

.module-brand img {
    width: 46px;
    height: 46px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    object-fit: contain;
}

.module-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.module-nav a,
.ghost-btn,
.primary-btn,
.mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(112, 136, 125, 0.2);
    background: rgba(255,255,255,0.68);
    color: var(--mx-jade-deep);
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(61, 91, 82, 0.06);
    backdrop-filter: blur(16px);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.module-nav a:hover,
.ghost-btn:hover,
.primary-btn:hover,
.mini-btn:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.95);
    border-color: rgba(76, 101, 93, 0.36);
    box-shadow: 0 16px 30px rgba(61, 91, 82, 0.1);
}

.primary-btn {
    min-height: 44px;
    padding: 0 20px;
    border-color: rgba(76, 101, 93, 0.28);
    background: linear-gradient(135deg, rgba(105, 130, 120, 0.98), rgba(75, 101, 93, 0.94));
    color: #fffaf4;
    box-shadow: 0 16px 34px rgba(75, 101, 93, 0.16);
}

.mini-btn {
    min-height: 32px;
    padding: 0 12px;
    font-size: 0.86rem;
}

.module-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    gap: 20px;
    align-items: stretch;
    margin-bottom: 20px;
}

.hero-copy,
.tool-panel,
.side-panel,
.history-panel {
    border: 1px solid var(--mx-border);
    border-radius: var(--mx-radius);
    background:
        radial-gradient(ellipse 60% 44% at 92% 10%, rgba(86, 211, 196, 0.2), transparent 70%),
        radial-gradient(ellipse 48% 36% at 8% 92%, rgba(230, 170, 141, 0.16), transparent 72%),
        linear-gradient(152deg, rgba(255,255,255,0.94), rgba(255,247,235,0.88) 46%, rgba(235,250,245,0.88) 100%);
    box-shadow: var(--mx-shadow);
    backdrop-filter: blur(20px);
}

.hero-copy {
    min-height: 330px;
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
}

.hero-copy::before {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: calc(var(--mx-radius) - 10px);
    border: 1px solid rgba(255,255,255,0.48);
    background:
        linear-gradient(120deg, rgba(255,255,255,0.42), transparent 36%),
        linear-gradient(90deg, rgba(85,207,193,0.16), transparent 34%, rgba(197,154,84,0.1) 72%, transparent);
    pointer-events: none;
}

.hero-copy > * {
    position: relative;
    z-index: 1;
}

.hero-kicker,
.panel-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 0 12px;
    margin-bottom: 14px;
    border-radius: 999px;
    border: 1px solid rgba(184, 149, 107, 0.18);
    background: rgba(255,255,255,0.58);
    color: var(--mx-gold);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

h1,
h2,
h3 {
    font-family: "Noto Serif SC", serif;
    color: #31443f;
    letter-spacing: 0.06em;
}

h1 {
    margin: 0 0 16px;
    font-size: clamp(2.1rem, 5vw, 4.2rem);
    line-height: 1.12;
    background: linear-gradient(120deg, #263f39 0%, #4b7c70 44%, #b88843 88%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-copy p {
    max-width: 48em;
    margin: 0;
    color: rgba(45, 60, 57, 0.88);
    font-size: 1.02rem;
    line-height: 1.9;
}

.hero-visual {
    min-height: 330px;
    border-radius: var(--mx-radius);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.54);
    box-shadow: var(--mx-shadow);
    background:
        linear-gradient(145deg, rgba(49, 68, 63, 0.34), rgba(184, 149, 107, 0.12)),
        var(--module-image) center/cover;
}

.hero-visual::after {
    content: attr(data-label);
    position: absolute;
    left: 24px;
    bottom: 20px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.72);
    color: var(--mx-jade-deep);
    font-size: 0.88rem;
    font-weight: 700;
}

.module-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}

.tool-panel,
.side-panel,
.history-panel {
    padding: clamp(26px, 2vw, 34px);
}

.tool-panel h2,
.side-panel h2,
.history-panel h2 {
    margin: 0 0 14px;
    font-size: 1.45rem;
}

.field-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.field-grid label {
    display: grid;
    gap: 7px;
    color: var(--mx-muted);
    font-size: 0.92rem;
}

.soft-input,
.soft-textarea,
.soft-select {
    width: 100%;
    border: 1px solid rgba(112, 136, 125, 0.2);
    border-radius: 14px;
    background: rgba(255,255,255,0.72);
    color: var(--mx-text);
    padding: 12px 14px;
    outline: none;
}

.soft-textarea {
    min-height: 112px;
    resize: vertical;
    line-height: 1.7;
}

.action-row,
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(112, 136, 125, 0.18);
    background: rgba(255,255,255,0.58);
    color: var(--mx-jade-deep);
    cursor: pointer;
}

.chip.active {
    background: rgba(112, 136, 125, 0.15);
    border-color: rgba(76, 101, 93, 0.3);
    color: #31443f;
    font-weight: 700;
}

.result-grid,
.item-grid {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.result-card,
.item-card,
.session-card {
    border: 1px solid rgba(112, 136, 125, 0.14);
    border-radius: 18px;
    background: rgba(255,255,255,0.58);
    padding: 16px;
}

.result-card strong,
.item-card strong,
.session-card strong {
    display: block;
    margin-bottom: 8px;
    color: #31443f;
}

.result-card p,
.item-card p,
.session-card p,
.side-panel p {
    margin: 0;
    color: var(--mx-muted);
    line-height: 1.75;
}

.history-list {
    display: grid;
    gap: 10px;
    max-height: 520px;
    overflow: auto;
}

.empty-note {
    color: var(--mx-muted);
    line-height: 1.8;
}

.module-manifesto {
    margin-top: 18px;
    color: var(--module-manifesto-color, #8A673E);
    font-family: "Ma Shan Zheng", "Noto Serif SC", "KaiTi", "STKaiti", serif;
    font-size: clamp(1.08rem, 2.2vw, 1.42rem);
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: 0.04em;
    text-wrap: balance;
    word-break: keep-all;
    overflow-wrap: normal;
}

.section-band {
    margin-top: 20px;
    padding: 24px;
    border: 1px solid var(--mx-border);
    border-radius: var(--mx-radius);
    background:
        linear-gradient(160deg, rgba(255,252,248,0.92), rgba(241,244,239,0.88));
    box-shadow: var(--mx-shadow);
}

.section-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-title-row h2 {
    margin: 0;
    font-size: 1.45rem;
}

.section-title-row p {
    max-width: 44em;
    margin: 0;
    color: var(--mx-muted);
    line-height: 1.7;
}

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

.metric {
    padding: 14px;
    border: 1px solid rgba(112, 136, 125, 0.14);
    border-radius: 16px;
    background: rgba(255,255,255,0.58);
}

.metric strong {
    display: block;
    color: #31443f;
    font-size: 1.15rem;
}

.metric span {
    display: block;
    margin-top: 4px;
    color: var(--mx-muted);
    font-size: 0.88rem;
}

.split-uneven {
    display: grid;
    grid-template-columns: minmax(0, 0.74fr) minmax(280px, 0.26fr);
    gap: 18px;
    align-items: start;
}

.commerce-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}

.plain-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.plain-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(112, 136, 125, 0.12);
    color: var(--mx-muted);
    line-height: 1.65;
}

.plain-list li:last-child {
    border-bottom: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(184, 149, 107, 0.13);
    color: var(--mx-gold);
    font-size: 0.82rem;
    font-weight: 700;
}

@media (max-width: 920px) {
    .module-hero,
    .module-layout,
    .split-uneven,
    .commerce-layout {
        grid-template-columns: 1fr;
    }

    .side-panel {
        order: -1;
    }
}

@media (max-width: 640px) {
    .module-shell {
        width: min(100vw - 28px, 1280px);
        padding-top: 22px;
    }

    .module-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .module-brand img {
        width: 42px;
        height: 42px;
    }

    .module-nav {
        justify-content: flex-start;
    }

    .hero-copy,
    .tool-panel,
    .side-panel,
    .history-panel {
        padding: 20px;
        border-radius: 20px;
    }

    .hero-visual {
        min-height: 210px;
    }

    .section-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .metric-strip {
        grid-template-columns: 1fr;
    }

    .module-manifesto,
    .formal-page-head .module-manifesto {
        max-width: 100%;
        letter-spacing: 0.02em;
        text-wrap: pretty;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: anywhere !important;
    }
}
