/* ============================================================
   积分卡密系统 — 前端样式
   ============================================================ */

:root {
  --brand: #5b4bf5;
  --brand-deep: #4f46e5;
  --brand-2: #8b5cf6;
  --grad: linear-gradient(135deg, #5b4bf5 0%, #7c3aed 50%, #a855f7 100%);
  --bg: #f4f5fb;
  --surface: #ffffff;
  --text: #14162b;
  --text-2: #3f4256;
  --muted: #767c8e;
  --line: #edeff7;
  --up: #059669;
  --down: #e11d48;
  --warn: #d97706;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 43, .04), 0 4px 14px -8px rgba(20, 22, 43, .12);
  --shadow: 0 1px 3px rgba(20, 22, 43, .05), 0 14px 34px -20px rgba(20, 22, 43, .22);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.app {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; display: block; }
b, strong { font-weight: 600; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
button, input { font-family: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.ico { width: 18px; height: 18px; flex: 0 0 auto; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }

/* ============================ 顶部导航 ============================ */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(20, 22, 43, .055);
}
.nav__inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex: 0 0 auto; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700;
  box-shadow: 0 6px 14px -6px rgba(91, 75, 245, .8);
}
.brand__mark--lg { width: 52px; height: 52px; border-radius: 15px; font-size: 25px; }
.brand__name { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }

.nav__links { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; }
.nav__link {
  padding: 7px 14px; border-radius: 9px; font-size: 14px;
  color: var(--text-2); font-weight: 500; transition: .16s;
}
.nav__link:hover { background: #f2f3fa; color: var(--text); }
.nav__link.is-active { background: #eef0ff; color: var(--brand); font-weight: 600; }

.nav__right { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }

.points-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px 6px 10px; border-radius: 999px;
  background: #f1f0ff; color: var(--brand);
  font-size: 13.5px; font-weight: 600;
  border: 1px solid #e3e0ff;
}
.points-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 3px rgba(91, 75, 245, .16);
}
.points-pill .unit { font-size: 12px; opacity: .7; font-weight: 500; }

.usermenu { position: relative; }
.usermenu__btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 4px; cursor: pointer; border-radius: 999px;
  color: var(--text-2);
}
.usermenu__btn:hover { background: #f2f3fa; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.usermenu__name { font-size: 13.5px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu__panel {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 168px; background: #fff; border-radius: 13px;
  box-shadow: 0 4px 10px rgba(20,22,43,.06), 0 20px 40px -18px rgba(20,22,43,.35);
  border: 1px solid var(--line); padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: .18s ease;
}
.usermenu__panel.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.usermenu__panel a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border-radius: 8px; font-size: 13.5px; color: var(--text-2);
}
.usermenu__panel a:hover { background: #f5f6fd; }
.usermenu__panel a.danger { color: var(--down); }
.usermenu__panel .ico { width: 16px; height: 16px; opacity: .8; }

/* ============================ 主体 ============================ */
.main { max-width: 1080px; margin: 0 auto; padding: 28px 24px 72px; }
.main--auth { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 32px 20px; }

/* ============================ 提示条 ============================ */
.flash-wrap { margin-bottom: 18px; display: grid; gap: 8px; }
.flash {
  padding: 12px 16px; border-radius: 12px; font-size: 14px;
  display: flex; align-items: center; gap: 8px;
  animation: flashIn .28s ease;
}
@keyframes flashIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.flash--success { background: #ecfdf5; color: #047857; border: 1px solid #c7f2e0; }
.flash--error { background: #fef2f2; color: #be123c; border: 1px solid #fbd5dc; }
.flash--warn { background: #fffbeb; color: #b45309; border: 1px solid #fce9b8; }

/* ============================ 卡片 ============================ */
.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid rgba(20, 22, 43, .045);
  padding: 20px 22px; margin-bottom: 16px;
}
.card--pad { padding: 24px; }
.card__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 12px;
}
.card__head h2 { font-size: 15px; color: var(--text); }
.card__head .more {
  font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 3px;
}
.card__head .more:hover { color: var(--brand); }
.card__head .more .ico { width: 14px; height: 14px; }
.card--notice { background: linear-gradient(180deg, #fdfcff, #fff); }
.notice-text { font-size: 14px; color: var(--text-2); line-height: 1.85; }

/* ============================ 积分卡片 ============================ */
.balance {
  position: relative; overflow: hidden;
  border-radius: 24px; padding: 28px 30px 26px; margin-bottom: 18px;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .2), transparent 42%),
    radial-gradient(circle at 6% 100%, rgba(255, 255, 255, .12), transparent 40%),
    var(--grad);
  color: #fff;
  box-shadow: 0 18px 40px -18px rgba(91, 75, 245, .75);
}
.balance__ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  width: 260px; height: 260px; right: -70px; top: -110px;
  pointer-events: none;
}
.balance__ring--2 { width: 180px; height: 180px; right: -20px; top: -50px; }
.balance__label {
  display: flex; align-items: center; gap: 7px;
  font-size: 13.5px; opacity: .88; font-weight: 500; letter-spacing: .02em;
}
.balance__label .ico { width: 16px; height: 16px; }
.balance__num {
  font-size: 52px; font-weight: 700; line-height: 1.15;
  margin: 6px 0 2px; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 20px rgba(255, 255, 255, .18);
}
.balance__meta { font-size: 13px; opacity: .82; }
.balance__meta b { font-weight: 600; }
.balance__meta .sep { opacity: .5; margin: 0 6px; }
.balance__actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

/* ============================ 按钮 ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: 11px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer;
  background: #f3f4fa; color: var(--text-2);
  transition: transform .14s ease, box-shadow .18s ease, background .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[disabled] {
  opacity: .55; cursor: not-allowed; transform: none !important;
  box-shadow: none !important;
}
.btn .ico { width: 16px; height: 16px; }

.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 8px 18px -9px rgba(91, 75, 245, .85); }
.btn--primary:hover { box-shadow: 0 12px 24px -9px rgba(91, 75, 245, .95); }

.btn--white { background: #fff; color: var(--brand-deep); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .4); }
.btn--white:hover { box-shadow: 0 10px 22px -8px rgba(0, 0, 0, .45); }

.btn--outline {
  background: rgba(255, 255, 255, .1); color: #fff;
  border-color: rgba(255, 255, 255, .42);
  backdrop-filter: blur(4px);
}
.btn--outline:hover { background: rgba(255, 255, 255, .2); }

.btn--ghost { background: #fff; color: var(--text-2); border-color: var(--line); }
.btn--ghost:hover { background: #fafbff; border-color: #dfe3f2; }

.btn--block { width: 100%; }
.btn--lg { padding: 13px 24px; font-size: 15px; border-radius: 13px; }
.btn--sm { padding: 7px 14px; font-size: 13px; border-radius: 9px; }

/* ============================ 列表 ============================ */
.list { list-style: none; margin: 0; padding: 0; }
.list__item {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.list--dense .list__item { padding: 11px 0; }
.list__item:last-child { border-bottom: 0; padding-bottom: 0; }
.list__item:first-child { padding-top: 2px; }

.list__icon {
  width: 36px; height: 36px; border-radius: 11px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600;
}
.list__icon .ico { width: 17px; height: 17px; }
.list__icon.is-up { background: #e9f9f1; color: var(--up); }
.list__icon.is-down { background: #fdeef2; color: var(--down); }
.list__icon.is-goods { background: #eef0ff; color: var(--brand); }

.list__body { flex: 1 1 auto; min-width: 0; }
.list__title {
  font-size: 14px; color: var(--text); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.list__sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.list__sub .dot { opacity: .5; }
.list__sub .tag {
  background: #f2f3fa; color: var(--muted); border-radius: 5px;
  padding: 1px 6px; font-size: 11.5px;
}
.list__amt {
  font-size: 15px; font-weight: 650; flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}
.list__amt.is-up { color: var(--up); }
.list__amt.is-down { color: var(--down); }

/* ============================ 空状态 ============================ */
.empty { text-align: center; padding: 34px 16px 28px; }
.empty__icon {
  width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 14px;
  background: #f4f5fc; color: #b4b9cc;
  display: flex; align-items: center; justify-content: center;
}
.empty__icon .ico { width: 25px; height: 25px; }
.empty p { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.empty__hint { font-size: 12.5px; color: #a8aec0; }

/* ============================ 页面标题 ============================ */
.page-head { margin: 4px 0 18px; }
.page-head h1 { font-size: 22px; margin-bottom: 4px; }
.page-head p { color: var(--muted); font-size: 13.5px; }
.page-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.points-chip {
  display: flex; align-items: baseline; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 13px;
  padding: 9px 16px; box-shadow: var(--shadow-sm);
}
.points-chip span { font-size: 12.5px; color: var(--muted); }
.points-chip b { font-size: 19px; color: var(--brand); font-variant-numeric: tabular-nums; }

/* ============================ 登录 / 注册 ============================ */
.app--auth {
  background:
    radial-gradient(900px 520px at 12% -8%, #e8e6ff 0%, transparent 62%),
    radial-gradient(760px 460px at 92% 8%, #f3e8ff 0%, transparent 58%),
    var(--bg);
}
.auth { width: 100%; max-width: 416px; position: relative; }
.auth__deco {
  position: absolute; inset: -40px -30px auto; height: 220px; z-index: 0;
  background: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, .18), transparent 68%);
  filter: blur(22px); pointer-events: none;
}
.auth-card {
  position: relative; z-index: 1;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-radius: 22px; padding: 34px 30px 26px;
  box-shadow: 0 2px 6px rgba(20, 22, 43, .04), 0 28px 60px -28px rgba(70, 60, 160, .38);
  border: 1px solid rgba(255, 255, 255, .8);
}
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head .brand__mark { margin: 0 auto 14px; }
.auth-head h1 { font-size: 21px; margin-bottom: 5px; }
.auth-head p { font-size: 13.5px; color: var(--muted); }
.auth-card .flash { margin-bottom: 14px; }
.auth-foot { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 18px; }
.auth-foot a { font-weight: 600; }
.auth-note { text-align: center; font-size: 12.5px; color: #a3a9bd; margin-top: 20px; }

/* ============================ 表单 ============================ */
.form { display: grid; gap: 15px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--text-2); font-weight: 550; }
.field .req { color: var(--down); }
.field .opt { color: #a8aec0; font-weight: 400; font-size: 12px; }

input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid #dfe3f2; border-radius: 11px;
  font-size: 14px; color: var(--text); background: #fbfcff;
  transition: border-color .16s, box-shadow .16s, background .16s;
  outline: none;
}
input[type=text]:focus, input[type=password]:focus, input[type=number]:focus,
select:focus, textarea:focus {
  border-color: #a5a0f8; background: #fff;
  box-shadow: 0 0 0 4px rgba(91, 75, 245, .12);
}
input::placeholder { color: #b0b6c8; }

/* ============================ 充值 ============================ */
.recharge-now {
  display: flex; align-items: baseline; justify-content: center; gap: 9px;
  padding: 6px 0 22px;
}
.recharge-now__label { font-size: 13px; color: var(--muted); }
.recharge-now__val { font-size: 28px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }

.recharge-form { display: grid; gap: 14px; max-width: 460px; margin: 0 auto; }
.code-input {
  text-align: center !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  font-size: 18px !important; letter-spacing: .12em;
  padding: 16px 14px !important; text-transform: uppercase;
}
.code-input::placeholder { letter-spacing: .1em; font-size: 15px; }

.recharge-tip {
  margin: 22px auto 0; max-width: 460px; padding: 15px 17px;
  background: #f8f9fe; border-radius: 13px; display: grid; gap: 7px;
}
.recharge-tip__row { display: flex; gap: 9px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.recharge-tip .tick { color: var(--up); font-weight: 700; flex: 0 0 auto; }

/* ============================ 商品 ============================ */
.goods-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
}
.goods {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(20, 22, 43, .045);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .24s ease;
}
.goods:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.goods.is-out { opacity: .78; }

.goods__cover {
  position: relative; height: 132px;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 30% 20%, #f0eeff, transparent 60%),
    linear-gradient(145deg, #f7f6ff, #f1f0fb);
}
.goods__cover img { width: 100%; height: 100%; object-fit: cover; }
.goods__emoji { font-size: 46px; line-height: 1; filter: drop-shadow(0 6px 12px rgba(91, 75, 245, .18)); }
.goods__badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(20, 22, 43, .68); color: #fff;
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
  backdrop-filter: blur(6px);
}
.goods__badge--warn { background: rgba(217, 119, 6, .92); }

.goods__body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1 1 auto; }
.goods__name { font-size: 15px; margin-bottom: 5px; }
.goods__desc {
  font-size: 12.5px; color: var(--muted); line-height: 1.6;
  margin-bottom: 14px; flex: 1 1 auto;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.goods__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.goods__price { display: flex; align-items: baseline; gap: 3px; }
.goods__price b { font-size: 19px; color: var(--brand); font-variant-numeric: tabular-nums; }
.goods__price span { font-size: 11.5px; color: var(--muted); }

.shop-tip { text-align: center; font-size: 12.5px; color: #a3a9bd; padding: 12px 20px 0; line-height: 1.7; }

/* ============================ 兑换记录 ============================ */
.order-list { display: grid; gap: 12px; }
.order {
  position: relative; background: #fff; border-radius: 16px;
  border: 1px solid rgba(20, 22, 43, .045);
  box-shadow: var(--shadow-sm); padding: 16px 18px;
}
.order.is-new {
  border-color: #cfc9ff;
  box-shadow: 0 0 0 3px rgba(91, 75, 245, .1), 0 1px 2px rgba(20, 22, 43, .04), 0 4px 14px -8px rgba(20, 22, 43, .12);
  animation: pop .4s ease;
}
@keyframes pop { 0% { transform: scale(.985); opacity: .4; } 100% { transform: scale(1); opacity: 1; } }

.order__flag {
  position: absolute; top: -9px; right: 16px;
  background: var(--grad); color: #fff;
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  box-shadow: 0 4px 10px -4px rgba(91, 75, 245, .9);
}
.order__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.order__name { font-size: 15px; font-weight: 600; }
.order__cost { font-size: 13.5px; color: var(--down); font-weight: 600; font-variant-numeric: tabular-nums; }

.order__code {
  display: flex; align-items: center; gap: 10px;
  background: #f8f9fe; border: 1px dashed #dbdff0; border-radius: 11px;
  padding: 11px 13px; margin: 12px 0 9px;
}
.order__code-label { font-size: 11.5px; color: var(--muted); flex: 0 0 auto; }
.order__code-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: .06em;
  flex: 1 1 auto; word-break: break-all;
  background: none; padding: 0;
}
.copy-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px;
  background: #fff; border: 1px solid #dfe3f2; border-radius: 8px;
  padding: 5px 10px; font-size: 12px; color: var(--text-2); cursor: pointer;
  transition: .16s;
}
.copy-btn:hover { border-color: #b9b2fb; color: var(--brand); background: #f7f6ff; }
.copy-btn .ico { width: 13px; height: 13px; }
.copy-btn.is-done { border-color: #a7e8c9; color: var(--up); background: #f0fdf7; }

.order__meta { display: flex; gap: 6px; font-size: 12px; color: #a3a9bd; flex-wrap: wrap; }
.order__meta .dot { opacity: .6; }

/* ============================ 分页 ============================ */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 20px 0 4px; flex-wrap: wrap; }
.pager__btn, .pager__num {
  min-width: 36px; height: 36px; padding: 0 12px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13.5px; color: var(--text-2); background: #fff;
  border: 1px solid var(--line); transition: .16s;
}
.pager__btn:hover, .pager__num:hover { border-color: #cfd5ea; background: #fafbff; }
.pager__num.is-active { background: var(--grad); color: #fff; border-color: transparent; font-weight: 600; }
.pager__btn.is-disabled { opacity: .42; pointer-events: none; }
.pager__gap { color: #b4b9cc; padding: 0 2px; }

/* ============================ 个人中心 ============================ */
.profile { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.profile__avatar {
  width: 52px; height: 52px; border-radius: 16px; flex: 0 0 auto;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff; font-size: 21px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.profile__info { flex: 1 1 auto; min-width: 0; }
.profile__name { font-size: 16.5px; font-weight: 650; }
.profile__meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.profile__points { text-align: right; flex: 0 0 auto; }
.profile__points b { font-size: 21px; color: var(--brand); display: block; line-height: 1.2; font-variant-numeric: tabular-nums; }
.profile__points span { font-size: 11.5px; color: var(--muted); }

.kv-list { margin: 0; padding: 14px 0 0; display: grid; gap: 11px; }
.kv-list > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.kv-list dt { font-size: 13px; color: var(--muted); }
.kv-list dd { margin: 0; font-size: 13.5px; color: var(--text-2); font-weight: 500; }

.logout-row {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 0; color: var(--down); font-size: 14px; font-weight: 550;
}
.logout-row .ico { width: 17px; height: 17px; }
.logout-row .ico:last-child { margin-left: auto; opacity: .5; width: 15px; color: var(--muted); }

/* ============================ 底部 Tab（移动端） ============================ */
.tabbar { display: none; }

/* ============================ 响应式 ============================ */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__inner { padding: 0 16px; height: 58px; gap: 12px; }
  .brand__name { font-size: 15px; }
  .usermenu__name { display: none; }

  .main { padding: 18px 16px 92px; }
  .main--auth { padding: 24px 18px; }

  .balance { border-radius: 20px; padding: 22px 22px 20px; }
  .balance__num { font-size: 42px; }
  .balance__actions .btn { flex: 1 1 auto; }

  .page-head h1 { font-size: 19px; }
  .card { padding: 17px 17px; border-radius: 16px; }
  .card--pad { padding: 18px 17px; }

  .goods-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
  .goods__cover { height: 108px; }
  .goods__emoji { font-size: 38px; }
  .goods__body { padding: 11px 12px 13px; }
  .goods__name { font-size: 14px; }
  .goods__desc { -webkit-line-clamp: 2; font-size: 12px; margin-bottom: 10px; }
  .goods__foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .goods__foot form, .goods__foot .btn { width: 100%; }
  .goods__price b { font-size: 17px; }

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid rgba(20, 22, 43, .07);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar__item {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 5px 0; color: #98a0b4; font-size: 10.5px; font-weight: 500;
    border-radius: 10px; transition: color .15s;
  }
  .tabbar__item .ico { width: 21px; height: 21px; }
  .tabbar__item.is-active { color: var(--brand); }
  .tabbar__item.is-active .ico { stroke-width: 2; }
}

@media (max-width: 400px) {
  .tabbar__item span { font-size: 9.5px; }
  .balance__meta { font-size: 12px; }
  .order__code { flex-wrap: wrap; }
  .order__code-val { width: 100%; order: 3; margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
