/* ============ App 手机示例 ============ */
.phones { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 40px 24px; justify-items: center; }
.phone-item { margin: 0; display: grid; gap: 14px; justify-items: center; width: 300px; }
.phone-item figcaption { text-align: center; display: grid; gap: 3px; }
.phone-item figcaption b { font-size: 14px; }
.phone-item figcaption span { font-size: 12px; color: var(--fg-3); line-height: 1.5; }

.phone {
  --ios-bg: #f2f2f7; --ios-card: #ffffff; --ios-fg: #000000; --ios-fg2: rgba(60, 60, 67, .6); --ios-sep: rgba(60, 60, 67, .16); --ios-fill: rgba(118, 118, 128, .12);
  width: 300px; height: 624px; padding: 10px; border-radius: 50px; background: #0d0d10; position: relative;
  box-shadow: inset 0 0 0 2px #2b2b30, inset 0 0 0 3px #000, 0 30px 60px -20px rgba(15, 23, 42, .45), 0 10px 20px -10px rgba(15, 23, 42, .3);
}
.phone::before { content: ""; position: absolute; left: -3px; top: 110px; width: 3px; height: 54px; border-radius: 2px 0 0 2px; background: #1f1f24; box-shadow: 0 70px 0 #1f1f24; }
.phone::after { content: ""; position: absolute; right: -3px; top: 150px; width: 3px; height: 80px; border-radius: 0 2px 2px 0; background: #1f1f24; }
[data-theme="dark"] .phone {
  --ios-bg: #000000; --ios-card: #1c1c1e; --ios-fg: #ffffff; --ios-fg2: rgba(235, 235, 245, .6); --ios-sep: rgba(84, 84, 88, .55); --ios-fill: rgba(118, 118, 128, .24);
  box-shadow: inset 0 0 0 2px #3a3a40, 0 30px 60px -20px rgba(0, 0, 0, .8);
}
.phone-screen {
  position: relative; height: 100%; border-radius: 40px; overflow: hidden; display: flex; flex-direction: column;
  background: var(--ios-bg); color: var(--ios-fg); font-size: 13px; -webkit-font-smoothing: antialiased;
}
.sb { height: 46px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 4px 26px 0 30px; font-weight: 600; font-size: 14px; position: relative; z-index: 6; }
.sb-island { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); width: 92px; height: 27px; border-radius: 20px; background: #000; }
.sb-icons { display: flex; align-items: center; gap: 5px; }
.sb-signal { display: flex; align-items: flex-end; gap: 1.5px; height: 11px; }
.sb-signal b { width: 3px; border-radius: 1px; background: currentColor; }
.sb-signal b:nth-child(1) { height: 4px; } .sb-signal b:nth-child(2) { height: 6px; } .sb-signal b:nth-child(3) { height: 8.5px; } .sb-signal b:nth-child(4) { height: 11px; }
.sb-batt { width: 24px; height: 12px; border-radius: 4px; border: 1.2px solid color-mix(in srgb, currentColor 45%, transparent); padding: 1.5px; position: relative; }
.sb-batt::after { content: ""; position: absolute; right: -3.5px; top: 3.5px; width: 2px; height: 4px; border-radius: 0 1px 1px 0; background: color-mix(in srgb, currentColor 45%, transparent); }
.sb-batt b { display: block; height: 100%; width: 80%; border-radius: 2px; background: currentColor; }
.home-ind { position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%); width: 110px; height: 4.5px; border-radius: 3px; background: var(--ios-fg); opacity: .85; z-index: 30; }
.app-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; position: relative; padding-bottom: 16px; }
.app-scroll::-webkit-scrollbar { display: none; }
.app-scroll.no-pad { padding-bottom: 0; }

/* 场景插画（渐变色块） */
.s-forest { background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .25)), radial-gradient(circle at 70% 30%, #fef3c7 0 8%, transparent 9%), linear-gradient(160deg, #a7f3d0, #10b981 55%, #065f46); }
.s-sunset { background: radial-gradient(circle at 30% 70%, #fde68a 0 10%, transparent 11%), linear-gradient(180deg, #fb7185, #f97316 55%, #7c2d12); }
.s-sea { background: linear-gradient(180deg, #bae6fd 0 45%, #0ea5e9 46%, #075985); }
.s-night { background: radial-gradient(circle at 75% 25%, #fef9c3 0 6%, transparent 7%), radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 40% 60%, #fff, transparent), linear-gradient(180deg, #1e1b4b, #4c1d95); }
.s-grape { background: radial-gradient(circle at 40% 45%, #bef264 0 12%, transparent 13%), radial-gradient(circle at 58% 55%, #a3e635 0 12%, transparent 13%), radial-gradient(circle at 48% 66%, #84cc16 0 12%, transparent 13%), #f7fee7; }
.s-berry { background: radial-gradient(circle at 35% 45%, #6366f1 0 10%, transparent 11%), radial-gradient(circle at 60% 50%, #4f46e5 0 10%, transparent 11%), radial-gradient(circle at 48% 66%, #4338ca 0 10%, transparent 11%), #eef2ff; }
.s-mango { background: radial-gradient(ellipse 30% 22% at 50% 52%, #fbbf24, #f59e0b 70%, transparent 72%), #fffbeb; }
.s-kiwi { background: radial-gradient(circle at 50% 50%, #fef9c3 0 6%, #84cc16 7% 26%, #65a30d 27% 30%, transparent 31%), #f0fdf4; }

/* ---------- iOS 首页 ---------- */
.ios-large { display: flex; justify-content: space-between; align-items: flex-end; padding: 6px 18px 10px; }
.ios-large small { font-size: 12px; color: var(--ios-fg2); font-weight: 600; text-transform: uppercase; }
.ios-large h2 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.ios-search { display: flex; align-items: center; gap: 6px; margin: 0 16px 12px; height: 36px; padding: 0 10px; border-radius: 11px; background: var(--ios-fill); color: var(--ios-fg2); }
.ios-search span { flex: 1; }
.stories { display: flex; gap: 12px; padding: 2px 16px 12px; overflow-x: auto; scrollbar-width: none; }
.story { display: grid; justify-items: center; gap: 4px; flex-shrink: 0; }
.story small { font-size: 11px; color: var(--ios-fg2); }
.story-ring { padding: 2.5px; border-radius: 50%; background: conic-gradient(#f59e0b, #ef4444, #d946ef, #6366f1, #f59e0b); position: relative; }
.story-ring .avatar { box-shadow: 0 0 0 2.5px var(--ios-bg); width: 50px; height: 50px; }
.story.seen .story-ring { background: var(--ios-sep); }
.story-ring em { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--ios-bg); }
.app-chips { display: flex; gap: 8px; padding: 0 16px 12px; overflow-x: auto; scrollbar-width: none; }
.app-chips span { flex-shrink: 0; padding: 6px 14px; border-radius: 99px; background: var(--ios-card); font-size: 12.5px; font-weight: 500; }
.app-chips span.on { background: var(--ios-fg); color: var(--ios-bg); }
.app-banner { margin: 0 16px; border-radius: 18px; overflow: hidden; position: relative; height: 130px; }
.app-banner-track { display: flex; height: 100%; transition: transform .6s var(--ease-out); }
.app-slide { flex: 0 0 100%; padding: 18px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
.app-slide small { font-size: 11px; opacity: .85; font-weight: 600; letter-spacing: .06em; }
.app-slide b { font-size: 19px; line-height: 1.25; }
.app-slide.s1 { background: radial-gradient(circle at 85% 25%, #fde68a 0 14%, transparent 15%), linear-gradient(135deg, #f59e0b, #b45309); }
.app-slide.s2 { background: radial-gradient(circle at 85% 30%, rgba(255,255,255,.3) 0 16%, transparent 17%), linear-gradient(135deg, #0ea5e9, #4338ca); }
.app-slide.s3 { background: linear-gradient(160deg, transparent 60%, rgba(0,0,0,.2)), linear-gradient(135deg, #22c55e, #065f46); }
.app-dots { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 4px; }
.app-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .5); transition: width .3s, background .3s; }
.app-dots i.on { width: 16px; background: #fff; }
.app-sec-row { display: flex; justify-content: space-between; align-items: center; padding: 18px 16px 10px; }
.app-sec-row b { font-size: 17px; }
.app-sec-row a { color: var(--primary); font-size: 12.5px; display: flex; align-items: center; }
.feed-card { margin: 0 16px 14px; background: var(--ios-card); border-radius: 18px; overflow: hidden; display: grid; gap: 8px; padding-bottom: 12px; }
.feed-card > b { padding: 0 12px; font-size: 14px; line-height: 1.4; }
.feed-img { height: 150px; position: relative; }
.feed-tag { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 3px; align-items: center; font-size: 11px; color: #fff; padding: 3px 8px; border-radius: 99px; background: rgba(0,0,0,.35); backdrop-filter: blur(8px); }
.feed-meta { display: flex; align-items: center; gap: 6px; padding: 0 12px; font-size: 12px; color: var(--ios-fg2); }
.feed-like { display: flex; align-items: center; gap: 3px; cursor: pointer; }
.feed-like.liked { color: #ef4444; }
.feed-like.liked svg { fill: #ef4444 !important; animation: likePop .45s var(--ease-spring); }
.tabbar {
  flex-shrink: 0; height: 80px; padding: 8px 10px 26px; display: flex; justify-content: space-around; align-items: center;
  background: color-mix(in srgb, var(--ios-card) 82%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: .5px solid var(--ios-sep); position: relative; z-index: 5;
}
.tab { display: grid; justify-items: center; gap: 2px; color: var(--ios-fg2); width: 48px; }
.tab small { font-size: 10px; font-weight: 500; }
.tab.on { color: var(--primary); }
.tab .badge { right: -8px; top: -4px; box-shadow: 0 0 0 2px var(--ios-card); }
.tab-center { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; color: #fff; margin-top: -18px;
  background: linear-gradient(135deg, var(--primary), #ec4899); box-shadow: 0 8px 18px -6px var(--primary); }

/* ---------- 详情页 ---------- */
.ios > .app-scroll.no-pad { margin-top: -46px; }
.detail-hero { height: 290px; position: relative; overflow: hidden; background: linear-gradient(180deg, #7dd3fc, #e0f2fe 60%); }
.detail-mtn { position: absolute; inset: 0;
  background: radial-gradient(circle at 75% 28%, #fff7ed 0 7%, transparent 8%),
    linear-gradient(170deg, transparent 52%, #166534 52.5%) bottom/100% 60% no-repeat,
    linear-gradient(200deg, transparent 50%, #15803d 50.5%) bottom/100% 75% no-repeat; }
.detail-mtn::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: repeating-linear-gradient(90deg, #14532d 0 3px, transparent 3px 11px), linear-gradient(transparent, #052e16); opacity: .7; }
.detail-float { position: absolute; top: 54px; left: 14px; right: 14px; display: flex; justify-content: space-between; }
.glass-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; cursor: pointer;
  background: rgba(255, 255, 255, .25); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: .5px solid rgba(255,255,255,.4); }
.glass-btn.liked svg { fill: #ef4444 !important; stroke: #ef4444; animation: likePop .45s var(--ease-spring); }
.detail-count { position: absolute; right: 14px; bottom: 36px; font-size: 11px; color: #fff; padding: 2px 8px; border-radius: 99px; background: rgba(0,0,0,.35); }
.detail-sheet { position: relative; margin-top: -24px; background: var(--ios-card); border-radius: 24px 24px 0 0; padding: 20px 18px 18px; display: grid; gap: 12px; min-height: 340px; }
.detail-sheet h3 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.detail-sub { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ios-fg2); }
.detail-sub svg { display: inline; vertical-align: -1px; }
.detail-rate { color: var(--ios-fg); font-weight: 700; }
.detail-tags .tag { background: var(--ios-fill); border: 0; color: var(--ios-fg); }
.detail-host { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: .5px solid var(--ios-sep); border-bottom: .5px solid var(--ios-sep); }
.detail-host b { display: block; font-size: 14px; }
.detail-host small { color: var(--ios-fg2); font-size: 12px; }
.detail-chat { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--ios-fill); color: var(--primary); }
.detail-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-feats div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.detail-feats svg { color: var(--primary); }
.detail-desc { font-size: 13px; line-height: 1.7; color: var(--ios-fg2); }
.detail-desc a { color: var(--ios-fg); font-weight: 600; text-decoration: underline; }
.detail-bar { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 10px 18px 28px; background: var(--ios-card); border-top: .5px solid var(--ios-sep); }
.detail-bar b { font-size: 19px; }
.detail-bar small { color: var(--ios-fg2); }
.detail-bar span { display: block; font-size: 11.5px; color: var(--ios-fg2); text-decoration: underline; }
.app-btn { height: 44px; padding: 0 28px; border-radius: 14px; border: 0; color: #fff; font-weight: 700; font-size: 15px; cursor: pointer;
  background: linear-gradient(90deg, #f43f5e, #e11d48); box-shadow: 0 8px 18px -8px #e11d48; }
.app-btn:active { transform: scale(.96); }

/* ---------- 聊天 ---------- */
.chat-screen { background: var(--ios-card); }
.chat-nav { flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 4px 12px 8px; border-bottom: .5px solid var(--ios-sep);
  background: color-mix(in srgb, var(--ios-card) 85%, transparent); backdrop-filter: blur(16px); }
.chat-back { display: flex; align-items: center; color: var(--primary); }
.chat-back em { font-style: normal; font-size: 12px; background: var(--ios-fill); color: var(--ios-fg); padding: 0 6px; border-radius: 99px; }
.chat-who { flex: 1; display: flex; align-items: center; gap: 8px; }
.chat-who b { display: block; font-size: 14px; }
.chat-who small { font-size: 11px; color: #22c55e; }
.chat-acts { display: flex; gap: 14px; color: var(--primary); }
.chat-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.chat-time { align-self: center; font-size: 11px; color: var(--ios-fg2); margin: 4px 0; }
.msg { max-width: 76%; padding: 8px 12px; border-radius: 18px; font-size: 13.5px; line-height: 1.45; animation: msgIn .35s var(--ease-spring); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.msg.in { align-self: flex-start; background: var(--ios-fill); border-bottom-left-radius: 6px; }
.msg.out { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 6px; }
.msg-status { display: block; text-align: right; font-size: 10px; opacity: .75; margin-top: 2px; }
.card-msg { padding: 0; overflow: hidden; width: 70%; background: var(--ios-card) !important; color: var(--ios-fg) !important; border: .5px solid var(--ios-sep); }
.card-msg-img { height: 84px; }
.card-msg b, .card-msg small { display: block; padding: 0 10px; }
.card-msg b { padding-top: 6px; font-size: 13px; }
.card-msg small { padding-bottom: 8px; color: var(--ios-fg2); font-size: 11px; }
.voice { display: flex; align-items: center; gap: 8px; }
.voice svg { fill: currentColor; }
.wave { display: flex; align-items: center; gap: 2px; }
.wave i { width: 2.5px; height: var(--h); border-radius: 2px; background: currentColor; opacity: .7; }
.voice small { color: var(--ios-fg2); font-size: 11px; }
.typing { display: flex; gap: 4px; padding: 12px 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ios-fg2); animation: typingDot 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-input { flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 8px 10px 30px; border-top: .5px solid var(--ios-sep); color: var(--ios-fg2); }
.chat-input input { flex: 1; height: 34px; border-radius: 17px; border: .5px solid var(--ios-sep); background: var(--ios-bg); padding: 0 12px; font: inherit; color: var(--ios-fg); outline: none; }
.chat-plus { width: 30px; height: 30px; border-radius: 50%; background: var(--ios-fill); display: grid; place-items: center; }
.chat-send { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .2s; }
.chat-send:active { transform: scale(.88); }

/* ---------- 个人中心 ---------- */
.prof { padding-bottom: 20px; }
.prof-screen .sb, .detail-screen .sb { color: #fff; }
.ios > .app-scroll.prof { margin-top: -46px; }
.prof-head { padding: 52px 18px 18px; color: #fff; background: radial-gradient(circle at 85% 0%, rgba(255,255,255,.25), transparent 50%), linear-gradient(140deg, var(--primary), #ec4899); }
.prof-top { display: flex; justify-content: flex-end; gap: 14px; }
.prof-me { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.prof-me .avatar { box-shadow: 0 0 0 3px rgba(255,255,255,.5); }
.prof-me b { display: block; font-size: 19px; }
.prof-me small { opacity: .8; font-size: 11.5px; }
.prof-edit { margin-left: auto; font-size: 11.5px; padding: 5px 10px; border-radius: 99px; border: 1px solid rgba(255,255,255,.6); }
.prof-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; text-align: center; }
.prof-stats b { display: block; font-size: 17px; }
.prof-stats small { opacity: .8; font-size: 11px; }
.vip-card { margin: -2px 14px 0; transform: translateY(-10px); display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 16px;
  color: #fde68a; background: linear-gradient(120deg, #1c1917, #44403c); box-shadow: 0 10px 24px -12px rgba(0,0,0,.6); }
.vip-card b { display: block; font-size: 15px; letter-spacing: .04em; }
.vip-card small { font-size: 11px; color: #d6d3d1; }
.vip-card > span { font-size: 12px; font-weight: 700; color: #1c1917; background: linear-gradient(90deg, #fde68a, #f59e0b); padding: 5px 12px; border-radius: 99px; }
.order-entry { margin: 0 14px; padding: 14px 6px; border-radius: 16px; background: var(--ios-card); display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; }
.order-entry > div { display: grid; justify-items: center; gap: 4px; }
.order-entry small { font-size: 11px; color: var(--ios-fg2); }
.order-entry .badge { box-shadow: 0 0 0 2px var(--ios-card); }
.ios-group-title { font-size: 12px; color: var(--ios-fg2); padding: 18px 30px 6px; text-transform: uppercase; }
.ios-group { margin: 0 14px; border-radius: 14px; background: var(--ios-card); overflow: hidden; }
.ios-group + .ios-group { margin-top: 16px; }
.cell { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; position: relative; background: var(--ios-card); cursor: pointer; transition: background .15s; }
.cell:active { background: var(--ios-fill); }
.cell:not(:last-child)::after, .swipe-cell:not(:last-child)::after { content: ""; position: absolute; left: 52px; right: 0; bottom: 0; height: .5px; background: var(--ios-sep); z-index: 2; }
.cell-ic { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: var(--c); color: #fff; flex-shrink: 0; }
.cell-label { flex: 1; font-size: 14px; }
.cell-val { color: var(--ios-fg2); font-size: 13.5px; }
.cell-pill { font-style: normal; font-size: 11px; color: #ef4444; background: rgba(239, 68, 68, .12); padding: 2px 8px; border-radius: 99px; }
.cell-chev { color: var(--ios-fg2); opacity: .6; display: grid; }
.cell-danger { justify-content: center; color: #ef4444; font-size: 14px; font-weight: 500; }
.swipe-cell { position: relative; overflow: hidden; }
.swipe-actions { position: absolute; right: 0; top: 0; bottom: 0; display: flex; }
.swipe-actions button { border: 0; color: #fff; font: inherit; font-size: 13px; width: 66px; cursor: pointer; }
.swipe-actions .pin { background: #f59e0b; }
.swipe-actions .del { background: #ef4444; }
.swipe-cell .cell { z-index: 1; transition: transform .3s var(--ease-out); touch-action: pan-y; }
.swipe-cell .cell.dragging { transition: none; }

/* ---------- Material 3 ---------- */
.md {
  --md-primary: #6750a4; --md-on-primary: #fff; --md-pc: #eaddff; --md-on-pc: #21005d; --md-sc: #e8def8; --md-on-sc: #1d192b;
  --md-surface: #fef7ff; --md-s1: #f7f2fa; --md-s2: #f3edf7; --md-s3: #ece6f0; --md-on-surface: #1d1b20; --md-variant: #49454f; --md-outline: #cac4d0;
  background: var(--md-surface); color: var(--md-on-surface); font-family: Roboto, var(--font);
}
[data-theme="dark"] .md {
  --md-primary: #d0bcff; --md-on-primary: #381e72; --md-pc: #4f378b; --md-on-pc: #eaddff; --md-sc: #4a4458; --md-on-sc: #e8def8;
  --md-surface: #141218; --md-s1: #1d1b20; --md-s2: #211f26; --md-s3: #2b2930; --md-on-surface: #e6e0e9; --md-variant: #cac4d0; --md-outline: #49454f;
}
.md .home-ind { height: 4px; width: 100px; opacity: .5; }
.md-topbar { flex-shrink: 0; display: flex; align-items: center; gap: 16px; padding: 6px 16px 10px; }
.md-topbar b { flex: 1; font-size: 20px; font-weight: 500; }
.md-body { padding: 0 0 80px; }
.md-search { display: flex; align-items: center; gap: 12px; margin: 0 14px 12px; height: 50px; padding: 0 16px; border-radius: 28px; background: var(--md-s3); color: var(--md-variant); }
.md-search span { flex: 1; }
.md-chips { display: flex; gap: 8px; padding: 0 14px 12px; overflow-x: auto; scrollbar-width: none; }
.md-chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--md-outline); font-size: 13px; font-weight: 500; color: var(--md-variant); cursor: pointer; position: relative; overflow: hidden; }
.md-chip.on { background: var(--md-sc); color: var(--md-on-sc); border-color: transparent; padding-left: 8px; }
.md-card { margin: 0 14px 12px; border-radius: 14px; overflow: hidden; }
.md-card.elevated { background: var(--md-s1); box-shadow: 0 1px 3px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.1); }
.md-card.outlined { border: 1px solid var(--md-outline); }
.md-card-img { height: 120px; }
.md-card-txt { padding: 12px 16px 4px; }
.md-card-txt b { display: block; font-size: 16px; font-weight: 500; }
.md-card-txt small { color: var(--md-variant); }
.md-card-acts { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 12px 12px; }
.md-text-btn, .md-tonal-btn { height: 36px; padding: 0 16px; border-radius: 18px; display: inline-flex; align-items: center; font-weight: 500; font-size: 13px; cursor: pointer; position: relative; overflow: hidden; }
.md-text-btn { color: var(--md-primary); }
.md-tonal-btn { background: var(--md-sc); color: var(--md-on-sc); }
.md-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 0 14px 12px; border-radius: 14px; overflow: hidden; }
.md-grid i { aspect-ratio: 1; }
.md-list-item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; position: relative; overflow: hidden; cursor: pointer; }
.md-list-item b { display: block; font-weight: 500; font-size: 14px; }
.md-list-item small { color: var(--md-variant); font-size: 12px; }
.md-list-item > div { flex: 1; }
.md-lead { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--md-pc); color: var(--md-on-pc); }
.md-switch .switch-track { width: 46px; height: 28px; border: 2px solid var(--md-outline); background: var(--md-s3); }
.md-switch .switch-track::after { width: 14px; height: 14px; top: 5px; left: 5px; background: var(--md-outline); box-shadow: none; }
.md-switch input:checked + .switch-track { background: var(--md-primary); border-color: var(--md-primary); }
.md-switch input:checked + .switch-track::after { width: 22px; height: 22px; top: 1px; left: 1px; transform: translateX(18px); background: var(--md-on-primary); }
.md-fab { position: absolute; right: 16px; bottom: 96px; z-index: 6; height: 56px; padding: 0 20px; border-radius: 16px; border: 0; display: flex; align-items: center; gap: 10px;
  background: var(--md-pc); color: var(--md-on-pc); font-weight: 500; font-size: 14px; cursor: pointer; overflow: hidden;
  box-shadow: 0 3px 6px rgba(0,0,0,.15), 0 2px 3px rgba(0,0,0,.12); transition: box-shadow .2s, transform .2s; }
.md-fab:hover { box-shadow: 0 6px 12px rgba(0,0,0,.2); }
.md-nav { flex-shrink: 0; display: grid; grid-template-columns: repeat(4, 1fr); height: 84px; padding: 12px 0 24px; background: var(--md-s2); }
.md-nav-item { display: grid; justify-items: center; gap: 4px; cursor: pointer; color: var(--md-variant); }
.md-nav-item i { width: 56px; height: 30px; border-radius: 15px; display: grid; place-items: center; transition: background .3s; }
.md-nav-item small { font-size: 11.5px; font-weight: 500; }
.md-nav-item.on { color: var(--md-on-surface); }
.md-nav-item.on i { background: var(--md-sc); color: var(--md-on-sc); animation: mdPill .35s var(--ease-out); }
@keyframes mdPill { from { transform: scaleX(.4); } }

/* 波纹 Ripple（通用） */
.ripple { position: relative; overflow: hidden; }
.ripple-wave { position: absolute; border-radius: 50%; background: currentColor; opacity: .22; transform: scale(0); animation: rippleOut .6s var(--ease-out) forwards; pointer-events: none; }
@keyframes rippleOut { to { transform: scale(1); opacity: 0; } }

/* ---------- 交互层 ---------- */
.ios-navbar { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; padding: 2px 14px 10px; color: var(--primary); border-bottom: .5px solid var(--ios-sep); }
.ios-navbar b { color: var(--ios-fg); font-size: 15px; }
.ov-body { transition: transform .4s var(--ease-out); }
.ptr { height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ios-fg2); transition: height .35s var(--ease-out); }
.ov-screen.ptr-on .ptr { height: 54px; }
.ptr .spin { width: 16px; height: 16px; }
.ov-list { margin: 0 14px; display: grid; gap: 8px; }
.ov-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--ios-card); }
.ov-item b { display: block; font-size: 13.5px; }
.ov-item small { font-size: 12px; color: var(--ios-fg2); }
.ov-screen.sk-on .ov-item .avatar, .ov-screen.sk-on .ov-item b, .ov-screen.sk-on .ov-item small {
  color: transparent !important; background: linear-gradient(90deg, var(--ios-fill) 25%, color-mix(in srgb, var(--ios-fill) 30%, transparent) 37%, var(--ios-fill) 63%);
  background-size: 400% 100%; animation: skShimmer 1.4s ease infinite; border-radius: 6px;
}
.ov-screen.sk-on .ov-item .avatar { border-radius: 50%; }
.ph-mask { position: absolute; inset: 0; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 20; }
.ph-on .ph-mask { opacity: 1; pointer-events: auto; }
.ph-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--ios-card); border-radius: 22px 22px 0 0; padding: 8px 16px 30px;
  display: grid; gap: 14px; justify-items: center; transform: translateY(105%); transition: transform .45s var(--ease-spring); }
.ph-grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--ios-sep); }
.ph-share { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 6px; width: 100%; }
.ph-share span { display: grid; justify-items: center; gap: 6px; }
.ph-share i { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: var(--c); }
.ph-share small { font-size: 11px; color: var(--ios-fg2); }
.ph-cancel { width: 100%; height: 44px; border: 0; border-radius: 12px; background: var(--ios-fill); color: var(--ios-fg); font: inherit; font-weight: 600; cursor: pointer; }
.ph-action { position: absolute; left: 8px; right: 8px; bottom: 26px; z-index: 21; display: grid; gap: 8px; transform: translateY(130%); transition: transform .4s var(--ease-out); }
.ph-action-group { border-radius: 14px; overflow: hidden; background: color-mix(in srgb, var(--ios-card) 92%, transparent); backdrop-filter: blur(20px); text-align: center; }
.ph-action-group p { font-size: 12px; color: var(--ios-fg2); padding: 12px; border-bottom: .5px solid var(--ios-sep); }
.ph-action button, .ph-alert button { border: 0; background: none; font: inherit; color: var(--primary); cursor: pointer; }
.ph-action-group button { display: block; width: 100%; height: 50px; font-size: 17px; border-bottom: .5px solid var(--ios-sep); }
.ph-action-group button:last-child { border: 0; }
.ph-action-group button.danger { color: #ef4444; }
.ph-action-cancel { height: 52px; border-radius: 14px !important; background: var(--ios-card) !important; font-weight: 600 !important; font-size: 17px !important; }
.ph-alert { position: absolute; left: 50%; top: 50%; z-index: 21; width: 240px; border-radius: 16px; overflow: hidden; text-align: center;
  background: color-mix(in srgb, var(--ios-card) 94%, transparent); backdrop-filter: blur(20px);
  transform: translate(-50%, -50%) scale(1.15); opacity: 0; pointer-events: none; transition: transform .3s var(--ease-out), opacity .2s; }
.ph-alert b { display: block; padding: 18px 16px 4px; font-size: 15px; }
.ph-alert p { padding: 0 16px 16px; font-size: 12.5px; color: var(--ios-fg2); line-height: 1.5; }
.ph-alert div { display: grid; grid-template-columns: 1fr 1fr; border-top: .5px solid var(--ios-sep); }
.ph-alert div button { height: 44px; font-size: 15px; }
.ph-alert div button + button { border-left: .5px solid var(--ios-sep); }
.ph-alert .strong { font-weight: 700; }
.ph-toast { position: absolute; left: 50%; top: 45%; z-index: 22; transform: translate(-50%, -50%) scale(.8); opacity: 0; pointer-events: none;
  display: grid; justify-items: center; gap: 8px; padding: 18px 20px; border-radius: 16px; background: rgba(30, 30, 30, .82); color: #fff; font-size: 13px; transition: all .25s var(--ease-out); }
.ov-screen.ly-sheet .ph-sheet { transform: none; }
.ov-screen.ly-action .ph-action { transform: none; }
.ov-screen.ly-alert .ph-alert { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
.ov-screen.ly-toast .ph-toast { transform: translate(-50%, -50%); opacity: 1; }

/* ---------- 小程序 ---------- */
.wx { background: #f5f5f5; color: #111; }
[data-theme="dark"] .wx { background: #111; color: #eee; }
.wx-nav { flex-shrink: 0; display: flex; align-items: center; justify-content: center; position: relative; height: 40px; background: #fff; }
[data-theme="dark"] .wx-nav { background: #191919; }
.wx-nav b { font-size: 15px; font-weight: 600; }
.wx-capsule { position: absolute; right: 10px; display: flex; align-items: center; height: 30px; padding: 0 10px; border-radius: 15px; border: .5px solid rgba(0,0,0,.15); background: rgba(255,255,255,.7); gap: 10px; }
[data-theme="dark"] .wx-capsule { background: rgba(0,0,0,.4); border-color: rgba(255,255,255,.2); }
.wx-capsule i { width: .5px; height: 16px; background: rgba(0,0,0,.2); }
.wx-close { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; }
.wx-close::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.wx-body { padding-bottom: 70px; }
.wx-hero { padding: 10px 14px 14px; background: linear-gradient(180deg, #fff, transparent); }
[data-theme="dark"] .wx-hero { background: linear-gradient(180deg, #191919, transparent); }
.wx-loc { display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; }
.wx-search { display: flex; align-items: center; gap: 6px; margin-top: 10px; height: 34px; padding: 0 12px; border-radius: 17px; background: #fff; border: 1.5px solid #22c55e; color: #999; }
[data-theme="dark"] .wx-search { background: #222; }
.wx-notice { display: flex; align-items: center; gap: 8px; margin: 0 14px 12px; padding: 7px 10px; border-radius: 10px; background: #fff7ed; color: #ea580c; font-size: 12px; overflow: hidden; }
.wx-notice > div { overflow: hidden; flex: 1; white-space: nowrap; }
.wx-notice span { display: inline-block; padding-left: 100%; animation: noticeRoll 14s linear infinite; }
@keyframes noticeRoll { to { transform: translateX(-100%); } }
.wx-kk { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px 0; margin: 0 14px 12px; padding: 14px 4px; border-radius: 14px; background: #fff; }
[data-theme="dark"] .wx-kk, [data-theme="dark"] .wx-goods { background: #1c1c1c; }
.wx-kk span { display: grid; justify-items: center; gap: 5px; }
.wx-kk i { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--c); box-shadow: 0 4px 10px -4px var(--c); }
.wx-kk small { font-size: 10.5px; color: #666; }
[data-theme="dark"] .wx-kk small { color: #aaa; }
.wx-coupons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 14px 12px; }
.wx-coupon { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; color: #b91c1c; background: linear-gradient(90deg, #fee2e2, #fff1f2); position: relative; }
.wx-coupon::before, .wx-coupon::after { content: ""; position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: #f5f5f5; transform: translateY(-50%); }
[data-theme="dark"] .wx-coupon::before, [data-theme="dark"] .wx-coupon::after { background: #111; }
.wx-coupon::before { left: -5px; }
.wx-coupon::after { right: -5px; }
.wx-coupon > b { font-size: 22px; }
.wx-coupon > b small { font-size: 12px; }
.wx-coupon div { flex: 1; display: grid; font-size: 11.5px; font-weight: 600; }
.wx-coupon div small { font-weight: 400; font-size: 10px; opacity: .8; }
.wx-coupon em { font-style: normal; font-size: 11px; color: #fff; background: #ef4444; padding: 2px 8px; border-radius: 99px; }
.wx-fall { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 14px; align-items: start; }
.wx-fall > div { display: grid; gap: 8px; }
.wx-goods { background: #fff; border-radius: 12px; overflow: hidden; display: grid; gap: 6px; padding-bottom: 8px; }
.wx-goods > i { display: block; }
.wx-goods b { font-size: 12.5px; font-weight: 500; padding: 0 8px; line-height: 1.4; }
.wx-goods .row { padding: 0 8px; }
.wx-price { color: #ef4444; font-weight: 700; font-size: 15px; }
.wx-price small { font-size: 11px; }
.wx-add { width: 22px; height: 22px; border-radius: 50%; background: #22c55e; color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .2s; }
.wx-add:active { transform: scale(.85); }
.wx-cartbar { position: absolute; left: 12px; right: 12px; bottom: 28px; z-index: 6; display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 6px 0 16px; border-radius: 25px; background: #1f2937; color: #fff; box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); }
.wx-cart { color: #fff; }
.wx-cart .badge { box-shadow: 0 0 0 2px #1f2937; }
.wx-cartbar > div { flex: 1; display: grid; }
.wx-cartbar b { font-size: 16px; }
.wx-cartbar small { font-size: 10px; color: #9ca3af; }
.wx-cartbar button { height: 38px; padding: 0 18px; border: 0; border-radius: 19px; background: #22c55e; color: #fff; font-weight: 700; cursor: pointer; }

/* App 术语卡 */
.app-terms-card { width: 300px; align-self: stretch; }
.app-terms { height: 624px; overflow: auto; border-radius: 28px; border: 1px solid var(--border); background: var(--card); padding: 20px; display: grid; gap: 10px; align-content: start; }
.app-terms > b { font-size: 16px; margin-bottom: 4px; }
.app-terms div { display: grid; gap: 1px; padding-bottom: 9px; border-bottom: 1px dashed var(--border); }
.app-terms span { font-size: 13px; font-weight: 600; }
.app-terms em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--primary); margin-left: 6px; font-weight: 500; }
.app-terms small { font-size: 12px; color: var(--fg-3); }
