:root {
  --gold: #c9a35c;
  --gold-2: #e5c382;
  --gold-dim: rgba(201, 163, 92, .28);
  --bg: #0c0b09;
  --panel: #161410;
  --panel-2: #1d1a14;
  --line: rgba(201, 163, 92, .22);
  --text: #f0e9db;
  --muted: #a29880;
  --red: #b3402f;
  --green: #7d9b6a;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  background-image: linear-gradient(rgba(12, 11, 9, .86), rgba(12, 11, 9, .94)), url("../yunjin-ordering/images/hero-bg.png");
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
  padding-bottom: 110px;
}
body.locked { overflow: hidden; }
button { font-family: var(--sans); cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: var(--sans); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 28px;
  background: rgba(12, 11, 9, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.brand .name { font-family: var(--serif); font-size: 26px; letter-spacing: 6px; color: var(--gold-2); white-space: nowrap; }
.brand .sub { font-size: 10px; letter-spacing: 3px; color: var(--muted); white-space: nowrap; }
.top-spacer { flex: 1; }
.table-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  color: var(--text);
  background: var(--panel);
  transition: border-color .2s;
  white-space: nowrap;
}
.table-pill:hover { border-color: var(--gold); }
.table-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.table-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  display: none;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .6);
  z-index: 70;
}
.table-menu.open { display: block; }
.table-menu button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  padding: 11px 16px;
  font-size: 14px;
  color: var(--text);
}
.table-menu button small {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.table-menu button:hover { background: rgba(201, 163, 92, .12); color: var(--gold-2); }
.dine-time { font-size: 12px; color: var(--muted); letter-spacing: 1px; white-space: nowrap; }
.dine-time b { color: var(--gold-2); font-weight: 600; }
.call-waiter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--gold-dim);
  color: var(--gold-2);
  font-size: 14px;
  letter-spacing: 1px;
  transition: all .2s;
  white-space: nowrap;
}
.call-waiter:hover { background: rgba(201, 163, 92, .14); }
.call-waiter.rang { animation: ring .5s ease; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(8deg); } 75% { transform: rotate(-8deg); } }
.menu-btn {
  width: 42px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all .2s;
}
.menu-btn span {
  width: 15px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  display: block;
}
.menu-btn:hover { border-color: var(--gold-dim); color: var(--gold-2); background: rgba(201, 163, 92, .08); }

.catnav {
  position: sticky;
  top: 63px;
  z-index: 55;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 12px 28px;
  background: rgba(12, 11, 9, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 163, 92, .12);
}
.catnav::-webkit-scrollbar { display: none; }
.catnav button {
  position: relative;
  padding: 8px 16px;
  font-size: 15px;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: 1px;
  transition: color .2s;
  flex-shrink: 0;
}
.catnav button:hover { color: var(--text); }
.catnav button.active { color: var(--gold-2); }
.catnav button.active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.badge {
  display: inline-block;
  margin-left: 4px;
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 9px;
  background: var(--gold);
  color: #181510;
  font-size: 11px;
  font-weight: 700;
  vertical-align: 2px;
}

.wrap { max-width: 1240px; margin: 0 auto; padding: 26px 28px 40px; user-select: none; -webkit-user-select: none; }
.wrap img { -webkit-user-drag: none; }
.section-tip { display: flex; align-items: baseline; gap: 12px; margin: 6px 0 20px; }
.section-tip h2 { font-family: var(--serif); font-size: 20px; letter-spacing: 4px; color: var(--gold-2); font-weight: 600; }
.section-tip span { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.section-tip .hint { margin-left: auto; font-size: 11px; color: rgba(201, 163, 92, .55); letter-spacing: 2px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; will-change: transform, opacity; }
.grid.n1 { grid-template-columns: minmax(300px, 880px); }
.grid.n1 .card { display: grid; grid-template-columns: 46% 54%; }
.grid.n1 .card .pic { aspect-ratio: auto; min-height: 320px; }
.grid.n2 { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
.grid.n3 { grid-template-columns: repeat(3, minmax(240px, 1fr)); }
.card {
  background: var(--panel);
  border: 1px solid rgba(201, 163, 92, .14);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); border-color: var(--gold-dim); box-shadow: 0 20px 44px rgba(0, 0, 0, .5); }
.card.sold-out { opacity: .56; }
.card.sold-out:hover { transform: none; box-shadow: none; }
.card .pic { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: #0a0908; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.13); transition: transform .5s; }
.card:hover .pic img { transform: scale(1.19); }
.card .tags { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; z-index: 2; }
.tag { padding: 3px 9px; border-radius: 6px; font-size: 11px; letter-spacing: 1px; line-height: 1.4; }
.tag.gold { background: linear-gradient(135deg, #d9b878, #b78f45); color: #1a160f; font-weight: 700; }
.tag.red { background: rgba(179, 64, 47, .92); color: #fff; }
.tag.line { background: rgba(12, 11, 9, .66); border: 1px solid var(--gold-dim); color: var(--gold-2); }
.card .body { padding: 14px 16px 16px; }
.card .row1 { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card .nm { font-family: var(--serif); font-size: 17px; letter-spacing: 1px; color: var(--text); }
.price { color: var(--gold-2); font-size: 17px; font-weight: 700; white-space: nowrap; }
.price i { font-style: normal; font-size: 12px; margin-right: 1px; }
.card .ds {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  letter-spacing: .5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .row2 { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.flags { display: flex; gap: 6px; flex-wrap: wrap; }
.flag { font-size: 11px; color: var(--muted); border: 1px solid rgba(255, 255, 255, .14); padding: 2px 7px; border-radius: 5px; }
.flag.spicy { color: #d98a7a; border-color: rgba(179, 64, 47, .5); }
.addbtn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-dim);
  color: var(--gold-2);
  font-size: 20px;
  line-height: 1;
  transition: all .2s;
}
.addbtn:hover { background: var(--gold); color: #181510; transform: scale(1.08); }
.addbtn:disabled { opacity: .45; cursor: not-allowed; transform: none; background: transparent; color: var(--muted); }
.addbtn-wrap { position: relative; }
.incart {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.sold-chip {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(5, 4, 3, .74);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #d9d0be;
  font-size: 12px;
  letter-spacing: 1px;
}

.page-arrow {
  position: fixed;
  top: 47%;
  transform: translateY(-50%);
  z-index: 50;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(22, 19, 14, .88);
  border: 1px solid var(--line);
  color: var(--gold-2);
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
  opacity: .45;
  transition: opacity .2s, transform .15s;
  backdrop-filter: blur(8px);
  padding-bottom: 3px;
}
.page-arrow:hover { opacity: 1; }
.page-arrow:active { transform: translateY(-50%) scale(.92); }
.page-arrow.left { left: 16px; }
.page-arrow.right { right: 16px; }
.page-arrow.hidden { opacity: 0; pointer-events: none; }

.cartbar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 80;
  width: min(1240px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 20px;
  border-radius: 18px;
  background: rgba(22, 19, 14, .96);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .65);
}
.cart-ico {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(201, 163, 92, .1);
  border: 1px solid var(--gold-dim);
  color: var(--gold-2);
  flex-shrink: 0;
}
.cart-ico.bump { animation: bump .4s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
.cart-ico .n {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.cart-sum { flex: 1; min-width: 0; }
.cart-sum .t1 { font-size: 13px; color: var(--muted); }
.cart-sum .t2 { font-size: 20px; color: var(--gold-2); font-weight: 700; }
.cart-sum .t2 i { font-style: normal; font-size: 12px; }
.bar-btn {
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 15px;
  letter-spacing: 2px;
  transition: all .2s;
  white-space: nowrap;
}
.bar-btn.ghost { border: 1px solid var(--line); color: var(--text); }
.bar-btn.ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.bar-btn.solid { background: linear-gradient(135deg, #d9b878, #b78f45); color: #181510; font-weight: 700; }
.bar-btn.solid:hover { filter: brightness(1.08); }
.bar-btn.solid:disabled { opacity: .35; cursor: not-allowed; filter: none; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 4, 3, .72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  animation: fade .22s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: min(880px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
  animation: pop .28s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.dtl-wrap { position: relative; }
.dtl { display: grid; grid-template-columns: 1fr 1fr; }
.dtl .pic { position: relative; min-height: 100%; overflow: hidden; }
.dtl .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.13); }
.dtl .info { padding: 26px 28px 24px; }
.dtl .nm { font-family: var(--serif); font-size: 24px; letter-spacing: 2px; color: var(--text); }
.dtl .price { color: var(--gold-2); font-size: 22px; font-weight: 700; margin-top: 6px; }
.dtl .ds { margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.8; }
.dtl .reco {
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px dashed var(--gold-dim);
  border-radius: 10px;
  font-size: 12px;
  color: var(--gold-2);
  letter-spacing: .5px;
  background: rgba(201, 163, 92, .06);
}
.opt-group { margin-top: 18px; }
.opt-title { font-size: 13px; color: var(--muted); letter-spacing: 2px; margin-bottom: 10px; }
.opt-title b { color: var(--red); font-weight: 400; }
.opts { display: flex; flex-wrap: wrap; gap: 9px; }
.opt {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  font-size: 14px;
  color: var(--text);
  transition: all .18s;
  background: rgba(255, 255, 255, .02);
}
.opt small { color: var(--muted); margin-left: 4px; font-size: 12px; }
.opt:hover { border-color: var(--gold-dim); }
.opt.sel { border-color: var(--gold); color: var(--gold-2); background: rgba(201, 163, 92, .12); }
.remark-input {
  width: 100%;
  margin-top: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .14);
  color: var(--text);
  outline: none;
}
.remark-input:focus { border-color: var(--gold-dim); }
.dtl-foot { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.stepper button { width: 40px; height: 40px; font-size: 19px; color: var(--gold-2); transition: background .15s; }
.stepper button:hover { background: rgba(201, 163, 92, .12); }
.stepper .qv { width: 36px; text-align: center; font-size: 16px; }
.cart-cta {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  height: 46px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d9b878, #b78f45);
  color: #181510;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  transition: filter .2s, transform .15s;
}
.cart-cta:hover { filter: brightness(1.08); }
.close-x {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(10, 9, 7, .66);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 16px;
  display: grid;
  place-items: center;
  transition: all .2s;
}
.close-x:hover { border-color: var(--gold); color: var(--gold-2); }
.close-x.static { position: static; flex-shrink: 0; }

.settings-panel {
  width: min(980px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
  animation: pop .28s cubic-bezier(.2, .9, .3, 1.2);
}
.settings-panel.orders-panel {
  width: min(1120px, 100%);
}
.admin-body {
  display: grid;
  grid-template-columns: 166px minmax(0, 1fr);
  min-height: 0;
  flex: 1;
}
.admin-nav {
  padding: 12px;
  border-right: 1px solid rgba(201, 163, 92, .14);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-nav button {
  padding: 12px 14px;
  border-radius: 10px;
  text-align: left;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 1px;
}
.admin-nav button:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.admin-nav button.active { background: rgba(201, 163, 92, .12); color: var(--gold-2); }
.admin-content {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(201, 163, 92, .14);
}
.settings-head h3 {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 4px;
  color: var(--gold-2);
  font-weight: 600;
}
.settings-head p {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
}
.dish-settings-grid {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 0;
  height: 100%;
}
.dish-list {
  max-height: calc(92vh - 86px);
  overflow-y: auto;
  padding: 12px;
  border-right: 1px solid rgba(201, 163, 92, .14);
}
.dish-list .add-dish-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-template-columns: none;
  gap: 0;
  height: 44px;
  margin-bottom: 10px;
  border: 1px dashed var(--gold-dim);
  background: rgba(201, 163, 92, .06);
  color: var(--gold-2);
}
.dish-list .add-dish-btn:hover { background: rgba(201, 163, 92, .12); }
.dish-list button {
  width: 100%;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 10px;
  color: var(--text);
  text-align: left;
}
.dish-list button:hover { background: rgba(255, 255, 255, .04); }
.dish-list button.active { background: rgba(201, 163, 92, .12); color: var(--gold-2); }
.dish-list img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}
.dish-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.dish-list em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  padding: 2px 7px;
}
.settings-form {
  max-height: calc(92vh - 86px);
  overflow-y: auto;
  padding: 18px 22px 22px;
}
.settings-form.wide {
  max-height: none;
  height: calc(92vh - 86px);
}
.settings-preview {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed rgba(201, 163, 92, .16);
}
.settings-preview img {
  width: 96px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
}
.settings-preview strong {
  display: block;
  font-family: var(--serif);
  color: var(--gold-2);
  font-size: 20px;
  letter-spacing: 2px;
}
.settings-preview span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}
.settings-form label {
  display: block;
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
}
.settings-form input,
.settings-form select,
.settings-form textarea {
  width: 100%;
  margin-top: 7px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  outline: none;
  font-size: 14px;
}
.settings-form select option { background: #1d1a14; color: var(--text); }
.settings-form textarea { resize: vertical; line-height: 1.6; }
.settings-form input:focus,
.settings-form select:focus,
.settings-form textarea:focus { border-color: var(--gold-dim); }
.image-editor-wrap,
.tag-editor-wrap,
.spec-editor-wrap {
  margin-top: 13px;
}
.category-editor-head,
.table-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
}
.category-editor-head span,
.table-editor-head span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
}
.category-editor-head .bar-btn,
.table-editor-head .bar-btn {
  padding: 8px 12px;
  font-size: 12px;
  letter-spacing: 1px;
}
.category-editor-list,
.table-editor-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.category-row,
.table-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
}
.category-row span,
.table-row span {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.tag-editor-head,
.spec-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.tag-editor-head label,
.spec-editor-head label {
  margin-top: 0;
}
.tag-editor-head .bar-btn,
.spec-editor-head .bar-btn {
  padding: 8px 12px;
  font-size: 12px;
  letter-spacing: 1px;
}
.image-editor-list,
.tag-editor-list,
.spec-editor-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.image-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
}
.image-thumb {
  width: 72px;
  height: 54px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
  display: grid;
  place-items: center;
}
.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-thumb span {
  color: var(--muted);
  font-size: 12px;
}
.image-row input {
  margin-top: 0;
}
.tag-row,
.spec-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 34px;
  gap: 8px;
  align-items: center;
}
.tag-row {
  grid-template-columns: minmax(0, 1fr) 34px;
}
.category-row input,
.table-row input {
  margin-top: 0;
}
.tag-row input,
.spec-row input {
  margin-top: 0;
}
.spec-del {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}
.spec-del:hover { color: var(--red); border-color: rgba(179, 64, 47, .5); background: rgba(179, 64, 47, .08); }
.empty-spec {
  padding: 14px 12px;
  border: 1px dashed rgba(201, 163, 92, .22);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
}
.orders-panel .orders-view {
  max-height: calc(92vh - 86px);
}
.form-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
}
.settings-form .switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  color: var(--text);
}
.switch-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--gold);
}
.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(201, 163, 92, .14);
}
.settings-actions.compact {
  margin-top: 12px;
  padding-top: 0;
  border-top: none;
}
.settings-divider {
  margin: 22px 0 18px;
  border-top: 1px solid rgba(201, 163, 92, .14);
}
.table-config h4 {
  font-family: var(--serif);
  color: var(--gold-2);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 3px;
}
.category-config h4 {
  font-family: var(--serif);
  color: var(--gold-2);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 3px;
}
.table-config p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
}
.category-config p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
}
.table-config textarea {
  width: 100%;
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  outline: none;
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
}
.table-config textarea:focus { border-color: var(--gold-dim); }

.orders-view {
  max-height: calc(92vh - 86px);
  overflow-y: auto;
  padding: 18px 22px 22px;
}
.orders-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.orders-summary > div {
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .03);
}
.orders-summary span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.orders-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
  color: var(--gold-2);
}
.order-card {
  border: 1px solid rgba(201, 163, 92, .14);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, .02);
  margin-bottom: 12px;
}
.order-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.order-card-head strong {
  display: block;
  color: var(--gold-2);
  font-size: 18px;
  letter-spacing: 2px;
}
.order-card-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.order-card-head em {
  font-style: normal;
  color: var(--gold-2);
  font-size: 18px;
  font-weight: 700;
}

.drawer-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(5, 4, 3, .6); animation: fade .2s ease; }
.drawer {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 0);
  z-index: 95;
  width: min(760px, 100%);
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .6);
  animation: slideup .26s cubic-bezier(.3, .9, .3, 1);
}
@keyframes slideup { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 14px; border-bottom: 1px solid rgba(201, 163, 92, .14); }
.drawer-head h3 { font-family: var(--serif); font-size: 18px; letter-spacing: 3px; color: var(--gold-2); font-weight: 600; }
.drawer-head .clear { font-size: 13px; color: var(--muted); letter-spacing: 1px; }
.drawer-head .clear:hover { color: var(--red); }
.drawer-list { overflow-y: auto; padding: 6px 22px; }
.cline { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed rgba(201, 163, 92, .14); align-items: center; }
.cline:last-child { border-bottom: none; }
.cline .thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.cline img { width: 64px; height: 64px; object-fit: cover; transform: scale(1.12); }
.cline .cinfo { flex: 1; min-width: 0; }
.cline .cnm { font-size: 15px; color: var(--text); letter-spacing: .5px; }
.cline .csub { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.cline .cright { text-align: right; flex-shrink: 0; }
.cline .cprice { font-size: 15px; color: var(--gold-2); font-weight: 700; margin-bottom: 8px; }
.cline .ops { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.mini-step { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.mini-step button { width: 28px; height: 28px; font-size: 15px; color: var(--gold-2); }
.mini-step span { width: 26px; text-align: center; font-size: 13px; }
.del { color: var(--muted); font-size: 13px; padding: 4px; }
.del:hover { color: var(--red); }
.drawer-foot { padding: 16px 22px 20px; border-top: 1px solid rgba(201, 163, 92, .14); display: flex; align-items: center; gap: 14px; }
.drawer-foot .tot { flex: 1; }
.drawer-foot .tot .a { font-size: 12px; color: var(--muted); }
.drawer-foot .tot .b { font-size: 22px; color: var(--gold-2); font-weight: 700; }
.drawer-foot .tot .b i { font-style: normal; font-size: 12px; }
.empty-cart { padding: 44px 0; text-align: center; color: var(--muted); font-size: 14px; letter-spacing: 2px; }

.panel {
  width: min(640px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
  animation: pop .28s cubic-bezier(.2, .9, .3, 1.2);
}
.panel h3 { font-family: var(--serif); font-size: 20px; letter-spacing: 4px; color: var(--gold-2); font-weight: 600; text-align: center; }
.panel .p-sub { text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; letter-spacing: 1px; }
.pline { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed rgba(201, 163, 92, .16); font-size: 14px; }
.pline .pn { flex: 1; min-width: 0; }
.pline .pn .s { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.pline .pq { color: var(--muted); white-space: nowrap; }
.pline .pp { color: var(--gold-2); font-weight: 600; white-space: nowrap; }
.sumrow { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.sumrow .k { font-size: 14px; color: var(--muted); letter-spacing: 2px; }
.sumrow .v { font-size: 26px; color: var(--gold-2); font-weight: 700; }
.sumrow .v i { font-style: normal; font-size: 13px; }
.panel-btns { display: flex; gap: 12px; margin-top: 22px; }
.panel-btns .bar-btn { flex: 1; text-align: center; padding: 14px; }
.status-chip { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 11px; letter-spacing: 1px; margin-left: 8px; vertical-align: 1px; }
.status-chip.added { background: rgba(179, 64, 47, .13); border: 1px solid rgba(179, 64, 47, .44); color: #d98a7a; }
.status-chip.doing { background: rgba(201, 163, 92, .14); border: 1px solid var(--gold-dim); color: var(--gold-2); }
.status-chip.done { background: rgba(125, 155, 106, .14); border: 1px solid rgba(125, 155, 106, .4); color: #a8c496; }
.ok-ico {
  width: 64px;
  height: 64px;
  margin: 6px auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(201, 163, 92, .12);
  border: 1px solid var(--gold);
  color: var(--gold-2);
  font-size: 28px;
  animation: pop .5s cubic-bezier(.2, .9, .3, 1.3);
}
.toast {
  position: fixed;
  left: 50%;
  top: 84px;
  transform: translate(-50%, 0);
  z-index: 200;
  padding: 12px 24px;
  border-radius: 999px;
  background: rgba(22, 19, 14, .96);
  border: 1px solid var(--gold-dim);
  color: var(--gold-2);
  font-size: 14px;
  letter-spacing: 1px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
  white-space: nowrap;
}

@media (max-width: 860px) {
  .dtl { grid-template-columns: 1fr; }
  .dtl .pic { aspect-ratio: 16 / 10; min-height: 0; }
  .brand .sub, .dine-time { display: none; }
  .brand .name { font-size: 21px; letter-spacing: 3px; }
  .topbar { padding: 12px 16px; gap: 10px; }
  .catnav { top: 57px; padding: 10px 16px; }
  .wrap { padding: 20px 16px 30px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
  .grid.n1, .grid.n2, .grid.n3 { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
  .grid.n1 .card { grid-template-columns: 1fr; }
  .grid.n1 .card .pic { aspect-ratio: 3 / 2; min-height: 0; }
  .bar-btn { padding: 12px 14px; font-size: 13px; letter-spacing: 1px; }
  .cart-sum .t2 { font-size: 17px; }
  .page-arrow { width: 40px; height: 40px; font-size: 22px; opacity: .35; }
  .page-arrow.left { left: 8px; }
  .page-arrow.right { right: 8px; }
  .section-tip .hint { display: none; }
  .menu-btn { width: 38px; height: 36px; }
  .admin-body { grid-template-columns: 1fr; }
  .admin-nav {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: none;
    border-bottom: 1px solid rgba(201, 163, 92, .14);
  }
  .admin-nav button { flex: 0 0 auto; }
  .dish-settings-grid { grid-template-columns: 1fr; }
  .dish-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid rgba(201, 163, 92, .14);
  }
  .dish-list button {
    width: 178px;
    flex: 0 0 178px;
  }
  .settings-form,
  .orders-view,
  .settings-form.wide { max-height: calc(92vh - 174px); padding: 16px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .settings-actions { flex-direction: column; }
  .settings-actions .bar-btn { width: 100%; }
  .orders-summary { grid-template-columns: 1fr; }
  .image-row { grid-template-columns: 58px minmax(0, 1fr) 34px; }
  .image-thumb { width: 58px; height: 46px; }
  .tag-row { grid-template-columns: minmax(0, 1fr) 34px; }
  .spec-row { grid-template-columns: minmax(0, 1fr) 100px 34px; }
}
