:root {
  --bg: #f4f1ea;
  --side: #1f2a28;
  --side-2: #2b3a37;
  --ink: #1c1916;
  --muted: #6b645b;
  --line: #e0d8cc;
  --card: #fffdf8;
  --accent: #2f6f68;
  --warn: #9a3412;
  --good: #2f6b4f;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden; }
body { font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
a { color: var(--accent); text-decoration: none; }
.shell { display: flex; height: 100%; overflow: hidden; }
.side { width: 220px; height: 100%; background: var(--side); color: #e8efe9; flex-shrink: 0; padding: 18px 0 24px; overflow-y: auto; overscroll-behavior: contain; }
.logo { display: block; padding: 4px 20px 18px; color: #fff; font-size: 18px; letter-spacing: 0.04em; }
.logo span { color: #9dcdc6; font-size: 12px; margin-left: 6px; }
.side-group { padding: 8px 0 10px; }
.side-group + .side-group { border-top: 1px solid #3d524e; margin-top: 2px; }
.side-label { position: sticky; top: 0; z-index: 2; padding: 8px 20px 6px; font-size: 11px; letter-spacing: 0.12em; color: #93a8a4; background: var(--side); }
.side-link { display: block; padding: 7px 20px; color: #d5e4df; font-size: 14px; }
.side-link:hover, .side-link.on { background: var(--side-2); color: #fff; }
.main { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.bar { flex: 0 0 auto; display: flex; justify-content: flex-start; align-items: center; gap: 6px 12px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fffdf8; z-index: 20; }
.bar > div:first-child { min-width: 0; }
.menu-btn { display: none; width: 34px; height: 34px; padding: 0; flex: 0 0 auto; align-items: center; justify-content: center; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; font-size: 17px; line-height: 1; }
.who { color: var(--muted); font-size: 13px; margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; justify-content: flex-end; min-width: 0; }
.content { flex: 1 1 auto; min-height: 0; min-width: 0; padding: 12px 16px 24px; overflow-y: auto; overflow-x: hidden; }
h1 { font-size: 20px; margin: 0 0 8px; font-weight: 600; }
.lead { color: var(--muted); margin: 0 0 10px; font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.home-grid { display: grid; gap: 18px; }
.home-block h2 { font-size: 14px; color: var(--muted); font-weight: 600; margin: 0 0 10px; }
.home-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.home-items a {
  display: block; padding: 14px 14px 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; color: inherit;
}
.home-items a:hover { border-color: var(--accent); }
.pay-head th { background: #ffe14a; color: #1c1916; font-weight: 600; }
.pay-corp { color: #c1121f; font-weight: 600; }
.pay-sheet td, .pay-sheet th { white-space: nowrap; }
.pay-steps { margin: 0 0 12px; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.pay-steps li { margin: 0 0 4px; }
.home-items strong { display: block; font-size: 15px; }
.home-items span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.filters, form.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 10px; }
.filters form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 0; }
.filters > div { min-width: 0; }
.filters input:not([type=checkbox]):not([type=radio]):not([type=file]), .filters select {
  width: 150px; max-width: 46vw; height: 32px; padding: 5px 8px;
}
.filters input[type=datetime-local] { width: 190px; }
.date-field { display: flex; flex-direction: column; gap: 4px; cursor: pointer; margin: 0; }
.date-field input[type="date"] {
  width: 11.5rem;
  height: 36px;
  min-height: 36px;
  padding: 4px 8px;
  font-size: 16px;
  cursor: pointer;
}
.place-toolbar input[type="date"] { width: 11.5rem; height: 36px; cursor: pointer; font-size: 16px; }
.filters button, .filters .btn, .filters a.btn { height: 32px; padding: 5px 14px; box-sizing: border-box; display: inline-flex; align-items: center; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
input, select, button {
  font: inherit; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); background: #fff;
  max-width: 100%;
}
.stack { display: grid; gap: 12px; max-width: 380px; }
.stack input, .stack select { width: 100%; }
.login-card input { width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 14px; margin-bottom: 12px; }
.form-grid > div { min-width: 0; }
.form-grid input:not([type=checkbox]):not([type=radio]):not([type=file]), .form-grid select {
  width: 100%; height: 32px; padding: 5px 8px; box-sizing: border-box;
}
#read-price-wrap[hidden] { display: none !important; }
.form-grid .note { margin: 4px 0 0; }
button, .btn { background: var(--accent); color: #fff; border: 0; cursor: pointer; }
.ghost { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 4px 8px; border-bottom: 1px solid #ece7de; font-size: 13px; vertical-align: middle; }
th { color: #5c564e; font-size: 12px; font-weight: 600; background: #ece7de; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:nth-child(odd) { background: #ffffff; }
tbody tr:nth-child(even) { background: #eef3f1; }
tbody tr:hover { background: #d9ebe6; }
tbody tr.off { color: #8a8178; }
.sheet td, .sheet th { white-space: nowrap; }
.card table:not(.place-sheet):not(.consume-sheet):not(.pay-sheet) th,
.card table:not(.place-sheet):not(.consume-sheet):not(.pay-sheet) td {
  max-width: 240px; overflow: hidden; text-overflow: ellipsis;
}
.card table td.ops { max-width: none; overflow: visible; white-space: nowrap; }
.card table td.proof { max-width: none; overflow: visible; }
.proof-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; vertical-align: middle; }
.wx-compact { color: #5c564e; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.muted { color: var(--muted); }
.cell-ok { background: #dcefe4 !important; color: #1f5c3c; font-weight: 600; }
.cell-wait { background: #f3e2cf !important; color: #9a3412; font-weight: 600; }
a.cell-wait { display: inline-block; padding: 0 6px; border-radius: 4px; text-decoration: none; }
a.cell-wait:hover { text-decoration: underline; }
.cell-fill { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 3px; margin: 0; min-width: 0; align-items: center; }
.cell-fill-cost { height: 22px; }
.cell-cost-chip {
  height: 22px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #e8c4b0;
  border-radius: 4px;
  background: #f3e2cf;
  color: #9a3412;
  cursor: pointer;
  white-space: nowrap;
}
.cell-cost-chip:hover { background: #fff; }
.cell-fill input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 22px;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #e8c4b0;
  border-radius: 4px;
  background: #f3e2cf;
  color: #9a3412;
}
.cell-fill input::placeholder { color: #9a3412; font-weight: 600; }
.cell-fill input:focus { outline: 2px solid #c2410c; background: #fff; color: #1f1b16; }
.cell-fill-err { color: #9a3412; font-size: 11px; font-weight: 600; white-space: normal; line-height: 1.2; }
.cell-pick { flex-direction: row; flex-wrap: nowrap; gap: 3px; }
.cell-pick button {
  height: 24px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #e8c4b0;
  border-radius: 4px;
  background: #f3e2cf;
  color: #9a3412;
  cursor: pointer;
}
.cell-pick button.on {
  background: #c2410c;
  border-color: #c2410c;
  color: #fff;
}
.cell-cost-edit {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
.cell-pick button:hover { background: #fff; }
.place-sheet td.col-pos,
.place-sheet td.col-bid {
  white-space: normal;
  overflow: visible;
}
.name-cell a { color: inherit; text-decoration: none; }
.name-cell a:hover { text-decoration: underline; }
.ops { display: flex; gap: 6px; align-items: center; }
.ops a, .ops .ghost { padding: 2px 8px; font-size: 12px; }
.ops form { margin: 0; }
.ghost.danger { color: #9a3412; border-color: #e8c4b0; }
.money-box { border: 1px solid var(--line); border-radius: 10px; padding: 16px; width: min(520px, 92vw); background: var(--card); }
.money-box select { width: 100%; max-width: 100%; }
.money-box h2 { font-size: 18px; margin: 0 0 8px; }
.task-box { width: min(560px, 94vw); border: 3px solid var(--warn); }
.task-box h2 { color: var(--warn); font-size: 22px; }
.task-box p { margin: 0 0 10px; font-size: 14px; }
.task-box ul { margin: 0 0 12px; padding-left: 18px; }
.task-box li { margin: 8px 0; }
.task-miss { color: var(--warn); font-weight: 700; margin-top: 2px; }
.task-box .btn, .task-box #task-close { font-size: 16px; padding: 8px 18px; }
.sync-line { font-size: 12px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
th a { color: inherit; }
.weixin-list { margin: 0; padding-left: 16px; line-height: 1.35; }
.date-quick { display: flex; gap: 6px; align-items: center; flex: 0 0 auto; }
.date-quick-btn { background: #fff; color: var(--ink); border: 1px solid var(--line); padding: 6px 10px; }
.date-quick-btn.on { border-color: var(--accent); background: #eef6f2; }
.date-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; align-items: center; }
.date-shortcuts button { background: #fff; color: var(--ink); border: 1px solid var(--line); padding: 6px 10px; }
.date-shortcuts button.on { border-color: var(--accent); background: #eef6f2; }
.date-shortcuts button:disabled { opacity: 0.4; cursor: not-allowed; }
.date-shortcuts .fan-month-label { font-size: 12px; color: var(--muted); padding: 0 2px 0 2px; }
.date-shortcuts select {
  height: 32px;
  width: auto;
  min-width: 88px;
  padding: 4px 8px;
  font: inherit;
}
.wx-search { margin-bottom: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wx-search input { flex: 1; min-width: 160px; }
.wx-search textarea { flex: 1; min-width: 220px; min-height: 64px; }
.wx-search .wx-group-tag { margin-left: 0; }
.pack-member-count { margin: 0 0 8px; font-weight: 700; color: var(--ink); }
.wx-box { max-height: 220px; overflow: auto; border: 1px solid var(--line); padding: 8px; border-radius: 8px; background: #fff; }
.wx-box.wx-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; overflow: hidden; }
.wx-box.wx-split .wx-col { min-width: 0; max-height: 204px; overflow: auto; }
.wx-col-title { margin: 0 0 6px; font-size: 12px; font-weight: 700; position: sticky; top: 0; }
.wx-box.wx-unused { border-color: #9bb8a8; background: #f4faf6; }
.wx-box.wx-bound { border-color: #d4b48a; background: #fbf6ee; }
.wx-box.wx-unused .wx-col-title { color: #2a6b4a; background: #f4faf6; }
.wx-box.wx-bound .wx-col-title { color: #8a5a12; background: #fbf6ee; }
.wx-box label { display: block; margin: 4px 0; color: var(--ink); }
/* #豁免-用户点名已绑配流箱点一个勾整组 */
.wx-group-block { border: 1px solid #e6d3b0; border-radius: 6px; padding: 4px 6px 6px; margin: 8px 0; background: #fffdf8; }
.wx-group-head { display: block; width: 100%; margin: 0 0 4px; text-align: left; font-size: 12px; font-weight: 700; }
.wx-group-tag { display: inline-block; margin-left: 4px; font-size: 11px; color: #8a5a12; background: #f3e2c4; padding: 1px 6px; border-radius: 4px; border: 0; cursor: pointer; }
.wx-picked-note { font-weight: 700; color: #8a5a12; }
.wx-picked { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; margin: 8px 0 12px; }
.wx-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; font-size: 12px; }
.wx-chip button { border: 0; background: none; cursor: pointer; color: var(--warn); font-size: 14px; line-height: 1; padding: 0; }
.money { font-weight: 700; color: #8a3b12; }
.howto { border: 2px solid var(--accent); }
.howto-steps { margin: 0; padding-left: 22px; }
.howto-steps li { margin: 8px 0; line-height: 1.45; font-size: 14px; color: var(--ink); }
.note { color: var(--muted); font-size: 12px; }
.flash { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.flash.bad { background: #fde8dc; color: var(--warn); }
.flash.warn { background: #fff3c4; color: #7a5100; border: 1px solid #ead58a; }
.flash.ok { background: #e5f3ea; color: var(--good); }
.pick-list { display: grid; gap: 6px; margin: 8px 0; }
#placement-form-card { scroll-margin-top: 12px; }
.pick-list a {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: inherit;
}
.pick-list a:hover { border-color: var(--accent); }
.pick-list span { color: var(--muted); font-size: 12px; }
.inline { display: flex; align-items: center; gap: 6px; color: var(--ink); }
textarea { width: 100%; min-height: 90px; font: inherit; padding: 8px; border-radius: 6px; border: 1px solid var(--line); }
.table-wrap { overflow-x: auto; max-width: 100%; }
.place-sheet { border-collapse: separate; border-spacing: 0; width: 100%; min-width: max-content; }
.place-sheet th, .place-sheet td { font-size: 13px; padding: 7px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: #fff; border-bottom: 1px solid #f0ede6; }
.place-sheet thead th { background: #f5f3ee; color: #5c564e; font-weight: 600; }
.place-sheet tbody tr:hover td { background: #eef3f1; }
.place-sheet th:first-child, .place-sheet td:first-child { position: sticky; left: 0; z-index: 6; box-shadow: 5px 0 5px -4px rgba(28, 25, 22, 0.12); }
.place-sheet thead th:first-child { z-index: 9; }
.place-sheet .col-name, .place-sheet td.place-name { min-width: 136px; max-width: 160px; }
.place-sheet .name-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wide-place-sheet td.place-name { max-width: 22rem; white-space: normal; overflow: visible; text-overflow: clip; }
.wide-place-sheet .name-cell,
.wide-place-sheet .pack-name-list summary { white-space: normal; overflow: visible; text-overflow: clip; }
.pack-name-list { margin: 0; }
.pack-name-list summary { cursor: pointer; }
.pack-name-list summary .note { margin-left: 6px; }
.pack-name-all { margin-top: 6px; white-space: normal; line-height: 1.45; font-size: 12px; color: var(--ink); }
.place-sheet .col-owner { overflow: hidden; text-overflow: ellipsis; }
.place-sheet.freeze-main {
  table-layout: fixed;
  width: max-content;
  --p1: 176px;
  --p2: 88px;
  --p3: 152px;
  --p4: 88px;
  --p5: 72px;
  --p6: 72px;
  --p7: 56px;
  --p8: 80px;
  --p9: 96px;
  --p10: 64px;
  --p11: 0px;
  --pinned: calc(var(--p1) + var(--p2) + var(--p3) + var(--p4) + var(--p5) + var(--p6) + var(--p7) + var(--p8) + var(--p9) + var(--p10) + var(--p11));
  min-width: max(100%, calc(var(--pinned) + 28rem));
}
.place-sheet.freeze-main.has-owner {
  --p3: 80px;
  --p4: 168px;
  --p5: 88px;
  --p6: 72px;
  --p7: 72px;
  --p8: 56px;
  --p9: 80px;
  --p10: 96px;
  --p11: 64px;
}
.place-sheet.freeze-main th,
.place-sheet.freeze-main td {
  font-size: 14px;
  padding: 8px 6px;
}
.place-sheet.freeze-main .col-name,
.place-sheet.freeze-main td.place-name {
  min-width: var(--p1);
  max-width: var(--p1);
}
.place-sheet.freeze-main thead th {
  white-space: normal;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: clip;
  vertical-align: bottom;
}
.place-sheet.freeze-main td.num,
.place-sheet.freeze-main td.col-date,
.place-sheet.freeze-main td.col-ops {
  text-overflow: clip;
}
.place-sheet.freeze-main td.col-date {
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.2;
}
.place-sheet .date-cell {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.place-sheet td.col-date {
  overflow: visible;
  white-space: nowrap;
}
.cell-schedule {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
}
.place-sheet.freeze-main td.col-date.pin {
  overflow: visible;
}
.place-sheet.freeze-main td.col-date.hour-open {
  z-index: 40;
}
.date-compact {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 3.2em;
  overflow: hidden;
  flex: 0 0 auto;
}
.date-show {
  font-weight: 700;
  pointer-events: none;
}
.place-sheet td.col-date .date-compact input[type="date"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
}
.cell-pick-edit .cell-pick-now { cursor: pointer; font-weight: 700; text-decoration: underline dotted; text-underline-offset: 2px; }
.cell-pick-edit button { display: none; }
.cell-pick-edit:hover .cell-pick-now,
.cell-pick-edit:focus-within .cell-pick-now { display: none; }
.cell-pick-edit:hover button,
.cell-pick-edit:focus-within button { display: inline-flex; }
.wx-blocked { opacity: 0.72; color: #7a5340; }
.wx-blocked input { cursor: not-allowed; }
.publish-hours { position: relative; margin: 6px 0 0; }
.hour-now {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  margin: 0;
  padding: 0 2px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #5c564e;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
.hour-now.cell-wait { color: #9a3412; }
.hour-pick {
  display: none;
  position: fixed;
  z-index: 80;
  grid-template-columns: repeat(6, minmax(2.4em, 1fr));
  gap: 4px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(28, 25, 22, 0.12);
}
.hour-pick.open { display: grid; }
.hour-pick button {
  height: 28px;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #e8c4b0;
  border-radius: 4px;
  background: #f3e2cf;
  color: #9a3412;
  cursor: pointer;
}
.hour-pick button.on {
  background: #c2410c;
  border-color: #c2410c;
  color: #fff;
}
.hour-pick button:hover { background: #fff; }
.place-sheet.freeze-main td.col-ops .ops {
  min-width: 0;
  max-width: 100%;
}
.place-sheet.freeze-main th:first-child,
.place-sheet.freeze-main td:first-child { box-shadow: none; }
.place-sheet.freeze-main .pin {
  position: sticky;
  overflow: hidden;
  background: #fff;
  box-sizing: border-box;
}
.place-sheet.freeze-main thead .pin {
  top: 0;
  background: #f5f3ee;
}
.place-sheet.freeze-main tbody tr:hover .pin { background: #eef3f1; }
.place-sheet.freeze-main tbody tr.tone-good .pin { background: #fdeceb; }
.place-sheet.freeze-main tbody tr.tone-worse .pin { background: #e6f4e8; }
.place-sheet.freeze-main .col-ops {
  width: var(--p2);
  min-width: var(--p2);
  max-width: var(--p2);
  box-sizing: border-box;
}
.place-sheet.freeze-main .pin-1 { left: 0; width: var(--p1); min-width: var(--p1); max-width: var(--p1); z-index: 21; }
.place-sheet.freeze-main .pin-3 { left: var(--p1); width: var(--p3); min-width: var(--p3); max-width: var(--p3); z-index: 19; }
.place-sheet.freeze-main .pin-4 { left: calc(var(--p1) + var(--p3)); width: var(--p4); min-width: var(--p4); max-width: var(--p4); z-index: 18; }
.place-sheet.freeze-main .pin-5 { left: calc(var(--p1) + var(--p3) + var(--p4)); width: var(--p5); min-width: var(--p5); max-width: var(--p5); z-index: 17; }
.place-sheet.freeze-main .pin-6 { left: calc(var(--p1) + var(--p3) + var(--p4) + var(--p5)); width: var(--p6); min-width: var(--p6); max-width: var(--p6); z-index: 16; }
.place-sheet.freeze-main .pin-7 { left: calc(var(--p1) + var(--p3) + var(--p4) + var(--p5) + var(--p6)); width: var(--p7); min-width: var(--p7); max-width: var(--p7); z-index: 15; }
.place-sheet.freeze-main .pin-8 { left: calc(var(--p1) + var(--p3) + var(--p4) + var(--p5) + var(--p6) + var(--p7)); width: var(--p8); min-width: var(--p8); max-width: var(--p8); z-index: 14; }
.place-sheet.freeze-main .pin-9 { left: calc(var(--p1) + var(--p3) + var(--p4) + var(--p5) + var(--p6) + var(--p7) + var(--p8)); width: var(--p9); min-width: var(--p9); max-width: var(--p9); z-index: 13; }
.place-sheet.freeze-main .pin-10 {
  left: calc(var(--p1) + var(--p3) + var(--p4) + var(--p5) + var(--p6) + var(--p7) + var(--p8) + var(--p9));
  width: var(--p10);
  min-width: var(--p10);
  max-width: var(--p10);
  z-index: 12;
}
.place-sheet.freeze-main .pin-11 {
  left: calc(var(--p1) + var(--p3) + var(--p4) + var(--p5) + var(--p6) + var(--p7) + var(--p8) + var(--p9) + var(--p10));
  width: var(--p11);
  min-width: var(--p11);
  max-width: var(--p11);
  z-index: 11;
}
.place-sheet.freeze-main:not(.has-owner) .pin-10,
.place-sheet.freeze-main.has-owner .pin-11 {
  box-shadow: 5px 0 5px -4px rgba(28, 25, 22, 0.12);
}
.place-sheet.freeze-main thead .pin-1 { z-index: 31; }
.place-sheet.freeze-main thead .pin-2 { z-index: 30; }
.place-sheet.freeze-main thead .pin-3 { z-index: 29; }
.place-sheet.freeze-main thead .pin-4 { z-index: 28; }
.place-sheet.freeze-main thead .pin-5 { z-index: 27; }
.place-sheet.freeze-main thead .pin-6 { z-index: 26; }
.place-sheet.freeze-main thead .pin-7 { z-index: 25; }
.place-sheet.freeze-main thead .pin-8 { z-index: 24; }
.place-sheet.freeze-main thead .pin-9 { z-index: 23; }
.place-sheet.freeze-main thead .pin-10 { z-index: 22; }
.place-sheet.freeze-main thead .pin-11 { z-index: 21; }
.place-sheet.freeze-main .col-attr { max-width: 96px; }
.place-sheet .col-note {
  max-width: 14em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #7a5100;
  font-size: 12px;
}
.place-page { min-width: 0; max-width: 100%; }
.place-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 10px;
  margin-bottom: 10px;
}
.place-toolbar .filters { flex: 1 1 520px; min-width: 0; margin-bottom: 0; }
.place-toolbar .filters > div { flex: 0 1 auto; min-width: 0; }
.place-toolbar input[name="q"] { width: 9.5rem; max-width: 28vw; }
.place-toolbar input[type="date"] { width: 11.5rem; height: 36px; cursor: pointer; font-size: 16px; }
.place-toolbar select { width: 7.4rem; max-width: 22vw; }
.place-actions { display: flex; flex-wrap: nowrap; gap: 6px; flex: 0 0 auto; margin-left: auto; }
.place-actions .btn, .place-actions a.btn { white-space: nowrap; padding: 5px 12px; height: 32px; box-sizing: border-box; display: inline-flex; align-items: center; }
.place-page .table-wrap { overflow: auto; max-height: calc(100vh - 200px); padding-top: 0; }
.tone-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; margin-right: 4px; }
.place-sheet .wx-cell { color: #5c564e; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-sheet td.ops a { margin-right: 6px; }
.placement-summary { margin: 0 0 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.placement-summary .card { padding: 10px 12px; }
.placement-summary .stat span, .placement-summary .stat a { display: block; }
.reference-legend { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.reference-legend .tone-legend { margin: 0; }
.view-tabs { display: flex; gap: 8px; margin: 0 0 10px; }
.tone-legend { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; font-size: 12px; }
.tone-legend span { padding: 3px 8px; border-radius: 6px; }
tr.tone-good, .tone-good { background: #fdeceb !important; color: #b42318; }
tr.tone-worse, .tone-worse { background: #e6f4e8 !important; color: #176b2c; }
.place-sheet tbody tr.tone-good td { background: #fdeceb; color: #b42318; }
.place-sheet tbody tr.tone-worse td { background: #e6f4e8; color: #176b2c; }
.name-cell { font-weight: 600; max-width: 100%; white-space: normal; }
.meta-cell { color: var(--muted); font-size: 11px; max-width: 100%; white-space: normal; }
.chip-row { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0 2px; max-width: 100%; max-height: 2.4em; overflow: hidden; }
.chip {
  display: inline-block; font-size: 11px; line-height: 1.4;
  padding: 0 7px; border-radius: 999px; background: #e8efe8; color: #2f6f68;
  white-space: nowrap;
}
.chip.dim { background: #ece7de; color: #5c564e; }
.place-sheet td.chip-cell { white-space: normal; }
.more-box { margin: 8px 0 12px; }
.more-filters { display: contents; }
.more-filters-check, .more-filters-label { display: none; }
.more-filters-body { display: contents; }
.date-range { display: contents; }
.filter-extra { display: contents; }
.flash-go { display: none; margin-left: 8px; font-weight: 700; }
@media (max-width: 900px) {
  .hide-sm { display: none; }
  .placement-summary { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}
@media (max-width: 600px) {
  .content { padding: 8px; }
  .who { font-size: 12px; }
}
.pager { display: flex; gap: 10px; align-items: center; margin-top: 12px; font-size: 13px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 12px; }
.stat-row b { font-size: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat b { display: block; font-size: 22px; }
.stat span { color: var(--muted); font-size: 12px; }
.consume-card { max-width: 760px; }
.recharge-time-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.recharge-time-form .time-field { flex: 1 1 18rem; min-width: 18rem; }
.recharge-time-form input[type="datetime-local"] {
  width: 100%;
  min-width: 18rem;
  height: 36px;
  font-size: 16px;
  cursor: pointer;
}
.consume-form .money-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 12px 0 16px;
}
.consume-form input { width: 100%; font-size: 16px; padding: 10px 12px; }
.delta { margin: 0; padding-top: 8px; font-size: 22px; }
thead th { position: sticky; top: 0; z-index: 1; }
th a:hover { color: var(--accent); }
.consume-sheet { table-layout: fixed; width: 100%; }
.consume-sheet th, .consume-sheet td { padding: 3px 6px; font-size: 12px; }
.consume-sheet td.col-date, .consume-sheet td.num, .consume-sheet th.num { white-space: nowrap; }
.consume-sheet td.col-account { white-space: normal; word-break: break-all; }
.consume-sheet td.col-channel { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.consume-sheet tfoot td { font-weight: 700; border-top: 2px solid #cfc6b8; }
.consume-sheet tbody tr.merged,
.consume-sheet tbody tr.merged:nth-child(odd),
.consume-sheet tbody tr.merged:nth-child(even) {
  background: #ece4f7 !important;
}
.consume-sheet tbody tr.merged:hover { background: #ddd4f0 !important; }
.consume-sheet tbody tr.merged td { border-top: 1px solid #d4c6ea; border-bottom: 1px solid #d4c6ea; }
.cost { color: #016d9b; font-weight: 700; }
.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}
.login-card { width: min(420px, 100%); padding: 22px 20px 24px; }
.login-card h1 { font-size: 24px; margin-bottom: 6px; }
.login-card .stack button { width: 100%; min-height: 44px; font-size: 17px; }
.qr-thumb { width: 3.2em; height: 3.2em; object-fit: contain; background: #fff; border: 1px solid var(--line); vertical-align: middle; }
.tag { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: #e8efe8; color: var(--good); }
.tag.wait { background: #f6e7d8; color: var(--warn); }
.tag.op-1 { background: #dcefe4; color: #1f5c3c; }
.tag.op-2 { background: #f3e2cf; color: #9a3412; }
.tag.op-3 { background: #dce6f5; color: #1e3a5f; }
.tag.op-4 { background: #ece4f7; color: #5b21b6; }
html.login-page, html.login-page body {
  overflow: auto;
  height: auto;
  min-height: 100%;
}
.login-card input { font-size: 16px; min-height: 42px; }
@media (max-width: 960px) {
  .place-sheet.freeze-main {
    --p1: 156px;
    --p2: 84px;
    --p3: 120px;
    --p4: 80px;
    --p5: 68px;
    --p6: 68px;
    --p7: 52px;
    --p8: 76px;
    --p9: 92px;
    --p10: 60px;
  }
  .place-sheet.freeze-main.has-owner {
    --p3: 76px;
    --p4: 120px;
    --p5: 80px;
    --p6: 68px;
    --p7: 68px;
    --p8: 52px;
    --p9: 76px;
    --p10: 92px;
    --p11: 60px;
  }
  .menu-btn { display: inline-flex; width: 42px; height: 42px; font-size: 20px; }
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 70;
    width: min(260px, 86vw); height: 100vh; height: 100dvh; transform: translateX(-105%);
    transition: transform 0.18s ease; box-shadow: 0 0 32px rgba(20, 30, 28, 0.35);
    padding-top: calc(18px + env(safe-area-inset-top));
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
  .side.open { transform: none; }
  .side-link { padding: 12px 20px; font-size: 16px; }
  .side-mask { position: fixed; inset: 0; z-index: 65; background: rgba(28, 25, 22, 0.4); }
  .who .sync-line { display: none !important; }
  .who { gap: 8px; white-space: nowrap; flex-shrink: 0; }
  .bar { padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); gap: 8px; flex-wrap: nowrap; }
  .bar > div:nth-child(2) { flex: 1; min-width: 0; }
  .bar strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .howto, .flash-extra, .legend-note, .placement-summary { display: none; }
  .page-sync, .filters form.page-sync { display: none !important; }
  .flash-go { display: inline; }
  .filter-extra {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1 1 100%;
    order: 5;
  }
  .filter-extra .btn, .filter-extra a.btn { flex: 1 1 42%; justify-content: center; }
  .lead { display: none; }
  .login-card .lead { display: block; font-size: 13px; line-height: 1.5; }
  .flash { padding: 8px 10px; margin-bottom: 8px; font-size: 14px; }
  .filter-q label { display: none; }
  .filters > .more-filters, form.filters > .more-filters,
  .more-filters {
    display: block;
    flex: 1 1 100%;
    order: 4;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 0 10px;
  }
  .more-filters-label {
    display: block;
    padding: 10px 0;
    font-size: 15px;
    color: var(--accent);
    cursor: pointer;
  }
  .more-filters-body { display: none; }
  .more-filters-check:checked ~ .more-filters-body { display: block; }
  .more-filters-check:checked + .more-filters-label { border-bottom: 1px solid var(--line); }
  .more-filters-body > div { margin: 8px 0; }
  .place-actions .btn, .place-actions a.btn { flex: 1 1 auto; justify-content: center; }
  .content {
    padding: 10px 10px calc(20px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }
  input, select, textarea, button, .btn {
    font-size: 16px;
  }
  button, .btn, .filters button, .filters .btn, .filters a.btn {
    min-height: 42px;
    height: auto;
    padding: 8px 14px;
    border-radius: 8px;
  }
  .filters { gap: 8px; }
  .filters input:not([type=checkbox]):not([type=radio]):not([type=file]),
  .filters select {
    width: 100%;
    max-width: none;
    height: 42px;
  }
  .filters > div, form.filters > div { flex: 1 1 46%; min-width: 140px; order: 5; }
  .filters > .filter-q, form.filters > .filter-q { flex: 1 1 auto; min-width: 0; order: 1; }
  .filter-go { order: 2; flex: 0 0 auto; }
  .filter-submit { order: 6; }
  .filters > .date-range, form.filters > .date-range {
    display: flex;
    gap: 8px;
    flex: 1 1 100%;
    order: 3;
    min-width: 0;
  }
  .date-range > div,
  .date-range > .date-field {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .date-range label { margin: 0; }
  .date-field input[type="date"] { width: 100%; min-width: 0; }
  .filters > .date-quick, form.filters > .date-quick { flex: 1 1 100%; order: 4; }
  .date-quick-btn { min-height: 36px; flex: 1 1 0; }
  .date-shortcuts button { min-height: 36px; }
  .date-shortcuts select { min-height: 36px; font-size: 16px; }
  .view-tabs { flex-wrap: wrap; }
  .view-tabs .btn { min-height: 38px; flex: 1 1 auto; justify-content: center; }
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding-bottom: 6px;
  }
  .place-sheet:not(.freeze-main) .col-name,
  .place-sheet:not(.freeze-main) td.place-name { min-width: 128px; max-width: 160px; }
  /* #豁免-窄屏号包名也要能展开看全 */
  .wide-place-sheet:not(.freeze-main) td.place-name { max-width: 22rem; white-space: normal; overflow: visible; text-overflow: clip; }
  .place-sheet th, .place-sheet td { padding: 8px 8px; }
  .place-toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .place-toolbar .filters { flex: 1 1 auto; }
  .place-toolbar input[name="q"],
  .place-toolbar input[type="date"],
  .place-toolbar select { width: 100%; max-width: none; }
  .place-actions { flex-wrap: nowrap; margin-left: 0; order: 5; }
  .place-page .table-wrap { max-height: none; }
  .card table:not(.place-sheet):not(.consume-sheet):not(.pay-sheet) th,
  .card table:not(.place-sheet):not(.consume-sheet):not(.pay-sheet) td {
    max-width: 180px;
  }
  .stack { max-width: none; }
  .form-grid { grid-template-columns: 1fr; }
  .consume-form input { font-size: 16px; min-height: 42px; }
  .home-items { grid-template-columns: 1fr 1fr; }
  .home-items a { padding: 14px 12px; min-height: 64px; }
  .pager { gap: 14px; font-size: 14px; padding: 8px 0 16px; }
  .pager a { padding: 8px 12px; border: 1px solid var(--accent); border-radius: 8px; }
  .money-box, .task-box {
    width: min(560px, calc(100vw - 20px));
    max-height: calc(100dvh - 24px);
    overflow: auto;
  }
  .stat-row b { font-size: 18px; }
  .howto { padding: 12px; }
}
.only-xs { display: none; }
@media (max-width: 600px) {
  .place-sheet.freeze-main {
    --p1: 148px;
    --p2: 84px;
    --p3: 120px;
    --p4: 80px;
    --p5: 0px;
    --p6: 0px;
    --p7: 52px;
    --p8: 0px;
    --p9: 92px;
    --p10: 60px;
  }
  .place-sheet.freeze-main.has-owner {
    --p3: 76px;
    --p4: 120px;
    --p5: 80px;
    --p6: 0px;
    --p7: 0px;
    --p8: 52px;
    --p9: 0px;
    --p10: 92px;
    --p11: 60px;
  }
  .filters > div, form.filters > div { flex: 1 1 100%; }
  .filters > .filter-q, form.filters > .filter-q { flex: 1 1 auto; min-width: 0; }
  .filters > .date-range, form.filters > .date-range { flex: 1 1 100%; }
  .date-range > div { flex: 1 1 0; min-width: 0; }
  .hide-xs { display: none; }
  .only-xs { display: block; font-size: 12px; }
  .consume-sheet { table-layout: auto; }
  .consume-sheet td.col-date { min-width: 5.6em; }
  .consume-sheet td.col-date .muted { display: none; }
  .home-items { grid-template-columns: 1fr; }
  .who { font-size: 12px; }
  .content { padding-left: 8px; padding-right: 8px; }
  .card { padding: 10px; }
  th, td { padding: 8px 8px; font-size: 13px; }
  .place-actions { gap: 6px; }
}
