﻿:root {
  color-scheme: light;
  --bg: #1f130f;
  --ink: #2b1d15;
  --muted: #836957;
  --line: #c98e47;
  --paper: #fff1cf;
  --charcoal: #22130f;
  --ember: #d3471d;
  --gold: #f1bf57;
  --mint: #246f57;
  --name: #3a2416;
  --soft-text: #6f584a;
  --locked: #b5a08e;
  --focus: rgba(241, 191, 87, 0.28);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

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

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(255, 152, 73, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(20, 9, 6, 0.35), rgba(20, 9, 6, 0.72)),
    url("./assets/dachun-bbq.jpg") center top / 700px auto fixed,
    var(--bg);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 236, 201, 0.84), rgba(244, 219, 178, 0.92)),
    repeating-linear-gradient(90deg, rgba(71, 35, 22, 0.08) 0 1px, transparent 1px 14px);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 40px;
}

.hero {
  min-height: 208px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 34px 32px;
  border-radius: 8px;
  color: #fffaf0;
  background:
    linear-gradient(120deg, rgba(28, 13, 8, 0.92), rgba(111, 22, 12, 0.7) 46%, rgba(238, 137, 44, 0.3)),
    url("./assets/dachun-bbq.jpg") center 38% / cover;
  box-shadow:
    0 26px 54px rgba(18, 8, 6, 0.34),
    inset 0 1px 0 rgba(255, 239, 206, 0.22);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 204, 117, 0.3), transparent 72%);
  pointer-events: none;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 221, 154, 0.18);
  border-radius: 8px;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(241, 191, 87, 0.18);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(2.25rem, 8vw, 5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
  color: #5e2813;
}

.subtitle {
  max-width: 620px;
  margin-bottom: 0;
  color: rgba(255, 244, 223, 0.82);
  line-height: 1.7;
}

.total-panel {
  min-width: 180px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(255, 229, 178, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 239, 206, 0.16), rgba(255, 232, 188, 0.08)),
    rgba(49, 21, 14, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 248, 230, 0.18);
  backdrop-filter: blur(10px);
}

.total-panel span {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 250, 240, 0.72);
}

.total-panel strong {
  display: block;
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  color: #ffd27b;
  text-shadow: 0 0 18px rgba(255, 188, 88, 0.2);
}

.total-panel strong::after {
  content: " 今日火热";
  display: block;
  margin-top: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: rgba(255, 239, 206, 0.64);
}

.workspace {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.entry-gate,
.table-gate,
.admin-panel {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 245, 220, 0.96), rgba(255, 237, 198, 0.95));
  box-shadow:
    0 18px 34px rgba(32, 12, 8, 0.18),
    inset 0 1px 0 rgba(255, 249, 232, 0.7);
}

.entry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.entry-quick-access {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(180, 124, 41, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 247, 228, 0.95), rgba(255, 236, 196, 0.92));
}

.entry-quick-access p {
  margin: 0;
  color: #8f5c2b;
  font-size: 0.88rem;
}

.entry-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.entry-board-card {
  padding: 14px;
  border: 1px solid #d6a45f;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 248, 227, 0.98), rgba(255, 229, 183, 0.94));
  box-shadow: 0 10px 18px rgba(87, 35, 16, 0.08);
}

.entry-board-card-wide {
  grid-column: 1 / -1;
}

.entry-board-card-gold {
  background: linear-gradient(180deg, rgba(255, 246, 214, 0.98), rgba(255, 226, 155, 0.94));
}

.entry-board-card-ember {
  background: linear-gradient(180deg, rgba(255, 239, 214, 0.98), rgba(255, 207, 163, 0.94));
}

.entry-board-card-ink {
  background: linear-gradient(180deg, rgba(255, 243, 221, 0.98), rgba(246, 222, 188, 0.94));
}

.entry-board-label {
  display: block;
  margin-bottom: 8px;
  color: var(--soft-text);
  font-size: 0.8rem;
  font-weight: 800;
}

.entry-board-value {
  display: block;
  color: var(--name);
  font-size: 1.22rem;
  line-height: 1.2;
}

.entry-board-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.entry-top-list {
  display: grid;
  gap: 8px;
}

.entry-top-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 248, 227, 0.76);
}

.entry-top-item strong {
  color: var(--name);
  overflow-wrap: anywhere;
}

.entry-top-item span:last-child {
  color: var(--ember);
  font-weight: 800;
}

.entry-top-rank {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #8d3118, #c8531d);
  color: #ffe0ab;
  font-size: 0.82rem;
  font-weight: 900;
}

.entry-board-empty {
  grid-column: 1 / -1;
  padding: 16px 18px;
  border: 1px dashed #d6a868;
  border-radius: 8px;
  background: rgba(255, 246, 227, 0.72);
  color: var(--muted);
  text-align: center;
}

.entry-button {
  min-height: 112px;
  border: 1px solid #db9f52;
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(180deg, #fff5d8, #ffe9bb);
  color: var(--name);
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 238, 0.9),
    0 10px 20px rgba(87, 35, 16, 0.08);
}

.entry-button strong,
.entry-button span {
  display: block;
}

.entry-button strong {
  margin-bottom: 8px;
  font-size: 1.12rem;
}

.entry-button span {
  color: var(--soft-text);
  line-height: 1.5;
}

.entry-button:hover {
  border-color: rgba(211, 71, 29, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 238, 0.96),
    0 12px 24px rgba(83, 25, 18, 0.12);
}

.admin-entry {
  background: linear-gradient(180deg, #fff0d5, #ffd9a3);
}

.admin-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 52px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(132, 45, 18, 0.38);
  border-radius: 18px 18px 20px 20px;
  background: linear-gradient(180deg, rgba(121, 18, 10, 0.92), rgba(188, 58, 20, 0.95));
  box-shadow:
    0 14px 30px rgba(50, 13, 10, 0.22),
    inset 0 1px 0 rgba(255, 228, 190, 0.28);
  z-index: 60;
}

.search-fab {
  position: fixed;
  right: 18px;
  bottom: 96px;
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(114, 39, 18, 0.34);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe9bb, #ffcc77);
  color: #7b3113;
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow:
    0 14px 28px rgba(48, 13, 8, 0.2),
    inset 0 1px 0 rgba(255, 249, 228, 0.8);
  z-index: 60;
}

.search-fab.is-active {
  background: linear-gradient(180deg, #ffcc74, #ff9e4a);
  color: #6d210f;
  box-shadow:
    0 16px 30px rgba(69, 19, 8, 0.26),
    inset 0 1px 0 rgba(255, 248, 232, 0.84);
}

.action-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  min-width: min(86vw, 320px);
  max-width: min(90vw, 360px);
  padding: 12px 16px;
  border: 1px solid rgba(119, 36, 20, 0.22);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(100, 24, 16, 0.96), rgba(140, 40, 20, 0.96));
  color: #ffe7be;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: 0 16px 30px rgba(44, 12, 8, 0.26);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 90;
}

.action-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.menu-search-sheet {
  position: fixed;
  top: 108px;
  left: 50%;
  width: min(calc(100vw - 24px), 560px);
  transform: translateX(-50%);
  display: block;
  padding: 0;
  background: transparent;
  pointer-events: none;
  z-index: 70;
}

.menu-search-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 247, 227, 0.98), rgba(255, 233, 188, 0.98));
  box-shadow: 0 18px 30px rgba(38, 12, 8, 0.18);
  pointer-events: auto;
}

.menu-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.menu-search-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.menu-search-field span,
.menu-search-note {
  color: var(--soft-text);
}

.menu-search-field input {
  margin-top: 6px;
}

.menu-search-note {
  margin: 10px 0 0;
  font-size: 0.9rem;
}

.search-empty-state {
  margin: 14px 0;
}

.admin-fab:hover {
  transform: translateY(-1px);
  box-shadow:
    0 18px 34px rgba(50, 13, 10, 0.28),
    inset 0 1px 0 rgba(255, 228, 190, 0.36);
}

.admin-fab-lantern {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 34px;
}

.admin-fab-cap,
.admin-fab-tail {
  width: 10px;
  height: 4px;
  border-radius: 999px;
  background: #ffd989;
}

.admin-fab-body {
  position: relative;
  width: 24px;
  height: 20px;
  margin: 2px 0;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 35%, #ffe89d, #ffba58 58%, #cf4b18 100%);
  box-shadow:
    0 0 0 1px rgba(255, 232, 179, 0.25),
    0 0 14px rgba(255, 183, 72, 0.28);
}

.admin-fab-body::before,
.admin-fab-body::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: rgba(142, 43, 21, 0.35);
}

.admin-fab-body::before {
  left: 7px;
}

.admin-fab-body::after {
  right: 7px;
}

.table-gate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.table-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #ddb16f;
  border-radius: 8px;
  background: rgba(255, 248, 227, 0.84);
}

.diner-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 10px;
}

.diner-flow span {
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(220, 173, 108, 0.48);
  border-radius: 8px;
  background: rgba(255, 249, 232, 0.76);
  color: #8f5c2b;
  font-size: 0.84rem;
  font-weight: 900;
}

.diner-flow span.is-active {
  border-color: rgba(234, 92, 38, 0.62);
  background: linear-gradient(180deg, rgba(255, 244, 218, 0.98), rgba(255, 221, 172, 0.96));
  color: #a13a18;
}

.diner-flow span.is-done {
  border-color: rgba(124, 148, 91, 0.42);
  background: rgba(237, 246, 221, 0.82);
  color: #5c743a;
}

.single-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

#openTableForm {
  position: sticky;
  top: 10px;
  z-index: 8;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 12px;
  box-shadow: 0 10px 18px rgba(87, 35, 16, 0.1);
}

.selected-table-hint {
  grid-column: 1 / -1;
  width: fit-content;
  margin: 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 235, 194, 0.92);
  color: #a13a18;
  font-size: 0.86rem;
  font-weight: 900;
}

#openTableForm .secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

#openTableForm input:disabled {
  color: rgba(80, 60, 45, 0.5);
  background: rgba(255, 249, 232, 0.62);
}

.table-select-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.diner-table-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.diner-table-card {
  min-height: 108px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(220, 173, 108, 0.62);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(255, 239, 208, 0.96));
  box-shadow: 0 10px 18px rgba(87, 35, 16, 0.09);
  color: var(--name);
  text-align: left;
}

.diner-table-card:hover,
.diner-table-card.is-selected {
  border-color: rgba(234, 92, 38, 0.72);
  box-shadow:
    0 0 0 3px rgba(255, 187, 86, 0.25),
    0 12px 22px rgba(87, 35, 16, 0.14);
}

.diner-table-card.is-selected {
  background: linear-gradient(180deg, rgba(255, 247, 224, 0.98), rgba(255, 222, 177, 0.98));
}

.diner-table-kicker {
  width: fit-content;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 235, 194, 0.92);
  color: #b34616;
  font-size: 0.68rem;
  font-weight: 900;
}

.diner-table-card strong {
  font-size: 1.04rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.diner-table-meta {
  color: var(--soft-text);
  font-size: 0.82rem;
  font-weight: 800;
}

.diner-table-total {
  color: #f05a24;
  font-size: 0.92rem;
  font-weight: 900;
}

.diner-table-empty {
  grid-column: 1 / -1;
}

#createTableByDinerForm {
  margin-top: 12px;
}

.create-table-disclosure {
  margin-top: 12px;
  border: 1px dashed rgba(180, 124, 41, 0.36);
  border-radius: 8px;
  background: rgba(255, 248, 227, 0.62);
}

.create-table-disclosure summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #8f5c2b;
  font-weight: 900;
  cursor: pointer;
}

.create-table-disclosure .table-form {
  margin: 0 10px 10px;
}

.create-table-disclosure #createTableByDinerForm {
  margin: 0 10px 10px;
}

.table-create-button {
  align-self: end;
}

.table-message {
  min-height: 22px;
  margin: 10px 0 0;
  color: #8f1d17;
  font-weight: 800;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #ddb16f;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff4d4, #ffebc3);
}

.table-toolbar span {
  color: var(--name);
  font-weight: 900;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 0 rgba(255, 250, 238, 0.4);
}

.table-toolbar-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.table-card-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.boss-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.boss-card {
  padding: 14px;
  border: 1px solid #d9a45c;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 247, 226, 0.98), rgba(255, 229, 176, 0.92));
  box-shadow: 0 10px 20px rgba(87, 35, 16, 0.08);
}

.boss-card-label {
  display: block;
  margin-bottom: 8px;
  color: var(--soft-text);
  font-size: 0.8rem;
  font-weight: 800;
}

.boss-card-value {
  display: block;
  color: var(--name);
  font-size: 1.2rem;
  line-height: 1.2;
}

.boss-card-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.boss-card-ember {
  background: linear-gradient(180deg, rgba(255, 241, 214, 0.98), rgba(255, 219, 171, 0.92));
}

.boss-card-gold {
  background: linear-gradient(180deg, rgba(255, 247, 214, 0.98), rgba(255, 229, 152, 0.94));
}

.boss-card-ink {
  background: linear-gradient(180deg, rgba(255, 243, 221, 0.98), rgba(246, 222, 188, 0.94));
}

.boss-card-mint {
  background: linear-gradient(180deg, rgba(238, 250, 239, 0.96), rgba(211, 236, 221, 0.94));
}

.table-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #ddb16f;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 250, 237, 0.98), rgba(255, 240, 210, 0.94));
  box-shadow: 0 10px 18px rgba(87, 35, 16, 0.08);
}

.table-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.danger-table-button {
  color: #8f1d17;
  border-color: rgba(201, 25, 18, 0.35);
  background: #fff1ee;
}

.danger-table-button:hover {
  border-color: rgba(201, 25, 18, 0.5);
}

.table-card h3 {
  margin: 0 0 5px;
  color: var(--name);
  font-size: 1rem;
}

.table-card p {
  margin: 0;
  color: var(--soft-text);
  line-height: 1.45;
}

.setup-panel,
.ledger-panel,
.menu-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 247, 224, 0.96), rgba(255, 237, 198, 0.94));
  box-shadow:
    0 18px 34px rgba(32, 12, 8, 0.18),
    inset 0 1px 0 rgba(255, 249, 232, 0.72);
}

.setup-panel {
  padding: 18px;
}

.ledger-panel {
  padding: 18px;
  min-width: 0;
}

.menu-panel {
  grid-column: 1 / -1;
  padding: 18px;
  margin-top: 18px;
}

.menu-panel .section-title {
  align-items: start;
}

.menu-panel .section-title p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.compact-button {
  min-width: 96px;
  min-height: 38px;
  padding: 0 14px;
}

.menu-editor[hidden] {
  display: none;
}

.menu-editor .inline-form {
  grid-template-columns: minmax(0, 1.4fr) 120px 140px 112px 44px;
  align-items: end;
}

.menu-actions {
  margin: 0 0 12px;
}

.menu-actions .secondary-button {
  width: 100%;
}

.admin-access-panel {
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(255, 241, 214, 0.94));
}

.wechat-admin-form {
  grid-template-columns: minmax(0, 1fr) 128px;
  align-items: end;
}

.wechat-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
}

.wechat-admin-column {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(221, 177, 111, 0.72);
  border-radius: 8px;
  background: rgba(255, 251, 242, 0.74);
}

.wechat-admin-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.wechat-admin-column-head h3 {
  margin: 0;
  color: var(--name);
  font-size: 1rem;
}

.wechat-admin-column-head span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.wechat-admin-list {
  display: grid;
  gap: 8px;
}

.wechat-user-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(228, 193, 142, 0.78);
  border-radius: 8px;
  background: #fffaf0;
}

.wechat-user-avatar {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  background: #24140e;
  color: #ffe7bc;
  font-weight: 950;
}

.wechat-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wechat-user-main {
  min-width: 0;
}

.wechat-user-main strong,
.wechat-user-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-user-main strong {
  color: var(--name);
  font-size: 0.96rem;
}

.wechat-user-main span {
  margin-top: 3px;
  color: var(--soft-text);
  font-size: 0.78rem;
}

.wechat-user-action {
  min-width: 88px;
}

.wechat-user-action.is-done {
  color: #126152;
  border-color: rgba(47, 145, 111, 0.36);
  background: #e8f6f1;
}

.wechat-user-action:disabled {
  cursor: default;
  opacity: 0.78;
}

.wechat-empty-state {
  min-height: 96px;
}

.panel-block + .panel-block {
  margin-top: 26px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.section-title h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-title h2::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffdd8d, #e05a1c 72%);
  box-shadow: 0 0 10px rgba(224, 90, 28, 0.28);
}

.section-title.wide {
  align-items: start;
}

#dinerViewToggleBtn {
  min-width: 124px;
}

.section-title p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.warning-note {
  margin: -2px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(211, 71, 29, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff0ca, #ffe1af);
  color: #8d2412;
  font-weight: 850;
  line-height: 1.45;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #f15b2f, #c83816);
  color: white;
  font-size: 1.45rem;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 221, 191, 0.34),
    0 8px 18px rgba(119, 31, 13, 0.22);
}

.icon-button:hover,
.primary-button:hover,
.secondary-button:hover {
  filter: brightness(0.96);
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 106px;
  gap: 10px;
  margin-bottom: 12px;
}

.inline-form.one-line {
  grid-template-columns: 1fr;
}

label span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.82rem;
}

input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d3a25f;
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 251, 242, 0.92);
  color: var(--ink);
  outline: none;
}

select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d3a25f;
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 251, 242, 0.92);
  color: var(--name);
  font: inherit;
  outline: none;
}

input:focus {
  border-color: var(--ember);
  box-shadow: 0 0 0 4px var(--focus);
}

select:focus {
  border-color: var(--ember);
  box-shadow: 0 0 0 4px var(--focus);
}

.list {
  display: grid;
  gap: 8px;
}

.list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 251, 242, 0.96), rgba(255, 240, 210, 0.9));
  box-shadow: 0 8px 16px rgba(87, 35, 16, 0.05);
}

.identity-panel {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid #ddb16f;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff4d5, #ffe9c1);
}

.identity-panel p {
  margin: 8px 0 0;
  color: var(--soft-text);
  font-size: 0.88rem;
  line-height: 1.45;
}

.list-row.editable-item {
  grid-template-columns: 40px minmax(140px, 1fr) 88px 84px 132px 74px 30px;
}

.list-row.editable-item.menu-item-card {
  grid-template-columns: 1fr;
  align-content: start;
  gap: 10px;
  min-height: 186px;
  padding: 10px;
  border-color: rgba(220, 173, 108, 0.58);
  background: linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(255, 242, 216, 0.96));
  box-shadow: 0 10px 18px rgba(87, 35, 16, 0.08);
}

.menu-item-card-head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 30px;
  gap: 7px;
  align-items: center;
}

.menu-item-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 8px;
  align-items: end;
}

.menu-card-field {
  min-width: 0;
}

.menu-card-field span {
  margin-bottom: 4px;
  font-size: 0.74rem;
}

.menu-item-card .item-category-field {
  grid-column: 1 / -1;
}

.menu-item-card-actions {
  margin-top: auto;
}

.menu-item-card .menu-order-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.menu-item-card .menu-order-buttons .tiny-button {
  width: 100%;
}

.menu-item-card .item-price-edit,
.menu-item-card .item-market-toggle,
.menu-item-card .item-category-edit,
.menu-item-card .menu-order-buttons,
.menu-item-card .danger-tiny {
  grid-column: auto;
}

.menu-item-card .item-name-edit {
  min-width: 0;
  font-weight: 900;
}

.menu-featured-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-market-toggle,
.item-market-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-featured-toggle input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.menu-market-toggle input,
.item-market-toggle input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.item-featured-toggle {
  font-size: 1.1rem;
  color: #b4871b;
}

.item-featured-toggle.is-active {
  color: var(--gold);
  border-color: rgba(228, 166, 41, 0.55);
  background: #fff6db;
}

.item-category-edit {
  min-width: 0;
}

.item-market-toggle {
  justify-content: center;
  padding: 0 10px;
  border: 1px solid rgba(177, 126, 26, 0.24);
  border-radius: 10px;
  background: rgba(255, 247, 231, 0.92);
  color: #8f5820;
  font-size: 0.82rem;
}

.market-price-stack {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.market-price-stack strong {
  color: #bf4314;
  font-size: 0.9rem;
}

.market-price-stack small {
  color: #8b6a46;
  font-size: 0.74rem;
}

.menu-order-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.menu-order-buttons .tiny-button:disabled,
.item-featured-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.menu-group-row td {
  padding: 0;
  background: transparent;
  border-bottom: 0;
  scroll-margin-top: 88px;
}

.menu-group-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #e0a55b;
  border-radius: 8px;
  background: linear-gradient(90deg, #4f1e12, #6d2614 55%, #8b3515);
  color: #ffe8bb;
  text-align: left;
  box-shadow: 0 8px 18px rgba(56, 18, 10, 0.18);
}

.menu-group-toggle strong {
  font-size: 0.98rem;
  color: #fff0c8;
}

.menu-group-toggle span {
  color: #ffd784;
  font-weight: 900;
}

.menu-group-toggle em {
  color: rgba(255, 234, 190, 0.76);
  font-style: normal;
  font-size: 0.84rem;
}

.admin-menu-section + .admin-menu-section {
  margin-top: 14px;
}

.admin-menu-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.admin-menu-section-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid #deaa61;
  border-radius: 8px;
  background: linear-gradient(90deg, #fff0ca, #ffe0a3);
  color: var(--name);
}

.admin-menu-section-header strong::after {
  content: " MENU";
  margin-left: 6px;
  font-size: 0.72rem;
  color: rgba(94, 40, 19, 0.54);
}

.admin-menu-section-header strong {
  font-size: 0.96rem;
}

.admin-menu-section-header span {
  color: var(--muted);
  font-size: 0.84rem;
}

.list-row.editable-person {
  grid-template-columns: minmax(120px, 1fr) auto 30px;
}

.list-row.person-row {
  grid-template-columns: minmax(120px, 1fr) auto;
}

.person-name-view {
  color: var(--name);
  font-weight: 800;
}

.person-total-view {
  color: #9f241d;
  font-weight: 800;
}

.list-row strong {
  overflow-wrap: anywhere;
}

.list-input {
  min-height: 34px;
  padding: 6px 8px;
  color: var(--name);
}

.price-tag {
  color: var(--mint);
  font-weight: 800;
}

.tiny-button {
  width: 30px;
  height: 30px;
  border: 1px solid #d5a866;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff8e8, #ffe6bc);
  color: var(--muted);
}

.tiny-button:hover {
  color: var(--ember);
  border-color: rgba(216, 73, 47, 0.4);
}

.danger-tiny {
  color: #8f1d17;
  border-color: rgba(201, 25, 18, 0.35);
  background: #fff1ee;
  font-weight: 800;
}

.danger-tiny:hover {
  color: #7a1914;
  border-color: rgba(201, 25, 18, 0.5);
}

.people-tools {
  margin-top: 10px;
}

.people-tools .compact-button {
  width: 100%;
}

.panel-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 26px;
}

.secondary-button,
.danger-button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid #d6a868;
  background: linear-gradient(180deg, #fff9eb, #ffe8c1);
  color: var(--charcoal);
  box-shadow: inset 0 1px 0 rgba(255, 250, 238, 0.84);
}

.danger-button {
  color: var(--ember);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 251, 242, 0.98), rgba(255, 240, 210, 0.94));
}

.menu-section-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}

.menu-section-tabs::-webkit-scrollbar {
  display: none;
}

.menu-section-tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(185, 121, 31, 0.24);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 249, 237, 0.96), rgba(255, 233, 193, 0.96));
  color: #7b3614;
  font-size: 0.86rem;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(73, 21, 11, 0.1);
}

.menu-section-tab.is-active {
  border-color: rgba(165, 41, 18, 0.48);
  background: linear-gradient(180deg, #b33618, #d44b1b);
  color: #ffe6ba;
  box-shadow: 0 10px 18px rgba(97, 22, 11, 0.18);
}

.order-card-panel {
  display: grid;
  gap: 12px;
}

.order-card-status {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d9ad6d;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 248, 229, 0.98), rgba(255, 230, 188, 0.96));
  box-shadow: 0 12px 24px rgba(61, 19, 10, 0.12);
}

.order-card-status div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-card-status span {
  color: #7d3b16;
  font-size: 0.88rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.order-card-status strong {
  color: #b73317;
  font-size: 1.05rem;
}

.order-card-grid {
  display: grid;
  gap: 14px;
}

.order-card-section {
  display: grid;
  gap: 10px;
}

.order-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e0a55b;
  border-radius: 8px;
  background: linear-gradient(90deg, #4f1e12, #7b2e16);
  color: #ffe8bb;
}

.order-section-head span {
  color: rgba(255, 234, 190, 0.76);
  font-size: 0.84rem;
}

.order-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-order-card-list {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.order-item-card {
  min-height: 96px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(220, 173, 108, 0.58);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(255, 245, 226, 0.98));
  box-shadow: 0 8px 16px rgba(62, 19, 11, 0.1);
}

.order-item-card.is-drink-card {
  border-color: rgba(211, 146, 64, 0.58);
  background: linear-gradient(180deg, rgba(255, 249, 236, 0.99), rgba(255, 238, 205, 0.98));
}

.order-item-card.is-market-card {
  border-color: rgba(196, 83, 35, 0.44);
  background: linear-gradient(180deg, rgba(255, 243, 237, 0.99), rgba(255, 226, 209, 0.96));
}

.order-item-card.is-search-hit {
  animation: searchHitPulse 1.05s ease;
  border-color: rgba(255, 108, 28, 0.92);
  box-shadow:
    0 0 0 3px rgba(255, 187, 86, 0.36),
    0 10px 18px rgba(62, 19, 11, 0.16);
}

@keyframes searchHitPulse {
  0% {
    transform: scale(1);
  }

  35% {
    transform: scale(1.018);
  }

  100% {
    transform: scale(1);
  }
}

.order-item-main {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 4px;
}

.order-item-title-row {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.order-item-name {
  min-width: 0;
  flex: 1 1 auto;
  color: #2f2119;
  font-size: 0.92rem;
  line-height: 1.18;
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.order-featured-pill {
  flex: 0 0 auto;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border: 1px solid rgba(222, 117, 33, 0.28);
  border-radius: 999px;
  background: rgba(255, 235, 194, 0.92);
  color: #b34616;
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.order-item-flags {
  gap: 4px;
}

.order-item-card .item-flag {
  min-height: 20px;
  padding: 0 6px;
  font-size: 0.66rem;
}

.order-card-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.order-item-price {
  color: #f05a24;
  font-size: 0.9rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.order-card-controls {
  display: grid;
  grid-template-columns: 26px 24px 32px;
  gap: 3px;
  align-items: center;
}

.order-step {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: #eee8df;
  color: #8a8177;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  touch-action: manipulation;
}

.order-step-plus {
  width: 32px;
  height: 32px;
  background: #17181d;
  color: #fff4d6;
  box-shadow: 0 6px 12px rgba(18, 18, 24, 0.2);
}

.order-step:disabled {
  cursor: not-allowed;
  opacity: 0.44;
}

.order-card-qty {
  color: #737983;
  text-align: center;
  font-weight: 900;
}

.order-custom-drink-card {
  grid-column: 1 / -1;
}

.admin-order-item-card {
  min-height: 0;
  grid-template-rows: auto auto auto;
}

.admin-order-people {
  display: grid;
  gap: 7px;
}

.admin-order-person-row {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid rgba(218, 166, 94, 0.42);
  border-radius: 8px;
  background: rgba(255, 249, 235, 0.78);
}

.admin-order-person-name {
  min-width: 0;
  color: #4a2a19;
  font-size: 0.9rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.admin-order-controls {
  grid-template-columns: 26px 58px 32px;
}

.admin-order-qty-input {
  width: 58px;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  padding: 4px;
  border-color: rgba(224, 116, 43, 0.72);
  background: rgba(255, 255, 252, 0.98);
  color: #3a2416;
  text-align: center;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 238, 202, 0.7);
}

.admin-order-foot {
  padding-top: 2px;
  border-top: 1px dashed rgba(190, 132, 62, 0.42);
}

.order-market-price-field {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(72px, 96px);
  gap: 6px;
  align-items: center;
  width: fit-content;
  padding: 5px 7px;
  border: 1px solid rgba(196, 83, 35, 0.42);
  border-radius: 8px;
  background: rgba(255, 237, 224, 0.82);
}

.order-market-price-field span {
  margin: 0;
  color: #bf4314;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.order-market-price-input {
  min-height: 34px;
  padding: 5px 7px;
  border-color: rgba(196, 83, 35, 0.72);
  background: rgba(255, 255, 252, 0.98);
  color: #7d2d13;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 238, 202, 0.7);
}

.admin-order-item-total {
  color: #12624e;
  font-size: 0.96rem;
}

.admin-custom-drink-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 94px;
  gap: 8px;
}

.admin-custom-drink-cell {
  display: grid;
  grid-template-columns: 54px 58px;
  gap: 6px;
  align-items: center;
}

.admin-custom-drink-cell .custom-drink-create {
  min-width: 58px;
  min-height: 30px;
  padding: 0 8px;
}

.order-drink-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(74px, 0.8fr) minmax(70px, 0.7fr) auto;
  gap: 8px;
  align-items: center;
}

.order-drink-create,
.custom-drink-create {
  width: auto;
  min-width: 58px;
  min-height: 34px;
  padding: 0 12px;
  font-weight: 900;
  white-space: nowrap;
}

.order-empty-state {
  grid-column: 1 / -1;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.ledger-table th,
.ledger-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: middle;
}

.ledger-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, #ffda8e, #f2b14f);
  color: var(--name);
  font-size: 0.9rem;
}

.ledger-table tr:last-child td {
  border-bottom: 0;
}

.ledger-table .name-col {
  width: 170px;
  color: #5c2412;
  font-weight: 850;
}

.item-label-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item-name-text {
  display: block;
}

.item-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.item-flag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
}

.item-flag-featured {
  background: linear-gradient(90deg, #7c1f10, #b93e18);
  color: #ffe7b6;
  box-shadow: 0 6px 12px rgba(124, 31, 16, 0.18);
}

.item-flag-booking {
  background: linear-gradient(90deg, #ffe9b5, #ffcf76);
  color: #774112;
}

.item-flag-drink {
  background: linear-gradient(90deg, #ffe7c7, #ffc37b);
  color: #7a340e;
}

.item-flag-market {
  background: linear-gradient(90deg, #ffe2d7, #ffb28e);
  color: #8d2b12;
}

.item-flag-custom {
  background: linear-gradient(90deg, #f6dcc9, #efb68a);
  color: #6f2e11;
}

.item-owner-note {
  color: var(--muted);
  font-size: 0.82rem;
}

.item-inline-actions {
  display: inline-flex;
  gap: 6px;
  margin-top: 4px;
}

.ledger-table .price-col,
.ledger-table .row-total {
  width: 100px;
  white-space: nowrap;
}

.ledger-table .price-col {
  color: var(--soft-text);
}

.qty-input {
  min-width: 76px;
  max-width: 96px;
  text-align: center;
}

.qty-control {
  display: inline-grid;
  grid-template-columns: 34px 72px 34px;
  gap: 6px;
  align-items: center;
}

.qty-step {
  width: 34px;
  height: 34px;
  border: 1px solid #e0a55d;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff4d6, #ffdfaa);
  color: var(--ember);
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1;
  touch-action: manipulation;
}

.qty-step:disabled,
.qty-input:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.qty-step:disabled {
  background: #f3eadb;
  color: var(--locked);
}

.qty-input:disabled {
  background: #f7f1e8;
  color: var(--locked);
  border-color: #e7dac5;
}

.qty-cell.is-locked::after {
  content: "锁定";
  margin-left: 8px;
  color: var(--locked);
  font-size: 0.78rem;
}

.qty-step:active {
  transform: translateY(1px);
}

.custom-drink-launcher-row .name-col {
  min-width: 180px;
}

.custom-drink-launcher-row .item-label-stack {
  gap: 8px;
}

.custom-drink-draft-name,
.custom-drink-draft-price {
  width: 100%;
}

.custom-drink-price-cell {
  min-width: 92px;
}

.custom-drink-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.custom-drink-create {
  min-width: 84px;
  width: 100%;
}

.row-total {
  color: var(--mint);
  font-weight: 800;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 251, 241, 0.98), rgba(255, 238, 205, 0.94));
  box-shadow: 0 10px 22px rgba(87, 35, 16, 0.08);
  position: relative;
  overflow: hidden;
}

.summary-card::before,
.summary-card::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(196, 139, 75, 0.18);
}

.summary-card::before {
  left: -7px;
}

.summary-card::after {
  right: -7px;
}

.summary-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.summary-card h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--name);
  overflow-wrap: anywhere;
  letter-spacing: 0.02em;
}

.summary-card strong {
  color: #b63a1a;
}

.battle-title {
  display: grid;
  gap: 6px;
}

.summary-rank-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #5a2113, #8d3118);
  color: #ffe2ae;
  font-size: 0.72rem;
  font-weight: 900;
}

.battle-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.battle-stats span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 230, 182, 0.72);
  color: #7a4b1f;
  font-size: 0.76rem;
  font-weight: 800;
}

.battle-card-top {
  border-color: #e0b25f;
}

.battle-card-rank-1 .summary-rank-badge {
  background: linear-gradient(90deg, #8e3e13, #d45d1f);
}

.battle-card-rank-2 .summary-rank-badge {
  background: linear-gradient(90deg, #6d4b29, #b1824d);
}

.battle-card-rank-3 .summary-rank-badge {
  background: linear-gradient(90deg, #734d25, #a96f33);
}

.detail-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px dashed #d8ad72;
  color: var(--muted);
  font-size: 0.92rem;
}

.detail-line span:first-child {
  color: var(--soft-text);
}

.detail-line span:last-child {
  color: var(--name);
  font-weight: 800;
}

.detail-line span:first-child {
  overflow-wrap: anywhere;
}

.detail-line.is-drink-detail {
  background: linear-gradient(90deg, rgba(255, 233, 181, 0.55), rgba(255, 205, 120, 0.18));
  border-radius: 8px;
  padding: 9px 10px;
  margin-top: 6px;
  border-top: 1px solid rgba(209, 140, 43, 0.45);
}

.detail-line.is-drink-detail span:first-child {
  color: #8a3f14;
  font-weight: 700;
}

.detail-line.is-drink-detail span:last-child {
  color: #9f2417;
}

.detail-line.is-market-detail {
  background: linear-gradient(90deg, rgba(255, 224, 215, 0.72), rgba(255, 187, 150, 0.24));
  border-radius: 8px;
  padding: 9px 10px;
  margin-top: 6px;
  border-top: 1px solid rgba(188, 84, 34, 0.48);
  border-left: 4px solid #c74d1b;
}

.detail-line.is-market-detail span:first-child {
  color: #973012;
  font-weight: 800;
}

.detail-line.is-market-detail span:last-child {
  color: #b73317;
  font-weight: 900;
}

.summary-grand-card {
  background: linear-gradient(180deg, #fff7e4, #ffe8bc);
  border-color: #e0bf77;
}

.summary-grand-card strong {
  color: #b1231b;
}

.summary-grand-note {
  border-top-style: solid;
  color: var(--name);
}

.summary-grand-note span:first-child,
.summary-grand-note span:last-child {
  color: var(--name);
  font-weight: 900;
}

.empty-state {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(255, 246, 227, 0.72), rgba(255, 235, 194, 0.6));
  border: 1px dashed #d6a868;
  border-radius: 8px;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--charcoal);
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100% - 20px, 680px);
    padding-top: 10px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .total-panel {
    width: 100%;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .table-gate-grid {
    grid-template-columns: 1fr;
  }

  .entry-grid {
    grid-template-columns: 1fr;
  }

  .admin-fab {
    right: 14px;
    bottom: 14px;
    width: 48px;
    height: 60px;
  }

  .search-fab {
    right: 14px;
    bottom: 86px;
    width: 46px;
    height: 46px;
  }

  .menu-search-sheet {
    top: 84px;
    width: calc(100vw - 20px);
  }

  .menu-search-card {
    padding: 12px;
    border-radius: 10px;
  }

  .menu-search-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .menu-search-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .menu-search-field input {
    margin-top: 4px;
  }

  .action-toast {
    bottom: 18px;
    min-width: min(88vw, 320px);
    font-size: 0.88rem;
  }

  .setup-panel {
    display: flex;
    flex-direction: column;
  }

  .menu-section-tabs {
    position: sticky;
    top: 10px;
    z-index: 5;
    margin-bottom: 10px;
    padding: 6px 2px 8px;
    background: linear-gradient(180deg, rgba(250, 241, 221, 0.96), rgba(250, 241, 221, 0.8));
    backdrop-filter: blur(4px);
  }

  .menu-section-tab {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.84rem;
  }

  .menu-block .list {
    max-height: 330px;
    overflow-y: auto;
    padding-right: 3px;
  }

  .wechat-admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  body {
    background-attachment: scroll;
    background-size: 460px auto;
  }

  .app-shell {
    width: min(100% - 12px, 440px);
  }

  .hero {
    min-height: 150px;
    gap: 14px;
    padding: 18px;
  }

  h1 {
    font-size: 2.6rem;
  }

  .subtitle {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .total-panel {
    padding: 13px;
  }

  .setup-panel,
  .ledger-panel,
  .table-gate,
  .entry-gate,
  .admin-panel {
    padding: 12px;
  }

  .table-form,
  .single-form {
    grid-template-columns: 1fr;
  }

  .wechat-admin-form {
    grid-template-columns: 1fr;
  }

  .wechat-user-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .wechat-user-action {
    grid-column: 2;
    justify-self: start;
    min-width: 108px;
  }

  .diner-table-card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .diner-table-card {
    min-height: 96px;
    padding: 10px;
  }

  .diner-table-card strong {
    font-size: 0.96rem;
  }

  .table-form .secondary-button,
  .table-form .icon-button {
    width: 100%;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .table-toolbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .table-toolbar .compact-button {
    width: 100%;
  }

  .table-card {
    grid-template-columns: 1fr;
  }

  .table-card .compact-button {
    width: 100%;
  }

  .table-card-actions {
    grid-template-columns: 1fr;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .panel-actions {
    grid-template-columns: 1fr;
  }

  .menu-panel {
    padding: 12px;
  }

  .menu-panel .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-button {
    width: 100%;
  }

  .menu-editor .inline-form {
    grid-template-columns: 1fr;
  }

  .menu-editor .inline-form .icon-button {
    width: 100%;
  }

  .list-row.editable-item {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .list-row.editable-item.menu-item-card {
    grid-template-columns: 1fr;
  }

  .item-price-edit,
  .item-market-toggle,
  .item-category-edit,
  .menu-order-buttons,
  .list-row.editable-item .danger-tiny {
    grid-column: 2;
  }

  .menu-item-card .item-price-edit,
  .menu-item-card .item-market-toggle,
  .menu-item-card .item-category-edit,
  .menu-item-card .menu-order-buttons,
  .menu-item-card .danger-tiny {
    grid-column: auto;
  }

  .menu-order-buttons {
    grid-template-columns: 1fr 1fr;
  }

  .section-title.wide {
    margin-bottom: 10px;
  }

  .section-title.wide p {
    font-size: 0.9rem;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .ledger-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .ledger-table th {
    top: 54px;
  }

  .order-card-status {
    top: 54px;
  }

  .order-card-list {
    gap: 6px;
  }

  .admin-order-card-list {
    grid-template-columns: 1fr;
  }

  .order-item-card {
    min-height: 90px;
    gap: 6px;
    padding: 8px;
  }

  .order-item-title-row {
    gap: 5px;
  }

  .order-item-name {
    font-size: 0.88rem;
  }

  .order-featured-pill {
    min-height: 18px;
    padding: 0 5px;
    font-size: 0.62rem;
  }

  .order-item-card .item-flag {
    min-height: 18px;
    padding: 0 5px;
    font-size: 0.62rem;
  }

  .order-card-foot {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px;
    align-items: center;
  }

  .order-item-price {
    font-size: 0.86rem;
  }

  .order-card-controls {
    grid-template-columns: 24px 22px 30px;
    justify-self: end;
  }

  .admin-order-controls {
    grid-template-columns: 24px 54px 30px;
  }

  .admin-order-person-row {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 6px 7px;
  }

  .admin-order-qty-input {
    width: 54px;
  }

  .order-market-price-field {
    grid-template-columns: auto minmax(68px, 88px);
  }

  .order-step {
    width: 24px;
    height: 24px;
    font-size: 16px;
  }

  .order-step-plus {
    width: 30px;
    height: 30px;
  }

  .order-drink-form {
    grid-template-columns: 1fr 0.72fr;
  }

  .order-drink-create {
    grid-column: 1 / -1;
    width: 100%;
  }

  .ledger-table thead {
    display: none;
  }

  .ledger-table,
  .ledger-table tbody,
  .ledger-table tr,
  .ledger-table td {
    display: block;
    width: 100%;
  }

  .ledger-table tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(83, 25, 18, 0.08);
    overflow: hidden;
  }

  .ledger-table .menu-group-row {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .ledger-table td {
    border-bottom: 1px solid #f0dfba;
    padding: 9px 12px;
  }

  .ledger-table tr:last-child td,
  .ledger-table td:last-child {
    border-bottom: 0;
  }

  .ledger-table .name-col {
    width: 100%;
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--name);
    background: #fff6df;
  }

  .ledger-table .price-col {
    width: 100%;
    color: var(--muted);
  }

  .ledger-table .price-col::before {
    content: "单价";
    margin-right: 10px;
    color: var(--muted);
    font-size: 0.86rem;
  }

  .ledger-table .qty-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .ledger-table .qty-cell::before {
    content: attr(data-label);
    min-width: 0;
    color: var(--name);
    font-weight: 800;
    overflow-wrap: anywhere;
  }

  .ledger-table .qty-cell.is-locked::before {
    color: var(--soft-text);
  }

  .qty-cell.is-locked::after {
    content: none;
  }

  .qty-control {
    grid-template-columns: 40px 62px 40px;
    gap: 5px;
  }

  .custom-drink-cell {
    gap: 5px;
  }

  .qty-step {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .qty-input {
    min-width: 62px;
    max-width: 62px;
    min-height: 40px;
    padding: 6px;
  }

  .ledger-table .row-total {
    width: 100%;
    display: flex;
    justify-content: space-between;
    background: #fffaf0;
  }

  .ledger-table .row-total::before {
    content: "小计";
    color: var(--muted);
    font-weight: 700;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }
}

