﻿:root {
            --bg: #f2f7f3;
            --bg-grad-1: #f6fbf8;
            --bg-grad-2: #eaf3ee;
            --text: #22322b;
            --muted: #6f8378;
            --primary: #2a9d5f;
            --primary-strong: #1f7f4b;
            --surface: #ffffff;
            --chip: #e7efe9;
            --chip-active: #2a9d5f;
            --border: #dce8df;
            --shadow: 0 4px 12px rgba(26, 48, 34, 0.08);
            --radius: 12px;
        }

        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            color: var(--text);
            font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
            background:
                radial-gradient(circle at 90% -10%, #d8f4e4 0%, transparent 34%),
                radial-gradient(circle at -20% 20%, #e6f7ef 0%, transparent 36%),
                linear-gradient(180deg, var(--bg-grad-1), var(--bg-grad-2));
            min-height: 100vh;
        }

        .topbar {
            position: sticky;
            top: 0;
            z-index: 20;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            background: rgba(255, 255, 255, 0.82);
            backdrop-filter: blur(8px);
            border-bottom: 1px solid rgba(42, 157, 95, 0.14);
        }

        .brand {
            display: flex;
            flex-direction: column;
            line-height: 1.1;
            gap: 2px;
        }

        .brand-title {
            font-size: 14px;
            font-weight: 800;
            color: #1f3a2b;
        }

        .brand-sub {
            font-size: 12px;
            color: #6f8378;
        }

        .menu-btn,
        .top-tab {
            border: none;
            border-radius: 10px;
            height: 38px;
            cursor: pointer;
        }

        .menu-btn {
            width: 38px;
            background: #e7f3ec;
            color: #1e7f4a;
            font-size: 18px;
            font-weight: 700;
        }

        .tabs {
            display: flex;
            gap: 8px;
            flex: 1;
            overflow: auto;
        }

        .top-tab {
            padding: 0 14px;
            background: #eef6f1;
            color: #34644a;
            white-space: nowrap;
            transition: 0.2s ease;
        }

        .top-tab.active {
            background: linear-gradient(90deg, var(--primary), #42b372);
            color: #fff;
        }

        .drawer-mask {
            position: fixed;
            inset: 0;
            background: rgba(12, 26, 18, 0.35);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.22s ease;
            z-index: 25;
        }

        .drawer-mask.show {
            opacity: 1;
            pointer-events: auto;
        }

        .drawer {
            position: fixed;
            top: 0;
            left: 0;
            width: min(320px, 86vw);
            height: 100vh;
            background: #f9fdfb;
            border-right: 1px solid var(--border);
            box-shadow: 8px 0 24px rgba(20, 42, 29, 0.18);
            transform: translateX(-105%);
            transition: transform 0.24s ease;
            z-index: 30;
            padding: 14px 14px 20px;
            overflow: auto;
        }

        .drawer.show {
            transform: translateX(0);
        }

        .drawer-title {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 12px;
            color: #245236;
        }

        .accordion-item {
            border: 1px solid var(--border);
            border-radius: 12px;
            background: #fff;
            margin-bottom: 10px;
            overflow: hidden;
        }

        .accordion-header {
            width: 100%;
            border: 0;
            background: #f2f8f4;
            color: #2c5d42;
            padding: 12px;
            font-size: 14px;
            font-weight: 700;
            text-align: left;
            cursor: pointer;
        }

        .accordion-body {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.2s ease;
        }

        .accordion-body.open {
            max-height: 420px;
        }

        .fav-list {
            list-style: none;
            margin: 0;
            padding: 8px;
        }

        .fav-list li {
            border-radius: 10px;
            background: #f3faf6;
            margin-bottom: 8px;
            padding: 8px 10px;
            font-size: 13px;
            color: #2e5b42;
            cursor: pointer;
        }

        .fav-empty {
            padding: 10px;
            color: #7b9385;
            font-size: 13px;
        }

        .container {
            max-width: 1320px;
            margin: 0 auto;
            padding: 24px 24px 40px;
        }

        .hero {
            border-radius: 14px;
            border: 1px solid #d5e6da;
            background: linear-gradient(120deg, rgba(54, 164, 103, 0.12), rgba(174, 215, 190, 0.12));
            box-shadow: var(--shadow);
            padding: 14px 16px;
            margin-bottom: 12px;
        }

        .hero-title {
            margin: 0;
            font-size: 18px;
            color: #235739;
        }

        .hero-sub {
            margin-top: 6px;
            color: #61816e;
            font-size: 13px;
        }

        .search {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 10px 12px;
            display: flex;
            align-items: center;
            gap: 8px;
            box-shadow: var(--shadow);
        }

        .search input {
            flex: 1;
            border: 0;
            outline: 0;
            font-size: 14px;
            color: var(--text);
            background: transparent;
        }

        .search button {
            height: 34px;
            border: 0;
            border-radius: 9px;
            padding: 0 14px;
            background: linear-gradient(90deg, var(--primary), #39af6e);
            color: #fff;
            cursor: pointer;
            font-weight: 600;
        }

        .category-wrap {
            margin-top: 12px;
            display: flex;
            gap: 8px;
            overflow: auto;
            padding: 6px 2px 10px;
        }

        .chip {
            border: 0;
            border-radius: 999px;
            background: var(--chip);
            color: #365f47;
            padding: 8px 14px;
            font-size: 13px;
            cursor: pointer;
            white-space: nowrap;
            transition: 0.2s ease;
        }

        .chip.active {
            background: var(--chip-active);
            color: #fff;
        }

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

        .card {
            border-radius: 12px;
            overflow: hidden;
            border: 1px solid #e0ebe3;
            background: #fff;
            box-shadow: 0 2px 8px rgba(20, 36, 27, 0.08);
            cursor: pointer;
            transition: transform 0.18s ease;
        }

        .card:hover {
            transform: translateY(-2px);
        }

        .cover {
            position: relative;
            aspect-ratio: 16 / 9;
            background: #dceadf;
        }

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

        .mobile-ribbon {
            position: absolute;
            top: 10px;
            right: -34px;
            transform: rotate(35deg);
            background: #d94141;
            color: #f7fff9;
            font-size: 11px;
            font-weight: 700;
            padding: 3px 38px;
            letter-spacing: 0.2px;
        }

        .tip-ribbon {
            position: absolute;
            top: 10px;
            left: 10px;
            background: #f0b429;
            color: #553f00;
            font-size: 11px;
            font-weight: 700;
            border-radius: 999px;
            padding: 4px 8px;
            box-shadow: 0 2px 8px rgba(74, 52, 4, 0.24);
            z-index: 1;
        }

        .card-body {
            padding: 10px;
        }

        .title-row {
            display: flex;
            align-items: flex-start;
            gap: 8px;
        }

        .name {
            flex: 1;
            margin: 0;
            font-size: 14px;
            line-height: 1.35;
            font-weight: 700;
            color: #1f3a2b;
        }

        .star {
            border: 0;
            background: transparent;
            cursor: pointer;
            color: #a6b8ad;
            font-size: 18px;
            line-height: 1;
            padding: 0;
            margin-top: -1px;
        }

        .star.active {
            color: #f3b12a;
        }

        .meta {
            margin-top: 6px;
            font-size: 12px;
            color: var(--muted);
            line-height: 1.45;
            word-break: break-word;
        }

        .summary-meta {
            display: flex;
            align-items: flex-start;
            gap: 2px;
        }

        .summary-text {
            flex: 1;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 5;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.45;
            max-height: calc(1.45em * 5);
        }

        .load-state {
            text-align: center;
            color: #6f8779;
            font-size: 13px;
            padding: 20px 0 10px;
        }

        .detail-mask {
            position: fixed;
            inset: 0;
            z-index: 60;
            background: rgba(11, 24, 16, 0.45);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.26s ease;
            display: flex;
            justify-content: center;
            align-items: flex-end;
            padding: 0;
        }

        .detail-mask.show {
            opacity: 1;
            pointer-events: auto;
        }

        .detail-sheet {
            width: min(1080px, 100vw);
            height: 100vh;
            max-height: 100vh;
            background: #f7fcf9;
            border-radius: 18px 18px 0 0;
            border: 1px solid #d8e8de;
            box-shadow: 0 -14px 38px rgba(18, 39, 27, 0.28);
            overflow: auto;
            transform: translateY(100%);
            transition: transform 0.28s ease;
            position: relative;
        }

        .detail-mask.show .detail-sheet {
            transform: translateY(0);
        }

        .detail-top {
            position: sticky;
            top: 0;
            z-index: 2;
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(247, 252, 249, 0.92);
            backdrop-filter: blur(6px);
            border-bottom: 1px solid #dbe9e0;
            padding: 10px 12px;
        }

        .detail-back {
            border: 0;
            border-radius: 999px;
            height: 34px;
            padding: 0 12px;
            background: #e8f3ec;
            color: #235b3d;
            font-weight: 700;
            cursor: pointer;
        }

        .detail-title {
            margin: 0;
            font-size: 16px;
            color: #1f392b;
        }

        .detail-content {
            padding: 12px;
            display: grid;
            gap: 12px;
        }

        .detail-cover-card,
        .detail-card {
            background: #fff;
            border: 1px solid #dbe9e0;
            border-radius: 14px;
            box-shadow: 0 4px 14px rgba(20, 40, 29, 0.08);
            overflow: hidden;
        }

        .detail-cover {
            width: 100%;
            aspect-ratio: 16 / 9;
            object-fit: cover;
            background: #d8e9df;
        }

        .detail-cover-meta {
            padding: 10px;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .pill {
            display: inline-flex;
            align-items: center;
            border-radius: 999px;
            padding: 6px 10px;
            font-size: 12px;
            font-weight: 700;
            background: #e8f2ec;
            color: #2f6247;
        }

        .pill.tail {
            background: #2a9d5f;
            color: #fff;
            cursor: pointer;
        }

        .pill.ok {
            background: #daf3e5;
            color: #1f7f4b;
        }

        .pill.warn {
            background: #ffebeb;
            color: #c33333;
        }

        .pill.action {
            cursor: pointer;
            border: 1px solid #d4e8da;
            background: #eef6f1;
        }

        .pill.action.share {
            background: #e7f0ff;
            border-color: #cfe1ff;
            color: #28559a;
        }

        .pill.action.import {
            background: #fff4e6;
            border-color: #f4d6aa;
            color: #8a5605;
        }

        .detail-card {
            padding: 12px;
        }

        .detail-card h3 {
            margin: 0 0 8px;
            font-size: 15px;
            color: #224635;
        }

        .detail-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
            font-size: 13px;
            color: #3a5f49;
        }

        .detail-html {
            font-size: 13px;
            line-height: 1.65;
            color: #314f3e;
            word-break: break-word;
        }

        .detail-html img {
            max-width: 100%;
            height: auto;
            border-radius: 10px;
            border: 1px solid #dbe9e0;
            display: block;
            margin: 8px 0;
        }

        .detail-html a {
            color: #1f7f4b;
            text-decoration: underline;
        }

        .detail-html ul,
        .detail-html ol {
            padding-left: 20px;
            margin: 8px 0;
        }

        .detail-html li {
            margin: 4px 0;
        }

        .tip-box {
            border: 2px dashed #e6b94a;
            background: #fff8e8;
            border-radius: 12px;
            padding: 10px;
            margin-bottom: 10px;
        }

        .test-images {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .test-image-card {
            border-radius: 12px;
            border: 1px solid #dbe9e0;
            background: #fff;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(20, 40, 29, 0.08);
        }

        .test-image-card img {
            width: 100%;
            aspect-ratio: 16 / 9;
            object-fit: cover;
            display: block;
            background: #e8efe9;
            cursor: zoom-in;
        }

        .img-preview-mask {
            position: fixed;
            inset: 0;
            z-index: 90;
            display: none;
            align-items: center;
            justify-content: center;
            background: rgba(8, 18, 12, 0.88);
            padding: 16px;
        }

        .img-preview-mask.show {
            display: flex;
        }

        .img-preview-mask img {
            max-width: min(1200px, 95vw);
            max-height: 90vh;
            width: auto;
            height: auto;
            border-radius: 10px;
            border: 1px solid rgba(231, 245, 235, 0.25);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
            background: #fff;
        }

        .modal-mask {
            position: fixed;
            inset: 0;
            z-index: 92;
            display: none;
            align-items: center;
            justify-content: center;
            background: rgba(9, 20, 14, 0.58);
            padding: 14px;
        }

        .modal-mask.show {
            display: flex;
        }

        .modal-card {
            width: min(540px, 94vw);
            background: #fff;
            border: 1px solid #d7e8de;
            border-radius: 16px;
            box-shadow: 0 18px 44px rgba(10, 29, 18, 0.35);
            padding: 14px;
        }

        .modal-title {
            margin: 0;
            color: #214636;
            font-size: 17px;
            font-weight: 800;
        }

        .modal-sub {
            margin-top: 6px;
            font-size: 13px;
            color: #668472;
        }

        .modal-row {
            margin-top: 12px;
            display: flex;
            gap: 8px;
        }

        .modal-row input {
            flex: 1;
            border: 1px solid #d8e6dc;
            border-radius: 10px;
            height: 38px;
            padding: 0 10px;
            outline: none;
        }

        .modal-btn {
            border: 0;
            border-radius: 10px;
            height: 38px;
            padding: 0 12px;
            cursor: pointer;
            background: #2a9d5f;
            color: #fff;
            font-weight: 700;
        }

        .modal-btn.light {
            background: #e6f1ea;
            color: #28513d;
        }

        .import-code {
            margin-top: 12px;
            border: 2px dashed #ecc27e;
            border-radius: 12px;
            background: #fff8ec;
            color: #6d4700;
            font-size: 28px;
            font-weight: 900;
            text-align: center;
            letter-spacing: 4px;
            padding: 10px 12px;
        }

        .share-preview-wrap {
            margin-top: 12px;
            text-align: center;
        }

        .share-preview-wrap img {
            max-width: 100%;
            border-radius: 14px;
            border: 1px solid #d6e7dc;
            box-shadow: 0 8px 24px rgba(13, 32, 21, 0.18);
            background: #fff;
        }

        .share-actions {
            margin-top: 12px;
            display: flex;
            gap: 10px;
        }

        .share-actions .modal-btn {
            flex: 1;
        }

        .detail-actions {
            position: fixed;
            right: 18px;
            bottom: 18px;
            z-index: 66;
            padding: 0;
        }

        .detail-main-btn {
            width: 58px;
            border: 0;
            border-radius: 999px;
            height: 58px;
            cursor: pointer;
            font-weight: 700;
            color: #fff;
            background: linear-gradient(90deg, var(--primary), #3bb071);
            box-shadow: 0 10px 26px rgba(28, 98, 62, 0.38);
            font-size: 12px;
            line-height: 1.2;
            padding: 0 6px;
        }
           .official-search-btn {
            margin-left: auto;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: 38px;
            padding: 0 12px;
            border-radius: 10px;
            border: 1px solid #cbe2d3;
            background: #e7f3ec;
            color: #1e7f4a;
            text-decoration: none;
            font-size: 13px;
            font-weight: 700;
            white-space: nowrap;
            transition: 0.2s ease;
        }

        .official-search-btn:hover {
            background: #dff0e7;
            color: #17683d;
        }

        @media (max-width: 1260px) {
            .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
        }

        @media (max-width: 980px) {
            .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        }

        @media (max-width: 640px) {
            .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .container { padding: 14px 12px 26px; }
            .search button { padding: 0 12px; }
            .detail-grid { grid-template-columns: 1fr; }
            .test-images { grid-template-columns: 1fr; }
            .detail-sheet {
                width: 100vw;
                border-radius: 0;
                border: 0;
            }
            .detail-actions {
                right: 12px;
                bottom: 12px;
            }
        }
