:root {
  --ink: #271914;
  --brown: #5b291d;
  --red: #a93624;
  --gold: #d69a3a;
  --cream: #fff6e7;
  --paper: #fffaf1;
  --muted: #8b7668;
  --line: rgba(91, 41, 29, .12);
  --shadow: 0 16px 42px rgba(55, 28, 17, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(8, 6, 3, .28), rgba(8, 6, 3, .28)),
    url("images/background.png") center top / cover fixed no-repeat,
    #090704;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }
.page-shell { width: min(100%, 520px); min-height: 100vh; margin: 0 auto; background: linear-gradient(rgba(10,7,4,.18), rgba(10,7,4,.18)), url("images/background.png") center top / cover fixed no-repeat; box-shadow: 0 0 60px rgba(0,0,0,.4); overflow: hidden; }

.hero { position: relative; min-height: 300px; padding: env(safe-area-inset-top) 22px 28px; color: #fff9ec; background: linear-gradient(110deg, rgba(5,4,2,.86) 0%, rgba(7,5,3,.78) 48%, rgba(12,8,4,.64) 100%), url("images/scenic/guangxi-food-treasure-map-horizontal-hero.jpg") 47% center / cover no-repeat; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .08; background-image: linear-gradient(30deg, transparent 48%, #f3ca7d 49%, transparent 51%); background-size: 28px 28px; mask-image: linear-gradient(to left, #000, transparent 64%); }
.hero::after { content: ""; position: absolute; width: 220px; height: 220px; right: -74px; top: 65px; border: 1px solid rgba(243,202,125,.27); border-radius: 44% 56% 48% 52%; transform: rotate(20deg); }
.topbar { position: relative; z-index: 2; height: 58px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.icon-button, .city-button { border: 0; color: inherit; background: transparent; }
.icon-button { justify-self: start; padding: 4px 12px 4px 0; font-size: 34px; font-weight: 200; }
.city-button { display: flex; gap: 7px; align-items: center; font-weight: 600; }
.city-dot { width: 7px; height: 7px; border-radius: 50%; background: #e9ae4c; box-shadow: 0 0 0 4px rgba(233,174,76,.15); }
.hero-copy { position: relative; z-index: 2; margin-top: 42px; }
.eyebrow { margin: 0 0 8px; color: #e9b45d; font-size: 11px; letter-spacing: 3px; font-weight: 700; }
.hero h1 { margin: 0; max-width: 330px; white-space: nowrap; font-family: "STKaiti", "KaiTi", serif; font-size: clamp(34px, 10.5vw, 51px); line-height: 1.08; letter-spacing: 1px; text-shadow: 0 8px 24px rgba(0,0,0,.4); }

.category-section { position: relative; z-index: 3; margin-top: -16px; padding: 18px 18px 4px; border-radius: 22px 22px 0 0; background: rgba(255,250,241,.95); backdrop-filter: blur(10px); }
.secondary-tabs { display: flex; gap: 22px; margin-top: 0; padding: 8px 2px 7px; overflow-x: auto; scrollbar-width: none; }
.secondary-tabs::-webkit-scrollbar { display: none; }
.secondary-tab { position: relative; flex: 0 0 auto; padding: 8px 0; border: 0; color: var(--muted); background: transparent; font-size: 13px; }
.secondary-tab.active { color: var(--brown); font-weight: 800; }
.secondary-tab.active::after { content: ""; position: absolute; bottom: 2px; left: 50%; width: 16px; height: 3px; border-radius: 3px; background: var(--gold); transform: translateX(-50%); }

.list-section { padding: 13px 18px 26px; background: rgba(255,250,241,.95); backdrop-filter: blur(10px); }
.store-list { display: grid; gap: 12px; }
.store-group { display: grid; gap: 8px; }
.store-card { position: relative; display: grid; grid-template-columns: 116px 1fr; gap: 13px; min-height: 145px; padding: 10px; border: 1px solid rgba(108,64,38,.09); border-radius: 17px; background: linear-gradient(135deg, #fffdfa, #fff3dd); box-shadow: 0 8px 23px rgba(76,43,25,.08); transition: transform .2s, box-shadow .2s; overflow: hidden; }
.store-card:active { transform: scale(.985); }
.store-image { width: 116px; height: 125px; object-fit: cover; border-radius: 12px; background: #eadcc8; }
.rank-badge { position: absolute; top: 10px; left: 10px; min-width: 46px; padding: 4px 8px; color: #fff; border-radius: 12px 0 11px 0; background: linear-gradient(135deg, #c59237, #8a531e); font-size: 9px; font-weight: 800; text-align: center; box-shadow: 0 5px 10px rgba(73,41,20,.22); }
.rank-badge b { display: block; font-size: 15px; line-height: 1; }
.store-content { min-width: 0; padding: 3px 1px; }
.store-title-row { display: flex; gap: 10px; align-items: start; justify-content: space-between; }
.store-title { margin: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: clamp(19px, 4.6vw, 22px); font-weight: 900; line-height: 1.22; letter-spacing: -.2px; }
.store-actions { position: relative; z-index: 2; flex: 0 0 auto; display: flex; align-items: center; gap: 4px; }
.favorite { padding: 2px 3px; border: 0; color: #a89586; background: transparent; font-size: 21px; line-height: 1; }
.favorite.active { color: #d58b28; }
.explore-button { display: inline-flex; align-items: center; gap: 3px; padding: 5px 8px; border: 1px solid rgba(142,86,34,.14); border-radius: 999px; color: #75441f; background: #f3dfb8; font-size: 10px; font-weight: 900; line-height: 1; box-shadow: 0 3px 8px rgba(94,54,25,.08); }
.explore-button span { font-size: 14px; line-height: .8; }
.explore-button:active { transform: scale(.95); }
.meta { margin: 8px 0 0; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heat { color: #a8452e; }
.store-tags { display: flex; gap: 5px; margin-top: 9px; overflow: hidden; }
.store-tags span { flex: 0 0 auto; padding: 3px 6px; border-radius: 5px; color: #8b5f27; background: #f6e4c2; font-size: 9px; }
.price-row { display: flex; align-items: baseline; gap: 7px; margin-top: 10px; }
.price { color: #b93b27; font-size: 18px; font-weight: 900; }
.price small { font-size: 10px; }
.original-price { color: #ad9d91; font-size: 10px; }
.empty-state { padding: 55px 20px; text-align: center; color: var(--muted); }
.empty-state div { font-size: 46px; }
.empty-state h3 { margin: 12px 0 6px; color: var(--ink); }
.empty-state p { margin: 0; font-size: 13px; }
.recommendation-section { padding: 26px 18px; background: rgba(255,250,241,.95); backdrop-filter: blur(10px); }
.recommendation-section { border-top: 1px solid rgba(91,41,29,.09); }
.recommendation-heading { display: flex; align-items: end; justify-content: space-between; margin: 0 0 14px; padding-right: 18px; }
.recommendation-heading p { margin: 0 0 3px; color: #b9863b; font-size: 8px; font-weight: 800; letter-spacing: 1.3px; }
.recommendation-heading h2 { margin: 0; font-size: 22px; }
.recommendation-section .recommendation-heading { padding-right: 0; }
.recommendation-tools { display: grid; justify-items: end; gap: 6px; }
.recommendation-tools > span { color: var(--muted); font-size: 9px; }
.slider-controls { display: flex; gap: 6px; }
.slider-button { display: grid; place-items: center; width: 29px; height: 29px; padding: 0 0 2px; border: 1px solid rgba(91,41,29,.16); border-radius: 9px; color: var(--brown); background: rgba(255,255,255,.72); font-size: 21px; line-height: 1; box-shadow: 0 4px 10px rgba(76,43,25,.06); }
.slider-button:active { transform: scale(.94); }
.slider-button:disabled { color: #bcaea3; background: rgba(255,255,255,.35); cursor: default; box-shadow: none; }
.recommendation-track { -webkit-overflow-scrolling: touch; overscroll-behavior-inline: contain; touch-action: pan-x pan-y; cursor: grab; user-select: none; }
.recommendation-track.dragging { cursor: grabbing; scroll-snap-type: none; }
.recommendation-track img { -webkit-user-drag: none; user-select: none; }
.classic-track { display: flex; gap: 12px; padding: 0 1px 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.classic-track::-webkit-scrollbar { display: none; }
.classic-card { flex: 0 0 calc(100% - 2px); border: 1px solid rgba(108,64,38,.12); border-radius: 18px; background: #fff6e7; box-shadow: 0 10px 26px rgba(76,43,25,.1); overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; }
.classic-visual { height: 180px; background: #d9c7aa; }
.classic-visual img { width: 100%; height: 100%; min-width: 0; object-fit: cover; background: #eadcc8; }
.classic-media-item { position: relative; width: 100%; height: 100%; min-width: 0; margin: 0; overflow: hidden; }
.classic-media-item span { position: absolute; left: 9px; bottom: 8px; max-width: calc(100% - 18px); padding: 4px 7px; border-radius: 6px; color: #fff9ed; background: rgba(38,23,16,.68); backdrop-filter: blur(4px); font-size: 9px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-placeholder { position: relative; display: grid; align-content: center; justify-items: center; gap: 5px; min-width: 0; color: rgba(255,248,231,.86); background: linear-gradient(145deg, #463b2d, #1a1712); overflow: hidden; }
.media-placeholder::before, .media-placeholder::after { content: ""; position: absolute; border: 1px solid rgba(217,177,95,.24); border-radius: 50%; }
.media-placeholder::before { width: 100px; height: 100px; top: -45px; right: -35px; }
.media-placeholder::after { width: 56px; height: 56px; bottom: -25px; left: -18px; }
.media-placeholder span { position: relative; z-index: 1; font-size: 13px; font-weight: 700; letter-spacing: 2px; }
.media-placeholder small { position: relative; z-index: 1; color: rgba(255,248,231,.48); font-size: 8px; }
.food-placeholder { background: linear-gradient(145deg, #6b4827, #241b12); }
.classic-copy { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.classic-copy { padding: 15px; }
.classic-copy small { color: #b67b2d; font-size: 9px; font-weight: 700; }
.classic-copy h3 { margin: 3px 0 4px; font-size: 16px; }
.classic-copy p { margin: 0; color: var(--muted); font-size: 10px; }
.recommend-arrow { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 11px; color: #fff6e7; background: var(--brown); font-size: 19px; }
.classic-copy .recommend-arrow { width: 34px; height: 34px; border-radius: 10px; font-size: 16px; }
.page-footer { display: flex; align-items: center; gap: 12px; padding: 22px 35px 36px; color: #d6b986; background: rgba(8,6,3,.76); font-size: 10px; letter-spacing: 1px; }
.page-footer span { flex: 1; height: 1px; background: var(--line); }

[hidden] { display: none !important; }
.sheet-backdrop, .dialog-backdrop { position: fixed; z-index: 20; inset: 0; display: flex; justify-content: center; background: rgba(22,13,10,.58); backdrop-filter: blur(5px); }
.sheet-backdrop { align-items: end; }
.detail-sheet { position: relative; width: min(100%, 520px); max-height: 92vh; border-radius: 25px 25px 0 0; background: var(--paper); overflow: auto; animation: sheetUp .28s ease-out; }
.sheet-close { position: absolute; z-index: 2; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; color: #fff; background: rgba(35,21,17,.65); font-size: 24px; }
.detail-sheet > img { display: block; width: 100%; height: 230px; object-fit: cover; background: #eee; }
.detail-content { padding: 20px 20px max(24px, env(safe-area-inset-bottom)); }
.detail-title-row { display: flex; gap: 9px; align-items: center; }
.detail-title-row > span { padding: 4px 8px; border-radius: 7px; color: #fff; background: var(--red); font-size: 11px; font-weight: 800; }
.detail-title-row h2 { margin: 0; font-size: 22px; }
.detail-tags { color: var(--muted); font-size: 12px; }
.detail-info { display: flex; gap: 13px; padding: 12px 0; border-top: 1px solid var(--line); }
.detail-info > span { color: var(--gold); font-size: 22px; }
.detail-info small { color: var(--muted); }
.detail-info p { margin: 3px 0 0; font-size: 13px; }
.package-card { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding: 15px; border-radius: 13px; background: #f6e5c7; }
.package-card small { color: #9b6e39; }
.package-card h3 { margin: 4px 0 0; font-size: 15px; }
.package-card strong { color: var(--red); font-size: 24px; }
.navigate-button { width: 100%; margin-top: 17px; padding: 15px; border: 0; border-radius: 13px; color: #fff; background: linear-gradient(135deg, #713321, #9f3c26); font-weight: 800; box-shadow: 0 9px 18px rgba(126,50,31,.2); }
.navigate-button span { margin-left: 6px; }
.dialog-backdrop { align-items: center; padding: 24px; }
.confirm-dialog { width: min(100%, 360px); padding: 25px 22px 19px; border-radius: 20px; background: #fffaf1; text-align: center; animation: dialogIn .2s ease-out; box-shadow: var(--shadow); }
.dialog-icon { display: grid; place-items: center; width: 50px; height: 50px; margin: 0 auto; border-radius: 50%; color: #fff; background: var(--gold); font-size: 26px; }
.confirm-dialog h3 { margin: 13px 0 6px; }
.confirm-dialog p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 9px; margin-top: 20px; }
.dialog-actions button { padding: 12px 5px; border: 0; border-radius: 10px; color: #69564c; background: #eee6dd; font-size: 13px; font-weight: 700; }
.dialog-actions .confirm-primary { color: #fff; background: var(--red); }
.toast { position: fixed; z-index: 40; left: 50%; bottom: 32px; padding: 10px 16px; border-radius: 20px; color: #fff; background: rgba(38,24,18,.9); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes sheetUp { from { transform: translateY(35%); opacity: .4; } }
@keyframes dialogIn { from { transform: scale(.92); opacity: .3; } }
@media (min-width: 700px) { body { padding: 32px 0; } .page-shell { border-radius: 26px; min-height: calc(100vh - 64px); } }
@media (max-width: 370px) { .store-card { grid-template-columns: 102px 1fr; } .store-image { width: 102px; } .recommendation-tools > span { display: none; } }
