/* ==============================================
   Travel Theme Consolidated CSS
   Merged: style.css + header.css + main.css + advanced-features.css + contact-page.css
   ============================================== */

/* ------------------------------
   Theme Metadata & Variables
   ------------------------------ */
:root {
    /* 浙江文化主色：龙泉青瓷 / 鲜明孔雀绿（提升对比度与辨识度） */
    --primary: #0E9E8C;
    --primary-rgb: 14 158 140;
    /* 朱砂红：印章 / 文化强标识（浙江双色系统，已启用） */
    --accent: #D1463B;
    --accent-rgb: 209, 70, 59;
    --bg-body: #f6f3ec;
    --bg-white: #ffffff;
    --text-main: #222222;
    --text-muted: #717171;
    --border-soft: #e7e1d6;
    --radius-lg: 16px;
    --radius-sm: 8px;
    --shadow-card: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-float: 0 4px 16px rgba(0,0,0,0.1);
    --transition: all 0.2s ease;
    --bottom-nav-height: 70px;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
}

.dark {
    /* 深墨青（浙江水墨底），不再用纯黑 / slate-950 */
    --bg-body: #0b1a17;
    /* 暗色下提亮青瓷绿，保证在墨青底上依然醒目 */
    --primary: #2BC4AD;
    --primary-rgb: 43 196 173;
    --bg-white: #0e221e;
    --text-main: #eaf3f0;
    --text-muted: #9fb8b0;
    --border-soft: #1c352e;
    --glass-bg: rgba(14, 34, 30, 0.7);
    --glass-border: rgba(255, 255, 255, 0.06);
}

/* 文化暖纸 / 墨青底：统一全站页面背景 */
.bg-body { background-color: var(--bg-body); }
body { background-color: var(--bg-body); }

/* 浙江文化暗色底：把纯黑/近黑的暗色表面统一改为墨青梯度，避免"全黑"观感。
   关键：class 暗色模式下 Tailwind 编译出的类名是 dark:bg-slate-950（带 dark: 前缀），
   形如 .dark\:bg-slate-950:is(.dark *)，故覆盖选择器必须写成 .dark .dark\:bg-slate-950 才能命中。 */
/* —— 实体色（卡片/页面底） —— */
.dark .dark\:bg-slate-950,
.dark .dark\:bg-stone-950 { background-color: #0b1a17 !important; }
.dark .dark\:bg-slate-900,
.dark .dark\:bg-stone-900 { background-color: #0e221e !important; }
.dark .dark\:bg-slate-800,
.dark .dark\:bg-stone-800 { background-color: #133029 !important; }
.dark .dark\:bg-slate-700,
.dark .dark\:bg-stone-700 { background-color: #1a3b32 !important; }
/* —— 边框 —— */
.dark .dark\:border-slate-800,
.dark .dark\:border-stone-800 { border-color: #1c352e !important; }
.dark .dark\:border-slate-700,
.dark .dark\:border-stone-700 { border-color: #244539 !important; }
/* —— 次要文字 —— */
.dark .dark\:text-slate-400,
.dark .dark\:text-stone-400 { color: #9fb8b0 !important; }
.dark .dark\:text-slate-300,
.dark .dark\:text-stone-300 { color: #c5d8d2 !important; }
/* —— 半透明覆盖层（导航栏 / 弹层 / 搜索框等）：同步去黑，避免叠加出纯黑 —— */
.dark .dark\:bg-slate-900\/90,
.dark .dark\:bg-stone-900\/90 { background-color: rgba(14, 34, 30, 0.9) !important; }
.dark .dark\:bg-slate-900\/80,
.dark .dark\:bg-stone-900\/80 { background-color: rgba(14, 34, 30, 0.8) !important; }
.dark .dark\:bg-slate-950\/50,
.dark .dark\:bg-stone-950\/50 { background-color: rgba(11, 26, 23, 0.5) !important; }
.dark .dark\:bg-slate-800\/50,
.dark .dark\:bg-stone-800\/50 { background-color: rgba(19, 48, 41, 0.5) !important; }
.dark .dark\:border-stone-800\/50 { border-color: rgba(28, 53, 46, 0.5) !important; }

/* 文化头（附近页等）：青瓷墨绿渐变，替代原纯黑 bg-slate-900，加强对比与朱砂红点缀 */
.zj-hero {
    background: linear-gradient(135deg, #0e3a31 0%, #14624f 45%, #0b1a17 100%);
    position: relative;
}
.zj-hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(120% 80% at 85% 12%, rgba(var(--accent-rgb), 0.20), transparent 60%);
}

/* —— 浙江特色视觉体系：强对比双色（青瓷绿 + 朱砂红） —— */
/* 朱砂红印章：浙江 / 在地文化的强标识徽章 */
.zj-seal {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent); color: #fff;
    font-weight: 700; letter-spacing: .06em; line-height: 1;
    border-radius: 9999px; padding: .28rem .7rem; font-size: .7rem;
    box-shadow: 0 3px 10px rgba(var(--accent-rgb), 0.4);
}
/* eyebrow：青瓷绿小标签 + 竖条，用于区块/hero 导语 */
.zj-eyebrow {
    display: inline-flex; align-items: center; gap: .55rem;
    color: var(--primary); font-weight: 800; letter-spacing: .22em;
    text-transform: uppercase; font-size: .68rem;
}
.zj-eyebrow::before {
    content: ""; width: 26px; height: 3px; border-radius: 3px;
    background: var(--primary); display: inline-block;
}
/* 区块标题：青瓷绿强调竖条 */
.zj-section-title { position: relative; padding-left: .8rem; }
.zj-section-title::before {
    content: ""; position: absolute; left: 0; top: .18em; bottom: .18em;
    width: 4px; border-radius: 4px; background: var(--primary);
}
/* 青瓷绿淡底图标容器 */
.zj-ico-wrap { background: rgba(var(--primary-rgb) / 0.12); }
/* 语言选项选中态（浙江青瓷绿高亮） */
.lang-selected {
    background: rgba(var(--primary-rgb) / 0.14);
    outline: 2px solid var(--primary); outline-offset: -2px;
    color: var(--primary) !important; font-weight: 600;
}

/* 模态遮罩（发布/AI 弹层）原本是 bg-stone-950/50 纯黑，改为墨青底色遮罩 */
.bg-stone-950\/50 { background-color: rgba(11, 26, 23, 0.5) !important; }

/* ------------------------------
   Reset & Base Styles
   ------------------------------ */
*, *::before, *::after { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/plus-jakarta-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/plus-jakarta-sans-500.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/plus-jakarta-sans-600.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/plus-jakarta-sans-700.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/plus-jakarta-sans-800.woff2') format('woff2'); }
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

/* ------------------------------
   Scrollbar
   ------------------------------ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { 
    background: var(--primary); 
    border-radius: 10px; 
    border: 3px solid transparent; 
    background-clip: content-box; 
}

@supports (padding: max(0px)) {
    #masthead { 
        padding-left: max(0.75rem, env(safe-area-inset-left)); 
        padding-right: max(0.75rem, env(safe-area-inset-right)); 
    }
}

/* ------------------------------
   Animations
   ------------------------------ */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.animate-fade-in { animation: fade-in 0.3s ease-out; }


.reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

/* ------------------------------
   Scroll Progress
   ------------------------------ */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, var(--primary), #3b82f6);
    z-index: 9999;
    transition: width 0.1s ease;
}


/* ------------------------------
   Card System
   ------------------------------ */
.glass-card {
    background: var(--bg-white);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-card);
}

/* 游记评论区（种草社区互评） */
.comments-area { font-size: 14px; }
.comments-area .comments-title { scroll-margin-top: 90px; }
.comment-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-direction: column; gap: 0.875rem; }
.comment-list .children { margin-left: 2.5rem; list-style: none; padding: 0; }
.comment-list .comment { position: relative; }
.comment-body {
    display: flex; gap: 0.75rem; padding: 0.875rem 1rem;
    background: #fff; border: 1px solid rgba(15,23,42,0.06); border-radius: 1rem;
}
.dark .comment-body { background: #1c1917; border-color: rgba(255,255,255,0.06); }
.comment-body .avatar { width: 40px; height: 40px; border-radius: 9999px; flex-shrink: 0; }
.comment-content { flex: 1; min-width: 0; }
.comment-meta { font-size: 12px; color: #78716c; margin-bottom: 2px; }
.dark .comment-meta { color: #a8a29e; }
.comment-meta .fn { font-weight: 600; color: #1c1917; font-style: normal; }
.dark .comment-meta .fn { color: #f5f5f4; }
.comment-content > p { margin: 0; color: #44403c; line-height: 1.6; }
.dark .comment-content > p { color: #d6d3d1; }
.comment-reply-link { font-size: 12px; color: var(--primary); font-weight: 600; }
.comment-respond { margin-top: 1.5rem; }
.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%; background: #f5f5f4; border: 1px solid #e7e5e4; color: #1c1917;
    border-radius: 1rem; padding: 0.875rem 1rem; outline: none;
}
.dark .comment-form textarea,
.dark .comment-form input[type="text"],
.dark .comment-form input[type="email"],
.dark .comment-form input[type="url"] {
    background: #292524; border-color: #44403c; color: #f5f5f4;
}
.comment-form textarea:focus,
.comment-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,158,140,0.15); }
.comment-form .comment-form-cookies-consent { font-size: 12px; color: #78716c; display: flex; gap: 0.5rem; align-items: center; }
.comment-form .comment-form-cookies-consent input { width: auto; }
.no-comments { margin-top: 1rem; font-size: 13px; }

.app-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .app-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .app-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .app-grid { grid-template-columns: repeat(5, 1fr); } }

.app-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-soft);
    position: relative;
    cursor: pointer;
}
.app-card:hover { box-shadow: var(--shadow-float); }
.app-card:active { opacity: 0.9; }
.app-card-img { aspect-ratio: 1 / 1; overflow: hidden; position: relative; }
.app-card-img img { width: 100%; height: 100%; object-fit: cover; }
.app-card-content { padding: 16px; }
.app-card-title { font-size: 16px; font-weight: 800; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-card-meta { font-size: 13px; color: var(--text-muted); }

@media (max-width: 767px) {
    .app-grid { grid-template-columns: 1fr; gap: 24px; padding: 0 16px; }
    .app-card { border-radius: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
    .app-card-img { aspect-ratio: 16 / 9; }
}



.faq-item {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ------------------------------
   Print Styles
   ------------------------------ */
@media print {
    #masthead, footer, #comparison-bar, .lg\:col-span-5, #video-controls, .Deluxe_Action_Bar, .no-print { 
        display: none !important; 
    }
    .lg\:col-span-7, .lg\:col-span-12 { 
        width: 100% !important; 
        position: relative !important; 
        top: 0 !important; 
    }
    body { 
        background: white !important; 
        color: black !important; 
    }
}

/* ==============================================
   Mobile APP-like Enhancements
   ============================================== */

/* Safe Area Support for iPhone X+ */
.safe-area-top {
    padding-top: max(1.5rem, env(safe-area-inset-top));
}
.safe-area-bottom {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}
.safe-area-right {
    padding-right: max(0rem, env(safe-area-inset-right));
}

/* Hide scrollbar class */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Prevent iOS text size adjust */
html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Prevent long-press selection on interactive elements */
#mobile-tab-bar *,
#travel-mobile-drawer-panel a,
#masthead button,
button {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* ---------- Mobile Drawer Animation ---------- */
#travel-mobile-drawer {
    opacity: 0;
    transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
#travel-mobile-drawer.open {
    opacity: 1;
}
#travel-mobile-drawer-backdrop {
    opacity: 0;
    transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
#travel-mobile-drawer.open #travel-mobile-drawer-backdrop {
    opacity: 1;
}
#travel-mobile-drawer-panel {
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
}
#travel-mobile-drawer.open #travel-mobile-drawer-panel {
    transform: translateX(0);
}

/* ---------- Bottom Tab Bar ---------- */
#mobile-tab-bar {
    transition: transform 0.28s ease, background-color 0.2s ease;
    will-change: transform;
}
#mobile-tab-bar.tab-hidden {
    transform: translateY(100%);
}
/* 浙江主题图标：顶栏 / 抽屉 / 搜索浮层 的图标统一为青瓷绿主色（覆盖 Tailwind 中性工具类） */
#masthead .material-symbols-outlined,
#travel-mobile-drawer .material-symbols-outlined,
#search-overlay .material-symbols-outlined {
    color: var(--primary);
}
#mobile-tab-bar .tab-btn {
    min-width: 48px;
    opacity: 0.72;
    transition: opacity .2s ease, transform .2s ease;
}
#mobile-tab-bar .tab-btn.active {
    opacity: 1;
}
/* AI 按钮始终高亮，不跟随未选中弱化 */
#mobile-tab-bar .tab-btn.ai-tab {
    opacity: 1;
}
#mobile-tab-bar .tab-btn .material-symbols-outlined {
    transition: transform .2s ease, opacity .2s ease;
}
#mobile-tab-bar .tab-btn.active .material-symbols-outlined {
    transform: scale(1.14);
}
/* 保护 AI 按钮白色图标（白字在青瓷绿圆底上，避免被主色覆盖成不可见） */
#mobile-tab-bar .material-symbols-outlined.text-white {
    color: #ffffff !important;
}

/* 底部导航多彩分标（含暗色适配） */
#mobile-tab-bar .tab-color-home   { color: #0d9488; }
.dark #mobile-tab-bar .tab-color-home   { color: #2dd4bf; }
#mobile-tab-bar .tab-color-spots  { color: #059669; }
.dark #mobile-tab-bar .tab-color-spots  { color: #34d399; }
#mobile-tab-bar .tab-color-nearby { color: #0284c7; }
.dark #mobile-tab-bar .tab-color-nearby { color: #38bdf8; }
#mobile-tab-bar .tab-color-hotel { color: #4f46e5; }
.dark #mobile-tab-bar .tab-color-hotel { color: #a78bfa; }
#mobile-tab-bar .tab-color-heritage { color: #b45309; }
.dark #mobile-tab-bar .tab-color-heritage { color: #f59e0b; }
#mobile-tab-bar .tab-color-me     { color: #d97706; }
.dark #mobile-tab-bar .tab-color-me     { color: #fbbf24; }

/* Tab icon active bounce */
.tab-icon-active {
    animation: tab-bounce 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes tab-bounce {
    0% { transform: scale(1); }
    45% { transform: scale(1.22); }
    100% { transform: scale(1); }
}

/* Tab button press feedback */
#mobile-tab-bar .tab-btn:active {
    transform: scale(0.92);
    opacity: 0.8;
}

/* Pressed state for all touch buttons */
.touch-manipulation:active {
    transform: scale(0.95);
}

/* ---------- Smooth scrollbar on mobile ---------- */
@media (max-width: 767px) {
    body {
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
    }
    /* 3-col spot card tight layout */
    .grid.grid-cols-3 > * .aspect-square {
        aspect-ratio: 1 / 1;
    }
    /* line clamp on mobile */
    .line-clamp-1 {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .line-clamp-2 {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    /* Make card touch-friendly */
    .app-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    /* Hero content tighter on mobile */
    section:first-of-type h1 br { display: none; }
}

/* Safe area inside main content bottom for tabbar */
@supports (padding: max(0px)) {
    main {
        padding-bottom: max(72px, calc(env(safe-area-inset-bottom) + 72px)) !important;
    }
    @media (min-width: 768px) {
        main { padding-bottom: 0 !important; }
    }
}


/* ---------- Hero section parallax hint ---------- */
.hero-parallax-wrap {
    transform: translateZ(0);
    will-change: transform;
}

/* ---------- Image progressive reveal ---------- */
img {
    transition: opacity 0.35s ease;
}

/* ---------- Fade in up on enter viewport ---------- */
.app-enter {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.33, 1, 0.68, 1);
}
.app-enter.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.app-enter.delay-1 { transition-delay: 60ms; }
.app-enter.delay-2 { transition-delay: 120ms; }
.app-enter.delay-3 { transition-delay: 180ms; }

/* Mobile / no-JS fallback: never let homepage sections stay invisible because reveal observer didn't fire */
@media (max-width: 640px) {
    .app-enter,
    .app-enter.delay-1,
    .app-enter.delay-2,
    .app-enter.delay-3,
    .app-enter.delay-4 {
        opacity: 1;
        transform: translateY(0);
    }
}
html.no-js .app-enter,
html.no-js .app-enter.delay-1,
html.no-js .app-enter.delay-2,
html.no-js .app-enter.delay-3,
html.no-js .app-enter.delay-4 {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Archive pages: app-like sticky filter bar & card image scrim ===== */
/* These are theme-independent so they work even though tailwind-built.css
   is a pre-built file and cannot see dynamically-generated class names. */
.archive-sticky-bar { position: sticky; top: 64px; z-index: 30; }
@media (min-width: 640px) { .archive-sticky-bar { top: 80px; } }
@media (min-width: 768px) { .archive-sticky-bar { top: 96px; } }
.archive-card-scrim { background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 60%); }

/* ===== Quick Navigation (首页金刚区) 彩色图标 ===== */
.quick-nav-icon-wrap {
    background-color: rgba(14, 158, 140, 0.10);
    color: #0E9E8C;
}
.dark .quick-nav-icon-wrap {
    background-color: rgba(43, 196, 173, 0.15);
    color: #2BC4AD;
}
/* 景点：青瓷绿 */
.quick-nav-item--green .quick-nav-icon-wrap { background-color: rgba(14, 158, 140, 0.10); color: #0E9E8C; }
.dark .quick-nav-item--green .quick-nav-icon-wrap { background-color: rgba(43, 196, 173, 0.15); color: #2BC4AD; }
/* 美食：朱砂红 */
.quick-nav-item--red .quick-nav-icon-wrap { background-color: rgba(209, 70, 59, 0.10); color: #D1463B; }
.dark .quick-nav-item--red .quick-nav-icon-wrap { background-color: rgba(232, 100, 90, 0.18); color: #F08076; }
/* 酒店：靛蓝 */
.quick-nav-item--blue .quick-nav-icon-wrap { background-color: rgba(37, 99, 235, 0.10); color: #2563EB; }
.dark .quick-nav-item--blue .quick-nav-icon-wrap { background-color: rgba(96, 165, 250, 0.18); color: #60A5FA; }
/* 民宿：琥珀 */
.quick-nav-item--amber .quick-nav-icon-wrap { background-color: rgba(217, 119, 6, 0.10); color: #D97706; }
.dark .quick-nav-item--amber .quick-nav-icon-wrap { background-color: rgba(251, 191, 36, 0.18); color: #FBBF24; }
/* 非遗：紫罗兰 */
.quick-nav-item--violet .quick-nav-icon-wrap { background-color: rgba(124, 58, 237, 0.10); color: #7C3AED; }
.dark .quick-nav-item--violet .quick-nav-icon-wrap { background-color: rgba(167, 139, 250, 0.18); color: #A78BFA; }
/* 活动：橙色 */
.quick-nav-item--orange .quick-nav-icon-wrap { background-color: rgba(234, 88, 12, 0.10); color: #EA580C; }
.dark .quick-nav-item--orange .quick-nav-icon-wrap { background-color: rgba(251, 146, 60, 0.18); color: #FB923C; }
/* 文创：粉色 */
.quick-nav-item--pink .quick-nav-icon-wrap { background-color: rgba(219, 39, 119, 0.10); color: #DB2777; }
.dark .quick-nav-item--pink .quick-nav-icon-wrap { background-color: rgba(244, 114, 182, 0.18); color: #F472B6; }
/* 攻略：青色 */
.quick-nav-item--cyan .quick-nav-icon-wrap { background-color: rgba(8, 145, 178, 0.10); color: #0891B2; }
.dark .quick-nav-item--cyan .quick-nav-icon-wrap { background-color: rgba(34, 211, 238, 0.18); color: #22D3EE; }
/* 积分：金色 */
.quick-nav-item--gold .quick-nav-icon-wrap { background-color: rgba(180, 83, 9, 0.10); color: #B45309; }
.dark .quick-nav-item--gold .quick-nav-icon-wrap { background-color: rgba(251, 191, 36, 0.18); color: #FBBF24; }
/* 附近：翠绿 */
.quick-nav-item--emerald .quick-nav-icon-wrap { background-color: rgba(22, 163, 74, 0.10); color: #16A34A; }
.dark .quick-nav-item--emerald .quick-nav-icon-wrap { background-color: rgba(74, 222, 128, 0.18); color: #4ADE80; }
/* 推广：玫红 */
.quick-nav-item--rose .quick-nav-icon-wrap { background-color: rgba(225, 29, 72, 0.10); color: #E11D48; }
.dark .quick-nav-item--rose .quick-nav-icon-wrap { background-color: rgba(251, 113, 133, 0.18); color: #FB7185; }
/* 我的：石板灰 */
.quick-nav-item--slate .quick-nav-icon-wrap { background-color: rgba(87, 83, 62, 0.10); color: #57533E; }
.dark .quick-nav-item--slate .quick-nav-icon-wrap { background-color: rgba(168, 162, 158, 0.18); color: #A8A29E; }
/* 助农：青柠绿 */
.quick-nav-item--lime .quick-nav-icon-wrap { background-color: rgba(132, 204, 22, 0.10); color: #84CC16; }
.dark .quick-nav-item--lime .quick-nav-icon-wrap { background-color: rgba(163, 230, 53, 0.18); color: #A3E635; }
/* 潮汐：青蓝 */
.quick-nav-item--teal .quick-nav-icon-wrap { background-color: rgba(13, 148, 136, 0.10); color: #0D9488; }
.dark .quick-nav-item--teal .quick-nav-icon-wrap { background-color: rgba(45, 212, 191, 0.18); color: #2DD4BF; }

/* ===== Archive / Taxonomy hero header (replaces missing Tailwind gradient classes) ===== */
.archive-hero {
    position: relative;
    height: auto;
    min-height: 0;
    padding: 2rem 0 1.5rem;
    width: 100%;
    overflow: hidden;
    background-color: var(--bg-body);
    border-bottom: 1px solid var(--border-soft);
}
@media (min-width: 640px) { .archive-hero { padding: 2.5rem 0 2rem; } }
@media (min-width: 768px) { .archive-hero { padding: 3rem 0 2.5rem; } }
.archive-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 2px 2px, var(--primary) 1px, transparent 0);
    background-size: 26px 26px;
    opacity: 0.04;
    pointer-events: none;
}
.dark .archive-hero::before { opacity: 0.06; }
.archive-hero-inner { position: relative; z-index: 10; }
.archive-hero-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (min-width: 640px) { .archive-hero-icon { width: 3.5rem; height: 3.5rem; } }
.archive-hero-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    opacity: 0.85;
}
.archive-hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.15;
}
@media (min-width: 640px) { .archive-hero-title { font-size: 2rem; } }
@media (min-width: 768px) { .archive-hero-title { font-size: 2.5rem; } }
.archive-hero-sub {
    color: var(--text-muted);
    font-weight: 500;
    max-width: 36rem;
    font-size: 0.875rem;
}
@media (min-width: 640px) { .archive-hero-sub { font-size: 1rem; } }

/* Tailwind 任意值类 text-[10px] 未被预构建扫描到，手动补（25+ 文件使用） */
.text-\[10px\] {
    font-size: 10px;
}

/* 游记点赞按钮（种草社区互动） —— 点赞态用自定义类，避免依赖 Tailwind 预构建里未必存在的 rose 色 */
.like-btn.is-liked {
    background: #fff1f2;
    color: #f43f5e;
    border-color: #fecdd3;
}
.dark .like-btn.is-liked {
    background: rgba(244, 63, 94, 0.12);
    color: #fb7185;
    border-color: rgba(244, 63, 94, 0.35);
}

/* 游记评论区样式（亮/暗双主题，与卡片风格统一） */
.comment-list { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-direction: column; gap: 14px; }
.comment-list li { background: var(--bg-white); border: 1px solid var(--border-soft); border-radius: 16px; padding: 16px 18px; }
.comment-list .comment-body { font-size: 14px; }
.comment-list .comment-meta { margin-bottom: 6px; }
.comment-list .comment-author { font-weight: 600; color: var(--text-main); }
.comment-list .comment-metadata { font-size: 12px; color: var(--text-muted); }
.comment-list .comment-content { margin-top: 6px; line-height: 1.7; color: var(--text-main); }
.comment-list .children { list-style: none; margin: 10px 0 0; padding-left: 18px; border-left: 2px solid var(--border-soft); display: flex; flex-direction: column; gap: 10px; }
.comment-list .children li { padding: 12px 14px; }
.comment-list .reply { margin-top: 8px; }
.comment-list .comment-reply-link { color: var(--primary); font-size: 12px; font-weight: 600; }
.comment-list img.avatar, .zj-comment-item img.avatar { border-radius: 9999px; }
.dark .comment-list li { background: #0e221e; border-color: rgba(255, 255, 255, 0.08); }
.dark .comment-list .children { border-left-color: rgba(255, 255, 255, 0.12); }

.zj-comment-tip {
    margin: 10px 0 14px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    background: rgba(14, 158, 140, 0.12);
    color: var(--primary);
    border: 1px solid rgba(14, 158, 140, 0.3);
}

/* ============================================================
   赚钱体系（推广 / 任务 / 排行榜）自定义样式
   纯 CSS，不依赖 Tailwind 预构建，亮/暗双主题
   ============================================================ */

/* 通用数据卡片 earn-card */
.earn-card {
    background: var(--bg-white);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 16px 18px;
    transition: transform .18s ease, box-shadow .18s ease;
}
.earn-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}
.earn-card-primary {
    background: linear-gradient(135deg, rgba(14, 158, 140, 0.16), rgba(14, 158, 140, 0.05));
    border-color: rgba(14, 158, 140, 0.4);
}
.earn-card-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 6px;
}
.earn-card-val {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.earn-card-primary .earn-card-val {
    color: var(--primary);
}

/* 任务进度条 */
.task-bar {
    height: 7px;
    border-radius: 9999px;
    background: var(--border-soft);
    overflow: hidden;
    margin-top: 10px;
}
.task-bar-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #0E9E8C, #2BC4AD);
    transition: width .4s ease;
}
.task-claim { white-space: nowrap; }
.task-claim:disabled { opacity: .55; cursor: not-allowed; }

/* 排行榜行 */
.rank-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--bg-white);
    border: 1px solid var(--border-soft);
    transition: background .15s ease;
}
.rank-row:hover { background: rgba(14, 158, 140, 0.06); }
.rank-no {
    width: 30px;
    flex: 0 0 30px;
    text-align: center;
    font-weight: 800;
    font-size: 15px;
    color: var(--text-muted);
}
.rank-no.top1 { color: #EAB308; }
.rank-no.top2 { color: #9CA3AF; }
.rank-no.top3 { color: #B45309; }
.rank-avatar {
    width: 38px;
    flex: 0 0 38px;
    height: 38px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(14, 158, 140, 0.16);
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}
.rank-name { font-weight: 600; color: var(--text-main); }
.rank-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.rank-amt {
    margin-left: auto;
    font-weight: 800;
    color: var(--primary);
    font-size: 15px;
}

/* 排行榜周期切换 tab */
.rank-tab {
    padding: 7px 16px;
    border-radius: 9999px;
    border: 1px solid var(--border-soft);
    background: var(--bg-white);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}
.rank-tab:hover { color: var(--primary); border-color: rgba(14, 158, 140, 0.4); }
.rank-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* 暗色主题适配 */
.dark .earn-card { background: #0e221e; border-color: rgba(255, 255, 255, 0.08); }
.dark .earn-card-primary { background: linear-gradient(135deg, rgba(43, 196, 173, 0.18), rgba(43, 196, 173, 0.05)); border-color: rgba(43, 196, 173, 0.45); }
.dark .earn-card-label { color: rgba(255, 255, 255, 0.6); }
.dark .earn-card-val { color: #f4f4f5; }
.dark .earn-card-primary .earn-card-val { color: #2BC4AD; }
.dark .earn-card:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4); }
.dark .task-bar { background: rgba(255, 255, 255, 0.12); }
.dark .rank-row { background: #0e221e; border-color: rgba(255, 255, 255, 0.08); }
.dark .rank-row:hover { background: rgba(43, 196, 173, 0.1); }
.dark .rank-name { color: #f4f4f5; }
.dark .rank-tab { background: #0e221e; border-color: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.65); }
.dark .rank-tab:hover { color: #2BC4AD; border-color: rgba(43, 196, 173, 0.5); }
.dark .rank-tab.active { background: #2BC4AD; border-color: #2BC4AD; color: #06231e; }

/* ============================================================
   手机端 APP 化全面升级（2026-07-29）
   浙江文化风 · 更 APP 化：安全区 / 滚动隐藏顶栏 / 底部抽屉 / 下拉刷新 / 页面转场 / PWA / 骨架屏
   全部为渐进增强：不支持的浏览器自动忽略，不影响桌面端。
   ============================================================ */

/* ---------- 1. 刘海/灵动岛安全区 + 滚动隐藏顶栏（移动端） ---------- */
@media (max-width: 767px) {
    /* 顶栏顶部内缩到安全区，毛玻璃栏从 y=0 起铺满，避免状态栏透出页面内容 */
    #masthead { padding-top: 0 !important; transition: transform .32s cubic-bezier(.4,0,.2,1), background-color .2s ease; will-change: transform; }
    #masthead > div:first-child { padding-top: max(0.75rem, env(safe-area-inset-top)); }
    /* 向下滚动隐藏顶栏、向上滚动/回到顶部显现（APP 质感） */
    #masthead.header-hidden { transform: translateY(-130%); }
    /* 内容区顶部留出 安全区 + 顶栏高度，避免被固定栏遮挡 */
    main { padding-top: calc(env(safe-area-inset-top) + 4rem) !important; }
}

/* ---------- 2. 登录弹窗：移动端改为底部抽屉（其余两个已是底部抽屉） ---------- */
@media (max-width: 767px) {
    #login-modal { align-items: flex-end !important; padding: 0 !important; }
    #login-modal > .relative {
        width: 100% !important;
        max-width: none !important;
        border-radius: 1.75rem 1.75rem 0 0 !important;
        max-height: 92vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ---------- 3. 底部抽屉统一滑入动画 + 拖拽手柄 ---------- */
@media (max-width: 767px) {
    #ai-chat-modal > div:last-child,
    #note-modal > div:last-child {
        animation: sheet-up .34s cubic-bezier(.32,.72,0,1);
    }
    #login-modal > .relative { animation: sheet-up .34s cubic-bezier(.32,.72,0,1); }
    /* 顶部拖拽手柄（抓取条） */
    #ai-chat-modal > div:last-child::before,
    #note-modal > div:last-child::before {
        content: "";
        display: block;
        flex: none;
        width: 38px; height: 4px;
        margin: 8px auto 2px;
        border-radius: 9999px;
        background: rgba(0,0,0,.16);
    }
    .dark #ai-chat-modal > div:last-child::before,
    .dark #note-modal > div:last-child::before { background: rgba(255,255,255,.22); }
}
@keyframes sheet-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* ---------- 4. 下拉刷新指示器 ---------- */
#ptr-indicator {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 10px);
    left: 50%;
    width: 40px; height: 40px;
    margin-left: -20px;
    border-radius: 50%;
    background: var(--bg-white);
    box-shadow: var(--shadow-float);
    display: flex; align-items: center; justify-content: center;
    z-index: 130;
    opacity: 0;
    transform: translateY(-64px);
    transition: transform .22s ease, opacity .22s ease;
    pointer-events: none;
}
#ptr-indicator.show { opacity: 1; }
#ptr-indicator.pull { transform: translateY(0); }
#ptr-indicator.spin .ptr-spinner { animation: ptr-rotate .8s linear infinite; }
.ptr-spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(var(--primary-rgb) / .25);
    border-top-color: var(--primary);
    border-radius: 50%;
}
@keyframes ptr-rotate { to { transform: rotate(360deg); } }

/* ---------- 5. 页面转场（View Transitions API，跨文档，渐进增强） ---------- */
@media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }
    ::view-transition-old(root) { animation: vt-slide-out .26s cubic-bezier(.4,0,.2,1) both; }
    ::view-transition-new(root) { animation: vt-slide-in .26s cubic-bezier(.4,0,.2,1) both; }
}
@keyframes vt-slide-out { to { transform: translateX(-22px); opacity: 0; } }
@keyframes vt-slide-in  { from { transform: translateX(22px); opacity: 0; } }

/* ---------- 6. APP 启动屏（仅独立模式/添加到主屏后显示） ---------- */
#app-splash {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg-body);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 18px;
    transition: opacity .45s ease;
}
#app-splash.hide { opacity: 0; pointer-events: none; }
#app-splash .splash-mark {
    width: 88px; height: 88px; border-radius: 24px;
    background: linear-gradient(135deg, var(--primary), #2BC4AD);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 30px rgba(14,158,140,.4);
    animation: splash-pop .6s cubic-bezier(.34,1.56,.64,1) both;
}
#app-splash .splash-mark .material-symbols-outlined { color: #fff; font-size: 48px; }
#app-splash .splash-name { font-size: 18px; font-weight: 600; color: var(--text-main); letter-spacing: .04em; }
#app-splash .splash-spinner {
    width: 26px; height: 26px; border: 3px solid rgba(var(--primary-rgb) / .25);
    border-top-color: var(--primary); border-radius: 50%;
    animation: ptr-rotate .8s linear infinite;
}
@keyframes splash-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- 8. 触感反馈 + 骨架屏 ---------- */
@media (max-width: 767px) {
    a, button, .tab-btn, .touch-manipulation, .app-bottom-tab-bar {
        -webkit-tap-highlight-color: transparent;
    }
}
.skeleton {
    background: linear-gradient(90deg, rgba(0,0,0,.05) 25%, rgba(0,0,0,.11) 37%, rgba(0,0,0,.05) 63%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
    border-radius: 10px;
}
.dark .skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.11) 37%, rgba(255,255,255,.05) 63%);
    background-size: 400% 100%;
}
@keyframes skeleton-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------- 首页 Hero 高度：手机端降低，露出下方内容 ---------- */
.home-hero { min-height: 62vh; }
@media (min-width: 640px) { .home-hero { min-height: 78vh; } }

/* ---------- AI 内容分析标签（advanced-features.js 动态注入） ---------- */
.ai-tag {
    display: inline-block;
    padding: .25rem .75rem;
    border-radius: 9999px;
    background: rgba(14, 158, 140, .12);
    color: #0E9E8C;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.4;
}
.dark .ai-tag { background: rgba(43, 196, 173, .18); color: #2BC4AD; }

/* ---------- 首页内容区块移动端左右边距（避免贴边，营造 App 满屏感） ---------- */
@media (max-width: 767px) {
    .app-enter { padding-left: 1rem; padding-right: 1rem; }
}
