/* AI酒仓通 · 视觉规范：酒红 + 香槟金，暖灰底，留白、细线、轻阴影 */
:root {
  --brand: #8a1a2f; --brand-deep: #5e0f1f; --brand-2: #b03048; --brand-soft: #f9edef;
  --gold: #b08a4a; --gold-soft: #f7efe0;
  --ink: #1f1b1d; --ink-2: #5a5357; --ink-3: #978f93; --line: #eee8e4;
  --bg: #f6f3f0; --card: #fff; --ok: #1f8a55; --warn: #b86e00; --blue: #2d5f9e; --red: #d0342c;
  --r: 14px; --r-sm: 10px;
  --shadow: 0 1px 2px rgba(70, 30, 40, .04), 0 6px 18px rgba(70, 30, 40, .05);
  --top: 48px;
  --grad: linear-gradient(135deg, #6a1226 0%, #8a1a2f 55%, #a52a43 100%);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: #e9e4e0; color: var(--ink); font: 15px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; padding-bottom: calc(68px + env(safe-area-inset-bottom)); box-shadow: 0 0 40px rgba(60, 20, 30, .10); }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
b, strong { font-weight: 600; }
.ic { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.ic.sm { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; }
.ic.h { width: 18px; height: 18px; color: var(--gold); }

/* 顶栏 */
#topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; height: var(--top); padding: 0 6px; background: var(--grad); color: #fff; }
#topbar h1 { flex: 1; margin: 0; font-size: 17px; font-weight: 600; letter-spacing: .5px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#back { width: 40px; height: 40px; border: 0; background: none; color: #fff; font-size: 30px; line-height: 1; font-weight: 300; }
#back.hide { visibility: hidden; }
#topright { min-width: 40px; text-align: right; font-size: 14px; }
#topright a, #topright button { color: #fff; background: none; border: 0; padding: 6px 8px; opacity: .95; }
#topright .ic { width: 20px; height: 20px; }

/* 底部导航 */
#tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 30; display: flex; background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
#tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0 5px; color: var(--ink-3); font-size: 10.5px; position: relative; }
#tabbar a i { display: grid; place-items: center; height: 26px; }
#tabbar a i .ic { width: 23px; height: 23px; }
#tabbar a.on { color: var(--brand); font-weight: 600; }
#tabbar a.on i .ic { stroke-width: 2.1; }
#tabbar a.pub i { width: 46px; height: 46px; margin-top: -20px; border-radius: 50%; background: var(--grad); color: #fff; box-shadow: 0 6px 14px rgba(138, 26, 47, .35), 0 0 0 4px #fff; }
#tabbar a.pub i .ic { width: 24px; height: 24px; stroke-width: 2.2; }
.dot { position: absolute; top: 3px; left: 54%; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; line-height: 16px; font-weight: 600; text-align: center; box-shadow: 0 0 0 2px #fff; }
body.noTab #tabbar { display: none; }
body.noTab #app { padding-bottom: 0; }

/* 通用 */
.loading, .empty { padding: 56px 20px; text-align: center; color: var(--ink-3); font-size: 14px; }
.pad { padding: 12px; }
.card { background: var(--card); border-radius: var(--r); padding: 14px 16px; margin: 12px; box-shadow: var(--shadow); }
.card h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.ch { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.row { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--ink-3); font-size: 12px; }
.sub { color: var(--ink-2); font-size: 13px; }
.price { color: var(--brand); font-weight: 700; font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.price small { font-size: 11px; font-weight: 400; margin-left: 1px; color: var(--ink-3); }
.pts { display: inline-block; padding: 0 6px; border-radius: 5px; background: #fff1e8; color: #c2410c; font-size: 11.5px; font-weight: 600; line-height: 19px; }
.tag { display: inline-block; padding: 0 7px; border-radius: 5px; font-size: 11px; line-height: 19px; background: #f3efec; color: var(--ink-2); white-space: nowrap; }
.tag.spot { background: #e7f5ed; color: var(--ok); }
.tag.future { background: #eaf0f8; color: var(--blue); }
.tag.hot { background: var(--brand-soft); color: var(--brand); }
.v { display: inline-block; padding: 0 5px; border-radius: 4px; background: var(--gold-soft); color: #8a6420; font-size: 10px; line-height: 17px; font-weight: 600; vertical-align: 1px; border: 1px solid #ecdcbc; }
.v.no { background: #f3efec; color: var(--ink-3); border-color: transparent; }
.demo { display: inline-block; padding: 0 5px; border: 1px solid #e6cdd2; border-radius: 4px; color: #a8465a; font-size: 10px; line-height: 15px; }
.ai { display: inline-block; padding: 0 5px; border-radius: 4px; background: linear-gradient(135deg, #b08a4a, #d1ad6b); color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; letter-spacing: .5px; vertical-align: 1px; }

/* 酒源卡片 */
.lst { margin: 0 12px; }
.item { display: block; background: #fff; border-radius: var(--r); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow); transition: transform .12s; }
.item:active { transform: scale(.99); }
.item.listing { display: flex; gap: 12px; align-items: flex-start; }
.tile { flex: none; width: 50px; height: 62px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tile b { font-size: 21px; font-weight: 700; line-height: 1; font-family: "Songti SC", "STSong", "Noto Serif SC", serif; }
.tile span { font-size: 10px; opacity: .85; }
.item .t { font-weight: 600; font-size: 15.5px; line-height: 1.35; }
.item .meta { margin-top: 3px; color: var(--ink-3); font-size: 12px; }
.item .pr { margin-top: 7px; gap: 6px; }
.item .qty { color: var(--ink); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.item .qty small { font-size: 11px; color: var(--ink-3); font-weight: 400; margin-left: 1px; }
.item .foot { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; align-items: center; color: var(--ink-3); font-size: 12px; }
.seek { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 6px; border-radius: 6px; background: var(--brand); color: #fff; font-size: 12px; vertical-align: 1px; }

/* 搜索与筛选 */
.search { position: sticky; top: var(--top); z-index: 10; background: var(--grad); padding: 2px 12px 12px; }
.search input { width: 100%; height: 38px; border: 0; border-radius: 19px; padding: 0 14px 0 36px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23978f93' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l4 4'/%3E%3C/svg%3E") 13px center no-repeat; outline: none; font-size: 14px; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 12px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 5px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips.small .chip { padding: 3px 11px; font-size: 12px; background: transparent; }
.chips.small .chip.on { background: var(--brand-soft); border-color: #ecc9cf; color: var(--brand); }
.sortbar { display: flex; gap: 16px; padding: 10px 16px 8px; font-size: 13px; color: var(--ink-2); align-items: center; }
.sortbar a.on { color: var(--brand); font-weight: 600; }
.sortbar label { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.sortbar label + label { margin-left: 0; }
.sortbar input[type=checkbox] { accent-color: var(--brand); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; margin: 12px; border-radius: var(--r); padding: 14px 0 12px; text-align: center; box-shadow: var(--shadow); }
.stats > div + div, .stats > a + a { border-left: 1px solid var(--line); }
.stats b { display: block; font-size: 19px; color: var(--ink); font-variant-numeric: tabular-nums; }
.stats span { font-size: 11px; color: var(--ink-3); }
.banner { display: flex; align-items: center; gap: 8px; margin: 12px 12px 0; padding: 11px 14px; border-radius: var(--r); background: linear-gradient(90deg, var(--gold-soft), #fffaf2); color: #7a5414; font-size: 13px; border: 1px solid #f0e2c6; }
.banner .ic { color: var(--gold); }
.banner b { color: var(--brand); }

/* 按钮与表单 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 36px; padding: 0 16px; border-radius: 18px; border: 1px solid transparent; background: var(--grad); color: #fff; font-size: 14px; font-weight: 500; white-space: nowrap; }
.btn.ghost { background: #fff; color: var(--brand); border-color: #e3c3c9; }
.btn.gray { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn.sm { height: 28px; padding: 0 12px; font-size: 12px; }
.btn.block { display: flex; width: 100%; height: 46px; border-radius: 23px; font-size: 16px; box-shadow: 0 6px 16px rgba(138, 26, 47, .2); }
.btn.block.ghost { box-shadow: none; }
.btn:disabled { opacity: .45; box-shadow: none; }
.actions { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); display: flex; gap: 8px; padding: 10px 12px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); z-index: 5; }
body.noTab .actions { bottom: 0; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.actions .btn { flex: 1; height: 44px; border-radius: 22px; }
.form { background: #fff; margin: 12px; border-radius: var(--r); padding: 2px 16px; box-shadow: var(--shadow); }
.field { display: flex; align-items: center; min-height: 50px; border-bottom: 1px solid var(--line); gap: 10px; }
.field:last-child { border-bottom: 0; }
.field > label { width: 78px; flex: none; color: var(--ink-2); font-size: 14px; }
.field input, .field select { flex: 1; min-width: 0; border: 0; outline: none; height: 46px; background: none; text-align: right; }
.field textarea { flex: 1; border: 0; outline: none; padding: 10px 0; min-height: 64px; resize: vertical; background: none; }
.field .unit { color: var(--ink-3); font-size: 13px; }
.field.col { flex-direction: column; align-items: stretch; padding: 12px 0; }
.field.col > label { width: auto; margin-bottom: 4px; }
.field.col input { text-align: left; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: 1; padding: 7px 0; }
.seg button { padding: 4px 13px; border-radius: 15px; border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--ink-2); }
.seg button.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); font-weight: 500; }
.hint { margin: 10px 12px; padding: 11px 14px; border-radius: var(--r-sm); background: #eef3fa; color: #2b4f80; font-size: 13px; line-height: 1.6; }
.hint.warn { background: #fff6e6; color: #85560a; }
.big-input { width: 100%; min-height: 92px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; outline: none; resize: vertical; background: #fff; line-height: 1.6; }
.big-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(138, 26, 47, .08); }
.sbox { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 19px; padding: 0 14px; outline: none; background: #fff; }
.sbox:focus { border-color: var(--brand); }

/* 详情 */
.hero { background: #fff; padding: 16px; }
.hero h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: .2px; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.kv div { background: #faf8f6; border: 1px solid #f2ede9; border-radius: 10px; padding: 8px 10px; }
.kv span { display: block; font-size: 11px; color: var(--ink-3); }
.kv b { font-size: 14px; font-weight: 600; }
.seller { display: flex; align-items: center; gap: 10px; }
.avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 16px; font-family: "Songti SC", "STSong", serif; position: relative; }
.avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.avatar .ic { width: 26px; height: 26px; }
.avatar.pub1 { background: var(--brand-soft); color: var(--brand); border-radius: 16px; }
.avatar.pub2 { background: #eaf0f8; color: var(--blue); border-radius: 16px; }
.avatar.pub3 { background: var(--gold-soft); color: var(--gold); border-radius: 16px; }
.avatar.live::after { content: ""; position: absolute; right: 0; bottom: 1px; width: 10px; height: 10px; border-radius: 50%; background: #2fb36d; box-shadow: 0 0 0 2px #fff; }
.credit { color: #8a6420; font-size: 12px; }
.chart { width: 100%; height: 120px; display: block; }
.spark { width: 70px; height: 24px; }
.up { color: #d4380d; } .down { color: var(--ok); }

/* 寻酒 */
.want .t { font-weight: 600; }
.want .raw { color: var(--ink-2); font-size: 13px; margin-top: 4px; line-height: 1.55; }
.badge-n { display: inline-block; min-width: 18px; padding: 0 7px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 11px; line-height: 19px; text-align: center; }
.score { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--brand); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.tabs { display: flex; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: var(--top); z-index: 9; }
.tabs a { flex: 1; text-align: center; padding: 11px 0; font-size: 14px; color: var(--ink-2); border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--brand); border-color: var(--brand); font-weight: 600; }
.seg-tabs { display: flex; gap: 4px; margin: 12px 12px 0; padding: 4px; background: #ece6e2; border-radius: 12px; overflow-x: auto; scrollbar-width: none; }
.seg-tabs::-webkit-scrollbar { display: none; }
.seg-tabs a { flex: 1 0 auto; text-align: center; padding: 7px 10px; border-radius: 9px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.seg-tabs a.on { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* 消息 */
.chat { padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: calc(100vh - var(--top) - 64px); }
.bubble { max-width: 76%; padding: 9px 13px; border-radius: 16px 16px 16px 4px; background: #fff; font-size: 14px; word-break: break-word; white-space: pre-wrap; box-shadow: var(--shadow); }
.bubble.me { align-self: flex-end; background: var(--grad); color: #fff; border-radius: 16px 16px 4px 16px; }
.bubble .ref { display: block; font-size: 11px; opacity: .75; margin-bottom: 2px; }
.bubble time { display: block; font-size: 10px; opacity: .6; margin-top: 2px; }
.composer { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); }
.composer input { flex: 1; height: 40px; border: 1px solid var(--line); border-radius: 20px; padding: 0 16px; outline: none; background: var(--bg); }
.notice { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.notice:last-child { border-bottom: 0; }
.notice.unread::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--red); }

/* 我的 */
.profile { background: var(--grad); color: #fff; padding: 20px 18px 50px; position: relative; overflow: hidden; }
.profile::after { content: ""; position: absolute; right: -40px; top: -60px; width: 200px; height: 200px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 0 0 30px rgba(255, 255, 255, .03); }
.profile .avatar { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .3); }
.profile .muted { color: rgba(255, 255, 255, .78); }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; margin: -34px 12px 12px; border-radius: var(--r); padding: 14px 0; text-align: center; position: relative; box-shadow: var(--shadow); }
.grid4 a + a { border-left: 1px solid var(--line); }
.grid4 a b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; }
.grid4 a span { font-size: 12px; color: var(--ink-3); }
.menu { background: #fff; margin: 12px; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.menu a, .menu button { color: inherit; display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-size: 15px; }
.menu a:last-child, .menu button:last-child { border-bottom: 0; }
.menu a:active, .menu button:active { background: #faf7f5; }
.menu i { font-style: normal; flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: #f3efec; color: var(--ink-2); }
.menu i .ic { width: 18px; height: 18px; }
.menu i.c0 { background: #f3efec; color: var(--ink-2); }
.menu i.c1 { background: var(--brand-soft); color: var(--brand); }
.menu i.c2 { background: #fdf0e6; color: #c0622a; }
.menu i.c3 { background: #eaf0f8; color: var(--blue); }
.menu i.c4 { background: var(--gold-soft); color: #9a7434; }
.menu i.c5 { background: #e9f5ef; color: var(--ok); }
.menu i.c6 { background: #f1ecf8; color: #6c4aa3; }
.menu .arrow { margin-left: auto; color: #c9c1c4; }
.menu .muted + .arrow { margin-left: 6px; }
.menu .arrow::after { content: "›"; font-size: 20px; line-height: 1; }

/* 管理端 */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px; }
.kpi { background: #fff; border-radius: 12px; padding: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0; }
.kpi span { font-size: 12px; color: var(--ink-3); }
.kpi b { font-size: 22px; font-weight: 700; margin: 2px 0; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi em { font-style: normal; font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi em.bad { color: var(--red); }
.logline { display: grid; grid-template-columns: 82px 1fr; gap: 0 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.logline:last-child { border-bottom: 0; }
.logline time { grid-row: span 2; color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.logline span { font-weight: 500; }
.logline em { font-style: normal; color: var(--ink-2); font-size: 12px; }
.srow, .urow, .lrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.srow:last-child, .urow:last-child, .lrow:last-child { border-bottom: 0; }
.urow { cursor: pointer; }
.urow .arrow::after { content: "›"; color: #c9c1c4; font-size: 20px; }
.sic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #f3efec; color: var(--ink-3); position: relative; }
.sic.on { background: #e9f5ef; color: var(--ok); }
.sic.on::after { content: ""; position: absolute; right: -2px; top: -2px; width: 10px; height: 10px; border-radius: 50%; background: #2fb36d; box-shadow: 0 0 0 2px #fff; }
.sic.bad { background: #fdecea; color: var(--red); }
.lrow { align-items: flex-start; }
.dotc { flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; }
.dotc.ok { background: #2fb36d; } .dotc.bad { background: var(--red); }
.okc { color: var(--ok); font-size: 12px; } .badc { color: var(--red); font-size: 12px; font-weight: 500; }
.bigpw { font: 600 30px/1.3 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 3px; text-align: center; padding: 10px 0; color: var(--brand); user-select: all; }

/* 订单 */
.steps { display: flex; justify-content: space-between; margin: 14px 0 4px; }
.steps div { flex: 1; text-align: center; font-size: 11px; color: var(--ink-3); position: relative; }
.steps div::before { content: ""; display: block; width: 12px; height: 12px; margin: 0 auto 5px; border-radius: 50%; background: var(--line); position: relative; z-index: 1; }
.steps div::after { content: ""; position: absolute; top: 5px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.steps div:first-child::after { display: none; }
.steps div.done { color: var(--brand); font-weight: 500; }
.steps div.done::before, .steps div.done::after { background: var(--brand); }
.tl { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 14px; }
.tl p { margin: 0 0 10px; font-size: 13px; }
.status { font-size: 13px; font-weight: 600; color: var(--warn); }
.status.done { color: var(--ok); }
.status.cancel { color: var(--ink-3); }

/* 登录 */
.login { min-height: 100vh; padding: 52px 22px 30px; background: var(--grad) top / 100% 250px no-repeat, var(--bg); position: relative; }
.login::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 250px; background: radial-gradient(circle at 85% 10%, rgba(255, 255, 255, .14), transparent 45%), radial-gradient(circle at 10% 90%, rgba(176, 138, 74, .25), transparent 50%); pointer-events: none; }
.login .logo { text-align: center; color: #fff; margin-bottom: 26px; position: relative; }
.login .logo img { width: 62px; height: 62px; border-radius: 16px; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }
.login .logo h2 { margin: 10px 0 0; font-size: 25px; letter-spacing: 1px; }
.login .logo p { margin: 4px 0 0; opacity: .82; font-size: 13px; letter-spacing: .5px; }
.login .box { background: #fff; border-radius: 18px; padding: 8px 20px 20px; box-shadow: 0 10px 30px rgba(70, 30, 40, .10); position: relative; }
.login input { width: 100%; height: 52px; border: 0; border-bottom: 1px solid var(--line); outline: none; font-size: 16px; background: none; }
.login input:focus { border-bottom-color: var(--brand); }
.demo-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.demo-list button { padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fcfaf9; text-align: left; font-size: 11.5px; line-height: 1.35; color: var(--ink-3); }
.demo-list button b { display: block; font-size: 13px; color: var(--ink); margin-bottom: 1px; }
.demo-list button:active { border-color: var(--brand); background: var(--brand-soft); }

/* 底部弹层 */
#sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-bg { position: absolute; inset: 0; background: rgba(30, 10, 15, .45); animation: fade .18s ease-out; }
.sheet-body { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; max-height: 86vh; overflow: auto; background: var(--bg); border-radius: 20px 20px 0 0; padding: 10px 0 calc(14px + env(safe-area-inset-bottom)); animation: up .22s cubic-bezier(.2, .8, .2, 1); }
.sheet-body::before { content: ""; display: block; width: 36px; height: 4px; margin: 0 auto 10px; border-radius: 2px; background: #d8d0cc; }
.sheet-body h3 { margin: 0 16px 6px; font-size: 17px; }
@keyframes up { from { transform: translate(-50%, 30%); opacity: .4; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
pre.copy { white-space: pre-wrap; background: #fff; margin: 10px 12px; padding: 14px; border-radius: 12px; font: 14px/1.7 inherit; font-family: inherit; }
#toast { position: fixed; left: 50%; top: 42%; transform: translateX(-50%); z-index: 99; max-width: 80%; padding: 11px 18px; border-radius: 12px; background: rgba(30, 20, 24, .88); color: #fff; font-size: 14px; text-align: center; backdrop-filter: blur(6px); }

table.mini { width: 100%; border-collapse: collapse; font-size: 13px; }
table.mini td, table.mini th { padding: 7px 4px; border-bottom: 1px solid var(--line); text-align: left; }
table.mini th { color: var(--ink-3); font-weight: 500; font-size: 12px; }
.foot-note { padding: 18px 16px; text-align: center; color: var(--ink-3); font-size: 11px; letter-spacing: .3px; }

/* 安卓/苹果 APP：顶部留出刘海和状态栏的位置，去掉网页阴影 */
body.in-app { background: var(--brand); --top: calc(48px + env(safe-area-inset-top)); }
body.in-app #app { max-width: none; box-shadow: none; }
body.in-app #topbar { padding-top: env(safe-area-inset-top); }
body.in-app .login { padding-top: calc(52px + env(safe-area-inset-top)); background-size: 100% calc(250px + env(safe-area-inset-top)), auto; }
body.in-app .login::before { height: calc(250px + env(safe-area-inset-top)); }
body.in-app #tabbar { max-width: none; }
body.in-app .sheet-body { max-width: none; }
/* 苹果手机输入框字号小于 16px 时会自动放大页面，APP 里统一用 16px */
body.in-app input, body.in-app textarea, body.in-app select { font-size: 16px; }

/* ---------- 消息通知 ---------- */
.sic.ok { background: #e9f5ef; color: var(--ok); }
.sic.bad { background: #fdecee; color: var(--red); }
.sic.warn { background: #fff6e6; color: #b07410; }
.swrow { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.swrow:last-of-type { border-bottom: 0; }
.swrow b { font-weight: 500; font-size: 15px; }
.sw { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 48px; height: 28px; margin: 0; border-radius: 14px; background: #d9d2ce; transition: background .2s; cursor: pointer; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.sw:checked { background: var(--brand); }
.sw:checked::after { transform: translateX(20px); }
#banner { position: fixed; z-index: 98; left: 10px; right: 10px; top: calc(8px + env(safe-area-inset-top)); max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .97); color: var(--ink); box-shadow: 0 10px 30px rgba(40, 10, 20, .22); backdrop-filter: blur(10px); transform: translateY(calc(-100% - 30px)); transition: transform .35s cubic-bezier(.2, .9, .3, 1.2); }
#banner.on { transform: none; }
#banner i { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--grad); color: #fff; }
#banner i svg { width: 20px; height: 20px; }
#banner b { display: block; font-size: 14px; }
#banner span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; color: var(--ink-2); }
