* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif; background:#f5f5f5; color:#333; max-width:480px; margin:0 auto; min-height:100vh; position:relative; overflow-x:hidden; }

.page { display:none; min-height:100vh; }
.page.active { display:block; }

.nav-bar { background:linear-gradient(135deg,#C41E3A,#E86252); color:#fff; padding:16px 20px; display:flex; align-items:center; gap:12px; position:sticky; top:0; z-index:100; }
.nav-back { font-size:22px; cursor:pointer; width:32px; height:32px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:rgba(255,255,255,0.2); flex-shrink:0; user-select:none; }
.nav-title { font-size:18px; font-weight:bold; flex:1; text-align:center; margin-right:44px; }

/* Home */
.home-header { background:linear-gradient(180deg,#C41E3A 0%,#E86252 50%,#f5f5f5 50%); padding:40px 20px 20px; text-align:center; }
.home-header h1 { font-size:28px; color:#fff; letter-spacing:4px; margin-bottom:8px; }
.home-header p { font-size:15px; color:rgba(255,255,255,0.85); letter-spacing:2px; }
.home-banner { margin:16px 20px 28px; padding:18px; background:rgba(255,255,255,0.2); border-radius:12px; text-align:center; font-size:15px; color:#fff; }
.home-cards { display:flex; padding:0 16px; gap:16px; }
.home-card { flex:1; background:#fff; border-radius:16px; padding:32px 16px; text-align:center; box-shadow:0 4px 20px rgba(0,0,0,0.08); cursor:pointer; transition:transform 0.2s; user-select:none; }
.home-card:active { transform:scale(0.96); }
.home-card-icon { width:64px; height:64px; border-radius:50%; display:flex; align-items:center; justify-content:center; margin:0 auto 14px; font-size:30px; }
.home-card-spots .home-card-icon { background:linear-gradient(135deg,#4A90D9,#6BB5FF); }
.home-card-food .home-card-icon { background:linear-gradient(135deg,#E86252,#FF8C42); }
.home-card h2 { font-size:18px; margin-bottom:6px; }
.home-card p { font-size:13px; color:#999; }
.home-tips { margin:28px 16px; padding:20px; background:#fff; border-radius:12px; box-shadow:0 2px 10px rgba(0,0,0,0.04); }
.home-tips h3 { font-size:16px; color:#C41E3A; margin-bottom:12px; padding-bottom:12px; border-bottom:1px solid #f0f0f0; }
.home-tips li { font-size:14px; color:#666; line-height:2; list-style:none; padding-left:16px; position:relative; }
.home-tips li::before { content:''; position:absolute; left:0; top:50%; transform:translateY(-50%); width:6px; height:6px; background:#C41E3A; border-radius:50%; }

/* Category Tabs */
.cat-bar { background:#fff; padding:12px 0; box-shadow:0 2px 8px rgba(0,0,0,0.05); overflow-x:auto; white-space:nowrap; -webkit-overflow-scrolling:touch; }
.cat-bar::-webkit-scrollbar { display:none; }
.cat-item { display:inline-block; padding:8px 18px; margin:0 4px; font-size:14px; color:#666; border-radius:20px; background:#f5f5f5; cursor:pointer; user-select:none; transition:all 0.2s; }
.cat-item:first-child { margin-left:12px; }
.cat-item:last-child { margin-right:12px; }
.cat-item.active { color:#fff; background:#C41E3A; }

/* Map Container */
.map-container { height:300px; position:relative; }
.map-container .leaflet-container { height:100%; width:100%; }
.map-count { position:absolute; top:10px; left:10px; background:rgba(0,0,0,0.6); color:#fff; font-size:12px; padding:5px 14px; border-radius:12px; z-index:1000; pointer-events:none; }

/* Spot List */
.spot-list { background:#fff; border-radius:20px 20px 0 0; box-shadow:0 -4px 16px rgba(0,0,0,0.06); max-height:calc(100vh - 364px); overflow-y:auto; -webkit-overflow-scrolling:touch; }
.spot-list-header { display:flex; justify-content:space-between; align-items:center; padding:14px 20px; font-size:15px; font-weight:bold; border-bottom:1px solid #f0f0f0; position:sticky; top:0; background:#fff; z-index:1; border-radius:20px 20px 0 0; cursor:pointer; }
.spot-item { display:flex; align-items:flex-start; padding:16px 20px; border-bottom:1px solid #f0f0f0; cursor:pointer; transition:background 0.2s; }
.spot-item:active { background:#f9f9f9; }
.spot-rank { width:32px; height:32px; line-height:32px; text-align:center; background:#C41E3A; color:#fff; font-size:13px; font-weight:bold; border-radius:50%; margin-right:14px; flex-shrink:0; }
.spot-info { flex:1; min-width:0; }
.spot-name { font-size:16px; font-weight:bold; margin-bottom:4px; }
.spot-rating { font-size:12px; color:#f90; font-weight:normal; margin-left:8px; }
.spot-desc { font-size:13px; color:#999; line-height:1.5; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; margin-bottom:6px; }
.spot-tags { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:4px; }
.spot-tag { font-size:11px; color:#C41E3A; background:rgba(196,30,58,0.07); padding:2px 10px; border-radius:10px; }
.spot-addr { font-size:12px; color:#999; }
.spot-nav { display:flex; flex-direction:column; align-items:center; justify-content:center; width:50px; height:50px; background:linear-gradient(135deg,#4A90D9,#6BB5FF); border-radius:12px; margin-left:10px; flex-shrink:0; cursor:pointer; font-size:12px; color:#fff; }

/* Food Grid */
.food-header { background:linear-gradient(135deg,#C41E3A 0%,#E86252 100%); padding:32px 20px 40px; text-align:center; }
.food-header h1 { font-size:26px; color:#fff; letter-spacing:3px; margin-bottom:8px; }
.food-header p { font-size:15px; color:rgba(255,255,255,0.8); }
.food-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; padding:16px; }
.food-card { background:#fff; border-radius:14px; padding:24px 16px 18px; text-align:center; box-shadow:0 2px 12px rgba(0,0,0,0.05); cursor:pointer; transition:transform 0.2s; user-select:none; }
.food-card:active { transform:scale(0.97); }
.food-card-icon { width:58px; height:58px; border-radius:50%; background:linear-gradient(135deg,#FFF3E0,#FFE0B2); display:flex; align-items:center; justify-content:center; margin:0 auto 10px; font-size:26px; }
.food-card h3 { font-size:17px; margin-bottom:4px; }
.food-card .shop-count { font-size:12px; color:#C41E3A; background:rgba(196,30,58,0.07); display:inline-block; padding:3px 12px; border-radius:10px; margin-bottom:8px; }
.food-card .food-desc { font-size:12px; color:#999; line-height:1.4; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }

/* Food Detail - Shop List */
.fd-header { background:linear-gradient(135deg,#C41E3A 0%,#FF6B6B 100%); padding:30px 20px 36px; text-align:center; }
.fd-icon { font-size:40px; margin-bottom:10px; }
.fd-name { font-size:22px; font-weight:bold; color:#fff; }
.fd-desc { font-size:14px; color:rgba(255,255,255,0.85); margin-top:6px; line-height:1.5; }
.fd-count { font-size:13px; color:rgba(255,255,255,0.65); margin-top:8px; }
.shop-card { display:flex; background:#fff; border-radius:14px; padding:18px; margin:12px 16px; box-shadow:0 2px 10px rgba(0,0,0,0.05); align-items:flex-start; cursor:pointer; }
.shop-card-rank { width:40px; flex-shrink:0; text-align:center; padding-top:4px; }
.rank-badge { font-size:10px; padding:4px 8px; border-radius:6px; color:#fff; display:inline-block; }
.rank-gold { background:linear-gradient(135deg,#FFD700,#FFA000); }
.rank-silver { background:linear-gradient(135deg,#C0C0C0,#909090); }
.rank-bronze { background:linear-gradient(135deg,#CD853F,#A0522D); }
.rank-num { font-size:14px; color:#999; font-weight:bold; }
.shop-content { flex:1; min-width:0; margin-left:12px; }
.shop-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.shop-top h3 { font-size:16px; font-weight:bold; }
.shop-top .rating { font-size:14px; color:#f90; flex-shrink:0; }
.shop-row { display:flex; margin-bottom:5px; font-size:13px; }
.shop-label { color:#C41E3A; flex-shrink:0; margin-right:8px; }
.shop-value { color:#666; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.shop-bottom { display:flex; justify-content:space-between; margin-top:8px; padding-top:8px; border-top:1px solid #f0f0f0; }
.shop-price { font-size:13px; color:#C41E3A; font-weight:bold; }
.shop-hours { font-size:12px; color:#999; }
.shop-nav-btn { width:44px; height:44px; border-radius:50%; background:linear-gradient(135deg,#4A90D9,#6BB5FF); display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-left:12px; cursor:pointer; font-size:20px; }

/* Shop Detail */
.sd-map { height:45vh; }
.sd-info { background:#fff; border-radius:20px 20px 0 0; box-shadow:0 -4px 16px rgba(0,0,0,0.08); padding:24px 20px; margin-top:-20px; position:relative; }
.sd-title-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.sd-title { font-size:20px; font-weight:bold; }
.sd-rating { font-size:15px; color:#f90; }
.sd-tag { display:inline-block; font-size:12px; color:#C41E3A; background:rgba(196,30,58,0.07); padding:4px 14px; border-radius:12px; margin-bottom:16px; }
.sd-block { margin-bottom:14px; }
.sd-label { font-size:13px; color:#999; margin-bottom:4px; }
.sd-text { font-size:15px; color:#333; line-height:1.5; }
.sd-text.price { color:#C41E3A; font-weight:bold; }
.sd-text.rec { color:#E86252; }
.sd-nav-action { display:flex; align-items:center; justify-content:center; padding:18px; border-radius:14px; font-size:17px; font-weight:bold; color:#fff; background:linear-gradient(135deg,#4A90D9,#6BB5FF); box-shadow:0 4px 16px rgba(74,144,217,0.25); margin-top:20px; cursor:pointer; gap:8px; }
.sd-nav-action:active { transform:scale(0.98); opacity:0.9; }

.leaflet-popup-content { font-size:13px; }
.leaflet-popup-content b { color:#C41E3A; }

.default-map { display:flex; align-items:center; justify-content:center; height:100%; background:#e8e8e8; color:#999; font-size:14px; flex-direction:column; gap:8px; }
.default-map .map-hint { font-size:12px; color:#bbb; }

.spot-list.collapsed { max-height:50px; }
.spot-list.collapsed .spot-item { display:none; }
