:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #f4f1ea;
  --ink: #191b18;
  --muted: #74786f;
  --line: #e7e2d7;
  --green: #17724f;
  --green-2: #e8f5ee;
  --red: #d94a31;
  --red-2: #fff0ec;
  --amber: #c77612;
  --amber-2: #fff4dd;
  --blue: #22718d;
  --blue-2: #e8f5fa;
  --brand: #ffd238;
  --brand-2: #fff6c9;
  --brand-dark: #201a07;
  --shadow: 0 18px 42px rgba(43, 36, 21, .13);
  --radius: 8px;
  --food: url("./assets/food-collage.png");
  --farm: url("./assets/farm-cherish-food-hero.png");
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
.public-test-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 36px;
  padding: 8px 14px;
  border-bottom: 1px solid #e6c36a;
  background: #fff4dd;
  color: #76500d;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
}
.public-test-banner strong { font-weight: 800; }
.public-test-banner .public-test-boundary { display: block; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% -10%, rgba(255, 210, 56, .22), transparent 26%),
    linear-gradient(180deg, #fffdf5, var(--bg));
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button {
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}
button:disabled {
  cursor: not-allowed;
  opacity: .58;
  box-shadow: none;
}
button:active {
  transform: translateY(1px) scale(.985);
}
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
input, select { height: 38px; padding: 0 10px; }
textarea { min-height: 84px; padding: 10px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  border-color: rgba(47,123,74,.55);
  box-shadow: 0 0 0 3px rgba(47,123,74,.09);
}

.shell {
  min-height: 100vh;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.topbar {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(35,43,32,.07);
  backdrop-filter: blur(10px);
}
body.merchant-alerting .topbar {
  box-shadow: 0 0 0 3px rgba(255, 210, 56, .52), 0 12px 34px rgba(35,43,32,.12);
}
.brand, .top-actions, .shop-line, .status-line, .section-head, .card-head, .panel-title, .order-actions, .metric-top {
  display: flex;
  align-items: center;
}
.brand { gap: 10px; min-width: 0; }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.brand-mark svg, button svg { width: 18px; height: 18px; stroke-width: 2.1; }
.fallback-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
  font-style: normal;
  font-weight: 700;
}
.brand-copy { min-width: 0; }
.brand-copy strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-copy span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.top-actions {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.mode-btn, .primary-btn, .ghost-btn, .text-btn, .icon-btn, .danger-btn {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  background: #fff;
  color: var(--ink);
}
.mode-btn {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}
.mode-btn.active {
  background: var(--green-2);
  color: var(--green);
  border-color: rgba(47,123,74,.25);
  box-shadow: inset 0 0 0 1px rgba(47,123,74,.08);
}
.primary-btn {
  color: var(--brand-dark);
  background: linear-gradient(180deg, #ffd84c, #ffc526);
  border-color: #e3b415;
  font-weight: 850;
  box-shadow: 0 7px 14px rgba(255,198,38,.22);
}
.primary-btn:hover {
  background: linear-gradient(180deg, #ffe06d, #ffca29);
}
.ghost-btn {
  border-color: var(--line);
  background: rgba(255,255,255,.94);
}
.ghost-btn:hover,
.icon-btn:hover {
  border-color: rgba(23,114,79,.25);
  color: var(--green);
  box-shadow: 0 6px 13px rgba(43,36,21,.06);
}
.ghost-btn:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: .55;
}
.danger-btn {
  color: var(--red);
  background: var(--red-2);
  border-color: rgba(196,75,56,.2);
}
.text-btn {
  min-height: 30px;
  color: var(--green);
  background: transparent;
  border: 0;
  padding: 0 6px;
  font-weight: 750;
}
.icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-color: var(--line);
}
.full { width: 100%; }

.workspace {
  display: grid;
  grid-template-columns: minmax(360px, 420px) minmax(720px, 1fr);
  gap: 14px;
  align-items: start;
}
.student-pane {
  position: sticky;
  top: 16px;
  display: flex;
  justify-content: center;
}
.phone-frame {
  width: 390px;
  height: min(830px, calc(100vh - 92px));
  min-height: 650px;
  padding: 10px;
  border-radius: 28px;
  background: #101410;
  border: 1px solid #232923;
  box-shadow: var(--shadow);
}
.student-app {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #f7f5ef;
  border-radius: 20px;
  position: relative;
}
.student-head {
  flex: 0 0 auto;
  padding: 13px 15px 12px;
  background:
    linear-gradient(180deg, rgba(255,246,201,.75), rgba(255,255,255,.96) 58%),
    #fff;
  border-bottom: 1px solid var(--line);
}
.status-line {
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}
.shop-line {
  justify-content: space-between;
  gap: 10px;
}
.shop-line h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 800;
}
.shop-line p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.student-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 10px 16px;
  scrollbar-width: thin;
}
.student-scroll::-webkit-scrollbar { width: 6px; }
.student-scroll::-webkit-scrollbar-thumb { background: #c9d3c3; border-radius: 999px; }
.student-view { display: none; }
.student-view.active { display: block; }
.view-toolbar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 10px;
}
.view-toolbar .ghost-btn {
  min-height: 34px;
  padding: 0 10px;
  background: #fff;
}

.hero {
  position: relative;
  min-height: 158px;
  border-radius: 16px;
  color: #fff;
  padding: 14px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 14px 28px rgba(53,43,20,.16);
}
.hero-art {
  position: absolute;
  inset: -10px;
  z-index: -3;
  background-image: var(--farm);
  background-size: cover;
  background-position: 39% center;
  transform: scale(1.03);
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(29,26,13,.08), rgba(26,23,12,.78)),
    linear-gradient(90deg, rgba(20,58,36,.5), transparent 60%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -52% -20%;
  height: 72%;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(255,215,68,.3), transparent 62%);
}
.hero-content {
  width: 100%;
  display: grid;
  gap: 4px;
}
.brush-title {
  width: fit-content;
  font-family: "STKaiti", "KaiTi", "Kaiti SC", "FangSong", serif;
  font-size: 35px;
  line-height: 1.05;
  letter-spacing: 0;
  color: #fff9dc;
  text-shadow: 0 2px 0 rgba(63,33,4,.32), 0 8px 22px rgba(0,0,0,.35);
}
.hero h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
  font-weight: 850;
}
.hero p {
  margin: 0;
  color: rgba(255,255,255,.9);
  font-size: 12px;
}
.soft-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 12px;
}
.quick-grid {
  margin: 12px 0 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.quick-grid button {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
  text-align: left;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 7px 8px;
  color: var(--ink);
}
.quick-grid svg { color: var(--green); }
.quick-grid span {
  font-weight: 650;
  font-size: 13px;
}
.quick-grid b {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.compact-quick {
  margin-top: 10px;
}
.compact-quick button {
  min-height: 60px;
}
.service-strip {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.service-strip div,
.mine-summary div {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.9);
  padding: 7px 8px;
  display: grid;
  align-content: center;
  gap: 3px;
}
.service-strip span,
.mine-summary span {
  color: var(--muted);
  font-size: 11px;
}
.service-strip strong,
.mine-summary strong {
  font-size: 14px;
  line-height: 1.25;
  font-weight: 800;
}
.store-status-strip {
  margin: 7px 0 8px;
}
.store-status-strip div {
  background: #fffdf7;
}
.store-status-strip strong {
  color: #1f241d;
}
.home-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0;
}
.home-entry-grid button {
  min-height: 76px;
  border: 1px solid rgba(231,226,215,.95);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,249,232,.88));
  color: var(--ink);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 10px;
  text-align: left;
  box-shadow: 0 8px 18px rgba(43,36,21,.06);
}
.home-entry-grid button:nth-child(2) {
  background: linear-gradient(135deg, #fffdf8, #eaf6fb);
}
.home-entry-grid button:nth-child(3) {
  background: linear-gradient(135deg, #fffdf8, #fff2db);
}
.home-entry-grid button:nth-child(4) {
  background: linear-gradient(135deg, #fffdf8, #eef8f2);
}
.home-entry-grid i {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #14684a;
  color: var(--brand);
}
.home-entry-grid i svg,
.home-entry-grid i .fallback-icon {
  width: 22px;
  height: 22px;
}
.home-entry-grid strong {
  display: block;
  font-size: 16px;
  line-height: 1.18;
  font-weight: 900;
}
.home-entry-grid small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}
.mini-order-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 7px 0 8px;
}
.mini-order-strip button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  text-align: left;
}
.mini-order-strip svg {
  color: var(--green);
  width: 19px;
  height: 19px;
}
.mini-order-strip strong {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}
.mini-order-strip small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.flow-card {
  min-height: 64px;
  margin: 12px 0;
  border: 1px solid rgba(47,123,74,.2);
  border-radius: var(--radius);
  background: var(--green-2);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
}
.flow-card div {
  background: rgba(255,255,255,.55);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-width: 0;
}
.flow-card svg,
.flow-card .fallback-icon {
  color: var(--green);
}
.flow-card span {
  color: #3d5541;
  font-size: 11px;
  white-space: nowrap;
}
.simple-actions {
  margin: 11px 0 9px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.simple-actions button,
.intent-strip button {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  display: grid;
  align-items: center;
}
.simple-actions button {
  min-height: 64px;
  justify-items: center;
  align-content: center;
  gap: 5px;
  padding: 8px 6px;
  text-align: center;
}
.simple-actions svg,
.intent-strip svg {
  width: 20px;
  height: 20px;
  color: var(--green);
}
.simple-actions span,
.intent-strip span {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.simple-actions strong,
.intent-strip strong {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
}
.simple-actions small,
.intent-strip small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}
.intent-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 6px;
}
.intent-strip button {
  grid-template-columns: 26px 1fr;
  min-height: 54px;
  gap: 7px;
  padding: 9px 10px;
  background: #f9fbf6;
}
.mascot-strip {
  margin: 8px 0 6px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.mascot-card {
  position: relative;
  min-height: 58px;
  border: 1px solid rgba(231,226,215,.96);
  border-radius: 14px;
  background: #fff;
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  box-shadow: 0 6px 16px rgba(43,36,21,.05);
  overflow: hidden;
}
.mascot-card strong {
  grid-column: 2;
  display: block;
  font-size: 13px;
  line-height: 1.2;
  align-self: end;
}
.mascot-card small {
  grid-column: 2;
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  align-self: start;
}
.mascot {
  position: relative;
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  display: block;
  overflow: visible;
  animation: mascot-breathe 2.8s ease-in-out infinite;
}
.mascot.dog {
  border-radius: 50% 50% 44% 44%;
  background:
    radial-gradient(circle at 31% 42%, #fff4ca 0 5px, transparent 6px),
    radial-gradient(circle at 68% 42%, #fff4ca 0 5px, transparent 6px),
    #f7c978;
  box-shadow: inset -6px -7px 0 rgba(151,82,28,.12), 0 5px 10px rgba(123,76,24,.14);
}
.mascot.dog::before,
.mascot.dog::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 16px;
  height: 18px;
  border-radius: 70% 70% 45% 45%;
  background: #8d5629;
}
.mascot.dog::before { left: -2px; transform: rotate(-22deg); }
.mascot.dog::after { right: -2px; transform: rotate(22deg); }
.mascot.dog i {
  position: absolute;
  left: 11px;
  top: 17px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #2f241a;
  box-shadow: 16px 0 0 #2f241a;
}
.mascot.dog b {
  position: absolute;
  left: 18px;
  top: 23px;
  width: 7px;
  height: 5px;
  border-radius: 50%;
  background: #2f241a;
}
.mascot.dog b::after {
  content: "";
  position: absolute;
  left: -4px;
  top: 5px;
  width: 15px;
  height: 7px;
  border-bottom: 2px solid #2f241a;
  border-radius: 0 0 999px 999px;
}
.dog-tail {
  position: absolute;
  right: -9px;
  top: 22px;
  width: 16px;
  height: 9px;
  border-radius: 999px 999px 999px 0;
  border-top: 5px solid #8d5629;
  transform-origin: left center;
  animation: dog-tail-wag 1.35s ease-in-out infinite;
}
.dog-bowl {
  position: absolute;
  left: 10px;
  bottom: -8px;
  width: 24px;
  height: 11px;
  border-radius: 2px 2px 12px 12px;
  background: linear-gradient(180deg, #fff 0 28%, #dfe9ed 29% 100%);
  border: 1px solid rgba(48,73,75,.18);
  box-shadow: inset 0 -2px 0 rgba(35,75,85,.08);
}
.mascot.bird {
  border-radius: 52% 48% 55% 45%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.55) 0 7px, transparent 8px),
    #5fb6d1;
  box-shadow: inset -7px -8px 0 rgba(14,69,97,.16), 0 6px 12px rgba(29,103,128,.16);
  animation-delay: .35s;
}
.mascot.bird::before {
  content: "";
  position: absolute;
  right: -6px;
  top: 16px;
  border-left: 10px solid #f3b43d;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.mascot.bird::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 19px;
  width: 19px;
  height: 12px;
  border-radius: 12px 4px 12px 4px;
  background: rgba(255,255,255,.46);
  transform: rotate(-18deg);
}
.mascot.bird i {
  position: absolute;
  right: 10px;
  top: 12px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #122b33;
}
.mascot.bird b {
  position: absolute;
  left: 13px;
  bottom: -4px;
  width: 11px;
  height: 8px;
  border-radius: 50%;
  background: #f3b43d;
}
.bird-wing {
  position: absolute;
  left: 4px;
  top: 17px;
  width: 20px;
  height: 14px;
  border-radius: 14px 4px 14px 4px;
  background: rgba(255,255,255,.58);
  transform-origin: right center;
  animation: bird-wing-flap 1.45s ease-in-out infinite;
}
.bird-parcel {
  position: absolute;
  left: 1px;
  bottom: -7px;
  width: 16px;
  height: 12px;
  border-radius: 4px;
  background: #ffd64a;
  border: 1px solid rgba(121,86,14,.12);
  box-shadow: 0 2px 0 rgba(121,86,14,.12);
}
.bird-parcel::before {
  content: "";
  position: absolute;
  inset: 5px 2px auto;
  height: 1px;
  background: rgba(121,86,14,.24);
}
.dog-card { background: linear-gradient(135deg, #fff, #fff8e8); }
.bird-card { background: linear-gradient(135deg, #fff, #eef9fc); }
.dog-card::after,
.bird-card::after {
  position: absolute;
  right: 9px;
  top: 7px;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}
.like-pulse .dog-card::after {
  content: "已记想吃";
  color: #8b4c08;
  background: rgba(255,215,68,.96);
  animation: mascot-bubble .85s ease both;
}
.surplus-pulse .dog-card::after {
  content: "惜食提醒";
  color: #0d6b44;
  background: rgba(224,247,235,.96);
  animation: mascot-bubble .85s ease both;
}
.cart-pulse .bird-card::after {
  content: "已入清单";
  color: #0b6275;
  background: rgba(224,248,255,.96);
  animation: mascot-bubble .85s ease both;
}
.share-pulse .bird-card::after {
  content: "帮你分享";
  color: #0b6275;
  background: rgba(224,248,255,.96);
  animation: mascot-bubble .85s ease both;
}
@keyframes mascot-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.025); }
}
.like-pulse .dog,
.cart-pulse .bird,
.share-pulse .bird,
.surplus-pulse .dog {
  animation: mascot-pop .55s ease both;
}
@keyframes mascot-pop {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-9px) scale(1.1); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes dog-tail-wag {
  0%, 100% { transform: rotate(-10deg); }
  50% { transform: rotate(28deg); }
}
@keyframes bird-wing-flap {
  0%, 100% { transform: rotate(-18deg) scaleY(1); }
  50% { transform: rotate(-34deg) scaleY(.82); }
}
@keyframes mascot-bubble {
  0% { opacity: 0; transform: translateY(-6px) scale(.92); }
  20%, 72% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-4px) scale(.96); }
}

.floating-pets {
  position: absolute;
  right: 12px;
  bottom: 136px;
  width: 116px;
  height: 96px;
  z-index: 32;
  pointer-events: none;
  opacity: 0;
}
.floating-pet {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 86px;
  height: 86px;
  opacity: 0;
  transform: translate(24px, 18px) scale(.72);
  transform-origin: 70% 90%;
  filter: drop-shadow(0 12px 18px rgba(32,26,17,.18));
}
.floating-pets.show {
  opacity: 1;
}
.floating-pets.dog-active .pet-dog,
.floating-pets.bird-active .pet-bird {
  opacity: 1;
  animation: pet-enter 1.85s cubic-bezier(.17,.84,.24,1) both;
}
.floating-pets.bird-active .pet-bird {
  animation-name: bird-deliver;
}
.floating-pets .mascot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 50px;
  height: 50px;
  grid-row: auto;
  animation: mascot-breathe 2.2s ease-in-out infinite;
}
.floating-pets .pet-shadow {
  position: absolute;
  right: 16px;
  bottom: 5px;
  width: 48px;
  height: 10px;
  border-radius: 999px;
  background: rgba(39,34,24,.17);
  transform: scaleX(.86);
}
.floating-pets .pet-bubble {
  position: absolute;
  right: 42px;
  bottom: 58px;
  min-width: max-content;
  max-width: 112px;
  padding: 7px 9px;
  border-radius: 13px 13px 4px 13px;
  background: rgba(24,27,24,.94);
  color: #fff7d6;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(26,24,18,.18);
  animation: pet-talk 1.85s ease both;
}
.floating-pets .pet-bubble::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: inherit;
  transform: rotate(45deg);
  border-radius: 2px;
}
.floating-pets .pet-dog .pet-bubble {
  background: rgba(83,54,24,.94);
  color: #fff4c3;
}
.floating-pets .pet-bird .pet-bubble {
  background: rgba(15,88,105,.94);
  color: #e8fbff;
}
.floating-pets .dog {
  transform-origin: center bottom;
}
.floating-pets .bird {
  transform-origin: center bottom;
}
.floating-pets.like-pulse .dog,
.floating-pets.surplus-pulse .dog {
  animation: dog-clean-pop 1.15s ease both;
}
.floating-pets.cart-pulse .bird,
.floating-pets.order-pulse .bird,
.floating-pets.share-pulse .bird {
  animation: bird-delivery-flap 1.15s ease both;
}
.floating-pets.share-pulse .bird::before {
  transform: translateX(1px) rotate(-8deg);
}
.floating-pets.order-pulse .bird-parcel {
  animation: parcel-drop 1.15s ease both;
}
@keyframes pet-enter {
  0% { opacity: 0; transform: translate(28px, 18px) scale(.7); }
  18% { opacity: 1; transform: translate(0, -4px) scale(1.03); }
  28%, 76% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(20px, 10px) scale(.82); }
}
@keyframes bird-deliver {
  0% { opacity: 0; transform: translate(48px, -14px) scale(.74) rotate(-6deg); }
  18% { opacity: 1; transform: translate(0, -5px) scale(1.02) rotate(2deg); }
  28%, 76% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0); }
  100% { opacity: 0; transform: translate(42px, -16px) scale(.82) rotate(4deg); }
}
@keyframes pet-talk {
  0%, 100% { opacity: 0; transform: translateY(4px) scale(.94); }
  16%, 78% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes dog-clean-pop {
  0%, 100% { transform: translateY(0) rotate(0); }
  32% { transform: translateY(-8px) rotate(-5deg); }
  58% { transform: translateY(0) rotate(4deg); }
}
@keyframes bird-delivery-flap {
  0%, 100% { transform: translateY(0) rotate(0); }
  28% { transform: translateY(-10px) rotate(-5deg); }
  56% { transform: translateY(-3px) rotate(4deg); }
}
@keyframes parcel-drop {
  0%, 100% { transform: translateY(0); }
  42% { transform: translateY(4px) rotate(5deg); }
}

.floating-pets {
  position: absolute;
  right: 10px;
  bottom: 146px;
  width: 164px;
  height: 124px;
  z-index: 36;
  pointer-events: none;
  opacity: 0;
  transition: bottom .22s ease;
}
.floating-pets.avoid-cart {
  bottom: 170px;
}
.floating-pets.avoid-form {
  bottom: 184px;
}
.floating-pets.show {
  opacity: 1;
}
.floating-pet {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 116px;
  height: 112px;
  opacity: 0;
  transform-origin: 62% 92%;
  filter: drop-shadow(0 14px 18px rgba(27, 24, 17, .2));
}
.floating-pets.dog-active .pet-dog,
.floating-pets.bird-active .pet-bird {
  opacity: 1;
}
.floating-pets .pet-figure {
  position: absolute;
  right: 8px;
  bottom: 10px;
  width: 82px;
  height: 82px;
  object-fit: contain;
  transform-origin: 50% 90%;
  user-select: none;
  -webkit-user-drag: none;
}
.floating-pets .pet-bird .pet-figure {
  width: 86px;
  height: 86px;
  right: 2px;
  bottom: 12px;
}
.floating-pets .pet-shadow {
  position: absolute;
  right: 19px;
  bottom: 7px;
  width: 58px;
  height: 12px;
  border-radius: 999px;
  background: rgba(38, 32, 20, .18);
  transform: scaleX(.92);
}
.floating-pets .pet-bubble {
  position: absolute;
  right: 54px;
  bottom: 78px;
  max-width: 172px;
  min-width: 108px;
  padding: 8px 10px;
  border-radius: 14px 14px 5px 14px;
  background: rgba(35, 28, 20, .94);
  color: #fff8d7;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 12px 24px rgba(31, 25, 17, .18);
  animation: pet-bubble-3d 2.15s ease both;
}
.floating-pets .pet-bubble::after {
  content: "";
  position: absolute;
  right: 9px;
  bottom: -5px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: inherit;
  transform: rotate(45deg);
}
.floating-pets .pet-bird .pet-bubble {
  right: 50px;
  background: rgba(9, 84, 102, .95);
  color: #eaffff;
}
.floating-pets.pet-dog-motion .pet-dog {
  animation: dog-x-travel 2.15s cubic-bezier(.2, .88, .22, 1) both;
}
.floating-pets.pet-dog-motion .pet-dog .pet-figure {
  animation: dog-step-3d .54s ease-in-out 3;
}
.floating-pets.pet-bird-motion .pet-bird {
  animation: bird-curve-travel 2.18s cubic-bezier(.2, .86, .22, 1) both;
}
.floating-pets.pet-bird-motion .pet-bird .pet-figure {
  animation: bird-flap-3d .42s ease-in-out 5;
}
.floating-pets.bird-heavy-pulse .pet-bird {
  animation: bird-heavy-travel 2.55s cubic-bezier(.2, .72, .26, 1) both;
}
.floating-pets.bird-heavy-pulse .pet-bird .pet-figure {
  animation: bird-heavy-wobble .72s ease-in-out 3;
}
@keyframes dog-x-travel {
  0% { opacity: 0; transform: translateX(-72px) translateY(10px) scale(.72) rotate(-8deg); }
  14% { opacity: 1; transform: translateX(-36px) translateY(0) scale(1.02) rotate(3deg); }
  34% { opacity: 1; transform: translateX(-10px) translateY(-2px) scale(1) rotate(-2deg); }
  70% { opacity: 1; transform: translateX(8px) translateY(0) scale(1) rotate(2deg); }
  100% { opacity: 0; transform: translateX(42px) translateY(7px) scale(.82) rotate(8deg); }
}
@keyframes dog-step-3d {
  0%, 100% { transform: translateY(0) rotate(0) scale(1); }
  42% { transform: translateY(-7px) rotate(-4deg) scale(1.03); }
}
@keyframes bird-curve-travel {
  0% { opacity: 0; transform: translate(76px, 22px) scale(.7) rotate(-13deg); }
  18% { opacity: 1; transform: translate(34px, -32px) scale(.98) rotate(-6deg); }
  42% { opacity: 1; transform: translate(-18px, -18px) scale(1.04) rotate(5deg); }
  72% { opacity: 1; transform: translate(3px, -38px) scale(1) rotate(-2deg); }
  100% { opacity: 0; transform: translate(66px, -48px) scale(.82) rotate(10deg); }
}
@keyframes bird-flap-3d {
  0%, 100% { transform: translateY(0) rotate(0) scale(1); }
  45% { transform: translateY(-6px) rotate(-7deg) scale(1.04); }
}
@keyframes bird-heavy-travel {
  0% { opacity: 0; transform: translate(48px, 18px) scale(.72) rotate(-8deg); }
  16% { opacity: 1; transform: translate(14px, -10px) scale(1) rotate(-2deg); }
  38% { opacity: 1; transform: translate(-8px, 2px) scale(1.02) rotate(4deg); }
  62% { opacity: 1; transform: translate(4px, 14px) scale(.96) rotate(-5deg); }
  82% { opacity: 1; transform: translate(-4px, 8px) scale(.98) rotate(3deg); }
  100% { opacity: 0; transform: translate(32px, 22px) scale(.78) rotate(8deg); }
}
@keyframes bird-heavy-wobble {
  0%, 100% { transform: translateY(0) rotate(0); }
  40% { transform: translateY(6px) rotate(-8deg); }
  70% { transform: translateY(2px) rotate(6deg); }
}
@keyframes pet-bubble-3d {
  0%, 100% { opacity: 0; transform: translateY(8px) scale(.92); }
  14%, 78% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Self-owned free pet engine v23: selected sticker mascots, contextual and event-driven. */
.floating-pets {
  left: 0;
  top: 0;
  right: auto;
  bottom: auto;
  width: 0;
  height: 0;
  z-index: 42;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.floating-pets.avoid-cart,
.floating-pets.avoid-form {
  bottom: auto;
}
.floating-pets.show {
  opacity: 1;
}
.floating-pets .floating-pet {
  left: 0;
  top: 0;
  right: auto;
  bottom: auto;
  width: 148px;
  height: 126px;
  opacity: 0;
  transform: translate(var(--pet-x, 218px), var(--pet-y, 612px)) scale(var(--pet-scale, .68));
  transform-origin: 55% 92%;
  will-change: transform, opacity;
  filter: drop-shadow(0 12px 18px rgba(27, 24, 17, .2));
}
.floating-pets.dog-active .pet-dog,
.floating-pets.bird-active .pet-bird {
  opacity: 1;
}
.floating-pets .pet-figure {
  right: 12px;
  bottom: 8px;
  width: 96px;
  height: 96px;
  object-fit: contain;
  transform-origin: 50% 90%;
}
.floating-pets .pet-bird .pet-figure {
  right: 8px;
  bottom: 8px;
  width: 98px;
  height: 90px;
}
.floating-pets .pet-shadow {
  right: 30px;
  bottom: 9px;
  width: 60px;
  height: 11px;
  background: rgba(37, 30, 19, .14);
}
.floating-pets .pet-bubble {
  left: 72px;
  right: auto;
  bottom: 88px;
  width: max-content;
  max-width: 238px;
  min-width: 204px;
  padding: 10px 12px;
  border-radius: 14px 14px 14px 5px;
  background: linear-gradient(135deg, rgba(37, 31, 22, .98), rgba(104, 70, 32, .96));
  color: #fff6c8;
  border: 1px solid rgba(255, 230, 157, .22);
  font-size: 13.5px;
  line-height: 1.28;
  font-weight: 900;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: 0 14px 28px rgba(31, 25, 17, .22);
  animation: pet-free-bubble var(--pet-duration, 4400ms) ease both;
}
.floating-pets.pet-event .pet-bubble {
  animation: none;
  opacity: 1;
}
.floating-pets .pet-dog .pet-bubble::after {
  left: 10px;
  right: auto;
}
.floating-pets .pet-bird .pet-bubble {
  left: auto;
  right: 90px;
  background: linear-gradient(135deg, rgba(6, 76, 98, .98), rgba(15, 129, 150, .96));
  color: #ecffff;
  border-color: rgba(184, 247, 255, .28);
}
.floating-pets .pet-bird .pet-bubble::after {
  left: auto;
  right: 10px;
}
@media (max-width: 480px) {
  .floating-pets .pet-bubble {
    left: -18px;
    min-width: 188px;
    max-width: 220px;
    padding: 8px 10px;
    font-size: 13px;
  }
  .floating-pets .pet-bird .pet-bubble {
    right: 48px;
    min-width: 188px;
    max-width: 220px;
  }
}
.floating-pets[data-pet-mode="demo"][data-pet-event="boxed"] .pet-dog .pet-figure {
  right: 76px;
  bottom: 6px;
  width: 70px;
  height: 70px;
}
.floating-pets[data-pet-mode="demo"][data-pet-event="boxed"] .pet-dog .pet-shadow {
  right: 82px;
  width: 46px;
}
.floating-pets[data-pet-mode="demo"][data-pet-event="boxed"] .pet-dog .pet-bubble {
  left: 2px;
  bottom: 74px;
  min-width: 78px;
  max-width: 78px;
  padding: 7px 8px;
  border-radius: 12px 12px 12px 4px;
  font-size: 11px;
  line-height: 1.18;
}
.floating-pets[data-pet-mode="demo"][data-pet-event="combo"] .pet-bird .pet-figure {
  right: 96px;
  bottom: 8px;
  width: 58px;
  height: 54px;
}
.floating-pets[data-pet-mode="demo"][data-pet-event="combo"] .pet-bird .pet-shadow {
  right: 102px;
  width: 34px;
}
.floating-pets[data-pet-mode="demo"][data-pet-event="combo"] .pet-bird .pet-bubble {
  left: -12px;
  right: auto;
  bottom: 66px;
  min-width: 70px;
  max-width: 70px;
  padding: 7px 8px;
  border-radius: 12px 12px 12px 4px;
  font-size: 11px;
  line-height: 1.18;
}
.floating-pets[data-pet-mode="demo"][data-pet-event="combo"] .pet-bird .pet-bubble::after {
  left: 10px;
  right: auto;
}
.floating-pets.pet-dog-walk .pet-dog {
  animation: dog-free-walk var(--pet-duration, 2900ms) cubic-bezier(.2, .88, .22, 1) both;
}
.floating-pets.pet-dog-walk .pet-dog .pet-figure {
  animation: dog-free-step .5s ease-in-out 5;
}
.floating-pets.pet-dog-rest .pet-dog {
  animation: dog-free-rest var(--pet-duration, 3400ms) ease both;
}
.floating-pets.pet-dog-rest .pet-dog .pet-figure {
  animation: dog-free-breathe 1.05s ease-in-out 3;
}
.floating-pets.pet-dog-hop .pet-dog {
  animation: dog-free-hop var(--pet-duration, 4300ms) ease both;
}
.floating-pets.pet-dog-hop .pet-dog .pet-figure {
  animation: dog-free-jump .58s cubic-bezier(.2, .78, .22, 1.2) 4;
}
.floating-pets.pet-bird-fly .pet-bird {
  animation: bird-free-arc var(--pet-duration, 3000ms) cubic-bezier(.2, .86, .22, 1) both;
}
.floating-pets.pet-bird-fly .pet-bird .pet-figure {
  animation: bird-free-flap .4s ease-in-out 7;
}
.floating-pets.pet-bird-heavy .pet-bird {
  animation: bird-free-heavy var(--pet-duration, 3200ms) cubic-bezier(.2, .72, .26, 1) both;
}
.floating-pets.pet-bird-heavy .pet-bird .pet-figure {
  animation: bird-free-heavy-flap .74s ease-in-out 4;
}
@keyframes dog-free-walk {
  0% {
    opacity: 0;
    transform: translate(calc(var(--pet-x) + var(--pet-start-dx)), calc(var(--pet-y) + 12px)) scale(.68) rotate(-8deg);
  }
  13% {
    opacity: 1;
    transform: translate(calc(var(--pet-x) - 24px), calc(var(--pet-y) - 1px)) scale(calc(var(--pet-scale) + .12)) rotate(3deg);
  }
  45% {
    opacity: 1;
    transform: translate(var(--pet-x), calc(var(--pet-y) - 4px)) scale(var(--pet-scale)) rotate(-2deg);
  }
  76% {
    opacity: 1;
    transform: translate(calc(var(--pet-x) + var(--pet-travel)), calc(var(--pet-y) + 1px)) scale(var(--pet-scale)) rotate(2deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--pet-x) + var(--pet-exit-dx)), calc(var(--pet-y) + 9px)) scale(.7) rotate(8deg);
  }
}
@keyframes dog-free-rest {
  0% {
    opacity: 0;
    transform: translate(calc(var(--pet-x) - 24px), calc(var(--pet-y) + 12px)) scale(.72) rotate(-4deg);
  }
  14%, 78% {
    opacity: 1;
    transform: translate(var(--pet-x), var(--pet-y)) scale(var(--pet-scale)) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--pet-x) + 16px), calc(var(--pet-y) + 8px)) scale(.76) rotate(4deg);
  }
}
@keyframes dog-free-hop {
  0% {
    opacity: 0;
    transform: translate(calc(var(--pet-x) - 20px), calc(var(--pet-y) + 12px)) scale(.72) rotate(-4deg);
  }
  12%, 86% {
    opacity: 1;
    transform: translate(var(--pet-x), var(--pet-y)) scale(var(--pet-scale)) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--pet-x) + 14px), calc(var(--pet-y) + 8px)) scale(.76) rotate(4deg);
  }
}
@keyframes dog-free-step {
  0%, 100% { transform: translateY(0) rotate(0) scale(1); }
  42% { transform: translateY(-7px) rotate(-4deg) scale(1.03); }
}
@keyframes dog-free-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.025); }
}
@keyframes dog-free-jump {
  0%, 100% { transform: translateY(0) rotate(0) scale(1); }
  42% { transform: translateY(-13px) rotate(-4deg) scale(1.04); }
  68% { transform: translateY(2px) rotate(3deg) scale(.99); }
}
@keyframes bird-free-arc {
  0% {
    opacity: 0;
    transform: translate(calc(var(--pet-x) + var(--pet-start-dx)), calc(var(--pet-y) + 22px)) scale(.66) rotate(-14deg);
  }
  18% {
    opacity: 1;
    transform: translate(calc(var(--pet-x) + 38px), calc(var(--pet-y) + var(--pet-arc-y))) scale(calc(var(--pet-scale) + .12)) rotate(-7deg);
  }
  45% {
    opacity: 1;
    transform: translate(calc(var(--pet-x) - 16px), calc(var(--pet-y) - 18px)) scale(calc(var(--pet-scale) + .18)) rotate(5deg);
  }
  73% {
    opacity: 1;
    transform: translate(calc(var(--pet-x) + 4px), calc(var(--pet-y) + var(--pet-arc-y) - 7px)) scale(var(--pet-scale)) rotate(-2deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--pet-x) + var(--pet-exit-dx)), calc(var(--pet-y) + var(--pet-arc-y) - 16px)) scale(.68) rotate(11deg);
  }
}
@keyframes bird-free-heavy {
  0% {
    opacity: 0;
    transform: translate(calc(var(--pet-x) + 58px), calc(var(--pet-y) + 12px)) scale(.64) rotate(-8deg);
  }
  18%, 74% {
    opacity: 1;
    transform: translate(var(--pet-x), calc(var(--pet-y) + 3px)) scale(var(--pet-scale)) rotate(-1deg);
  }
  42% {
    opacity: 1;
    transform: translate(calc(var(--pet-x) - 10px), calc(var(--pet-y) + 16px)) scale(calc(var(--pet-scale) + .04)) rotate(5deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--pet-x) + 34px), calc(var(--pet-y) + 24px)) scale(.68) rotate(8deg);
  }
}
@keyframes bird-free-flap {
  0%, 100% { transform: translateY(0) rotate(0) scale(1); }
  45% { transform: translateY(-6px) rotate(-7deg) scale(1.04); }
}
@keyframes bird-free-heavy-flap {
  0%, 100% { transform: translateY(0) rotate(0); }
  40% { transform: translateY(6px) rotate(-8deg); }
  70% { transform: translateY(2px) rotate(6deg); }
}
@keyframes pet-free-bubble {
  0%, 100% { opacity: 0; transform: translateY(8px) scale(.92); }
  8%, 88% { opacity: 1; transform: translateY(0) scale(1); }
}
.focus-card {
  margin: 8px 0;
  border: 1px solid rgba(231,226,215,.95);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(43,36,21,.05);
  overflow: hidden;
}
.dish-focus {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  min-height: 156px;
}
.product-reco-card {
  height: 184px;
  border-color: rgba(255,210,56,.55);
  background:
    linear-gradient(135deg, #fffdf6, #fff);
  box-shadow: 0 10px 22px rgba(43,36,21,.08);
}
.order-focus {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background:
    linear-gradient(90deg, rgba(226,242,230,.96), rgba(255,255,255,.96)),
    var(--food);
  background-size: cover;
}
.focus-photo {
  width: 100%;
  height: 100%;
  min-height: 156px;
  align-self: stretch;
  background-image: var(--photo);
  background-size: var(--photo-size, cover);
  background-position: var(--photo-pos, center);
}
.reco-photo-wrap {
  position: relative;
  height: 100%;
  min-height: 0;
  align-self: stretch;
}
.reco-photo-wrap .focus-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.focus-copy {
  min-width: 0;
  padding: 9px 10px 8px;
  display: grid;
  align-content: stretch;
  gap: 5px;
}
.product-reco-card .focus-copy {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}
.product-reco-card .recommend-head,
.product-reco-card h3,
.product-reco-card .dish-meta,
.product-reco-card .reco-reason,
.product-reco-card .focus-actions,
.product-reco-card .recommend-controls {
  flex: 0 0 auto;
}
.product-reco-card h3,
.product-reco-card p,
.product-reco-card .dish-meta {
  min-width: 0;
}
.product-reco-card h3 {
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-reco-card p {
  display: none;
}
.product-reco-card .dish-meta {
  flex-wrap: nowrap;
  overflow: hidden;
}
.product-reco-card .dish-meta .tag:nth-child(n+4) {
  display: none;
}
.focus-card h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: 0;
  font-weight: 850;
}
.focus-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.focus-card.product-reco-card p {
  display: none;
}
.product-reco-card .dish-meta > span:last-child {
  display: none;
}
.soft-label.dark {
  width: fit-content;
  background: var(--brand-2);
  color: var(--green);
  border-color: rgba(255,210,56,.5);
  font-weight: 750;
}
.focus-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.focus-actions .primary-btn,
.focus-actions .ghost-btn {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
}
.reco-reason {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
.reco-reason span {
  min-height: 29px;
  border-radius: 10px;
  background: rgba(255,246,201,.72);
  color: #736230;
  display: grid;
  align-content: center;
  justify-items: center;
  font-size: 10px;
  line-height: 1.1;
}
.reco-reason b {
  color: #171a16;
  font-size: 13px;
  line-height: 1;
}
.recommend-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.recommend-head > span:last-child {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.recommend-controls {
  display: grid;
  grid-template-columns: 25px 1fr 25px;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}
.recommend-controls button {
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  display: grid;
  place-items: center;
}
.recommend-controls svg,
.recommend-controls .fallback-icon {
  width: 15px;
  height: 15px;
}
.recommend-controls div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.recommend-controls i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #c8d5c2;
}
.recommend-controls i.active {
  width: 16px;
  background: var(--green);
}
.vote-list {
  display: grid;
  gap: 8px;
}
.vote-card {
  position: relative;
  min-height: 54px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  text-align: left;
}
.vote-card span {
  min-width: 0;
  display: grid;
  gap: 2px;
  position: relative;
  z-index: 1;
}
.vote-card strong {
  font-size: 14px;
}
.vote-card small {
  color: var(--muted);
  font-size: 11px;
}
.vote-card b {
  position: relative;
  z-index: 1;
  color: var(--green);
}
.vote-card > i {
  position: absolute;
  inset: auto auto 0 0;
  width: var(--w, 30%);
  height: 4px;
  background: var(--green);
}
.share-card {
  margin-top: 10px;
  border: 1px solid rgba(46,102,126,.22);
  border-radius: var(--radius);
  background: var(--blue-2);
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}
.share-card div {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.share-card strong {
  font-size: 14px;
}
.share-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.section-head {
  justify-content: space-between;
  gap: 10px;
  margin: 11px 0 8px;
}
.section-head h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0;
}
.hint {
  color: var(--muted);
  font-size: 12px;
}
.menu-hero-row {
  margin-bottom: 10px;
  min-height: 64px;
  border: 1px solid rgba(231,226,215,.95);
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(255,210,56,.22), transparent 54%),
    #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}
.menu-hero-row h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}
.menu-hero-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.category-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.ordering-layout {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}
.menu-category-rail {
  position: sticky;
  top: 0;
  display: grid;
  gap: 7px;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  padding: 2px 0 70px;
  scrollbar-width: none;
}
.menu-category-rail::-webkit-scrollbar { display: none; }
.menu-dish-pane {
  min-width: 0;
}
.menu-section-head {
  margin-top: 0;
}
.search-row {
  height: 40px;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 10px;
}
.search-row svg,
.search-row .fallback-icon {
  color: var(--muted);
}
.search-row input {
  height: 36px;
  border: 0;
  padding: 0;
  box-shadow: none;
}
.switch-row {
  min-height: 34px;
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}
.switch-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
}
.cat-chip {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 7px 6px;
  background: #fff;
  color: var(--muted);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  white-space: normal;
  text-align: center;
  font-size: 12px;
  font-weight: 750;
}
.cat-chip.active {
  background: #14684a;
  color: #fff8d8;
  border-color: var(--green);
  box-shadow: inset 3px 0 0 var(--brand), 0 6px 13px rgba(23,114,79,.18);
}
.cat-chip span {
  line-height: 1.15;
}
.cat-chip small {
  color: inherit;
  opacity: .72;
  font-size: 10px;
  line-height: 1;
}
.dish-list, .surplus-list, .message-list, .order-list, .rank-list, .prep-list {
  display: grid;
  gap: 9px;
}
.dish-list.compact {
  grid-template-columns: 1fr;
}
.dish-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid rgba(231,226,215,.9);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(43,36,21,.05);
}
.ordering-layout .dish-list {
  gap: 8px;
}
.ordering-layout .dish-card {
  grid-template-columns: 94px minmax(0, 1fr);
  min-height: 112px;
  border-radius: 14px;
  box-shadow: 0 5px 14px rgba(43,36,21,.045);
}
.ordering-layout .dish-photo {
  width: 94px;
  min-height: 112px;
}
.ordering-layout .photo-badge {
  left: 6px;
  bottom: 6px;
  min-height: 22px;
  padding: 4px 7px;
  font-size: 11px;
  border-radius: 9px;
}
.ordering-layout .dish-info {
  padding: 8px 8px 7px 9px;
  gap: 4px;
}
.ordering-layout .dish-main h4 {
  font-size: 15px;
}
.ordering-layout .dish-main .icon-btn {
  display: none;
}
.ordering-layout .dish-subline {
  max-width: 148px;
  font-size: 11px;
}
.ordering-layout .price-note {
  font-size: 11px;
}
.ordering-layout .price-note b {
  font-size: 14px;
}
.ordering-layout .dish-rules .tag:nth-child(n+3),
.ordering-layout .dish-tags .tag:nth-child(n+2) {
  display: none;
}
.ordering-layout .dish-cta {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}
.menu-tail-card {
  min-height: 94px;
  border: 1px solid rgba(47,123,74,.18);
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(232,245,238,.92), rgba(255,255,255,.96));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
}
.menu-tail-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}
.menu-tail-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.menu-tail-card > div:last-child {
  display: grid;
  gap: 7px;
}
.menu-tail-card .primary-btn,
.menu-tail-card .ghost-btn {
  min-height: 32px;
  border-radius: 999px;
}
.dish-photo, .surplus-photo, .admin-dish-photo {
  background-image: var(--photo, var(--food));
  background-size: var(--photo-size, 400% 200%);
  background-position: var(--photo-pos, center);
  background-repeat: no-repeat;
}
.focus-photo,
.dish-photo,
.admin-dish-photo {
  position: relative;
  overflow: hidden;
}
.dish-photo {
  width: 132px;
  height: 100%;
  min-height: 132px;
  align-self: stretch;
}
.dish-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(0,0,0,.22));
}
.dish-info {
  min-width: 0;
  padding: 8px 10px 8px 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.dish-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.dish-main h4 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: 0;
  font-weight: 850;
  overflow-wrap: anywhere;
}
.dish-subline {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dish-main .icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 11px;
  background: #fffaf0;
}
.dish-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
.tag, .pill {
  min-height: 21px;
  padding: 3px 7px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--surface-2);
  color: #52604e;
  font-size: 12px;
  line-height: 1.2;
}
.dish-rules .tag:nth-child(n+3),
.dish-tags .tag:nth-child(n+2) {
  display: none;
}
.tag.hot, .pill.red { color: var(--red); background: var(--red-2); }
.tag.cool, .tag.blue, .pill.blue { color: var(--blue); background: var(--blue-2); }
.tag.green, .pill.green { color: var(--green); background: var(--green-2); }
.tag.amber, .pill.amber { color: var(--amber); background: var(--amber-2); }
.tag.muted, .pill.muted { color: var(--muted); background: #f0eee8; }
.photo-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 1;
  max-width: calc(100% - 16px);
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 10px;
  color: #fff;
  background: rgba(25,27,24,.78);
  font-size: 12px;
  line-height: 1.2;
  box-shadow: 0 5px 14px rgba(0,0,0,.16);
  overflow-wrap: anywhere;
}
.photo-badge.green { background: rgba(47,123,74,.92); }
.photo-badge.blue { background: rgba(46,102,126,.92); }
.photo-badge.amber { background: rgba(198,118,18,.92); }
.photo-badge.hot { background: rgba(196,75,56,.92); }
.price-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.price-note b {
  color: #c95f00;
  font-weight: 850;
  font-size: 15px;
}
.dish-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dish-tags {
  min-width: 0;
  overflow: hidden;
  max-height: 24px;
}
.mini-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}
.mini-stat svg { width: 14px; height: 14px; }
.round-add {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.round-add svg { width: 18px; height: 18px; }
.dish-cta {
  min-height: 32px;
  border: 1px solid #e8dfcf;
  border-radius: 999px;
  background: #fffaf0;
  color: var(--ink);
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 750;
}
.dish-cta.primary {
  background: var(--brand);
  border-color: #eac21f;
  color: var(--brand-dark);
  box-shadow: 0 6px 14px rgba(255,210,56,.25);
}
.dish-cta svg,
.dish-cta .fallback-icon {
  width: 16px;
  height: 16px;
}

.surplus-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(182,106,28,.25);
  border-radius: var(--radius);
  background: #fffaf0;
}
.surplus-photo {
  min-height: 82px;
  border-radius: 8px;
}
.surplus-card h4, .message-card h4, .order-card h4, .prep-card h4 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
}
.surplus-card p, .message-card p, .order-card p, .prep-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.cart-note,
.surplus-rule,
.rule-card {
  border: 1px solid rgba(47,123,74,.22);
  border-radius: var(--radius);
  background: var(--green-2);
  padding: 10px;
  margin-bottom: 10px;
}
.cart-note {
  display: grid;
  gap: 3px;
}
.cart-note strong,
.surplus-rule strong,
.rule-card strong {
  font-size: 13px;
}
.cart-note span,
.surplus-rule span,
.rule-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.surplus-rule,
.rule-card {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 10px;
}
.surplus-rule svg,
.rule-card svg,
.surplus-rule .fallback-icon,
.rule-card .fallback-icon {
  color: var(--green);
}
.surplus-foot {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.message-card, .order-card, .prep-card, .empty-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 10px;
}
.message-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.message-hero-card {
  min-height: 86px;
  margin: -2px 0 10px;
  border: 1px solid rgba(255,210,56,.55);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255,210,56,.34), transparent 52%),
    linear-gradient(180deg, #fffdf6, #fff);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  box-shadow: 0 9px 18px rgba(43,36,21,.06);
}
.message-hero-card span,
.message-hero-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.message-hero-card strong {
  display: block;
  margin: 3px 0;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 900;
}
.message-hero-card .primary-btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
}
.student-message-card {
  position: relative;
  border-radius: 15px;
  padding: 11px 12px 10px;
  box-shadow: 0 7px 16px rgba(43,36,21,.045);
}
.student-message-card header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
}
.student-message-card h4 {
  font-size: 14px;
  line-height: 1.2;
}
.student-message-card header small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}
.message-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--green-2);
  color: var(--green);
  display: grid;
  place-items: center;
  font-weight: 900;
}
.support-btn {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--green-2);
}
.suggestion-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.suggestion-chips button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf7;
  padding: 0 13px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}
.mine-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.student-order {
  grid-template-columns: 1fr auto;
}
.form-card {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  display: grid;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(35,43,32,.05);
}
.form-actions {
  display: grid;
  gap: 8px;
}
.form-actions .ghost-btn span {
  display: inline;
}
#cancelDishEdit {
  display: none;
}
#dishForm.editing {
  border-color: rgba(255,210,56,.65);
  box-shadow: 0 0 0 3px rgba(255,210,56,.14), 0 8px 24px rgba(35,43,32,.05);
}
#dishForm.editing #cancelDishEdit {
  display: inline-flex;
}
label {
  display: grid;
  gap: 6px;
}
label > span {
  color: var(--muted);
  font-size: 12px;
}
.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
}
.cart-item h4,
.cart-item p {
  margin: 0;
}
.cart-item p,
.cart-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.cart-item small {
  color: var(--green);
  font-weight: 800;
}
.cart-total-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 10px;
  align-items: end;
  padding: 11px 12px;
  border: 1px solid rgba(47,123,74,.2);
  border-radius: 8px;
  background: var(--green-2);
}
.cart-total-row span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.cart-total-row strong {
  color: var(--green);
  font-size: 20px;
}
.cart-total-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}
.qty-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}
.qty-actions button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.cart-bar {
  position: sticky;
  z-index: 3;
  bottom: 8px;
  margin: 12px 2px 0;
  min-height: 54px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border: 1px solid rgba(25,27,24,.08);
  border-radius: 16px;
  background: rgba(28,28,25,.94);
  color: #fff;
  box-shadow: 0 12px 26px rgba(25,27,24,.2);
  backdrop-filter: blur(10px);
}
.cart-bar.empty {
  display: none;
  background: rgba(28,28,25,.88);
}
.cart-bar.empty .cart-icon b {
  display: none;
}
.cart-bar.empty .primary-btn {
  display: none;
}
.cart-bar.empty .cart-icon {
  background: #fff;
  color: #191b18;
}
.cart-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--brand);
  color: var(--brand-dark);
  display: grid;
  place-items: center;
}
.cart-icon b {
  position: absolute;
  right: -6px;
  top: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.cart-copy { min-width: 0; }
.cart-copy strong {
  display: block;
  font-size: 14px;
}
.cart-copy span {
  display: block;
  margin-top: 2px;
  color: rgba(255,255,255,.7);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-bar .primary-btn {
  min-width: 76px;
  min-height: 38px;
  border-radius: 999px;
}
.student-nav {
  flex: 0 0 auto;
  height: 62px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  background: #fff;
}
.student-nav button {
  min-width: 0;
  border: 0;
  background: #fff;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
}
.student-nav button.active {
  color: #d18a00;
}
.student-nav svg { width: 19px; height: 19px; }
.rank-card {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 9px;
}
.rank-no {
  width: 29px;
  height: 29px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: #52604e;
  font-size: 13px;
}
.rank-card strong {
  display: block;
  font-size: 13px;
}
.rank-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.bar {
  height: 7px;
  overflow: hidden;
  margin-top: 6px;
  border-radius: 999px;
  background: #edf2e9;
}
.bar i {
  display: block;
  width: var(--w, 50%);
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.admin-pane {
  min-width: 0;
  display: grid;
  grid-template-columns: 198px minmax(0, 1fr);
  min-height: calc(100vh - 92px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow);
}
.admin-side {
  padding: 12px;
  border-right: 1px solid var(--line);
  background: #fbfcf8;
  display: grid;
  align-content: start;
  gap: 6px;
}
.side-title {
  padding: 8px 8px 12px;
  display: grid;
  gap: 3px;
}
.side-title span {
  color: var(--muted);
  font-size: 12px;
}
.side-title strong {
  font-size: 16px;
}
.admin-side button {
  height: 40px;
  border: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  color: #4c5648;
  background: transparent;
  text-align: left;
}
.admin-side button.active {
  color: var(--green);
  background: var(--green-2);
}
.admin-side .admin-logout {
  margin-top: 8px;
  color: #8a3d34;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.admin-main {
  min-width: 0;
  padding: 14px;
  overflow: auto;
}
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.panel-title {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.panel-actions .ghost-btn.active {
  border-color: rgba(47,123,74,.26);
  background: var(--green-2);
  color: var(--green);
}
.panel-title h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}
.panel-title p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.ops-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.ops-card {
  min-width: 0;
  min-height: 104px;
  border: 1px solid rgba(47,123,74,.22);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #f7faf3);
  color: var(--ink);
  padding: 11px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  text-align: left;
}
.ops-card span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.ops-card svg {
  width: 16px;
  height: 16px;
  color: var(--green);
}
.ops-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 22px;
  line-height: 1.1;
}
.ops-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.ops-card.amber {
  border-color: rgba(182,106,28,.24);
  background: linear-gradient(180deg, #fff, var(--amber-2));
}
.merchant-order-popup {
  position: fixed;
  z-index: 2100;
  top: 16px;
  right: 16px;
  width: min(420px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid rgba(47,123,74,.24);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 44px rgba(27, 45, 30, .18);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  transform: translateY(-18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.merchant-order-popup.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.merchant-order-popup div {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.merchant-order-popup strong {
  color: var(--ink);
  font-size: 15px;
}
.merchant-order-popup span {
  color: var(--muted);
  font-size: 12px;
}
.prep-logic-card {
  margin: 10px 0 14px;
  border: 1px solid rgba(47,123,74,.2);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f7fbf5, #fff);
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 14px;
  align-items: center;
}
.prep-logic-card > div:first-child {
  min-width: 0;
  display: grid;
  gap: 8px;
}
.prep-logic-card strong {
  font-size: 18px;
  line-height: 1.35;
}
.prep-logic-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.prep-logic-steps {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.prep-logic-steps button {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 4px;
  text-align: center;
}
.prep-logic-steps b {
  color: var(--green);
  font-size: 15px;
}
.prep-logic-steps span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}
.metric {
  min-height: 104px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.metric-top {
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.metric strong {
  font-size: 27px;
  line-height: 1;
  letter-spacing: 0;
}
.metric small {
  color: var(--green);
  font-size: 12px;
}
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 14px;
  align-items: start;
}
.admin-grid.wide-left {
  grid-template-columns: minmax(280px, 320px) minmax(420px, 1fr);
}
.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}
.card-head {
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  margin-bottom: 10px;
}
.card-head h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0;
}
.order-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.order-ticket {
  position: relative;
  align-items: start;
  border-left: 4px solid rgba(47,123,74,.72);
}
.order-card.print-attention {
  border-color: rgba(194, 119, 17, .42);
  border-left-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(194, 119, 17, .08);
}
.order-main {
  min-width: 0;
  display: grid;
  gap: 7px;
}
.order-headline,
.student-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.customer-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.customer-line h4,
.student-order-top h4 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--green);
  font-size: 13px;
  font-weight: 800;
}
.pickup-code {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(47,123,74,.18);
  border-radius: 999px;
  background: var(--green-2);
  color: var(--green);
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  white-space: nowrap;
}
.customer-code {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(34,113,141,.18);
  border-radius: 999px;
  background: var(--blue-2);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  white-space: nowrap;
}
.arrival-time {
  flex: 0 0 auto;
  font-size: 14px;
}
.order-subline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.order-subline span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: #f6f8f3;
  border: 1px solid rgba(223,229,217,.86);
}
.order-subline .label-state {
  font-weight: 800;
}
.order-subline .label-state.pending {
  color: var(--red);
  background: var(--red-2);
  border-color: rgba(196,75,56,.2);
}
.order-subline .label-state.printed {
  color: var(--green);
  background: var(--green-2);
  border-color: rgba(47,123,74,.2);
}
.order-total-text {
  display: block;
  margin-top: 7px;
  color: var(--green);
  font-size: 13px;
}
.address-line {
  min-height: 32px;
  padding: 7px 8px;
  border-radius: 8px;
  background: #f7faf3;
  color: #405141;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  line-height: 1.45;
}
.address-line.small {
  min-height: 28px;
  padding: 6px 8px;
}
.address-line svg {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  color: var(--green);
  flex: 0 0 auto;
}
.order-items {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.order-print-attention {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(194, 119, 17, .24);
  border-radius: 8px;
  background: var(--amber-2);
  color: #7b4b09;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  line-height: 1.45;
}
.order-resolution-alert,.manual-review-summary,.manual-review-alert{display:grid;gap:6px;padding:10px 12px;border:1px solid #e7ad55;border-radius:10px;background:#fff8e8;color:#754b0b;font-size:13px;line-height:1.5}
.order-resolution-alert.refund_processing{border-color:#b7d9c7;background:#eef7f2;color:#176343}
.manual-review-summary{margin-bottom:12px}
.manual-exception-queue{gap:12px}
.manual-exception-head,.manual-exception-card>div{display:flex;align-items:center;justify-content:space-between;gap:12px}
.manual-exception-head button,.manual-exception-card button{border:1px solid #b6cbbf;border-radius:9px;background:#fff;color:#176f55;padding:7px 10px;font:inherit;cursor:pointer}
.manual-exception-card{display:grid;gap:7px;padding:11px;border:1px solid #e5e6dd;border-radius:10px;background:#fff}
.manual-exception-card p,.manual-exception-card small{margin:0}
.manual-exception-card small{color:#68736d}
.order-print-attention svg {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  flex: 0 0 auto;
}
.order-actions {
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.order-actions button {
  min-height: 31px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.order-actions button svg { width: 15px; height: 15px; }
.order-actions button[data-order-status$=":completed"] {
  color: var(--green);
  background: var(--green-2);
  border-color: rgba(47,123,74,.22);
}
.order-actions button[data-verify-order] {
  color: var(--green);
  background: var(--green-2);
  border-color: rgba(47,123,74,.22);
  font-weight: 800;
}
.order-actions button[data-order-status$=":submitted"] {
  color: var(--green);
  background: var(--green-2);
  border-color: rgba(47,123,74,.22);
  font-weight: 800;
}
.order-actions button[data-order-status$=":no_show"] {
  color: var(--red);
  background: var(--red-2);
  border-color: rgba(196,75,56,.2);
}
.order-actions button[data-order-status$=":rejected"] {
  color: var(--red);
  background: var(--red-2);
  border-color: rgba(196,75,56,.2);
  font-weight: 800;
}
.order-actions button[data-order-detail] {
  color: var(--blue);
  background: var(--blue-2);
  border-color: rgba(34,113,141,.2);
}
.status-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 12px;
}
.status-filter button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 12px;
  white-space: nowrap;
  color: var(--muted);
}
.status-filter button.active {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}
.admin-list-tools {
  display: grid;
  grid-template-columns: minmax(260px, 520px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.admin-search-control {
  min-width: 0;
  height: 40px;
  padding: 0 7px 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.admin-search-control:focus-within {
  border-color: rgba(23, 114, 79, .55);
  box-shadow: 0 0 0 3px rgba(23, 114, 79, .09);
}
.admin-search-control > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}
.admin-search-control input {
  min-width: 0;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.admin-search-control input:focus { box-shadow: none; }
.admin-search-control input[type="search"]::-webkit-search-cancel-button {
  appearance: none;
  -webkit-appearance: none;
}
.search-clear {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
}
.search-clear svg { width: 15px; height: 15px; }
.admin-list-summary {
  min-width: 0;
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.log-filter button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.log-filter button b {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.log-filter button.active b {
  background: rgba(255,255,255,.2);
  color: #fff;
}
.log-order-filter {
  min-width: 0;
  margin: -2px 0 12px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.log-order-filter[hidden] { display: none; }
.log-order-filter button {
  min-height: 34px;
  flex: 0 0 auto;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.log-order-filter button b {
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}
.log-order-filter button.active {
  border-color: rgba(23,114,79,.3);
  background: var(--green-2);
  color: var(--green);
  font-weight: 800;
}
.log-order-filter button.active b { background: #fff; }
.insight-list {
  display: grid;
  gap: 9px;
}
.insight {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  display: grid;
  gap: 4px;
  background: #fff;
}
.insight strong {
  font-size: 13px;
}
.insight span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.insight.green { border-color: rgba(47,123,74,.22); background: var(--green-2); }
.insight.amber { border-color: rgba(182,106,28,.22); background: var(--amber-2); }
.insight.blue { border-color: rgba(46,102,126,.22); background: var(--blue-2); }
.form-grid {
  display: grid;
  gap: 10px;
}
.settings-form {
  max-width: 720px;
}

.settings-permission-hint {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #ecd9a6;
  border-radius: 10px;
  background: #fff8e7;
  color: #765917;
}
.settings-status-card {
  border: 1px solid rgba(47,123,74,.18);
  border-radius: var(--radius);
  background: #fbfcf8;
  padding: 12px;
  display: grid;
  gap: 10px;
}
.settings-status-title {
  display: grid;
  gap: 3px;
}
.settings-status-title strong {
  font-size: 14px;
}
.settings-status-title span {
  color: var(--muted);
  font-size: 12px;
}
.settings-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.settings-status-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 9px;
  display: grid;
  gap: 4px;
}
.settings-status-item b {
  min-width: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.settings-status-item em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}
.settings-status-item.green {
  border-color: rgba(47,123,74,.22);
  background: var(--green-2);
}
.settings-status-item.green em {
  color: var(--green);
}
.settings-status-item.amber {
  border-color: rgba(182,106,28,.22);
  background: var(--amber-2);
}
.log-list-shell { min-width: 0; }
.log-list { display: grid; gap: 14px; }
.log-day-section { min-width: 0; }
.log-day-heading {
  min-height: 28px;
  padding: 0 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.log-day-heading strong { font-size: 13px; }
.log-day-heading span { color: var(--muted); font-size: 11px; }
.log-day-rows {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.log-row {
  min-width: 0;
  min-height: 72px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 54px 32px minmax(0, 1fr) minmax(90px, auto) auto;
  align-items: center;
  gap: 10px;
}
.log-row:last-child { border-bottom: 0; }
.log-row.new { box-shadow: inset 3px 0 var(--green); }
.log-row.success { background: rgba(235,247,239,.38); }
.log-row.exception {
  background: rgba(255,241,238,.62);
  box-shadow: inset 3px 0 var(--red);
}
.log-time {
  min-width: 0;
  display: grid;
  gap: 2px;
  color: var(--ink);
  font-style: normal;
}
.log-time strong { font-size: 14px; }
.log-time span { color: var(--muted); font-size: 10px; }
.log-event-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.log-event-icon svg { width: 16px; height: 16px; }
.log-row.new .log-event-icon,
.log-row.success .log-event-icon { background: var(--green-2); color: var(--green); }
.log-row.exception .log-event-icon { background: var(--red-2); color: var(--red); }
.log-content { min-width: 0; display: grid; gap: 4px; }
.log-title-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.log-category-badge {
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-size: 11px !important;
  line-height: 1;
}
.log-category-badge.order {
  border-color: rgba(23,114,79,.2);
  background: var(--green-2);
  color: var(--green);
}
.log-category-badge.security {
  border-color: rgba(199,118,18,.22);
  background: var(--amber-2);
  color: var(--amber);
}
.log-category-badge.dish {
  border-color: rgba(34,113,141,.2);
  background: var(--blue-2);
  color: var(--blue);
}
.log-category-badge.business {
  border-color: rgba(217,74,49,.16);
  background: var(--red-2);
  color: var(--red);
}
.log-content p {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.log-context {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.log-context span {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.log-context span + span::before {
  content: "·";
  margin-right: 8px;
  color: #b7beb2;
}
.log-operator {
  min-width: 88px;
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
}
.log-operator span { color: var(--ink-2); font-weight: 700; }
.log-operator small { color: var(--muted); font-size: 10px; }
.log-order-link {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid rgba(34,113,141,.2);
  border-radius: 6px;
  background: var(--blue-2);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
}
.log-order-link svg { width: 15px; height: 15px; }
.upload-preview {
  min-height: 138px;
  border: 1px dashed #b7c3b0;
  border-radius: var(--radius);
  background: #fbfcf8;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  overflow: hidden;
}
.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.upload-preview svg {
  width: 28px;
  height: 28px;
  margin-bottom: 5px;
  color: var(--green);
}
.dish-choice-editor {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dbe6dc;
  border-radius: var(--radius);
  background: #f8fbf8;
}
.dish-choice-editor[hidden] { display: none; }
.dish-choice-editor-head { display: grid; gap: 3px; }
.dish-choice-editor-head small { color: var(--muted); line-height: 1.45; }
.dish-choice-rows { display: grid; gap: 8px; }
.dish-choice-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 110px;
  gap: 8px;
  align-items: center;
}
.dish-choice-row b { color: var(--green); text-align: center; }
.dish-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.dish-library-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.dish-library-toolbar button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #e4dac8;
  border-radius: 999px;
  background: #fff;
  color: #4f5a4c;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dish-library-toolbar button b {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}
.dish-library-toolbar button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 18px rgba(18, 126, 74, .16);
}
.dish-library-toolbar button.active b {
  background: rgba(255,255,255,.18);
  color: #fff;
}
.dish-library-tools {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.dish-library-search {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #e4dac8;
  border-radius: 12px;
  background: #fffdf8;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.dish-library-search svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}
.dish-library-search input {
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 0;
  flex: 1;
  color: var(--ink);
  font: inherit;
}
.dish-library-shell {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.dish-library-directory {
  position: sticky;
  top: 8px;
  display: grid;
  gap: 7px;
  min-width: 0;
}
.dish-library-directory button {
  min-height: 48px;
  padding: 8px 9px;
  border: 1px solid #e4dac8;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fffaf1);
  color: #263026;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  box-shadow: 0 6px 14px rgba(43,36,21,.035);
}
.dish-library-directory button span {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.dish-library-directory strong {
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dish-library-directory small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dish-library-directory b {
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(18,126,74,.08);
  color: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.dish-library-directory button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 22px rgba(18,126,74,.16);
}
.dish-library-directory button.active small,
.dish-library-directory button.active b {
  color: rgba(255,255,255,.86);
}
.dish-library-directory button.active b {
  background: rgba(255,255,255,.18);
}
.dish-library-results {
  min-width: 0;
  display: grid;
  gap: 8px;
}
.dish-library-summary {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #eee3d1;
  border-radius: 10px;
  background: #fffdf7;
  color: #6a7465;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-dish {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(43,36,21,.04);
}
.admin-dish.is-hidden {
  background: #fbfaf6;
  border-style: dashed;
}
.admin-dish.is-hidden .admin-dish-photo {
  filter: grayscale(.3) saturate(.82);
  opacity: .72;
}
.admin-dish-photo {
  height: 104px;
}
.admin-dish-body {
  padding: 10px;
  display: grid;
  gap: 6px;
}
.admin-dish-title {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.admin-dish-title strong {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  font-weight: 850;
}
.admin-combo-text {
  min-height: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
  overflow-wrap: anywhere;
}
.admin-dish-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.admin-dish-actions button {
  min-height: 32px;
  border: 1px solid #e2d9ca;
  border-radius: 999px;
  background: #fff;
  color: #1670a4;
  font-weight: 700;
  font-size: 12px;
  padding: 0 6px;
}
.admin-dish-actions button[data-edit-dish] {
  color: var(--green);
  background: var(--green-2);
  border-color: rgba(47,123,74,.22);
}
.admin-dish-actions button[data-toggle-hidden-dish] {
  color: var(--amber);
  background: var(--amber-2);
  border-color: rgba(196,113,22,.22);
}
.admin-dish.is-hidden .admin-dish-actions button[data-toggle-hidden-dish] {
  color: var(--green);
  background: var(--green-2);
  border-color: rgba(47,123,74,.22);
}
.prep-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.prep-card b {
  color: var(--green);
  font-size: 13px;
  white-space: nowrap;
}
.prep-card b.amber { color: var(--amber); }
.prep-card b.green { color: var(--green); }
.time-bars {
  display: grid;
  gap: 11px;
}
.time-bar {
  display: grid;
  grid-template-columns: 84px 1fr 46px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.time-bar span {
  color: var(--muted);
}
.time-bar div {
  height: 8px;
  border-radius: 999px;
  background: #edf2e9;
  overflow: hidden;
}
.time-bar i {
  display: block;
  height: 100%;
  width: var(--w, 50%);
  border-radius: inherit;
  background: var(--green);
}
.time-bar b {
  text-align: right;
  font-size: 12px;
}
.surplus-list.admin .surplus-card {
  background: #fff;
}
.surplus-admin-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
}
.surplus-admin-row .surplus-card {
  border: 0;
  padding: 0;
}
.message-list.admin .message-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.reply-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}
.reply-box input {
  min-width: 160px;
}
.empty-card {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.combo-modal {
  position: fixed;
  inset: 0;
  z-index: 26;
  display: none;
}
.combo-modal.show {
  display: block;
}
.order-verify-modal { z-index: 1950; }
.print-choice-sheet { max-width: 440px; }
.print-choice-actions {
  display: grid;
  gap: 10px;
}
.print-choice-actions button {
  width: 100%;
  justify-content: flex-start;
}
.order-detail-open { overflow: hidden; }
.order-detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 1900;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.order-detail-drawer.show {
  opacity: 1;
  pointer-events: auto;
}
.order-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 20, .42);
  backdrop-filter: blur(2px);
}
.order-detail-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(540px, 100vw);
  height: 100%;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -18px 0 46px rgba(24, 37, 27, .18);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  transform: translateX(24px);
  transition: transform .2s ease;
}
.order-detail-drawer.show .order-detail-panel { transform: translateX(0); }
.order-detail-head {
  min-width: 0;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.order-detail-head > div { min-width: 0; }
.order-detail-head h3 {
  margin: 5px 0 3px;
  font-size: 20px;
  overflow-wrap: anywhere;
}
.order-detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.order-detail-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.order-detail-identity,
.order-detail-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.order-detail-identity .customer-line { flex-wrap: wrap; }
.order-detail-identity .customer-line > div {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 2px;
}
.order-detail-identity .customer-line > div strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-detail-identity .customer-line > div small {
  color: var(--blue);
  font-size: 11px;
}
.order-detail-contact {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.order-detail-contact span {
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.order-detail-summary {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.order-detail-summary > div {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbf8;
  display: grid;
  gap: 4px;
}
.order-detail-summary span {
  color: var(--muted);
  font-size: 11px;
}
.order-detail-summary strong {
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.order-detail-summary strong.green { color: var(--green); }
.order-detail-summary strong.blue { color: var(--blue); }
.order-detail-summary strong.amber { color: var(--amber); }
.order-detail-summary strong.red { color: var(--red); }
.order-detail-print-attention {
  margin: 0 14px;
}
.order-detail-section-title {
  min-height: 30px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.order-detail-section-title h4 { margin: 0; font-size: 15px; }
.order-detail-section-title > span { color: var(--muted); font-size: 12px; }
.order-detail-items { display: grid; }
.order-detail-item {
  min-width: 0;
  min-height: 46px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 64px;
  align-items: center;
  gap: 9px;
}
.order-detail-item:last-child { border-bottom: 0; }
.order-detail-item > div { min-width: 0; display: grid; gap: 3px; }
.order-detail-item > div strong,
.order-detail-item > div span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-detail-item > div span { color: var(--muted); font-size: 11px; }
.order-detail-item > span { color: var(--muted); font-size: 12px; }
.order-detail-item > b { text-align: right; font-size: 13px; }
.order-timeline { position: relative; display: grid; gap: 4px; }
.order-timeline-event {
  position: relative;
  min-width: 0;
  padding: 5px 0 10px 38px;
  display: grid;
}
.order-timeline-event::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 31px;
  bottom: -5px;
  width: 1px;
  background: var(--line);
}
.order-timeline-event:last-child::before { display: none; }
.order-timeline-icon {
  position: absolute;
  left: 0;
  top: 4px;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(23,114,79,.18);
  border-radius: 50%;
  background: var(--green-2);
  color: var(--green);
  display: grid;
  place-items: center;
}
.order-timeline-event.failed .order-timeline-icon {
  border-color: rgba(217,74,49,.2);
  background: var(--red-2);
  color: var(--red);
}
.order-timeline-icon svg { width: 14px; height: 14px; }
.order-timeline-event > div { min-width: 0; }
.order-timeline-title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.order-timeline-title strong { font-size: 13px; }
.order-timeline-title time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.order-timeline-event p {
  margin: 3px 0;
  color: #465046;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.order-timeline-event small { color: var(--muted); font-size: 11px; }
.order-detail-actions {
  min-height: 62px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}
.order-detail-actions > button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.order-detail-actions > button[data-order-status$=":submitted"],
.order-detail-actions > button[data-verify-order] {
  border-color: rgba(23,114,79,.2);
  background: var(--green-2);
  color: var(--green);
}
.order-detail-actions > button[data-order-status$=":rejected"],
.order-detail-actions > button[data-order-status$=":no_show"] {
  border-color: rgba(217,74,49,.2);
  background: var(--red-2);
  color: var(--red);
}
.order-detail-actions svg { width: 15px; height: 15px; }
.combo-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17,24,16,.38);
  backdrop-filter: blur(2px);
}
.combo-sheet {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: min(390px, calc(100vw - 24px));
  max-height: min(78vh, 640px);
  transform: translateX(-50%);
  overflow-y: auto;
  border: 1px solid rgba(47,123,74,.18);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 14px;
  display: grid;
  gap: 12px;
}
.order-verify-sheet .verify-rule-note {
  padding: 9px 10px;
  border-radius: 8px;
  background: #f5f8f2;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.combo-head {
  display: grid;
  grid-template-columns: 1fr 36px;
  gap: 10px;
  align-items: start;
}
.combo-head h3 {
  margin: 6px 0 3px;
  font-size: 18px;
  letter-spacing: 0;
}
.combo-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.fulfillment-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.fulfillment-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}
.fulfillment-tabs button.active {
  background: #fff;
  color: var(--green);
  box-shadow: 0 4px 12px rgba(35,43,32,.08);
}
.delivery-rule {
  min-height: 42px;
  border: 1px solid rgba(46,102,126,.2);
  border-radius: 12px;
  background: var(--blue-2);
  color: #315b66;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.35;
}
.delivery-rule svg,
.delivery-rule .fallback-icon {
  color: var(--blue);
  width: 17px;
  height: 17px;
}
.combo-groups {
  display: grid;
  gap: 12px;
}
.combo-group {
  display: grid;
  gap: 8px;
}
.combo-group-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.combo-group-title strong {
  font-size: 14px;
}
.combo-group-title span {
  color: var(--muted);
  font-size: 12px;
}
.combo-options {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.combo-options button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 12px;
  color: var(--ink);
}
.combo-options button.active {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}
.combo-summary {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(47,123,74,.2);
  border-radius: var(--radius);
  background: var(--green-2);
  padding: 10px;
}
.combo-summary span {
  color: var(--green);
  font-size: 12px;
}
.combo-summary strong {
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 30;
  transform: translateX(-50%) translateY(14px);
  min-height: 42px;
  max-width: min(420px, calc(100vw - 24px));
  padding: 0 14px;
  border-radius: 8px;
  color: #fff;
  background: rgba(32,38,31,.94);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 390px minmax(0, 1fr);
  }
  .ops-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prep-logic-card { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-grid, .admin-grid.wide-left { grid-template-columns: 1fr; }
  .dish-admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .shell { padding: 8px; gap: 8px; }
  .topbar {
    min-height: 52px;
    padding: 8px 10px;
    border-radius: 12px;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
  }
  .topbar { align-items: flex-start; }
  .brand-copy span { display: none; }
  .top-actions { gap: 6px; }
  .mode-btn span, .ghost-btn span { display: none; }
  .workspace { display: block; }
  .student-pane, .admin-pane { display: none; }
  .student-pane.active-pane, .admin-pane.active-pane { display: flex; }
  .student-pane { position: static; }
  .phone-frame {
    width: 100%;
    height: calc(100vh - 86px);
    min-height: 620px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .student-app { border-radius: 0; }
  .admin-pane.active-pane {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
    min-height: calc(100vh - 86px);
    box-shadow: none;
    border-radius: 0;
  }
  .admin-side {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .side-title { display: none; }
  .admin-side button {
    flex: 0 0 auto;
  }
  .admin-side .admin-logout {
    margin-top: 0;
    border-top: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
  }
  .admin-main { padding: 10px; }
  .panel-title {
    align-items: flex-start;
    flex-direction: column;
  }
  .customer-line { flex-wrap: wrap; }
  .order-detail-panel {
    top: auto;
    bottom: 0;
    width: 100%;
    height: min(90vh, 760px);
    border-top: 1px solid var(--line);
    border-left: 0;
    border-radius: 8px 8px 0 0;
    transform: translateY(24px);
  }
  .order-detail-drawer.show .order-detail-panel { transform: translateY(0); }
  .order-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-detail-actions { justify-content: flex-start; }
  .admin-list-tools {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }
  .admin-list-summary { justify-self: start; }
  .order-card, .message-list.admin .message-card {
    grid-template-columns: 1fr;
  }
  .order-actions { justify-content: flex-start; }
  .order-headline {
    align-items: flex-start;
    flex-direction: column;
  }
  .arrival-time { font-size: 13px; }
  .ops-board { grid-template-columns: 1fr; }
  .prep-logic-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log-row {
    grid-template-columns: 48px 30px minmax(0, 1fr) auto;
    grid-template-areas:
      "time icon content action"
      ". . operator action";
    align-items: start;
  }
  .log-time { grid-area: time; }
  .log-event-icon { grid-area: icon; }
  .log-content { grid-area: content; }
  .log-operator {
    grid-area: operator;
    min-width: 0;
    display: flex;
    justify-content: flex-start;
    gap: 6px;
  }
  .log-order-link { grid-area: action; align-self: center; }
}

@media (max-width: 600px) {
  .log-order-filter { margin-bottom: 10px; }
  .log-row {
    grid-template-columns: 32px minmax(0, 1fr) 48px;
    grid-template-areas:
      "icon content action"
      "time content action"
      ". operator operator";
    padding: 10px;
    gap: 6px 8px;
  }
  .log-time { align-self: start; }
  .log-time strong { font-size: 11px; }
  .log-time span { display: none; }
  .log-event-icon { width: 30px; height: 30px; }
  .log-title-line { gap: 5px; }
  .log-content p { font-size: 11px; }
  .log-context { gap: 3px 6px; }
  .log-context span { font-size: 10px; }
  .log-context span + span::before { margin-right: 6px; }
  .log-operator { font-size: 10px; }
  .log-order-link {
    width: 48px;
    min-width: 48px;
    padding: 0;
    font-size: 10px;
  }
  .log-order-link svg { display: none; }
}

@media (min-width: 600px) and (max-width: 860px) {
  .student-scroll {
    padding: 10px 16px 12px;
  }
  .hero {
    min-height: 142px;
  }
  .home-entry-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .home-entry-grid button {
    min-height: 82px;
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 10px 9px;
  }
  .home-entry-grid i {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }
  .home-entry-grid strong {
    font-size: 15px;
  }
  .mascot-strip,
  .mini-order-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .product-reco-card {
    grid-template-columns: 190px minmax(0, 1fr);
    height: 176px;
    min-height: 176px;
  }
  .reco-photo-wrap,
  .focus-photo {
    height: 100%;
    min-height: 0;
  }
  .reco-reason {
    max-width: 360px;
  }
  .ordering-layout {
    grid-template-columns: 94px minmax(0, 1fr);
  }
  .ordering-layout .dish-card {
    grid-template-columns: 142px minmax(0, 1fr);
  }
  .ordering-layout .dish-photo {
    width: 142px;
  }
}

@media (max-width: 430px) {
  .brand-copy strong { font-size: 14px; max-width: 150px; }
  .mode-btn, .primary-btn, .ghost-btn, .text-btn, .icon-btn, .danger-btn { min-height: 34px; padding: 0 10px; }
  .student-scroll { padding: 10px 10px 12px; }
  .student-head { padding: 12px 14px 10px; }
  .shop-line h1 { font-size: 21px; }
  .hero { min-height: 154px; padding: 13px; }
  .hero-art { background-position: 37% center; }
  .brush-title { font-size: 34px; }
  .hero h2 { font-size: 17px; }
  .dish-card { grid-template-columns: 132px 1fr; min-height: 132px; }
  .dish-photo { width: 132px; height: 100%; min-height: 132px; }
  .dish-info { padding: 8px 9px 8px 10px; gap: 5px; }
  .dish-main h4 { font-size: 16px; }
  .dish-subline { font-size: 11px; }
  .dish-rules {
    flex-wrap: nowrap;
    overflow: hidden;
  }
  .tag, .pill { font-size: 11px; padding: 3px 6px; white-space: nowrap; }
  .price-note { font-size: 11px; }
  .price-note b { font-size: 14px; }
  .dish-cta { min-height: 32px; padding: 0 10px; }
  .cart-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-left: 0;
    margin-right: 0;
  }
  .metrics, .dish-admin-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .simple-actions { gap: 6px; }
  .simple-actions button { min-height: 58px; padding: 7px 4px; }
  .dish-focus { grid-template-columns: 138px minmax(0, 1fr); min-height: 148px; }
  .focus-photo { width: 100%; height: 100%; min-height: 148px; }
  .reco-photo-wrap { min-height: 148px; }
  .focus-card h3 { font-size: 18px; }
  .product-reco-card {
    grid-template-columns: 132px minmax(0, 1fr);
    height: 188px;
    min-height: 188px;
  }
  .product-reco-card .reco-photo-wrap,
  .product-reco-card .focus-photo {
    height: 100%;
    min-height: 0;
  }
  .product-reco-card .focus-copy {
    padding: 8px 8px 7px;
    gap: 4px;
  }
  .product-reco-card .soft-label.dark {
    min-height: 21px;
    padding: 0 6px;
    font-size: 11px;
  }
  .product-reco-card .focus-card h3,
  .product-reco-card h3 {
    font-size: 17px;
  }
  .product-reco-card p {
    -webkit-line-clamp: 1;
    font-size: 11px;
  }
  .product-reco-card .reco-reason {
    display: none;
  }
  .product-reco-card .focus-actions {
    gap: 5px;
  }
  .product-reco-card .focus-actions .ghost-btn {
    display: none;
  }
  .product-reco-card .focus-actions .primary-btn {
    min-height: 30px;
    padding: 0 10px;
  }
  .product-reco-card .recommend-controls {
    grid-template-columns: 26px 1fr 26px;
    gap: 5px;
  }
  .product-reco-card .recommend-controls button {
    width: 26px;
    height: 26px;
  }
  .menu-tail-card {
    grid-template-columns: 1fr;
    min-height: 120px;
  }
  .menu-tail-card > div:last-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .focus-actions .ghost-btn span { display: inline; }
  .share-card { grid-template-columns: 1fr; }
  .reply-box { flex-direction: column; }
  .admin-dish {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    min-height: 108px;
  }
  .admin-dish-photo {
    width: 108px;
    height: 108px;
    min-height: 108px;
  }
  .admin-dish .photo-badge {
    left: 7px;
    bottom: 7px;
    font-size: 11px;
  }
  .admin-dish-body {
    padding: 9px;
    gap: 5px;
  }
  .admin-combo-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .admin-dish-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .admin-dish-actions button {
    min-height: 30px;
    padding: 0 4px;
    font-size: 11px;
  }
  .customer-line {
    flex-wrap: wrap;
  }
  .pickup-code {
    width: fit-content;
  }
}

/* Mobile acceptance fixes: tighter recommendation, menu, labels, and admin dish cards. */
.order-items,
.order-items .tag {
  min-width: 0;
}
.order-items .tag {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.address-line span,
.admin-combo-text,
.price-note,
.dish-subline {
  min-width: 0;
}

@media (max-width: 600px) {
  .product-reco-card {
    position: relative;
    grid-template-columns: 124px minmax(0, 1fr);
    min-height: 142px;
    height: 142px;
    border-radius: 14px;
  }
  .product-reco-card .reco-photo-wrap,
  .product-reco-card .focus-photo {
    min-height: 0;
    height: 100%;
  }
  .product-reco-card .focus-copy {
    position: relative;
    min-height: 0;
    padding: 7px 8px 7px;
    gap: 4px;
    justify-content: flex-start;
  }
  .product-reco-card .recommend-head {
    gap: 5px;
  }
  .product-reco-card .soft-label.dark {
    max-width: calc(100% - 34px);
    min-height: 21px;
    padding: 0 7px;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .product-reco-card h3 {
    font-size: 17px;
    line-height: 1.16;
  }
  .product-reco-card .dish-meta {
    max-height: 46px;
    flex-wrap: wrap;
    overflow: hidden;
    gap: 4px;
  }
  .product-reco-card .dish-meta .tag:nth-child(n+4) {
    display: none;
  }
  .product-reco-card .focus-actions {
    margin-top: 1px;
    gap: 5px;
  }
  .product-reco-card .focus-actions .primary-btn {
    min-height: 29px;
    padding: 0 10px;
    box-shadow: 0 6px 12px rgba(208,146,0,.18);
  }
  .product-reco-card .recommend-controls {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 104px;
    grid-template-columns: 25px 1fr 25px;
    gap: 4px;
  }
  .product-reco-card .recommend-controls button {
    width: 25px;
    height: 25px;
  }
  .product-reco-card .recommend-controls i {
    width: 5px;
    height: 5px;
  }
  .product-reco-card .recommend-controls i.active {
    width: 14px;
  }
  .home-entry-grid {
    gap: 8px;
  }
  .home-entry-grid button {
    min-height: 68px;
    padding: 9px 8px;
  }
  .home-entry-grid strong {
    font-size: 16px;
    line-height: 1.15;
  }
  .home-entry-grid b {
    line-height: 1.25;
  }

  .ordering-layout {
    display: block;
  }
  .menu-category-rail {
    position: sticky;
    z-index: 4;
    top: 0;
    display: flex;
    gap: 7px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 8px;
    margin: 0 0 8px;
    background: rgba(250,248,242,.96);
  }
  .cat-chip {
    flex: 0 0 auto;
    min-width: 62px;
    min-height: 36px;
    border-radius: 999px;
    padding: 5px 10px;
    display: inline-flex;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
  }
  .cat-chip.active {
    box-shadow: inset 2px 0 0 var(--brand), 0 5px 10px rgba(23,114,79,.14);
  }
  .cat-chip span {
    line-height: 1;
  }
  .cat-chip small {
    font-size: 10px;
  }
  .menu-section-head {
    margin-bottom: 7px;
  }
  .menu-section-head h3 {
    font-size: 16px;
  }
  .ordering-layout .dish-card {
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 120px;
    border-radius: 14px;
  }
  .ordering-layout .dish-photo {
    width: 112px;
    min-height: 120px;
  }
  .ordering-layout .dish-info {
    min-width: 0;
    padding: 8px 8px 7px;
    gap: 4px;
  }
  .ordering-layout .dish-main {
    min-width: 0;
  }
  .ordering-layout .dish-main h4 {
    font-size: 16px;
    line-height: 1.18;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }
  .ordering-layout .dish-subline {
    max-width: none;
    white-space: normal;
    line-height: 1.2;
  }
  .ordering-layout .dish-rules {
    flex-wrap: wrap;
    max-height: 48px;
    overflow: hidden;
  }
  .ordering-layout .price-note {
    white-space: normal;
    line-height: 1.28;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .ordering-layout .dish-actions {
    align-items: flex-end;
  }
  .ordering-layout .dish-tags {
    max-height: 24px;
  }
  .ordering-layout .dish-cta {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 9px;
  }
}

@media (max-width: 430px) {
  .student-scroll {
    padding: 8px 8px 12px;
  }
  .product-reco-card {
    grid-template-columns: 116px minmax(0, 1fr);
    min-height: 136px;
    height: 136px;
  }
  .product-reco-card .focus-copy {
    padding: 7px 7px 7px;
  }
  .product-reco-card .dish-meta {
    max-height: 42px;
  }
  .product-reco-card .focus-actions .primary-btn {
    min-height: 28px;
    padding: 0 9px;
  }
  .product-reco-card .recommend-controls {
    bottom: 7px;
    right: 7px;
    width: 96px;
  }
  .tag,
  .pill {
    white-space: normal;
  }
  .dish-card {
    grid-template-columns: 120px minmax(0, 1fr);
    min-height: 124px;
  }
  .dish-photo {
    width: 120px;
    min-height: 124px;
  }
  .price-note {
    white-space: normal;
  }
  .admin-main {
    padding: 8px;
  }
  .dish-admin-grid {
    gap: 8px;
  }
  .admin-dish {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 110px;
    border-radius: 13px;
  }
  .admin-dish-photo {
    width: 96px;
    height: 100%;
    min-height: 110px;
  }
  .admin-dish-body {
    min-width: 0;
    padding: 8px;
    gap: 4px;
  }
  .admin-dish-title {
    align-items: flex-start;
  }
  .admin-dish-title strong {
    font-size: 15px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }
  .admin-dish-body .hint {
    white-space: normal;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .admin-dish .dish-meta {
    max-height: 46px;
    overflow: hidden;
    gap: 4px;
  }
  .admin-dish .dish-meta .tag:nth-child(n+4) {
    display: none;
  }
  .admin-combo-text {
    margin: 0;
    line-height: 1.28;
    -webkit-line-clamp: 1;
  }
  .admin-dish-body > div:nth-last-child(2) {
    max-height: 23px;
    overflow: hidden;
  }
  .admin-dish-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }
  .admin-dish-actions button {
    min-height: 28px;
    padding: 0 3px;
    font-size: 11px;
  }
  .order-card {
    overflow: hidden;
  }
  .order-main,
  .order-items {
    min-width: 0;
  }
  .order-items {
    max-width: 100%;
    overflow: hidden;
  }
  .order-items .tag {
    flex: 1 1 140px;
    max-width: 100%;
    align-items: flex-start;
    line-height: 1.25;
  }
}

/* Takeout-style product layout: fixed image ratios and predictable mobile density. */
.merchant-reco-strip {
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid rgba(231,226,215,.92);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 9px 22px rgba(24,22,18,.08);
}
.merchant-reco-head {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.merchant-reco-head h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.15;
  font-weight: 850;
}
.merchant-reco-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 1px 2px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.merchant-reco-scroll::-webkit-scrollbar {
  display: none;
}
.merchant-reco-card {
  flex: 0 0 112px;
  width: 112px;
  min-width: 112px;
  border-radius: 11px;
  background: #fff;
  scroll-snap-align: start;
  overflow: hidden;
}
.merchant-reco-photo {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 10px;
  overflow: hidden;
  background-image: var(--photo);
  background-size: cover;
  background-position: var(--photo-pos, center);
  background-repeat: no-repeat;
}
.merchant-reco-photo span {
  position: absolute;
  left: 6px;
  bottom: 6px;
  max-width: calc(100% - 12px);
  min-height: 20px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #fff;
  background: rgba(16,18,15,.74);
  font-size: 10px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.merchant-reco-photo span.blue { background: rgba(46,102,126,.88); }
.merchant-reco-photo span.green { background: rgba(47,123,74,.88); }
.merchant-reco-photo span.amber { background: rgba(198,118,18,.88); }
.merchant-reco-photo span.hot { background: rgba(196,75,56,.88); }
.merchant-reco-card strong {
  min-height: 34px;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #161a15;
  font-size: 13px;
  line-height: 1.28;
  font-weight: 800;
}
.merchant-reco-card small {
  margin-top: 2px;
  display: block;
  color: #9a9a94;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.merchant-reco-foot {
  margin-top: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 6px;
}
.merchant-reco-foot b {
  min-width: 0;
  color: #22231f;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-add {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #050505;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 5px 12px rgba(0,0,0,.18);
}
.mini-add svg,
.mini-add .fallback-icon {
  width: 16px;
  height: 16px;
}

@media (max-width: 600px) {
  .merchant-reco-strip {
    margin-top: 8px;
    padding: 10px 10px 12px;
    border-radius: 14px;
  }
  .merchant-reco-card {
    flex-basis: 108px;
    width: 108px;
    min-width: 108px;
  }
  .merchant-reco-photo {
    width: 108px;
    height: 108px;
  }
  .ordering-layout {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }
  .menu-category-rail {
    position: sticky;
    top: 0;
    z-index: 4;
    display: grid;
    gap: 0;
    max-height: calc(100vh - 230px);
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
    padding: 0 0 88px;
    border-radius: 0;
    background: #f4f3ef;
  }
  .cat-chip {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 0;
    padding: 6px 5px;
    background: transparent;
    color: #7e817a;
    display: grid;
    place-items: center;
    gap: 2px;
    font-size: 12px;
    line-height: 1.12;
    white-space: normal;
  }
  .cat-chip.active {
    background: #fff;
    color: #121511;
    border-left-color: #101010;
    box-shadow: none;
  }
  .cat-chip small {
    font-size: 10px;
  }
  .menu-dish-pane {
    min-width: 0;
  }
  .menu-section-head {
    margin-bottom: 8px;
  }
  .menu-section-head h3 {
    font-size: 16px;
  }
  .ordering-layout .dish-list {
    gap: 0;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
  }
  .ordering-layout .dish-card {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 112px;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid rgba(231,226,215,.75);
    border-radius: 0;
    box-shadow: none;
    background: #fff;
  }
  .ordering-layout .dish-photo {
    width: 96px;
    height: 96px;
    min-height: 96px;
    margin: 0;
    border-radius: 8px;
    background-size: cover;
    background-position: var(--photo-pos, center);
    align-self: start;
  }
  .ordering-layout .photo-badge {
    left: 5px;
    bottom: 5px;
    min-height: 19px;
    max-width: calc(100% - 10px);
    padding: 3px 6px;
    border-radius: 999px;
    font-size: 10px;
  }
  .ordering-layout .dish-info {
    min-width: 0;
    min-height: 96px;
    padding: 0 8px 0 10px;
    gap: 4px;
    display: flex;
    flex-direction: column;
  }
  .ordering-layout .dish-main {
    min-width: 0;
  }
  .ordering-layout .dish-main h4 {
    font-size: 15px;
    line-height: 1.24;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .ordering-layout .dish-subline {
    max-width: none;
    color: #9a9a94;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
  }
  .ordering-layout .dish-rules {
    max-height: 22px;
    flex-wrap: nowrap;
    overflow: hidden;
    gap: 4px;
  }
  .ordering-layout .dish-rules .tag:nth-child(n+3) {
    display: none;
  }
  .ordering-layout .price-note {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #9a9a94;
    font-size: 11px;
    line-height: 1.3;
  }
  .ordering-layout .price-note b {
    color: #22231f;
    font-size: 15px;
  }
  .ordering-layout .dish-actions {
    margin-top: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 6px;
  }
  .ordering-layout .dish-tags {
    display: none;
  }
  .ordering-layout .dish-cta {
    min-width: 34px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
  }
}

@media (max-width: 430px) {
  .merchant-reco-scroll {
    gap: 9px;
  }
  .merchant-reco-card {
    flex-basis: 104px;
    width: 104px;
    min-width: 104px;
  }
  .merchant-reco-photo {
    width: 104px;
    height: 104px;
  }
  .merchant-reco-card strong {
    font-size: 12px;
  }
  .ordering-layout {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 7px;
  }
  .cat-chip {
    min-height: 50px;
    font-size: 11px;
  }
  .ordering-layout .dish-card {
    grid-template-columns: 92px minmax(0, 1fr);
    min-height: 108px;
    padding: 8px 0;
  }
  .ordering-layout .dish-photo {
    width: 92px;
    height: 92px;
    min-height: 92px;
  }
  .ordering-layout .dish-info {
    min-height: 92px;
    padding-right: 7px;
    padding-left: 8px;
  }
}

/* Final mobile acceptance pass: keep carousel logic, fix ratios, and compact merchant pages. */
@media (max-width: 600px) {
  #homeFocus .merchant-reco-strip {
    display: none;
  }
  .product-reco-card {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    height: 148px;
    min-height: 148px;
    border-radius: 14px;
    border-color: rgba(255,210,56,.58);
    background: #fff;
    box-shadow: 0 8px 18px rgba(42,34,18,.08);
  }
  .product-reco-card .reco-photo-wrap {
    width: 124px;
    height: 124px;
    min-height: 124px;
    align-self: center;
    margin-left: 8px;
    border-radius: 10px;
    overflow: hidden;
  }
  .product-reco-card .reco-photo-wrap .focus-photo {
    width: 100%;
    height: 100%;
    min-height: 0;
    background-size: cover;
    background-position: var(--photo-pos, center);
  }
  .product-reco-card .focus-copy {
    min-width: 0;
    min-height: 0;
    padding: 8px 9px 8px 14px;
    display: grid;
    grid-template-rows: auto auto auto 1fr auto;
    align-content: stretch;
    gap: 4px;
    overflow: hidden;
  }
  .product-reco-card .recommend-head {
    min-width: 0;
    gap: 6px;
  }
  .product-reco-card .soft-label.dark {
    max-width: 100%;
    min-height: 20px;
    padding: 0 7px;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .product-reco-card .recommend-head > span:last-child {
    font-size: 12px;
    flex: 0 0 auto;
  }
  .product-reco-card h3 {
    font-size: 18px;
    line-height: 1.16;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .product-reco-card p {
    display: none;
  }
  .product-reco-card .dish-meta {
    max-height: 43px;
    flex-wrap: wrap;
    overflow: hidden;
    gap: 4px;
  }
  .product-reco-card .dish-meta .tag:nth-child(n+4),
  .product-reco-card .dish-meta > span:last-child {
    display: none;
  }
  .product-reco-card .reco-reason {
    display: none;
  }
  .product-reco-card .focus-actions {
    align-self: end;
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .product-reco-card .focus-actions .ghost-btn {
    display: none;
  }
  .product-reco-card .focus-actions .primary-btn {
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
  }
  .product-reco-card .recommend-controls {
    position: absolute;
    right: 9px;
    bottom: 9px;
    width: 92px;
    display: grid;
    grid-template-columns: 24px 1fr 24px;
    gap: 4px;
  }
  .product-reco-card .recommend-controls button {
    width: 24px;
    height: 24px;
  }
  .product-reco-card .recommend-controls div {
    gap: 4px;
  }
  .product-reco-card .recommend-controls i {
    width: 5px;
    height: 5px;
  }
  .product-reco-card .recommend-controls i.active {
    width: 13px;
  }

  .ordering-layout {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 7px;
  }
  .menu-category-rail {
    width: 66px;
  }
  .cat-chip {
    min-height: 47px;
    padding: 5px 4px;
    font-size: 11px;
  }
  .ordering-layout .dish-card {
    grid-template-columns: 92px minmax(0, 1fr);
    min-height: 106px;
    padding: 8px 0;
  }
  .ordering-layout .dish-photo {
    width: 92px;
    height: 92px;
    min-height: 92px;
    border-radius: 8px;
  }
  .ordering-layout .dish-info {
    min-height: 92px;
    padding: 0 7px 0 8px;
  }
  .ordering-layout .dish-main h4 {
    font-size: 15px;
    line-height: 1.2;
    -webkit-line-clamp: 1;
  }
  .ordering-layout .dish-subline {
    font-size: 10px;
  }
  .ordering-layout .price-note {
    -webkit-line-clamp: 1;
  }

  .admin-panel[data-admin-panel="dishes"] .admin-grid.wide-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .admin-panel[data-admin-panel="dishes"] #dishForm {
    order: 2;
  }
  .admin-panel[data-admin-panel="dishes"] .admin-grid.wide-left > .card:not(form) {
    order: 1;
  }
  .admin-main {
    padding: 8px;
  }
  .admin-side {
    padding: 8px;
    gap: 6px;
  }
  .admin-side button {
    min-height: 36px;
    padding: 0 10px;
    border-radius: 10px;
  }
  .panel-title {
    margin-bottom: 8px;
  }
  .panel-title h2 {
    font-size: 20px;
  }
  .panel-title p {
    font-size: 12px;
    line-height: 1.35;
  }
  .order-card {
    border-radius: 12px;
    padding: 9px;
    overflow: hidden;
  }
  .order-main,
  .order-items,
  .customer-line {
    min-width: 0;
  }
  .order-subline {
    gap: 4px;
  }
  .order-subline span {
    min-height: 22px;
    padding: 0 6px;
    font-size: 11px;
  }
  .order-items .tag {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
  }
  .order-actions {
    gap: 5px;
  }
  .order-actions button {
    min-height: 30px;
    padding: 0 8px;
  }

  .dish-admin-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .dish-library-toolbar {
    gap: 6px;
    margin-bottom: 8px;
  }
  .dish-library-toolbar button {
    min-height: 30px;
    padding: 0 9px;
    font-size: 12px;
    gap: 4px;
  }
  .dish-library-toolbar button b {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
  }
  .dish-library-tools {
    gap: 8px;
    margin-bottom: 8px;
  }
  .dish-library-search {
    height: 36px;
    border-radius: 10px;
    padding: 0 10px;
  }
  .dish-library-shell {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .dish-library-directory {
    position: static;
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .dish-library-directory::-webkit-scrollbar {
    display: none;
  }
  .dish-library-directory button {
    flex: 0 0 112px;
    min-height: 44px;
    border-radius: 11px;
    padding: 7px 8px;
    scroll-snap-align: start;
  }
  .dish-library-directory strong {
    font-size: 12px;
  }
  .dish-library-directory small {
    font-size: 10px;
  }
  .dish-library-summary {
    min-height: 28px;
    font-size: 12px;
  }
  .admin-dish {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    min-height: 112px;
    border-radius: 12px;
  }
  .admin-dish-photo {
    width: 92px;
    height: 100%;
    min-height: 112px;
    border-radius: 0;
    background-size: cover;
    background-position: var(--photo-pos, center);
  }
  .admin-dish-body {
    min-width: 0;
    padding: 8px;
    gap: 4px;
  }
  .admin-dish-title strong {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .admin-dish-body .hint {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .admin-dish .dish-meta {
    max-height: 42px;
    overflow: hidden;
    gap: 4px;
  }
  .admin-dish .dish-meta .tag:nth-child(n+4) {
    display: none;
  }
  .admin-combo-text {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .admin-dish-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }
  .admin-dish-actions button {
    min-height: 28px;
    padding: 0 3px;
    font-size: 11px;
  }
}

@media (max-width: 430px) {
  .product-reco-card {
    grid-template-columns: 116px minmax(0, 1fr);
    height: 140px;
    min-height: 140px;
  }
  .product-reco-card .reco-photo-wrap {
    width: 116px;
    height: 116px;
    min-height: 116px;
    margin-left: 8px;
  }
  .product-reco-card .focus-copy {
    padding-left: 12px;
  }
  .ordering-layout {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .menu-category-rail {
    width: 64px;
  }
  .cat-chip {
    min-height: 46px;
    font-size: 10px;
  }
  .ordering-layout .dish-card {
    grid-template-columns: 88px minmax(0, 1fr);
    min-height: 102px;
  }
  .ordering-layout .dish-photo {
    width: 88px;
    height: 88px;
    min-height: 88px;
  }
  .ordering-layout .dish-info {
    min-height: 88px;
  }
  .admin-dish {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .admin-dish-photo {
    width: 88px;
  }
}

@media (max-width: 600px) {
  .admin-dish {
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 122px;
    align-items: start;
    overflow: hidden;
  }
  .admin-dish-photo {
    width: 92px;
    height: 92px;
    min-height: 92px;
    align-self: start;
    margin: 8px 0 8px 8px;
    border-radius: 10px;
    background-size: cover;
    background-position: var(--photo-pos, center);
  }
  .admin-dish .photo-badge {
    left: 5px;
    bottom: 5px;
    min-height: 18px;
    padding: 3px 6px;
    border-radius: 999px;
    font-size: 10px;
  }
  .admin-dish-body {
    min-height: 108px;
    padding: 8px 8px 8px 0;
    gap: 4px;
  }
  .admin-dish .dish-meta {
    max-height: 22px;
    flex-wrap: nowrap;
  }
  .admin-dish .dish-meta .tag:nth-child(n+3) {
    display: none;
  }
  .admin-dish-body > div:nth-last-child(2) {
    display: none;
  }
  .admin-combo-text {
    display: none;
  }
  .admin-dish-actions {
    margin-top: 2px;
  }
}

@media (max-width: 430px) {
  .admin-dish {
    grid-template-columns: 100px minmax(0, 1fr);
  }
  .admin-dish-photo {
    width: 88px;
    height: 88px;
    min-height: 88px;
  }
}

.admin-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 213, 74, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(247, 244, 235, 0.96), rgba(237, 246, 239, 0.96));
}

.admin-login-overlay[hidden] {
  display: none;
}

.admin-login-card {
  width: min(390px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(37, 29, 20, 0.16);
}

.login-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.login-brand-row strong {
  display: block;
  font-size: 22px;
  color: var(--ink);
}

.login-brand-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.admin-login-card label {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.admin-login-card input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
}

.admin-login-card input:focus {
  border-color: var(--green);
  outline: 3px solid rgba(30, 125, 75, 0.12);
}

.admin-login-error {
  min-height: 20px;
  margin: 10px 0;
  color: var(--danger);
  font-size: 13px;
}

body.admin-locked {
  overflow: hidden;
}

body.admin-locked #adminPane {
  visibility: hidden;
}

.account-security {
  margin-top: 22px;
}

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

.account-security-title h3 {
  margin: 0;
  font-size: 18px;
}

.account-security-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.account-password-form {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
}

.account-session-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.account-session-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.account-session-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--green);
}

.account-session-row strong,
.account-session-row small {
  display: block;
}

.account-session-row small {
  margin-top: 3px;
  color: var(--muted);
}

.account-current-badge {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.account-session-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.staff-account-create-form {
  grid-template-columns: 1.1fr 1.1fr minmax(120px, .7fr) 1.1fr auto;
  align-items: end;
}

.staff-reauth-panel {
  margin-bottom: 12px;
}

.staff-reauth-form,
.staff-reauth-status {
  display: grid;
  grid-template-columns: 36px minmax(180px, 1fr) minmax(220px, .8fr) auto;
  align-items: end;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d9e7de;
  border-radius: 8px;
  background: #f5faf7;
}

.staff-reauth-status {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
}

.staff-reauth-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--green);
}

.staff-reauth-form strong,
.staff-reauth-form small,
.staff-reauth-status strong,
.staff-reauth-status small {
  display: block;
}

.staff-reauth-form small,
.staff-reauth-status small {
  margin-top: 3px;
  color: var(--muted);
}

.staff-reauth-form label {
  display: grid;
  gap: 6px;
}

.staff-reauth-form label > span {
  color: var(--muted);
  font-size: 12px;
}

.staff-account-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.staff-account-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.staff-account-summary {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.staff-account-summary strong,
.staff-account-summary small {
  display: block;
}

.staff-account-summary small {
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.staff-account-status {
  font-size: 13px;
  font-weight: 700;
}

.staff-account-status.enabled {
  color: var(--green);
}

.staff-account-status.disabled {
  color: var(--danger);
}

.staff-account-controls {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, .5fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.staff-account-controls label,
.staff-password-reset label {
  display: grid;
  gap: 6px;
}

.staff-account-controls label > span,
.staff-password-reset label > span {
  color: var(--muted);
  font-size: 12px;
}

.staff-account-actions,
.staff-password-reset {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.staff-password-reset {
  justify-content: flex-end;
  margin-top: 10px;
  padding: 10px;
  background: #f7f8f4;
  border-radius: 6px;
}

.staff-password-reset label {
  min-width: min(280px, 100%);
  margin-right: auto;
}

.staff-account-owner-note {
  margin: 10px 0 0 48px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .account-password-form {
    grid-template-columns: 1fr 1fr;
  }

  .staff-account-create-form {
    grid-template-columns: 1fr 1fr;
  }

  .staff-account-controls {
    grid-template-columns: 1fr 1fr;
  }

  .staff-account-actions {
    grid-column: 1 / -1;
  }

  .staff-reauth-form {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
  }

  .staff-reauth-form label {
    grid-column: 2 / -1;
  }

  .staff-reauth-form button {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .account-password-form {
    grid-template-columns: 1fr;
  }

  .account-session-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .account-session-row > :last-child {
    grid-column: 2;
    justify-self: start;
  }

  .staff-account-create-form,
  .staff-account-controls {
    grid-template-columns: 1fr;
  }

  .staff-account-actions {
    grid-column: auto;
  }

  .staff-account-summary {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .staff-account-status {
    grid-column: 2;
  }

  .staff-account-owner-note {
    margin-left: 44px;
  }

  .staff-password-reset {
    align-items: stretch;
  }

  .staff-password-reset button {
    flex: 1 1 auto;
  }

  .staff-reauth-form,
  .staff-reauth-status {
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
  }

  .staff-reauth-form label,
  .staff-reauth-form button,
  .staff-reauth-status button {
    grid-column: 2;
  }

  .staff-reauth-form button,
  .staff-reauth-status button {
    justify-self: start;
  }
}

.application-boundary-note {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(47, 123, 74, .2);
  border-radius: 8px;
  background: #f5faf7;
}

.application-boundary-note > svg {
  width: 22px;
  height: 22px;
  color: var(--green);
  margin-top: 2px;
}

.application-boundary-note strong,
.application-boundary-note p {
  display: block;
}

.application-boundary-note p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.application-registry-grid {
  align-items: start;
}

.application-registry-grid > .card {
  min-width: 0;
}

.application-form-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.application-form-note svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--green);
  margin-top: 1px;
}

.application-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.application-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.application-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.application-row-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.application-row-head > div {
  min-width: 0;
}

.application-row-head h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.application-row-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

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

.application-status-item {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcf8;
}

.application-status-item span,
.application-status-item strong {
  display: block;
}

.application-status-item span {
  color: var(--muted);
  font-size: 11px;
}

.application-status-item strong {
  margin-top: 3px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.application-blockers {
  padding: 10px;
  border: 1px solid rgba(182, 106, 28, .22);
  border-radius: 6px;
  background: #fff8ea;
}

.application-blockers strong {
  font-size: 12px;
  color: #7e4b17;
}

.application-blockers ul {
  margin: 5px 0 0;
  padding-left: 18px;
  color: #7e4b17;
  font-size: 12px;
  line-height: 1.5;
}

.application-ready-note {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  color: var(--green);
  font-size: 12px;
  line-height: 1.45;
}

.application-ready-note svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.application-compliance-editor {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.application-compliance-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.application-compliance-head h5 {
  margin: 0;
  font-size: 13px;
}

.application-compliance-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.application-compliance-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.application-compliance-fields label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.application-compliance-fields label > span {
  color: var(--muted);
  font-size: 11px;
}

.application-compliance-fields input,
.application-compliance-fields select,
.application-compliance-fields textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.application-compliance-wide {
  grid-column: 1 / -1;
}

.application-compliance-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.application-compliance-actions small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 560px) {
  .application-boundary-note {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .application-row-head {
    display: grid;
  }

  .application-status-grid {
    grid-template-columns: 1fr;
  }

  .application-compliance-fields {
    grid-template-columns: 1fr;
  }

  .application-compliance-wide {
    grid-column: auto;
  }

  .application-compliance-head {
    display: grid;
  }
}
