:root {
  --bg: #f7f2e8;
  --ink: #3b2a1a;
  --muted: #8a735c;
  --card: #fff;
  --line: #eadfce;
  --gold: #c9a26b;
  --deep: #542916;
  --olive: #778059;
  --terra: #a13a1e;
  --safe-bottom: env(safe-area-inset-bottom);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #efe6d8; color: var(--ink); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
img { max-width: 100%; display: block; }
.app {
  width: min(480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  padding-bottom: calc(78px + var(--safe-bottom));
}
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; height: 52px;
  padding: 0 8px; background: #fff; border-bottom: 1px solid var(--line);
}
.topbar h1 { flex: 1; margin: 0; text-align: center; font-size: 17px; font-weight: 600; }
.back, .icon-btn {
  width: 40px; height: 40px; border-radius: 20px; font-size: 22px;
}
.view { display: none; }
.view.active { display: block; }
.banner { position: relative; height: 320px; overflow: hidden; background: #542916; }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.silk-text {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 58px; letter-spacing: 12px;
  font-family: "STXingkai", "华文行楷", "KaiTi", serif;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.city-select, .card, .menu, .user-card {
  background: #fff; border-radius: 16px; margin: 14px 16px;
}
.city-select { padding: 14px 16px; font-size: 15px; }
.city-select select { border: 0; background: transparent; width: calc(100% - 92px); font-size: 15px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px 20px; }
.tile {
  min-height: 104px; border-radius: 16px; padding: 18px 14px; text-align: left;
  background: #fefaf0; position: relative; overflow: hidden;
}
.tile.dark { background: #542916; color: #fefaf0; }
.tile.olive { background: #778059; color: #fff; }
.tile.gold { background: #f0e3c1; }
.tile.pink { background: #f8cded; color: #6d5870; }
.tile.terra { background: #a13a1e; color: #fff; }
.tile.wide { grid-column: 1 / -1; }
.tile .en { display: block; font-size: 12px; opacity: .72; letter-spacing: .4px; }
.tile .cn { display: block; margin-top: 8px; font-size: 20px; font-weight: 650; }
.tabbar {
  position: fixed; left: 50%; bottom: calc(12px + var(--safe-bottom)); transform: translateX(-50%);
  width: min(280px, calc(100% - 48px)); height: 54px; display: flex;
  background: #f0e8da; border-radius: 28px; padding: 4px; z-index: 30;
  box-shadow: 0 8px 24px rgba(84,41,22,.12);
}
.tabbar button { flex: 1; border-radius: 24px; color: #777; }
.tabbar button.on { background: #fff; color: #333; font-weight: 650; }
.list { padding: 8px 16px 24px; }
.spot, .food-card, .record, .menu-item {
  display: flex; gap: 12px; background: #fff; border-radius: 16px; overflow: hidden; margin-bottom: 12px;
}
.spot img, .food-card img, .record img, .thumb {
  width: 112px; height: 112px; object-fit: cover; background: #efe6d8; flex: none;
}
.spot .info, .food-card .info, .record .info { padding: 10px 12px 10px 0; min-width: 0; }
.name { font-size: 16px; font-weight: 650; }
.desc, .muted { color: var(--muted); font-size: 13px; line-height: 1.55; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 16px; }
.chip { flex: none; padding: 7px 12px; border-radius: 16px; background: #fff; color: #7b6248; }
.chip.on { background: var(--deep); color: #fff; }
.page-title { padding: 16px 16px 0; font-size: 22px; font-weight: 700; }
.hero { height: 240px; width: 100%; object-fit: cover; background: #ddd; }
.section { background: #fff; margin: 12px 16px; border-radius: 16px; padding: 14px; }
.section h3 { margin: 0 0 8px; font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: #f7efe4; color: #7b4b24; border-radius: 14px; padding: 5px 10px; font-size: 13px; }
.primary, .gold-btn {
  display: block; width: calc(100% - 32px); margin: 14px 16px; height: 44px; border-radius: 22px;
  background: var(--deep); color: #fff; font-size: 16px;
}
.gold-btn { background: var(--gold); }
.star {
  position: absolute; right: 16px; top: 64px; z-index: 5; width: 42px; height: 42px;
  border-radius: 21px; background: rgba(0,0,0,.35); color: #fff; font-size: 24px;
}
.user-card { padding: 22px 16px; text-align: center; }
.avatar { font-size: 42px; }
.login-btn, .save-btn { background: #c98b41; color: #fff; border-radius: 18px; padding: 8px 18px; }
.save-btn { background: var(--gold); }
.logout-btn { color: #888; margin-left: 8px; }
.name-input { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; width: 180px; }
.menu { overflow: hidden; }
.menu-item { margin: 0; border-radius: 0; padding: 16px; border-bottom: 1px solid var(--line); align-items: center; }
.menu-item span:last-child { margin-left: auto; color: #bbb; }
.copyright { text-align: center; color: #b29b84; font-size: 12px; padding: 20px; }
.chat { padding: 12px 16px 84px; }
.bubble { max-width: 84%; margin: 8px 0; padding: 10px 12px; border-radius: 14px; white-space: pre-wrap; line-height: 1.6; }
.bubble.robot { background: #fff; }
.bubble.user { background: #542916; color: #fff; margin-left: auto; }
.composer {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-bottom));
  width: min(480px, 100%); display: flex; gap: 8px; padding: 8px 12px; background: #fff; z-index: 25;
}
.composer input, .field, textarea, select.field {
  flex: 1; border: 1px solid var(--line); border-radius: 18px; padding: 10px 12px; background: #fff;
}
.composer button { background: var(--deep); color: #fff; border-radius: 18px; padding: 0 16px; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 8px 16px; }
.day { height: 42px; border-radius: 10px; background: #fff; position: relative; }
.day.on { outline: 2px solid var(--gold); }
.day.muted { color: #c8b8a6; }
.dot { position: absolute; right: 6px; bottom: 5px; width: 6px; height: 6px; border-radius: 3px; background: var(--terra); }
.tabs { display: flex; margin: 12px 16px; background: #fff; border-radius: 14px; padding: 4px; }
.tabs button { flex: 1; height: 36px; border-radius: 10px; }
.tabs button.on { background: var(--deep); color: #fff; }
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.42); z-index: 40;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet { width: min(480px, 100%); background: #f7f2e8; border-radius: 18px 18px 0 0; max-height: 78vh; overflow: auto; padding-bottom: 16px; }
.map { height: 46vh; background: #d9d0c3; }
.welcome {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  background: rgba(59, 42, 26, .46); padding: 24px;
}
.welcome-card {
  width: min(360px, 100%); background: #fffdf8; border-radius: 18px; padding: 26px 22px 20px;
  text-align: center; box-shadow: 0 16px 40px rgba(84, 41, 22, .2);
}
.welcome-card h2 { margin: 0 0 12px; font-size: 20px; }
.welcome-card p { margin: 0; color: #6d5846; line-height: 1.7; font-size: 15px; }
.welcome-card button {
  margin-top: 18px; width: 100%; height: 42px; border-radius: 21px; background: var(--deep); color: #fff;
}
.toast {
  position: fixed; left: 50%; top: 46%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,.75); color: #fff; border-radius: 10px; padding: 10px 14px; z-index: 60;
}
.polaroid { width: 300px; margin: 24px auto; background: #ffc8dd; border-radius: 8px; padding: 18px 18px 24px; text-align: center; }
.polaroid .photo { height: 280px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.polaroid img { width: 100%; height: 100%; object-fit: cover; }
.empty { text-align: center; color: #998675; padding: 40px 16px; }
.row { display: flex; gap: 8px; align-items: center; padding: 0 16px; }
.small { font-size: 12px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; background: #fff; margin: 8px 16px; padding: 10px 12px; border-radius: 12px; }
