:root {
  --wine: #7c1f2d;
  --wine-deep: #5e1420;
  --gold: #c9a227;
  --gold-soft: #f0e2b6;
  --cream: #fbf7f1;
  --paper: #ffffff;
  --ink: #2b2320;
  --muted: #8b7f76;
  --line: #e9dfd3;
  --green: #2f7d57;
  --red: #b3352c;
  --shadow: 0 6px 18px rgba(92, 40, 30, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

a { color: var(--wine); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: .5px; }
p { margin: 0; }
button, input, select, textarea { font-family: inherit; font-size: 15px; color: inherit; }
button { cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

.hide { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.grow { flex: 1; }

/* ---------- 布局 ---------- */
.wrap { max-width: 520px; margin: 0 auto; padding: 0 16px; }
.page { padding-bottom: 92px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(135deg, var(--wine-deep), var(--wine) 60%, #9a3242);
  color: #fff;
  padding: 16px 16px 18px;
}
.topbar h1 { font-size: 19px; letter-spacing: 2px; }
.topbar .sub { font-size: 12.5px; opacity: .82; margin-top: 2px; letter-spacing: 1px; }
.topbar .right { font-size: 12.5px; opacity: .9; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-top: 14px;
  border: 1px solid rgba(233, 223, 211, .8);
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-title { font-size: 15.5px; font-weight: 600; }
.card-title .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-right: 7px; vertical-align: 2px; }

/* ---------- 今日场次 ---------- */
.hero {
  margin-top: 14px;
  border-radius: 18px;
  padding: 18px 18px 16px;
  color: #fff;
  background:
    radial-gradient(circle at 88% -10%, rgba(255, 214, 150, .38), transparent 55%),
    linear-gradient(140deg, #8d2735, #611624 70%);
  box-shadow: 0 10px 24px rgba(110, 30, 40, .22);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -30px; bottom: -40px;
  width: 140px; height: 140px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
}
.hero .tag { display: inline-block; font-size: 11.5px; padding: 2px 9px; border-radius: 20px; background: rgba(255, 255, 255, .16); letter-spacing: 1px; }
.hero .date { font-size: 26px; font-weight: 700; margin: 10px 0 2px; letter-spacing: 1px; }
.hero .theme { font-size: 15px; opacity: .95; }
.hero .meta { margin-top: 10px; font-size: 12.5px; opacity: .82; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- 票种 ---------- */
.type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.type-row:last-child { border-bottom: none; padding-bottom: 2px; }
.type-name { font-weight: 600; font-size: 15px; }
.type-note { font-size: 12px; color: var(--muted); margin-top: 2px; }
.price { font-family: Georgia, "Times New Roman", serif; color: var(--wine); font-size: 19px; font-weight: 700; }
.price .rmb { font-size: 12px; margin-right: 1px; }
.price-old { color: #b6a89b; text-decoration: line-through; font-size: 13px; margin-right: 5px; }
.free { color: var(--green); }
.badge-line { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--gold-soft); color: #8a6a12; margin-left: 6px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  border-radius: 10px;
  background: #f3ece5;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  transition: transform .12s, opacity .12s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, #8d2735, var(--wine-deep)); color: #fff; box-shadow: 0 6px 14px rgba(120, 30, 40, .25); }
.btn-gold { background: linear-gradient(135deg, #d8b64a, var(--gold)); color: #4a3608; font-weight: 600; }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-line { background: transparent; border: 1px solid var(--wine); color: var(--wine); }
.btn-danger { background: #fbecea; color: var(--red); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: flex;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: 7px 0 9px;
  max-width: 520px;
  margin: 0 auto;
}
.tabbar button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
  padding: 4px 0;
}
.tabbar button.on { color: var(--wine); font-weight: 600; }
.tabbar .ic { font-size: 19px; line-height: 1; }

/* ---------- 表单 ---------- */
.field { margin-top: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fdfbf8;
  outline: none;
  transition: border-color .15s;
}
.input:focus { border-color: var(--gold); background: #fff; }
textarea.input { min-height: 76px; resize: vertical; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* ---------- 底部弹层 ---------- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(35, 20, 15, .48);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.mask.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 41;
  max-width: 520px;
  margin: 0 auto;
  background: var(--paper);
  border-radius: 18px 18px 0 0;
  transform: translateY(102%);
  transition: transform .26s cubic-bezier(.2, .8, .3, 1);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.sheet.on { transform: translateY(0); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.sheet-body { padding: 0 18px 18px; overflow-y: auto; }
.sheet-foot { padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }

/* ---------- 票夹 ---------- */
.ticket {
  margin-top: 12px;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(233, 223, 211, .9);
}
.ticket .band {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  background: linear-gradient(135deg, #8d2735, #6a1a27);
  color: #fff; font-size: 12.5px; letter-spacing: .5px;
}
.ticket .body { padding: 14px 16px; display: flex; align-items: center; gap: 14px; }
.ticket .info { flex: 1; min-width: 0; }
.ticket .no { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.ticket .qr-mini { width: 62px; height: 62px; flex: none; }
.ticket.used .band { background: linear-gradient(135deg, #7d7368, #625a51); }
.ticket.void .band { background: linear-gradient(135deg, #9a938c, #7d7570); }
.state { font-size: 11.5px; padding: 2px 8px; border-radius: 20px; background: rgba(255,255,255,.2); }

/* ---------- 电子票详情 ---------- */
.e-ticket {
  background: var(--paper);
  border-radius: 18px;
  padding: 22px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.e-ticket .qr { width: 220px; height: 220px; margin: 14px auto 6px; }
.e-ticket .code { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 1.5px; font-size: 13.5px; color: var(--wine); }
.e-ticket .dash { border-top: 1px dashed var(--line); margin: 16px 0; position: relative; }
.e-ticket .kv { display: flex; justify-content: space-between; font-size: 13.5px; padding: 5px 0; }
.e-ticket .kv span:first-child { color: var(--muted); }

/* ---------- 列表项 ---------- */
.list-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 0; border-bottom: 1px solid #f2ece5;
}
.list-item:last-child { border-bottom: none; }

/* ---------- 后台 ---------- */
.admin-body { background: #f6f2ec; }
.admin-top {
  background: linear-gradient(135deg, #5e1420, #8d2735);
  color: #fff;
  padding: 16px 20px;
}
.admin-top h1 { font-size: 17px; letter-spacing: 1.5px; }
.admin-tabs {
  display: flex; gap: 4px; overflow-x: auto;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 0 12px;
  position: sticky; top: 0; z-index: 10;
}
.admin-tabs button {
  padding: 13px 12px; font-size: 14px; color: var(--muted); white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.admin-tabs button.on { color: var(--wine); border-bottom-color: var(--wine); font-weight: 600; }

/* 验票端分栏：桌面、手机都只显示当前一栏（!important 压过「找回密码申请」的内联 display） */
#mainWrap [data-sec]:not(.on) { display: none !important; }
#mainWrap [data-sec].on { display: block; }
#mainWrap .stat-grid.on { display: grid; }
#staffTabs { display: none; }
@media (min-width: 768px) {
  #staffTabs { display: flex; }
}

/* 购物车勾选点：默认勾上，点一下取消这一项 */
.sel-dot {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid #cdbfae; background: #fff; color: transparent;
  font-size: 13px; line-height: 20px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; margin-right: 10px;
}
.sel-dot.on { background: #7c1f2d; border-color: #7c1f2d; color: #fff; }
.sel-dot:active { transform: scale(.94); }
.sel-dot-ghost { flex: none; width: 22px; height: 22px; margin-right: 10px; display: inline-block; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat {
  background: #fff; border-radius: 12px; padding: 14px 16px; border: 1px solid var(--line);
}
.stat .label { font-size: 12.5px; color: var(--muted); }
.stat .value { font-family: Georgia, serif; font-size: 26px; font-weight: 700; color: var(--wine); margin-top: 2px; }
.stat .unit { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 2px; }
.stat .hint { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.chart { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.chart .bar { width: 100%; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #c9a227, #a8842f); min-height: 3px; }
.chart .lab { font-size: 11px; color: var(--muted); }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 9px 8px; border-bottom: 1px solid #f1eae2; text-align: left; white-space: nowrap; }
table.data th { color: var(--muted); font-weight: 500; background: #faf6f0; }
.table-wrap { overflow-x: auto; }

.pill { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 20px; }
.pill.ok { background: #e7f4ec; color: var(--green); }
.pill.warn { background: #fdf1dc; color: #9a6d10; }
.pill.bad { background: #fbecea; color: var(--red); }
.pill.info { background: #eef1f6; color: #4a5a72; }

.toast {
  position: fixed;
  left: 50%; bottom: 110px;
  transform: translate(-50%, 12px);
  background: rgba(43, 35, 32, .92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 24px;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: all .22s;
  z-index: 60;
  max-width: 86vw;
  text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.empty { text-align: center; color: var(--muted); font-size: 13.5px; padding: 34px 10px; }
.empty .big { font-size: 30px; display: block; margin-bottom: 8px; opacity: .5; }

.seg { display: flex; background: #f3ece5; border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; padding: 8px; border-radius: 8px; font-size: 13.5px; color: var(--muted); }
.seg button.on { background: #fff; color: var(--wine); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
/* 票夹分类里的小计数：比标签淡一档，不要抢「可用 / 已失效」本身 */
.seg button .cnt { font-size: 12px; opacity: .6; font-weight: 400; margin-left: 3px; }

.login-box { max-width: 400px; margin: 40px auto; padding: 0 20px; }

@media (max-width: 380px) {
  .hero .date { font-size: 23px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ==================== 移动端 / 平板 / 多浏览器适配 ==================== */

/* 1. iOS 横屏不要自动放大正文；容器不出现横向滚动条 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: hidden; }

/* 2. 手指滚动更顺（iOS 需要这个开关才有惯性） */
.admin-tabs, .table-wrap, .sheet-body, .ticket, .e-ticket { -webkit-overflow-scrolling: touch; }

/* 2.1 按钮和状态标签不拆行（窄屏被挤成一列字是最常见的可读性事故） */
.btn, .pill, .badge-line, .state, .e-ticket .code, .ticket .no { white-space: nowrap; }
.btn { flex-shrink: 0; }

/* 3. 触屏设备：把点击区域做大，避免误触 */
@media (pointer: coarse) {
  .btn { min-height: 42px; }
  .btn-sm { min-height: 34px; }
  .admin-tabs button { padding-top: 14px; padding-bottom: 14px; }
  .list-item { padding: 14px 0; }
  .seg button { min-height: 38px; }
}

/* 4. 弹层高度：手机上键盘弹出会吃掉 vh，优先用 dvh（不支持时回落到 vh） */
.sheet { max-height: 88vh; max-height: 88dvh; }

/* 5. 刘海屏 / 手势条安全区 */
.tabbar {
  padding-bottom: 9px;
  padding-bottom: calc(9px + env(safe-area-inset-bottom, 0px));
  -webkit-backdrop-filter: blur(8px);
}
.page { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
.toast { bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
.admin-tabs { scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; height: 0; }

/* 6. 底栏与弹层跟随「内容宽度」设置（theme.js 会写入 --wrap-max），
      这样平板/大屏上不会出现底栏窄于内容、弹层错位 */
.tabbar, .sheet { max-width: var(--wrap-max, 520px); }

/* 7. 手机竖屏：表单一行一个、输入框 16px（iOS 不会因聚焦放大整页）、表格更紧凑 */
@media (max-width: 767px) {
  .wrap { padding-left: 14px; padding-right: 14px; }
  .row { flex-wrap: wrap; }
  .row > .field { flex: 1 1 100%; min-width: 0; }
  .card { padding-left: 14px; padding-right: 14px; }
  .topbar, .admin-top { padding: 14px 14px; }
  .topbar h1, .admin-top h1 { font-size: 16.5px; letter-spacing: 1px; line-height: 1.35; }
  .topbar .sub, .topbar .right, .admin-top .small { font-size: 11.5px; }
  /* 后台/验票端顶栏：标题独占一行，账号和退出按钮落到第二行 */
  .admin-top > div { flex-wrap: wrap; row-gap: 4px; }
  .admin-top > div > div:first-child { flex: 1 1 100%; }
  .admin-top > div > div:last-child { text-align: left !important; display: flex; align-items: center; gap: 10px; }
  #btnAdminLogout { margin-top: 0 !important; }
  main { padding-left: 12px !important; padding-right: 12px !important; }
  .e-ticket .qr { width: 180px; height: 180px; }
  .stat .value { font-size: 23px; }
  .stat { padding: 12px 13px; }
  .stat-grid { gap: 10px; }
  table.data { font-size: 12.5px; }
  table.data th, table.data td { padding: 8px 7px; }
  .ticket .body { gap: 10px; }
  .ticket .qr-mini { width: 54px; height: 54px; }
  .hero h2, .hero .date { word-break: break-word; }
  .list-item { flex-wrap: wrap; row-gap: 8px; }
  .list-item > div:last-child { margin-left: auto; }
}

/* 8. 平板 / 桌面：后台内容居中，不要贴着左边一大片空白 */
@media (min-width: 900px) {
  main { margin-left: auto !important; margin-right: auto !important; }
}

/* ==================== 9. 验票端：手机上按 App 形态分栏 ==================== */

/* 桌面 / 平板：底栏不出现，所有区块照旧一次性全显示，与改前完全一致 */
.staff-tabbar { display: none; }
.scan-help-sm { display: none; }
.pending-help-sm { display: none; }

/* 核销卡顶部：今日实际收款 + 核销票面 */
.income {
  background: linear-gradient(135deg, #fdf7e8, #faf0d6);
  border: 1px solid #eeddb6;
  border-radius: 12px;
  padding: 12px 15px;
}
.income-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.income-label { font-size: 12.5px; color: #8a7038; letter-spacing: .3px; }
.income-value { font-size: 26px; font-weight: 700; color: var(--wine); line-height: 1.3; letter-spacing: .5px; }
.income-side { font-size: 12.5px; color: #8a7038; text-align: right; line-height: 1.85; white-space: nowrap; }
.income-side b { color: var(--wine); font-weight: 600; margin: 0 5px 0 6px; }
.income-side i { font-style: normal; color: #a08a52; }
.income-foot { margin-top: 8px; padding-top: 7px; border-top: 1px dashed #eeddb6; font-size: 12px; color: #a08a52; line-height: 1.6; }

/* 扫码区与待核销区之间的分隔线（两卡合并成一张卡后靠它分区） */
.card-split { border-top: 1px dashed var(--line); margin-top: 16px; }

@media (max-width: 767px) {
  /* 顶栏压成一行（微信风格）：标题在左、账号和退出在右，日期收掉，把屏幕让给核销区 */
  .admin-top { padding: 11px 14px; }
  .admin-top h1 { font-size: 16.5px; white-space: nowrap; }
  .admin-top > div { flex-wrap: nowrap !important; row-gap: 0 !important; gap: 10px; }
  .admin-top > div > div:first-child { flex: 1 1 auto !important; min-width: 0; }
  .admin-top > div > div:last-child {
    flex: 0 0 auto;
    text-align: right !important;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  #staffDate { display: none; }
  #staffWho { font-size: 12px; }
  #btnStaffLogout { margin-top: 0 !important; padding: 6px 12px; }

  /* 底栏是 fixed 的，内容底部留出高度，最后一张卡不会被压住 */
  main {
    padding-top: 10px !important;
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* 分栏：不是当前栏的整块隐藏（!important 用来压过「找回密码申请」的内联 display） */
  #mainWrap [data-sec]:not(.on) { display: none !important; }
  #mainWrap [data-sec].on { display: block; }
  #mainWrap .stat-grid.on { display: grid; }

  .staff-tabbar { display: flex; max-width: none; }
  .staff-tabbar button { font-size: 12.5px; padding: 6px 0; }

  /* 扫码卡：手机上的主角，输入框和按钮做厚，拇指够得到 */
  #scanCard { padding: 13px 14px 12px !important; }
  #scanCode { height: 46px; font-size: 16px; }
  #btnScanGo { min-width: 88px; height: 46px; padding: 0 16px; }
  .scan-help-lg { display: none; }
  .scan-help-sm { display: block !important; }

  /* 待核销：长说明收起来，只留一行短提示，把屏幕让给票列表 */
  .pending-help-lg { display: none; }
  .pending-help-sm { display: block !important; }

  /* 待核销：一张票占一块，操作区落在下面一行，按钮做大 */
  #pendingList > .card { padding: 12px !important; }
  #pendingList .list-item { display: block; padding: 10px 0; }
  #pendingList .list-item > div:last-child { justify-content: flex-end; margin-top: 8px; }
  #pendingList .btn { min-width: 96px; height: 40px; }
  #pendingList input[type="number"] { height: 40px; }
  #codeInput { height: 44px; }

  /* 收款条：手机上金额再大一点，一眼看清 */
  .income-value { font-size: 29px; }
  .income-side { font-size: 12px; line-height: 1.8; }
  .income-foot { font-size: 11.5px; }

  /* 记录栏：一条记录占两行，时间靠右 */
  #recordList .list-item { display: block; }
  #recordList .list-item > div:last-child { margin-top: 6px; text-align: right; }

  /* 会员栏 / 我的栏：表单一列一个，按钮不挤 */
  #memEdit .field { flex: 1 1 100% !important; }
  #btnSaveMem, #btnCancelMem { height: 42px; }
}

/* ==================== 10. 管理后台：手机上换成底部导航 ==================== */

/* 桌面 / 平板：底栏不存在，顶部 8 个页签照旧 */
.admin-tabbar { display: none; }

/* 后台标题的「· 管理后台」后缀：桌面上小一号跟着名称，手机上省掉给标题腾地方 */
.venue-tail { font-size: 12.5px; font-weight: 400; opacity: .8; letter-spacing: .5px; }

@media (max-width: 767px) {
  /* 顶部页签组整个换成底部 5 栏（票种 / 公告 / 核销记录已并进主栏） */
  .admin-tabs { display: none !important; }
  .admin-tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 7px 6px;
    padding-bottom: calc(7px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 20px rgba(60, 30, 20, .07);
  }
  .admin-tabbar button {
    flex: 1;
    font-size: 13px;
    padding: 8px 0;
    color: var(--muted);
    border-radius: 9px;
    letter-spacing: .5px;
  }
  .admin-tabbar button.on { color: var(--wine); font-weight: 600; background: rgba(124, 31, 45, .08); }

  /* 底栏是 fixed 的，内容底部要留出高度（main 的 padding 是内联的，必须 !important） */
  #mainWrap main { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important; }

  /* 顶栏压成一行：标题在左、账号和退出在右，日期收掉，标题过长时省略不换行 */
  .admin-top > div { flex-wrap: nowrap !important; row-gap: 0 !important; gap: 10px; }
  .admin-top > div > div:first-child { flex: 1 1 auto !important; min-width: 0; }
  .admin-top h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #adminDate { display: none; }
  .venue-tail { display: none; }
  .admin-top > div > div:last-child {
    flex: 0 0 auto;
    text-align: right !important;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  #adminWho { font-size: 12px; }
  #btnAdminLogout { margin-top: 0 !important; padding: 6px 12px; }

  /* 订单筛选：手机上控件各占一行，两个日期并排，查询按钮整行（原来按钮被拉成半行，输入框被挤哑） */
  #tab-orders .row > * { flex: 1 1 100% !important; min-width: 0 !important; }
  #tab-orders .row > .input[type="date"] { flex: 1 1 calc(50% - 8px) !important; min-width: 0 !important; }
  #btnQueryOrders { flex: 1 1 100% !important; height: 42px; }

  /* 表格：手机上限定表格不把卡片撑破，横向滑动看全列 */
  .table-wrap { max-width: 100%; }
}

/* 320 这类超窄屏：后台顶栏收起账号名、标题缩一档，保证场所名完整不被省略号吃掉 */
@media (max-width: 359px) {
  .admin-top h1 { font-size: 15px; }
  #adminWho { display: none; }
  #staffWho { font-size: 11px; }
  #btnAdminLogout, #btnStaffLogout { padding: 5px 10px !important; }
}
/* ===== 12. 顾客端「舞厅信息」模块（内容/位置/字体字号由后台配） ===== */
#venueIntro{white-space:pre-wrap;line-height:1.9}
#aboutCard.center{text-align:center}
#aboutCard.center .list-item{justify-content:center;gap:10px}