:root {
    --bg: #f4f1ea;
    --surface: #fffdf8;
    --surface-2: #edf3ef;
    --ink: #151817;
    --muted: #65716c;
    --line: rgba(31, 48, 43, 0.15);
    --deep: #10241f;
    --deep-2: #193a34;
    --forest: #2f6658;
    --ocean: #2e7588;
    --wine: #7a2334;
    --brass: #ad8450;
    --cream: #f7efe0;
    --white: #ffffff;
    --shadow: 0 22px 60px rgba(16, 36, 31, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(244, 241, 234, 0.92), rgba(237, 243, 239, 0.76) 52%, rgba(244, 241, 234, 0.98)),
        var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
    letter-spacing: 0;
}

button,
select {
    color: inherit;
}

.site-head {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 76px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(16, 36, 31, 0.92);
    color: var(--surface);
    backdrop-filter: blur(18px);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.logo-mark {
    width: 164px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.logo-mark img {
    width: 136px;
    height: auto;
}

.logo strong {
    font-size: 26px;
    line-height: 1;
    font-weight: 820;
    letter-spacing: 0;
}

.logo span {
    color: rgba(255, 253, 248, 0.72);
    font-size: 14px;
    white-space: nowrap;
}

.logo > span:last-child {
    color: rgba(255, 253, 248, 0.78);
}

.site-head nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: rgba(255, 253, 248, 0.82);
    font-size: 14px;
    white-space: nowrap;
}

.site-head nav a {
    position: relative;
    padding: 28px 0;
}

.site-head nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;
    height: 2px;
    background: var(--brass);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 180ms ease;
}

.site-head nav a:hover::after,
.site-head nav a:focus-visible::after {
    transform: scaleX(1);
}

.showroom {
    min-height: calc(100vh - 76px);
    padding: 0 28px 42px;
}

.hero {
    position: relative;
    isolation: isolate;
    margin: 0 calc(50% - 50vw) 22px;
    padding: 44px max(28px, calc((100vw - 1500px) / 2 + 28px));
    min-height: 456px;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.72fr);
    align-items: center;
    gap: 44px;
    color: var(--surface);
    background:
        linear-gradient(115deg, rgba(16, 36, 31, 0.98) 0%, rgba(25, 58, 52, 0.98) 56%, rgba(237, 243, 239, 0.96) 56%, rgba(247, 239, 224, 0.98) 100%);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(122, 35, 52, 0.22), transparent 34%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.16), transparent 42%);
}

.hero-copy {
    max-width: 860px;
}

.eyebrow,
.panel-kicker {
    margin: 0 0 10px;
    color: var(--brass);
    font-size: 13px;
    font-weight: 760;
    line-height: 1.2;
}

.hero h1 {
    margin: 0;
    max-width: 860px;
    font-size: 64px;
    line-height: 1.04;
    font-weight: 820;
    letter-spacing: 0;
}

.lead {
    margin: 22px 0 0;
    max-width: 720px;
    color: rgba(255, 253, 248, 0.78);
    font-size: 18px;
    line-height: 1.85;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 11px 16px;
    background: var(--deep);
    color: var(--surface);
    font-weight: 720;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-2px);
}

.btn.secondary {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--deep);
}

.hero .btn {
    background: var(--surface);
    color: var(--deep);
}

.hero .btn.secondary {
    border-color: rgba(255, 253, 248, 0.32);
    background: transparent;
    color: var(--surface);
}

.hero-media {
    position: relative;
    min-height: 320px;
    align-self: stretch;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 30px 80px rgba(11, 31, 28, 0.28);
}

.hero-media img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
    background: var(--surface);
}

.hero-feature {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: grid;
    gap: 5px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background: rgba(16, 36, 31, 0.84);
    color: var(--surface);
    backdrop-filter: blur(14px);
}

.hero-feature span,
.hero-feature small {
    color: rgba(255, 253, 248, 0.68);
    font-size: 12px;
}

.hero-feature strong {
    font-size: 18px;
    line-height: 1.35;
}

body.demo-data .hero-copy::after {
    content: "示例态：未读取到 api/public.php 的有效数据";
    display: inline-flex;
    margin-top: 20px;
    border: 1px solid rgba(255, 253, 248, 0.28);
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.12);
    color: rgba(255, 253, 248, 0.9);
    padding: 10px 12px;
    font-size: 13px;
}

.proof-strip {
    max-width: 1500px;
    margin: 0 auto 18px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.9);
    box-shadow: 0 10px 30px rgba(16, 36, 31, 0.06);
}

.proof-strip div {
    min-height: 92px;
    padding: 18px 22px;
    display: grid;
    align-content: center;
    gap: 5px;
    border-right: 1px solid var(--line);
}

.proof-strip div:last-child {
    border-right: 0;
}

.proof-strip strong {
    color: var(--deep);
    font-size: 34px;
    line-height: 1;
}

.proof-strip span {
    color: var(--muted);
    font-size: 13px;
}

.workspace {
    max-width: 1500px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(540px, 1.28fr) minmax(300px, 0.7fr) minmax(330px, 0.78fr);
    gap: 16px;
    align-items: stretch;
}

.map-panel,
.community-panel,
.case-panel,
.gallery,
.case-info {
    border: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.94);
    box-shadow: 0 14px 34px rgba(16, 36, 31, 0.07);
}

.map-panel,
.community-panel,
.case-panel {
    min-width: 0;
    overflow: hidden;
}

.map-toolbar,
.panel-title {
    min-height: 76px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--line);
}

.map-toolbar h2,
.panel-title h2 {
    margin: 0;
    color: var(--deep);
    font-size: 20px;
    line-height: 1.2;
}

.panel-title span,
.map-toolbar span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.toolbar-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

select,
.screen-btn {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--deep);
    padding: 8px 12px;
}

select {
    max-width: 168px;
}

.screen-btn {
    cursor: pointer;
    white-space: nowrap;
    transition: transform 180ms ease, background 180ms ease;
}

.screen-btn:hover,
.screen-btn:focus-visible {
    transform: translateY(-1px);
    background: var(--surface-2);
}

.map-canvas {
    position: relative;
    min-height: 548px;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #dbe9ea;
}

.map-base {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
    user-select: none;
}

.map-sheen {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.42), transparent 28%, transparent 72%, rgba(46, 117, 136, 0.1)),
        linear-gradient(0deg, rgba(16, 36, 31, 0.05), transparent 35%);
}

.map-legend {
    min-height: 54px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

.map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.map-legend strong {
    margin-left: auto;
    color: var(--deep);
    font-weight: 760;
    white-space: nowrap;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--wine);
    box-shadow: 0 0 0 4px rgba(122, 35, 52, 0.12);
}

.legend-line {
    width: 26px;
    height: 3px;
    border-radius: 999px;
    background: var(--brass);
}

.legend-line.river {
    background: var(--ocean);
}

.marker {
    position: absolute;
    z-index: 5;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    min-height: 42px;
    max-width: 190px;
    border: 0;
    border-radius: 999px;
    padding: 6px 13px 6px 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 36, 31, 0.94);
    color: var(--surface);
    box-shadow: 0 16px 32px rgba(16, 36, 31, 0.26);
    cursor: pointer;
    transform: scale(1);
    transform-origin: center;
    transition: transform 180ms ease, background 180ms ease, opacity 180ms ease;
}

.marker b {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--brass);
    color: var(--deep);
    font-size: 13px;
    font-weight: 820;
}

.marker span {
    min-width: 0;
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 720;
}

.marker:hover,
.marker:focus-visible {
    transform: scale(1.045);
    outline: 3px solid rgba(173, 132, 80, 0.22);
}

.marker.active {
    background: var(--wine);
}

.marker.active b {
    background: var(--surface);
    color: var(--wine);
}

.map-empty {
    position: absolute;
    z-index: 6;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    max-width: min(320px, calc(100% - 36px));
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.92);
    padding: 16px 18px;
    color: var(--muted);
    text-align: center;
    box-shadow: var(--shadow);
}

.panel-summary {
    min-height: 70px;
    padding: 14px 18px;
    display: grid;
    align-content: center;
    gap: 3px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(47, 102, 88, 0.1), rgba(173, 132, 80, 0.1));
}

.panel-summary strong {
    color: var(--deep);
    font-size: 28px;
    line-height: 1;
}

.panel-summary span {
    color: var(--muted);
    font-size: 12px;
}

.community-list,
.case-list {
    padding: 12px;
    display: grid;
    gap: 12px;
    max-height: 612px;
    overflow: auto;
    overscroll-behavior: contain;
}

.community-card,
.case-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    overflow: hidden;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.community-card {
    min-height: 146px;
    padding: 15px;
    cursor: pointer;
}

.community-card:hover,
.community-card:focus-within,
.case-card:hover,
.case-card:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(16, 36, 31, 0.11);
}

.community-card.active {
    border-color: rgba(122, 35, 52, 0.55);
    box-shadow: 0 0 0 3px rgba(122, 35, 52, 0.12);
}

.community-card.active::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--wine);
}

.community-card h3,
.case-card h3 {
    margin: 0;
    color: var(--deep);
    font-size: 18px;
    line-height: 1.35;
}

.community-card p,
.case-card p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border: 1px solid rgba(47, 102, 88, 0.14);
    border-radius: 999px;
    padding: 4px 8px;
    background: #eef4ef;
    color: #42594f;
    font-size: 12px;
    line-height: 1.2;
}

.case-card a {
    display: grid;
    color: inherit;
}

.thumb {
    aspect-ratio: 16 / 10;
    min-height: 168px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        linear-gradient(135deg, #e5dfd5, #f8f4ec 48%, #dce9e6);
    color: #7c867f;
    font-size: 14px;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 260ms ease;
}

.case-card:hover .thumb img,
.case-card:focus-within .thumb img {
    transform: scale(1.035);
}

.case-card .body {
    padding: 15px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.btn.disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.empty {
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 34px 18px;
    text-align: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.52);
}

.detail {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 28px 46px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) 420px;
    gap: 20px;
    align-items: start;
}

.gallery,
.case-info {
    border-radius: 8px;
    overflow: hidden;
}

.main-image {
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #ded7cb, #f9f6ee);
    color: var(--muted);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbs {
    display: flex;
    gap: 8px;
    padding: 10px;
    overflow: auto;
    border-top: 1px solid var(--line);
}

.thumbs button {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    background: var(--surface);
    cursor: pointer;
    white-space: nowrap;
}

.case-info {
    padding: 24px;
}

.case-info h1 {
    margin: 0 0 12px;
    color: var(--deep);
    font-size: 34px;
    line-height: 1.16;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0;
}

.info-grid div {
    min-height: 70px;
    border-radius: 8px;
    padding: 12px;
    background: var(--surface-2);
}

.info-grid span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
}

.section {
    margin-top: 20px;
}

.section h2 {
    margin: 0 0 8px;
    color: var(--deep);
    font-size: 18px;
}

.section p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.demo .site-head {
    display: none;
}

.demo .showroom {
    padding: 14px;
}

.demo .hero,
.demo .proof-strip {
    display: none;
}

.demo .workspace {
    max-width: none;
    min-height: calc(100vh - 28px);
}

.marker,
.map-base,
.hero-media,
[data-reveal],
.community-card,
.case-card {
    will-change: transform, opacity;
}

@media (min-width: 1600px) {
    .hero h1 {
        font-size: 72px;
    }

    .hero {
        min-height: 500px;
    }
}

@media (max-width: 1240px) {
    .hero {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
    }

    .hero h1 {
        font-size: 54px;
    }

    .workspace {
        grid-template-columns: minmax(0, 1fr) minmax(310px, 0.58fr);
    }

    .map-panel {
        grid-column: 1 / -1;
    }

    .case-panel {
        grid-column: 1 / -1;
    }

    .case-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
    }

    .community-list {
        max-height: 520px;
    }
}

@media (max-width: 920px) {
    .site-head {
        min-height: 68px;
        padding: 0 20px;
    }

    .site-head nav {
        gap: 16px;
        overflow-x: auto;
    }

    .showroom {
        padding: 0 18px 32px;
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: 0;
        padding-top: 38px;
        padding-bottom: 34px;
        background: linear-gradient(160deg, rgba(16, 36, 31, 0.99), rgba(25, 58, 52, 0.98) 68%, rgba(237, 243, 239, 0.96));
    }

    .hero h1 {
        font-size: 46px;
    }

    .hero-media {
        min-height: 280px;
    }

    .proof-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .proof-strip div:nth-child(2) {
        border-right: 0;
    }

    .proof-strip div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

    .workspace,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .map-canvas {
        min-height: 460px;
    }

    .community-list,
    .case-list {
        max-height: none;
    }
}

@media (max-width: 640px) {
    .site-head {
        position: static;
        padding: 16px;
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .site-head nav {
        width: 100%;
        padding-bottom: 2px;
    }

    .logo-mark {
        width: 142px;
        height: 35px;
    }

    .logo-mark img {
        width: 118px;
    }

    .site-head nav a {
        padding: 4px 0 9px;
    }

    .site-head nav a::after {
        bottom: 3px;
    }

    .showroom,
    .detail {
        padding-left: 14px;
        padding-right: 14px;
    }

    .hero {
        margin-bottom: 16px;
        padding: 30px 14px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .lead {
        font-size: 16px;
        line-height: 1.75;
    }

    .hero-actions {
        display: grid;
    }

    .hero-media,
    .hero-media img {
        min-height: 230px;
    }

    .proof-strip {
        margin-bottom: 14px;
    }

    .proof-strip div {
        min-height: 84px;
        padding: 14px;
    }

    .proof-strip strong {
        font-size: 29px;
    }

    .map-toolbar,
    .panel-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .toolbar-tools {
        width: 100%;
        justify-content: stretch;
    }

    .toolbar-tools select,
    .toolbar-tools .screen-btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .map-canvas {
        min-height: 390px;
    }

    .map-legend {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .map-legend strong {
        width: 100%;
        margin-left: 0;
    }

    .marker {
        min-height: 38px;
        padding-right: 10px;
    }

    .marker b {
        width: 27px;
        height: 27px;
        flex-basis: 27px;
    }

    .marker span {
        max-width: 86px;
        font-size: 12px;
    }

    .case-list {
        grid-template-columns: 1fr;
    }

    .case-info h1 {
        font-size: 28px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
