:root {
    --brand: #0f766e;
    --brand-dark: #134e4a;
    --accent: #c2410c;
    --gold: #b7791f;
    --ink: #172026;
    --muted: #64748b;
    --line: #dbe4ea;
    --paper: #ffffff;
    --soft: #f4f7f8;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(15, 118, 110, 0.08), transparent 360px),
        var(--soft);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    padding-bottom: 110px;
}

button,
input {
    font: inherit;
}

.site-header {
    background:
        linear-gradient(135deg, rgba(15, 76, 72, 0.96), rgba(15, 118, 110, 0.92)),
        radial-gradient(circle at top right, rgba(250, 204, 21, 0.32), transparent 32%);
    color: #fff;
    padding: 26px 16px 24px;
}

.header-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 22px;
    align-items: end;
}

.brand-block {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.brand-mark {
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
    letter-spacing: 0;
}

.eyebrow {
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    margin-bottom: 6px;
}

h1 {
    font-size: clamp(1.55rem, 4vw, 2.55rem);
    line-height: 1.15;
    font-weight: 800;
}

.subtitle {
    color: rgba(255, 255, 255, 0.82);
    margin-top: 10px;
    line-height: 1.6;
}

.search-panel {
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
}

.search-box {
    position: relative;
}

.search-box::before {
    content: "🔍";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
}

.search-box input {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px 12px 42px;
    border: 0;
    border-radius: 8px;
    outline: none;
    color: var(--ink);
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.search-box input:focus {
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.36), inset 0 0 0 1px var(--gold);
}

.stats {
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.88rem;
    margin-top: 10px;
}

.join-directory-btn {
    width: 100%;
    min-height: 44px;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--brand-dark);
    cursor: pointer;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.join-directory-btn:hover {
    transform: translateY(-1px);
    background: #fff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

.nav-shell {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(14px);
}

.nav-copy {
    max-width: 1120px;
    margin: 0 auto;
    padding: 11px 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 0.84rem;
}

.nav-copy strong {
    color: var(--ink);
    font-size: 0.95rem;
    flex: 0 0 auto;
}

.nav-copy span {
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-copy span::after {
    content: " →";
    color: var(--accent);
    font-weight: 800;
}

.category-nav {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 16px 14px;
    white-space: nowrap;
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 118, 110, 0.45) transparent;
}

.category-nav::-webkit-scrollbar {
    height: 4px;
}

.category-nav::-webkit-scrollbar-thumb {
    background: rgba(15, 118, 110, 0.45);
    border-radius: 999px;
}

.cat-btn {
    min-height: 38px;
    padding: 8px 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    flex: 0 0 auto;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.cat-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 118, 110, 0.45);
}

.cat-btn.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.24);
}

.container {
    max-width: 1120px;
    margin: 20px auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.card {
    min-height: 158px;
    background: var(--paper);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
}

.card:hover {
    border-color: rgba(15, 118, 110, 0.32);
    box-shadow: var(--shadow);
}

.card-name {
    color: var(--brand-dark);
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.45;
    margin-bottom: 10px;
}

.card-info {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
    margin-bottom: 7px;
    word-break: break-word;
}

.card-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
    gap: 8px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
}

.action-btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 10px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.btn-tel {
    background: #e9f7f5;
    color: #0f766e;
}

.btn-wechat {
    background: #eef8ea;
    color: #32830d;
}

.btn-web {
    background: #fff4e6;
    color: #b45309;
}

.no-result {
    max-width: 560px;
    margin: 42px auto;
    padding: 26px 16px;
    color: var(--muted);
    text-align: center;
    display: none;
}

.floating-actions {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(-50%);
    width: min(420px, calc(100vw - 92px));
}

.install-btn,
.back-top,
.guide-close {
    border: 0;
    cursor: pointer;
}

.install-btn {
    min-height: 58px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 18px 10px 12px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--brand));
    box-shadow: 0 18px 38px rgba(12, 74, 110, 0.26);
}

.install-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.2);
    font-size: 1.45rem;
    line-height: 1;
}

.install-btn strong,
.install-btn small {
    display: block;
    text-align: left;
    line-height: 1.25;
}

.install-btn small {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.76rem;
    margin-top: 2px;
}

.back-top {
    position: fixed;
    right: 18px;
    bottom: 88px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    color: var(--brand-dark);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top-icon {
    width: 15px;
    height: 15px;
    border-top: 3px solid currentColor;
    border-left: 3px solid currentColor;
    transform: translateY(4px) rotate(45deg);
}

.back-top-icon::after {
    content: "";
    position: absolute;
    width: 3px;
    height: 18px;
    left: 4px;
    top: -1px;
    border-radius: 999px;
    background: currentColor;
}

.back-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.guide-mask {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: end center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.46);
}

.guide-mask[hidden] {
    display: none;
}

.guide-sheet {
    width: min(560px, 100%);
    background: #fff;
    border-radius: 8px;
    padding: 22px;
    position: relative;
    box-shadow: var(--shadow);
}

.guide-sheet .eyebrow {
    color: var(--brand);
}

.guide-sheet h2 {
    font-size: 1.35rem;
    margin-bottom: 14px;
}

.guide-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #334155;
    font-size: 1.45rem;
    line-height: 1;
}

.guide-content ol {
    padding-left: 22px;
    color: #334155;
    line-height: 1.8;
}

.guide-content p {
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 10px;
}

.mail-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #e9f7f5;
    color: var(--brand-dark);
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 760px) {
    .header-inner {
        grid-template-columns: 1fr;
    }

    .brand-mark {
        width: 46px;
        height: 46px;
    }

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

    .container {
        grid-template-columns: 1fr;
        margin-top: 14px;
    }

    .floating-actions {
        left: 12px;
        right: 66px;
        bottom: 12px;
        width: auto;
        transform: none;
    }

    .install-btn {
        flex: 1;
        max-width: none;
        justify-content: flex-start;
    }

    .back-top {
        right: 12px;
        bottom: 18px;
    }
}
