:root {
  /* 青瓷 · 玉色 — 吴文化博物馆 */
  --bg:          #f0ece6;  /* 月白 */
  --bg-soft:     #e8e3dc;  /* 月阴 */
  --surface:     #faf8f5;  /* 霜白 */
  --surface-hover: #f5f2ec;
  --surface-raised: #faf8f5;
  --celadon:     #6b9686;  /* 青瓷 — 主色 */
  --celadon-soft: rgba(107,150,134,0.1);
  --celadon-deep:#528072;
  --celadon-glow:rgba(107,150,134,.18);
  --gold:        #c49b5c;  /* 金茶 — 暖缀 */
  --gold-soft:   rgba(196,155,92,0.1);
  --gold-deep:   #a07d3a;
  --gold-glow:   rgba(196,155,92,.18);
  --sand:        #7d6b58;  /* 檀木 */
  --stone:       #5b6b7a;  /* 石青 */
  --red:         #c45a4a;  /* 点朱 */
  --green:       #4ea87a;
  --text:        rgba(35,30,25,0.88);  /* 墨色 */
  --text-secondary: rgba(35,30,25,0.48);
  --text-tertiary:  rgba(35,30,25,0.22);
  --border:      rgba(35,30,25,0.06);
  --border-light: rgba(35,30,25,0.03);
  --radius-sm:6px; --radius:10px; --radius-lg:14px; --radius-xl:20px;
  --shadow: 0 1px 3px rgba(35,30,25,0.04), 0 2px 8px rgba(35,30,25,0.04);
  --shadow-lg: 0 4px 20px rgba(35,30,25,0.08);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease:cubic-bezier(.4,0,.2,1);
  --serif: 'Noto Serif SC', 'Songti SC', 'SimSun-ExtB', Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background:
    radial-gradient(ellipse 65% 35% at 8% 15%, rgba(196,155,92,0.035) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 92% 85%, rgba(107,150,134,0.03) 0%, transparent 55%),
    var(--bg);
  color: var(--text); font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  max-width: 430px; margin: 0 auto; position: relative;
}

/* App Shell */
#app { height: 100%; display: flex; flex-direction: column; }
header {
  height: 48px; padding: 0 16px; background: var(--surface);
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(35,30,25,0.03);
}
header h1 {
  font-family: var(--serif);
  font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: 1px;
}

#content { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; position: relative; }
#content > section { display: none; padding: 20px 20px 28px; }
#chat-section{display:none;flex-direction:column;flex:1;position:relative}
#chat-section.active{display:flex}
#content > section#chat-section{padding:0}
#content > section#camera-section{padding:20px 20px 28px}
#content > section#chat-section.active{padding:0}
#content > section.active { display: block; }
#content > section#chat-section.active {
  display: flex; position: absolute; inset: 0;
  flex-direction: column; padding-bottom: 0;
}

.section-title svg, .card svg, .banner-slide svg, .guide-card svg, .chat-cta svg, .cta-chip svg, .btn svg { vertical-align: middle; margin-top: -3px; }


/* Cards & Common */
.card {
  background: var(--surface); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.section-title {
  font-family: var(--serif);
  font-size: 20px; font-weight: 700; margin: 24px 0 14px; color: var(--text);
  letter-spacing: 0.5px;
}
.chip {
  display: inline-block; padding: 6px 16px; border-radius: 20px; font-size: 13px;
  background: var(--surface); color: var(--text-secondary); cursor: pointer;
  margin: 0 4px 8px 0; box-shadow: var(--shadow); white-space: nowrap;
  border: none; transition: all .15s;
}
.chip:active { transform: scale(.96); }
.chip.active { background: var(--celadon); color: #fff; }
.chip.gold { background: var(--gold); color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 10px 20px; border-radius: var(--radius); font-size: 14px; font-weight: 500;
  cursor: pointer; border: none; transition: all 0.2s;
  font-family: inherit;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--gold); color: #fff; box-shadow: 0 2px 8px rgba(196,155,92,0.2); }
.btn-secondary { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.btn-celadon { background: var(--celadon); color: #fff; box-shadow: 0 2px 8px rgba(107,150,134,0.2); }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }

/* Banner Carousel */
.banner { position: relative; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 20px; }
.banner-slides { display: flex; transition: transform 0.4s ease; }
.banner-slide { min-width: 100%; height: 180px; background: var(--surface); display: flex;
  align-items: center; padding: 24px; position: relative; }
.banner-slide h2 { font-size: 20px; color: var(--gold); margin-bottom: 8px; }
.banner-slide p { font-size: 13px; color: var(--text-secondary); }
.banner-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; }
.banner-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-tertiary); }
.banner-dot.active { background: var(--gold); width: 20px; border-radius: 3px; }

/* Chat */
.chat-list{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:14px}
.chat-list::-webkit-scrollbar{display:none}
.chat-msg{display:flex;gap:10px;max-width:88%;animation:msgIn .35s var(--ease)}
@keyframes msgIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
.chat-msg.bot{align-self:flex-start}
.chat-msg.user{align-self:flex-end;flex-direction:row-reverse}
.chat-msg .avatar{width:32px;height:32px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:#fff}
.chat-msg.bot .avatar{background:linear-gradient(135deg,var(--celadon),var(--celadon-deep))}
.chat-msg.user .avatar{background:linear-gradient(135deg,var(--gold),var(--gold-deep))}
.chat-msg .bubble{padding:12px 14px;border-radius:var(--radius);font-size:14px;line-height:1.7;position:relative}
.chat-msg.bot .bubble{background:var(--surface);color:var(--text);border-radius:4px var(--radius) var(--radius) var(--radius);border:1px solid var(--border)}
.chat-msg.user .bubble{background:linear-gradient(135deg,var(--gold),var(--gold-deep));color:#fff;border-radius:var(--radius) 4px var(--radius) var(--radius)}
.chat-msg .source{font-size:11px;color:var(--text-tertiary);margin-top:6px;padding-top:6px;border-top:1px solid var(--border);display:flex;align-items:center;gap:4px}
.chat-msg .play-btn,.chat-msg .chat-cta .cta-chip{display:inline-flex;align-items:center;gap:4px;font-size:11px;cursor:pointer;padding:3px 10px;border-radius:12px;transition:all .2s}
.chat-msg .play-btn{color:var(--celadon);background:var(--celadon-soft)}
.chat-msg .play-btn:active{background:var(--celadon-glow)}
.chat-msg .chat-cta{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}
.chat-msg .chat-cta .cta-chip{font-size:11px;padding:4px 12px;border-radius:12px;cursor:pointer;transition:all .2s}
.typing-indicator{display:flex;gap:4px;padding:6px 4px;align-items:center}
.typing-indicator span{width:6px;height:6px;border-radius:50%;background:var(--text-tertiary);animation:typing 1.2s infinite}
.typing-indicator span:nth-child(2){animation-delay:.2s}
.typing-indicator span:nth-child(3){animation-delay:.4s}
@keyframes typing{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-4px)}}
.msg-suggestions{display:flex;gap:4px;flex-wrap:wrap;margin-top:8px;padding-top:6px;border-top:1px solid var(--border)}
.msg-chip{padding:3px 10px;border-radius:10px;font-size:11px;background:var(--bg-soft);color:var(--text-secondary);cursor:pointer;border:1px solid var(--border);transition:all .2s;white-space:nowrap}
.msg-chip:active{background:var(--gold-soft);color:var(--gold)}
.chat-input{display:flex;align-items:center;gap:6px;margin:0 12px calc(12px + var(--safe-bottom));padding:8px 10px;background:var(--surface);border:1px solid var(--border);border-radius:24px;flex-shrink:0;box-shadow:var(--shadow)}
/* 语音主模式 */
.ci-voice{flex:1;display:flex;align-items:center}
.ci-voice-btn{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 14px;border-radius:18px;border:none;background:var(--bg-soft);color:var(--text-secondary);cursor:pointer;transition:all .2s;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;font-size:14px;font-weight:500;height:38px}
.ci-voice-btn:active{transform:scale(.97);background:var(--surface-hover);color:var(--text)}
.ci-voice-btn.recording{background:var(--surface-hover);color:var(--red);animation:voice-pulse-btn 1.2s ease-in-out infinite}
@keyframes voice-pulse-btn{0%,100%{box-shadow:0 3px 10px rgba(212,83,90,0.2)}50%{box-shadow:0 3px 22px rgba(212,83,90,0.4)}}
.ci-voice-btn svg{width:20px;height:20px;flex-shrink:0}
/* 文字输入模式 */
.ci-text{flex:1;display:flex;align-items:center;gap:6px}
.ci-text input{flex:1;padding:8px 14px;border:none;border-radius:18px;font-size:14px;outline:none;background:var(--bg-soft);color:var(--text)}
.ci-text input:focus{background:var(--surface-hover)}
.ci-text input::placeholder{color:var(--text-tertiary)}
.ci-text .send-btn{width:38px;height:38px;border-radius:50%;background:var(--gold);color:#fff;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s;box-shadow:0 2px 10px rgba(196,155,92,.25);flex-shrink:0}
.ci-text .send-btn:active{transform:scale(.88)}
.ci-text .send-btn svg{width:16px;height:16px;display:block}
/* 拍照按钮 */
.ci-camera,.ci-toggle{width:36px;height:36px;border-radius:50%;background:transparent;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--text-secondary);transition:all .15s;flex-shrink:0}
.ci-camera:active,.ci-toggle:active{background:var(--surface-hover);transform:scale(.88);color:var(--text)}
.ci-camera svg,.ci-toggle svg{width:24px;height:24px}

/* Inline Camera */
.inline-camera{position:absolute;inset:0;background:rgba(0,0,0,.92);z-index:50;display:none;flex-direction:column;align-items:center;justify-content:center}
.inline-camera.open{display:flex}
.ic-view{text-align:center;width:100%;padding:20px}
.ic-frame{width:280px;height:280px;border-radius:var(--radius-lg);position:relative;margin:0 auto}
.ic-frame .bg{position:absolute;inset:0;border-radius:var(--radius-lg);border:1.5px solid rgba(196,155,92,.25);box-shadow:0 0 60px rgba(196,155,92,.06)}
.ic-frame .corner{position:absolute;width:24px;height:24px;border-color:var(--gold);border-style:solid}
.ic-frame .corner.tl{top:-1.5px;left:-1.5px;border-width:2.5px 0 0 2.5px;border-radius:var(--radius-lg) 0 0 0}
.ic-frame .corner.tr{top:-1.5px;right:-1.5px;border-width:2.5px 2.5px 0 0;border-radius:0 var(--radius-lg) 0 0}
.ic-frame .corner.bl{bottom:-1.5px;left:-1.5px;border-width:0 0 2.5px 2.5px;border-radius:0 0 0 var(--radius-lg)}
.ic-frame .corner.br{bottom:-1.5px;right:-1.5px;border-width:0 2.5px 2.5px 0;border-radius:0 0 var(--radius-lg) 0}
.ic-scan{position:absolute;left:10%;width:80%;height:1.5px;background:linear-gradient(90deg,transparent,var(--gold),transparent);animation:scan-inline 2s ease-in-out infinite;top:10%}
@keyframes scan-inline{0%{top:12%}50%{top:86%}100%{top:12%}}
.ic-hint{color:var(--text-secondary);font-size:14px;margin-top:24px;letter-spacing:.5px}
.ic-close{color:var(--text-tertiary);font-size:13px;margin-top:28px;cursor:pointer;padding:8px 24px;border:1px solid var(--border);border-radius:var(--radius-sm);display:inline-block;transition:all .2s}
.ic-close:active{background:var(--surface)}

.typing-indicator{display:flex;gap:4px;align-items:center;padding:4px 0}
.typing-indicator span{width:6px;height:6px;border-radius:50%;background:var(--text-tertiary);animation:typing 1.4s infinite}
.typing-indicator span:nth-child(2){animation-delay:.2s}
.typing-indicator span:nth-child(3){animation-delay:.4s}
@keyframes typing{0%,60%,100%{opacity:.3;transform:scale(.8)}30%{opacity:1;transform:scale(1)}}

/* Camera */
.camera-controls{position:absolute;bottom:60px;left:0;right:0;display:flex;flex-direction:column;align-items:center;gap:10px}
#camera-hint{color:rgba(255,255,255,0.55);font-size:13px;letter-spacing:.3px}
.camera-btn{width:66px;height:66px;border-radius:50%;border:3px solid rgba(255,255,255,.25);background:rgba(255,255,255,.12);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 24px rgba(0,0,0,.3);color:rgba(255,255,255,.85);transition:all .15s}
.camera-btn:active{transform:scale(.85);background:rgba(255,255,255,.2)}

.camera-search{margin-top:20px;padding:0 0 16px}
.search-row{display:flex;gap:8px}
#exhibit-search{flex:1;padding:12px 16px;border-radius:var(--radius);border:1px solid var(--border);background:var(--surface);color:var(--text);font-size:14px;outline:none;box-shadow:var(--shadow)}
#exhibit-search:focus{border-color:rgba(196,155,92,.35)}

#camera-viewfinder { position: relative; width: 100%; aspect-ratio: 3/4; background: #000;
  border-radius: var(--radius-lg); overflow: hidden; display: flex; align-items: center; justify-content: center; }
#camera-viewfinder video { width: 100%; height: 100%; object-fit: cover; }
#camera-viewfinder .corners { position: absolute; inset: 20px; border: 2px solid rgba(196,155,92,0.3);
  border-radius: var(--radius); }
#camera-viewfinder .corner { position: absolute; width: 28px; height: 28px; border-color: var(--gold); border-style: solid; }
.corner.tl { top: 16px; left: 16px; border-width: 3px 0 0 3px; border-radius: 6px 0 0 0; }
.corner.tr { top: 16px; right: 16px; border-width: 3px 3px 0 0; border-radius: 0 6px 0 0; }
.corner.bl { bottom: 16px; left: 16px; border-width: 0 0 3px 3px; border-radius: 0 0 0 6px; }
.corner.br { bottom: 16px; right: 16px; border-width: 0 3px 3px 0; border-radius: 0 0 6px 0; }
.scan-line { position: absolute; left: 20px; right: 20px; height: 2px; background: var(--gold);
  opacity: 0.5; animation: scan 2s ease-in-out infinite; }
@keyframes scan { 0%,100% { top: 20px; } 50% { top: calc(100% - 20px); } }

/* Shop Grid */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.product-card { background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); }
.product-card .info { padding: 10px 12px; }
.product-card .name { font-size: 13px; margin-bottom: 4px; }
.product-card .price { color: var(--gold); font-weight: 600; font-size: 15px; }
.product-card .price .original { color: var(--text-tertiary); text-decoration: line-through;
  font-size: 12px; margin-left: 6px; }
.product-card .variants{display:flex;gap:4px;flex-wrap:nowrap;margin-top:6px;overflow-x:auto}
.product-card .btn-buy{font-size:10px;padding:3px 6px;border-radius:8px;background:var(--gold-soft);color:var(--gold);border:1px solid rgba(196,155,92,.25);cursor:pointer;white-space:nowrap;transition:all .15s;flex-shrink:0}
.product-card .btn-buy:active{background:var(--gold);color:var(--bg)}

.shop-sticky{position:-webkit-sticky;position:sticky;top:0;z-index:2;background:var(--bg);padding-top:4px}
.category-chips{display:flex;gap:8px;overflow-x:auto;padding:8px 16px;-webkit-overflow-scrolling:touch}
.category-chips::-webkit-scrollbar{display:none}
#shopBanner .banner-slide{height:120px;padding:16px 20px}

.shop-cart-fab{position:fixed;bottom:24px;right:16px;width:52px;height:52px;border-radius:50%;background:var(--gold);color:#fff;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 16px rgba(196,155,92,.35);z-index:50;transition:all .2s}
.shop-cart-fab:active{transform:scale(.9)}
.shop-cart-badge{position:absolute;top:-4px;right:-4px;background:var(--red);color:#fff;font-size:10px;min-width:18px;height:18px;border-radius:9px;padding:0 5px;display:flex;align-items:center;justify-content:center}

/* Cart Drawer */
#cart-drawer { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%;
  max-width: 430px; max-height: 70vh; background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 200; overflow-y: auto; box-shadow: var(--shadow-lg); display: none; padding-bottom: 20px; }
#cart-drawer.open { display: block; }
#cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 199; display: none; }
#cart-overlay.open { display: block; }

/* Toast */
#toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); z-index: 300;
  background: var(--surface-raised); color: var(--text); padding: 10px 24px;
  border-radius: 20px; font-size: 14px; opacity: 0; transition: opacity 0.3s; }
#toast.show { opacity: 1; }

/* Game */
.game-tabs{display:flex;margin-bottom:16px;border-bottom:1px solid var(--border)}
.game-tab{flex:1;text-align:center;padding:10px 0;font-size:14px;cursor:pointer;color:var(--text-secondary);border-bottom:2px solid transparent;transition:all .15s}
.game-tab.active{color:var(--gold);border-bottom-color:var(--gold)}
.game-progress-icon{color:var(--gold);margin-bottom:4px}
.game-progress-title{font-family:var(--serif);font-size:18px;font-weight:700;margin:8px 0 12px}
#game-progress-bar{height:8px;background:var(--bg-soft);border-radius:6px;margin:12px 0;overflow:hidden}
#game-progress-fill{height:100%;background:var(--gold);border-radius:6px;width:0%;transition:width .4s ease}
#game-progress-text{font-size:13px;color:var(--text-secondary)}
.quiz-back{display:flex;align-items:center;gap:4px;font-size:13px;color:var(--text-secondary);cursor:pointer;margin-bottom:12px}
#quiz-result{margin-top:12px;padding:12px;border-radius:8px}

.treasure-item { display: flex; align-items: center; gap: 12px; padding: 14px;
  background: var(--surface); border-radius: var(--radius); margin-bottom: 8px; box-shadow: var(--shadow); }
.treasure-item .status-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.treasure-item .status-dot.done { background: var(--green); box-shadow: 0 0 6px rgba(78,168,122,0.3); }
.treasure-item .status-dot.near { background: var(--gold); box-shadow: 0 0 6px rgba(196,155,92,0.3); animation: pulse 1.5s infinite; }
.treasure-item .status-dot.pending { background: var(--text-tertiary); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Profile */
.stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border-radius: var(--radius); padding: 16px;
  text-align: center; border: 1px solid var(--border); }
.stat-card .value { font-size: 24px; font-weight: 700; color: var(--gold); }
.stat-card .label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.badge-wall { display: flex; gap: 12px; overflow-x: auto; padding: 8px 0; }
.badge-item { min-width: 80px; text-align: center; padding: 12px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); }
.badge-item.unlocked { box-shadow: 0 0 0 1.5px var(--gold), var(--shadow); }
.badge-item.locked { opacity: 0.4; }
.badge-item .icon { font-size: 28px; }

/* Loading */
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Guide Cards */
.guide-card{display:flex;align-items:center;gap:12px;padding:14px;background:var(--surface);border-radius:var(--radius);margin-bottom:8px;box-shadow:var(--shadow);transition:all .15s;position:relative;overflow:hidden}
.guide-card:active{transform:translateY(-1px)}
.guide-card::before{content:'';position:absolute;left:0;top:4px;bottom:4px;width:3px;border-radius:2px;opacity:.5}
.guide-icon{width:34px;height:34px;border-radius:8px;background:var(--celadon-soft);display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--celadon);font-size:16px}
.guide-info{flex:1;min-width:0}
.guide-name{font-family:var(--serif);font-size:16px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.guide-meta{font-size:12px;color:var(--text-secondary);margin-top:1px}
.guide-actions{flex-shrink:0}
#guide-section{display:flex;flex-direction:column}
.guide-cam-fab{display:flex;align-items:center;justify-content:center;gap:10px;padding:16px;border-radius:var(--radius);background:var(--surface);color:var(--celadon);cursor:pointer;box-shadow:var(--shadow);font-size:15px;font-weight:500;transition:all .2s;width:100%;margin-top:16px;border:none;flex-shrink:0}
.guide-cam-fab:active{background:var(--celadon-soft);transform:scale(.98)}
.guide-cam-fab svg{width:24px;height:24px}

/* Modal */
.modal { position: fixed; inset: 0; z-index: 250; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.6); }
.modal-content { background: var(--surface); border-radius: var(--radius-lg); padding: 24px;
  max-width: 340px; width: 90%; text-align: center; }
.modal-content h3 { margin-bottom: 12px; color: var(--gold); }
.modal-content .pickup-code { font-size: 32px; font-weight: 700; color: var(--gold);
  letter-spacing: 4px; margin: 12px 0; }

/* ===== NEW PROFILE STYLES ===== */

/* Profile User Card */
.profile-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
  cursor: pointer; margin-bottom: 16px;
  transition: background 0.15s;
}
.profile-card:active { background: var(--surface-hover); }
.profile-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--gold-soft); border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: 17px; font-weight: 600; color: var(--text); }
.profile-desc { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.profile-arrow {
  font-size: 20px; color: var(--text-tertiary);
  padding: 8px; flex-shrink: 0;
}

/* Menu List */
.menu-list {
  display: flex; flex-direction: column; gap: 1px;
  background: rgba(35,30,25,0.04); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 20px;
}
.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; background: var(--surface); cursor: pointer;
  transition: background 0.15s;
}
.menu-item:active { background: var(--surface-hover); }
.menu-icon { font-size: 18px; width: 24px; text-align: center; }
.menu-label { flex: 1; font-size: 15px; color: var(--text); }
.menu-arrow { color: var(--text-tertiary); font-size: 16px; }
.menu-item-danger .menu-label { color: var(--red); }

/* Sub-page Header */
.sub-page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.sub-page-header .back-btn {
  color: var(--gold); font-size: 14px; cursor: pointer; padding: 4px 0; min-width: 60px;
}
.sub-page-title {
  font-size: 17px; font-weight: 600; color: var(--text); flex: 1; text-align: center;
}

/* Order Tabs */
.order-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.order-tabs .chip { margin: 0; }

/* Order Card */
.order-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.order-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.order-id { font-size: 12px; color: var(--text-tertiary); }
.order-status {
  font-size: 11px; padding: 2px 10px; border-radius: 10px;
  background: var(--celadon-soft); color: var(--celadon);
}
.order-status.status-pending { background: var(--gold-soft); color: var(--gold); }
.order-status.status-cancelled { background: rgba(212,83,90,0.1); color: var(--red); }
.order-items { margin-bottom: 8px; }
.order-item {
  display: flex; justify-content: space-between;
  font-size: 13px; padding: 4px 0; color: var(--text-secondary);
}
.order-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 8px; border-top: 1px solid var(--border);
}
.order-time { font-size: 11px; color: var(--text-tertiary); }
.order-total { font-size: 15px; font-weight: 600; color: var(--text); }
.order-total b { color: var(--gold); }

/* Login Modal */
.login-tabs { display: flex; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.login-tab {
  flex: 1; text-align: center; padding: 10px; font-size: 15px;
  cursor: pointer; color: var(--text-secondary); border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.login-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.login-demo-hint{margin-top:8px;font-size:12px;color:var(--text-tertiary);text-align:center}
.cancel-btn{margin-top:8px}
.form-input {
  width: 100%; padding: 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
  font-size: 15px; margin-bottom: 12px; outline: none; box-sizing: border-box;
}
.form-input:focus { border-color: var(--gold); }
.form-input::placeholder { color: var(--text-tertiary); }

/* Static Content (Policies, Privacy, Service) */
.static-content { padding: 0; }
.static-content h3 {
  font-size: 16px; font-weight: 600; margin: 24px 0 8px; color: var(--text);
}
.static-content h3:first-child { margin-top: 0; }
.static-content p {
  font-size: 14px; color: var(--text-secondary);
  line-height: 1.8; margin-bottom: 12px;
}
.static-content ul { padding-left: 20px; margin-bottom: 12px; }
.static-content li {
  font-size: 14px; color: var(--text-secondary);
  line-height: 1.8; margin-bottom: 4px;
}

/* Service / Contact Cards */
.service-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.service-card .service-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0; font-size: 14px;
}
.service-card .service-row:not(:last-child) {
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px; padding-bottom: 12px;
}
.service-label { color: var(--text-secondary); min-width: 70px; }
.service-value { color: var(--text); }
.service-card .phone-link {
  color: var(--gold); text-decoration: none; font-size: 16px; font-weight: 600;
}

/* Feedback Form */
.feedback-types { display: flex; gap: 8px; margin-bottom: 16px; }
.feedback-types .chip { margin: 0; }
.feedback-types .chip.active { background: var(--gold-soft); color: var(--gold); border-color: var(--gold); }
.form-textarea {
  width: 100%; padding: 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
  font-size: 15px; margin-bottom: 12px; outline: none; resize: vertical;
  min-height: 120px; font-family: inherit; box-sizing: border-box;
}
.form-textarea:focus { border-color: var(--gold); }
.form-textarea::placeholder { color: var(--text-tertiary); }

/* Edit Profile */
.edit-avatar-section {
  text-align: center; margin-bottom: 20px;
}
.edit-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--gold-soft); border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; margin: 0 auto 8px;
}
.edit-phone-display {
  color: var(--text-tertiary); font-size: 14px; margin-bottom: 16px;
  padding: 8px 12px; background: var(--bg-soft); border-radius: 8px;
  border: 1px solid var(--border);
}

/* Empty State */
.empty-state {
  text-align: center; padding: 40px 20px;
  color: var(--text-tertiary); font-size: 14px;
}

/* Voice Recording Overlay */
#voice-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
#voice-overlay.active { display: flex; }
#voice-overlay.cancel #voice-cancel-tip {
  color: var(--red);
  background: rgba(212,83,90,0.2);
}
#voice-overlay.cancel #voice-mic-icon {
  transform: scale(0.8);
  background: rgba(212,83,90,0.2);
  border-color: var(--red);
}
#voice-overlay.cancel #voice-status { color: var(--red); }

#voice-cancel-tip {
  position: absolute; top: 60px;
  padding: 8px 20px; border-radius: 20px;
  background: rgba(255,255,255,0.1);
  color: var(--text-secondary); font-size: 14px;
  transition: all 0.2s;
}

#voice-recording-ui {
  display: flex; flex-direction: column;
  align-items: center; gap: 20px;
}

#voice-mic-icon {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--celadon-soft);
  border: 3px solid var(--celadon);
  display: flex; align-items: center; justify-content: center;
  color: var(--celadon);
  transition: all 0.2s;
  animation: voice-pulse 1.5s ease-in-out infinite;
}
@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(107,150,134,0.4); }
  50% { box-shadow: 0 0 0 20px rgba(107,150,134,0); }
}

#voice-wave {
  display: flex; align-items: center; gap: 4px; height: 40px;
}
#voice-wave span {
  width: 4px; border-radius: 2px;
  background: var(--celadon);
  animation: voice-wave 0.8s ease-in-out infinite;
}
#voice-wave span:nth-child(1) { height: 16px; animation-delay: 0s; }
#voice-wave span:nth-child(2) { height: 28px; animation-delay: 0.15s; }
#voice-wave span:nth-child(3) { height: 40px; animation-delay: 0.3s; }
#voice-wave span:nth-child(4) { height: 24px; animation-delay: 0.45s; }
#voice-wave span:nth-child(5) { height: 12px; animation-delay: 0.6s; }
@keyframes voice-wave {
  0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

#voice-status {
  font-size: 15px; color: var(--text-secondary);
  text-align: center; transition: color 0.2s;
}

/* 冷启动欢迎页 */
.welcome-wrap {
  padding: 40px 20px; text-align: center;
}
.welcome-msg {
  font-size: 15px; line-height: 1.7; color: var(--text);
  margin-bottom: 20px;
}
.welcome-hot {
  display: flex; gap: 10px; overflow-x: auto;
  padding-bottom: 8px; margin-bottom: 16px;
}
.hot-item {
  cursor: pointer; min-width: 100px; flex-shrink: 0;
  background: var(--surface); border-radius: var(--radius);
  padding: 12px 10px; text-align: center;
  transition: background 0.2s;
}
.hot-item:active { background: var(--surface-hover); }
.hot-name { font-size: 13px; font-weight: 600; margin-top: 6px; }
.hot-meta { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.welcome-actions {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}

/* 拍照识别确认弹窗 */
.recog-confirm {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 100; display: flex;
  align-items: center; justify-content: center;
}
.recog-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.5);
}
.recog-card {
  position: relative; background: var(--surface);
  border-radius: 16px; padding: 28px 24px; width: 280px;
  text-align: center; z-index: 1;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  animation: fadeUp .3s var(--ease);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.recog-icon { font-size: 36px; margin-bottom: 8px; }
.recog-title { font-size: 13px; color: var(--text-secondary); margin-bottom: 14px; }

/* Sidebar */
.sidebar-overlay{position:fixed;inset:0;background:rgba(35,30,25,.5);z-index:199;display:none;opacity:0;transition:opacity .3s ease}
.sidebar-overlay.open{display:block;opacity:1}
#sidebar{position:fixed;top:0;left:0;bottom:0;width:280px;max-width:75vw;background:var(--surface);z-index:200;transform:translateX(-100%);transition:transform .3s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column;box-shadow:var(--shadow-lg);overflow-y:auto}
#sidebar.open{transform:translateX(0)}
.sidebar-header{display:flex;align-items:center;gap:12px;padding:20px 16px;border-bottom:1px solid var(--border)}
.sidebar-avatar{font-size:36px;width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:var(--gold-soft);border-radius:12px;color:var(--gold)}
.sidebar-user{flex:1}
.sidebar-name{font-family:var(--serif);font-size:17px;font-weight:700;letter-spacing:1px}
.sidebar-desc{font-size:12px;color:var(--text-secondary);margin-top:2px}
.sidebar-items{padding:8px 0;flex:1;display:flex;flex-direction:column}
.sidebar-item{display:flex;align-items:center;gap:12px;padding:14px 20px;cursor:pointer;transition:all .15s;font-size:15px;color:var(--text-secondary)}
.sidebar-item:active{background:var(--surface-hover);color:var(--text)}
.sidebar-item svg{flex-shrink:0;color:var(--text-tertiary)}
.sidebar-item:active svg{color:var(--text)}
.sidebar-item.active{color:var(--gold);background:var(--gold-soft)}
.sidebar-item.active svg{color:var(--gold)}
.sidebar-divider{height:1px;background:var(--border);margin:8px 16px}
.sidebar-divider.spacer{margin-top:auto}

/* Header buttons */
/* Header layout */
header .header-left{display:flex;align-items:center;gap:6px;min-width:60px;height:48px}
header .header-right{display:flex;align-items:center;gap:6px;min-width:60px;justify-content:flex-end;height:48px}
header .header-title{
  flex:1;text-align:center;font-family:var(--serif);font-size:17px;font-weight:700;
  letter-spacing:1.5px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  height:48px;line-height:48px
}
header .back-btn{color:var(--gold);font-size:14px;cursor:pointer;display:none;padding:4px 6px}
header .menu-btn{color:var(--text);cursor:pointer;width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:8px;flex-shrink:0}
header .menu-btn:active{background:var(--surface)}
header .header-tts{color:var(--text-secondary);cursor:pointer;padding:6px;border-radius:50%;display:none}
header .header-tts:active{background:var(--surface);color:var(--celadon)}
header .header-tts.muted{color:var(--text-tertiary);opacity:.5}

/* Header brand */

/* Floor tabs capsule */
#floor-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 4px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
#floor-tabs .chip {
  flex: 1;
  text-align: center;
  margin: 0;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
  background: transparent;
  border-radius: 8px;
  transition: all .2s;
}
#floor-tabs .chip.active {
  background: var(--celadon);
  color: #fff;
  box-shadow: 0 2px 6px rgba(107,150,134,0.2);
}

/* Hall map cards (dynamic) */
#hall-map .card {
  text-align: center;
  cursor: pointer;
  padding: 18px 14px;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
#hall-map .card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent 80%);
  opacity: 0;
  transition: opacity .2s;
}
#hall-map .card.is-selected::before { opacity: 1; }
#hall-map .card:active {
  transform: translateY(-1px);
}
#hall-map .card div:first-child {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

