:root {
  /* Brand — 따뜻한 갈색 */
  --primary: #7d5640;
  --primary-dark: #593a2a;
  --primary-light: #f1e7df;
  --primary-grad: linear-gradient(180deg, #8a6149 0%, #69472f 100%);
  --accent: #cf9a4e;
  --accent-light: #f8efdf;
  --accent-ink: #8a5d1d;
  /* 로고 올리브골드 (브랜드 포인트) */
  --olive: #8f8a18;

  /* Surfaces */
  --bg: #f4ede4;
  --card: #fffdfb;
  --field-bg: #f5efe7;

  /* Ink */
  --text: #2a211b;
  --muted: #968a7e;
  --line: rgba(43, 33, 27, 0.09);
  --hairline: rgba(43, 33, 27, 0.06);

  --danger: #c0564f;
  --success: #7c7b22;

  /* Geometry */
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 28px;

  /* Liquid Glass */
  --glass-blur: blur(22px) saturate(180%);
  --glass-blur-strong: blur(30px) saturate(190%);
  /* 밝은 상단 엣지(스페큘러) + 은은한 내부 광 + 얇은 림 + 부드러운 외곽 그림자 */
  --glass-hi: inset 0 1px 1px rgba(255, 255, 255, 0.75),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22), inset 0 -10px 22px rgba(255, 255, 255, 0.16);
  --glass-edge: 1px solid rgba(255, 255, 255, 0.4);

  /* Elevation — soft, layered */
  --shadow-sm: 0 1px 2px rgba(60, 42, 30, 0.05);
  --shadow: 0 1px 2px rgba(60, 42, 30, 0.04), 0 8px 24px rgba(60, 42, 30, 0.06);
  --shadow-pop: 0 12px 38px rgba(60, 42, 30, 0.16);
  --shadow-lg: 0 20px 56px rgba(60, 42, 30, 0.22);

  /* Motion — 모두 부드럽게 감속(오버슈트 없음) */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-glide: cubic-bezier(0.4, 0, 0.18, 1);
  --ease-smooth: cubic-bezier(0.32, 0.72, 0, 1);
  --t-fast: 0.24s;
  --t-base: 0.36s;
  --t-slow: 0.55s;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

/* 동작 최소화 선호 시 모든 모션 정지 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation-duration: 0.01ms !important;
  }
}

/* 페이지 간 이동(주문하기 ↔ 현황판 등)을 끊김 없이 부드럽게 — 미지원 브라우저는 일반 이동 */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.36s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.18, 1);
}

/* ── 상단 바 (Liquid Glass) ───────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
}

.appbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 18px;
  padding-top: calc(14px + env(safe-area-inset-top));
  color: #fff;
  background: linear-gradient(180deg, rgba(138, 97, 73, 0.84), rgba(105, 71, 47, 0.86));
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 1px 0 rgba(60, 42, 30, 0.06);
}
.topbar .appbar {
  position: static;
}
.appbar .brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), opacity var(--t-fast) var(--ease-glide);
}
.appbar .brand:active {
  transform: scale(0.97);
  opacity: 0.85;
}
.appbar .brand .leaf {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.22));
}
.appbar .sub {
  font-size: 11.5px;
  font-weight: 500;
  opacity: 0.82;
  display: block;
  letter-spacing: 0.01em;
  margin-top: 1px;
}
.appbar a {
  color: #fff;
  text-decoration: none;
}
.appbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.iconbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  backdrop-filter: blur(14px) saturate(170%);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 3px 10px rgba(60, 42, 30, 0.2);
  transition: background var(--t-fast) var(--ease-glide), transform var(--t-fast) var(--ease-out);
}
.iconbtn svg {
  width: 15px;
  height: 15px;
}
.iconbtn:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.3);
}
.iconbtn.off {
  opacity: 0.55;
}

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 16px 128px;
}

/* 카테고리 탭 — 라이트 글래스 */
.cattabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 1px 0 var(--hairline);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-x;
}
.cattabs::-webkit-scrollbar {
  display: none;
}
.cattabs:active {
  cursor: grabbing;
}
.cattab {
  flex-shrink: 0;
  border: none;
  background: rgba(60, 42, 30, 0.05);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-base) var(--ease-glide), color var(--t-base) var(--ease-glide),
    transform var(--t-fast) var(--ease-out);
}
.cattab:active {
  transform: scale(0.96);
}
.cattab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(125, 86, 64, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* 탭 좌우 스크롤 표시 (< >) — 더 넘길 수 있을 때만 부드럽게 등장 */
.cattabs-wrap {
  position: relative;
}
.cattabs-edge {
  position: absolute;
  top: 0;
  bottom: 1px;
  width: 48px;
  display: flex;
  align-items: center;
  border: none;
  cursor: pointer;
  color: var(--primary-dark);
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-glide);
}
.cattabs-edge.show {
  opacity: 1;
  pointer-events: auto;
}
.cattabs-edge svg {
  width: 19px;
  height: 19px;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.7));
}
.cattabs-edge.left {
  left: 0;
  justify-content: flex-start;
  padding-left: 9px;
  background: linear-gradient(to right, rgba(252, 250, 247, 0.96) 35%, rgba(252, 250, 247, 0));
}
.cattabs-edge.right {
  right: 0;
  justify-content: flex-end;
  padding-right: 9px;
  background: linear-gradient(to left, rgba(252, 250, 247, 0.96) 35%, rgba(252, 250, 247, 0));
}
.cattabs-edge:active svg {
  transform: scale(0.85);
}

/* ── 버튼 ───────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-base) var(--ease-glide),
    filter var(--t-fast) var(--ease-glide);
}
.btn:active {
  transform: scale(0.97);
  filter: brightness(0.97);
}
.btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}
.btn-primary {
  background: linear-gradient(180deg, #8a6149 0%, #69472f 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(125, 86, 64, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-accent {
  background: linear-gradient(180deg, #e29c38 0%, #d28a26 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(217, 146, 48, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}
.btn-success {
  background: linear-gradient(180deg, #9a951f 0%, #7c7b22 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(124, 123, 34, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-ghost {
  background: rgba(60, 42, 30, 0.05);
  color: var(--text);
}
.btn-block {
  width: 100%;
}
.btn-sm {
  padding: 10px 15px;
  font-size: 14px;
  border-radius: 13px;
  font-weight: 700;
}

/* ── 메뉴 목록 (고객) ───────────────────────── */
.category-title {
  margin: 26px 4px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin-bottom: 6px;
  animation: gridIn var(--t-base) var(--ease-out) both;
}
/* 탭 전환 시 메뉴가 끊김 없이 스르르 나타나도록 */
.category-title {
  animation: gridIn var(--t-base) var(--ease-out) both;
}
@keyframes gridIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.menu-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding-bottom: 11px;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-base) var(--ease-glide);
}
.menu-card.tappable {
  cursor: pointer;
  user-select: none;
}
.menu-card.tappable:active {
  transform: scale(0.97);
}
.menu-card.selected {
  box-shadow: var(--shadow), 0 0 0 2px var(--primary);
}
.menu-card.soldout .thumb img {
  filter: grayscale(1);
  opacity: 0.45;
}

.menu-card .thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #faf9f7;
  border-bottom: 1px solid var(--hairline);
}
.menu-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.soldout-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(2px) saturate(120%);
  -webkit-backdrop-filter: blur(2px) saturate(120%);
  color: var(--danger);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.g-name {
  padding: 9px 9px 2px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.32;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.g-price {
  padding: 2px 8px 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary-dark);
  text-align: center;
}

/* 탭해서 담기 표시 (이미지 우상단) — 작은 글래스 */
.menu-add {
  position: absolute;
  top: 7px;
  right: 7px;
}
.add-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px) saturate(150%);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  color: var(--primary);
  font-size: 17px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), var(--shadow-sm);
}
.qty-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(125, 86, 64, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: softIn var(--t-base) var(--ease-out);
}

.stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.stepper button {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-glide);
}
.stepper button:active {
  transform: scale(0.92);
}
.stepper button.plus {
  background: var(--primary);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.stepper .count {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.stepper.sm {
  gap: 8px;
}
.stepper.sm button {
  width: 28px;
  height: 28px;
  font-size: 16px;
}
.stepper.sm .count {
  font-size: 14.5px;
}

/* ── 하단 주문 바 (Liquid Glass) ───────────────────────── */
.cartbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: var(--glass-blur-strong);
  -webkit-backdrop-filter: var(--glass-blur-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 -1px 0 var(--hairline),
    0 -10px 30px rgba(60, 42, 30, 0.06);
  transform: translateY(130%);
  transition: transform var(--t-slow) var(--ease-smooth);
}
.cartbar.show {
  transform: translateY(0);
}
/* 담길 때: 튕김 없이 은은한 광이 스르르 번졌다 사라짐 */
.cartbar.bump {
  animation: glow var(--t-slow) var(--ease-glide);
}
@keyframes glow {
  0% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 -1px 0 var(--hairline),
      0 -10px 30px rgba(60, 42, 30, 0.06);
  }
  45% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 -1px 0 var(--hairline),
      0 -12px 36px rgba(125, 86, 64, 0.22);
  }
  100% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 -1px 0 var(--hairline),
      0 -10px 30px rgba(60, 42, 30, 0.06);
  }
}
.cart-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: none;
  border-radius: 16px;
  padding: 12px 14px 12px 12px;
  background: linear-gradient(180deg, #8a6149 0%, #69472f 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(125, 86, 64, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform var(--t-fast) var(--ease-out), filter var(--t-fast) var(--ease-glide);
}
.cart-btn:active {
  transform: scale(0.985);
  filter: brightness(0.96);
}
.cart-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-dark);
  font-size: 14.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 3px rgba(60, 42, 30, 0.25);
}
.cart-total {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.cart-cta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 15px;
  font-weight: 700;
  padding-left: 10px;
  white-space: nowrap;
}
.cart-cta svg {
  width: 17px;
  height: 17px;
}

/* 장바구니로 미끄러져 들어가는 잔상 */
.fly-img {
  position: fixed;
  z-index: 300;
  border-radius: 16px;
  object-fit: cover;
  pointer-events: none;
  opacity: 0.95;
  box-shadow: var(--shadow-pop);
  transition:
    transform var(--t-slow) var(--ease-smooth),
    opacity var(--t-slow) var(--ease-glide);
  will-change: transform, opacity;
}

/* ── 시트 / 모달 (Liquid Glass) ───────────────────────── */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(30, 22, 15, 0.36);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn var(--t-base) var(--ease-glide);
}
.sheet-backdrop.show {
  display: flex;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.sheet {
  width: 100%;
  max-width: 560px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: var(--glass-blur-strong);
  -webkit-backdrop-filter: var(--glass-blur-strong);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 8px 22px calc(24px + env(safe-area-inset-bottom));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), var(--shadow-lg);
  animation: slideup var(--t-slow) var(--ease-smooth);
  will-change: transform;
}
/* 드래그 핸들 (넉넉한 터치 영역) */
.sheet-grab {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  margin-bottom: 6px;
  cursor: grab;
  touch-action: none;
}
.sheet-grab::before {
  content: "";
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: rgba(60, 42, 30, 0.18);
  transition: width var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-glide);
}
.sheet.dragging {
  animation: none;
}
.sheet.dragging .sheet-grab {
  cursor: grabbing;
}
.sheet.dragging .sheet-grab::before {
  width: 52px;
  background: rgba(60, 42, 30, 0.32);
}
@keyframes slideup {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
.sheet h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.sheet .summary {
  margin-top: 2px;
}
.sheet .summary .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 2px;
  font-size: 14.5px;
  border-bottom: 1px solid var(--hairline);
}
.sheet .summary .row .nm {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}
.sheet .summary .row-thumb {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  object-fit: cover;
  flex-shrink: 0;
}
.sheet .summary .row .line-price {
  min-width: 72px;
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sheet .summary .total {
  font-weight: 800;
  font-size: 17px;
  border-bottom: none;
  padding-top: 14px;
}
.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin: 16px 2px 7px;
  letter-spacing: 0.01em;
}
.textfield {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 15px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
  transition: border-color var(--t-fast) var(--ease-glide),
    background var(--t-fast) var(--ease-glide), box-shadow var(--t-fast) var(--ease-glide);
}
.textfield::placeholder {
  color: #aab0ac;
}
.textfield:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(125, 86, 64, 0.12);
}
.sheet .actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.sheet .actions .btn {
  flex: 1;
}

/* 주문 완료 모달 */
.done-modal {
  text-align: center;
  padding: 8px 20px calc(30px + env(safe-area-inset-bottom));
}
.done-modal .big-no {
  font-size: 60px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--primary);
  margin: 10px 0 4px;
  font-variant-numeric: tabular-nums;
  animation: softIn var(--t-slow) var(--ease-out);
}
.done-modal .msg {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 22px;
  line-height: 1.55;
}

/* ── 내 주문 상태 ───────────────────────── */
.myorders {
  margin-bottom: 6px;
}
.myorder-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 9px;
  position: relative;
  overflow: hidden;
  animation: glideUp var(--t-base) var(--ease-out);
}
.myorder-chip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
}
.myorder-chip.completed::before {
  background: var(--success);
}
.myorder-chip .no {
  font-weight: 800;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.myorder-chip .label {
  font-size: 13px;
  color: var(--muted);
  margin-left: 9px;
}

.badge {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.badge.preparing {
  background: var(--accent-light);
  color: var(--accent-ink);
}
.badge.completed {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.badge.delivered {
  background: rgba(60, 42, 30, 0.06);
  color: var(--muted);
}

/* ── 현황판 ───────────────────────── */
.board-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.board-col {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 12px;
  min-height: 52vh;
}
.board-col h2 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}
.board-col.preparing h2 {
  color: var(--accent-ink);
}
.board-col.completed h2 {
  color: var(--primary-dark);
}
.board-ticket {
  text-align: center;
  border-radius: 16px;
  padding: 14px 8px;
  margin-bottom: 10px;
  animation: glideUp var(--t-base) var(--ease-out);
}
.board-col.preparing .board-ticket {
  background: var(--accent-light);
}
.board-col.completed .board-ticket {
  background: var(--primary-light);
}
.board-ticket .no {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.board-col.preparing .board-ticket .no {
  color: var(--accent-ink);
}
.board-col.completed .board-ticket .no {
  color: var(--primary-dark);
}
.board-ticket .name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-top: 3px;
}
.board-empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 34px 0;
}

/* 새로 제조완료된 티켓 — 튕김 없이 은은한 글로우가 천천히 호흡 */
.board-ticket.just-ready {
  animation: glideUp var(--t-base) var(--ease-out), readyGlow 2.4s var(--ease-glide) 0.2s 3;
}
@keyframes readyGlow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(125, 86, 64, 0);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(125, 86, 64, 0.45);
  }
}

/* ── 관리자 ───────────────────────── */
.stats {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.stat {
  flex: 1;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 14px 10px;
  text-align: center;
}
.stat .num {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}
.stat .lbl {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.order-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 17px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  animation: glideUp var(--t-base) var(--ease-out);
}
.order-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--accent);
}
.order-card.completed::before {
  background: var(--success);
}
/* 새 주문 — 부드러운 글로우 페이드 (깜빡임 X) */
.order-card.flash {
  animation: glideUp var(--t-base) var(--ease-out), cardGlow 1.6s var(--ease-glide);
}
@keyframes cardGlow {
  0% {
    box-shadow: var(--shadow), 0 0 0 3px rgba(217, 146, 48, 0.55);
  }
  100% {
    box-shadow: var(--shadow), 0 0 0 0 rgba(217, 146, 48, 0);
  }
}
.order-card .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.order-card .no {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.order-card .name {
  font-size: 15px;
  font-weight: 600;
  margin-left: 9px;
}
.order-card .time {
  font-size: 12.5px;
  color: var(--muted);
  text-align: right;
  margin-top: 2px;
}
.order-card .items {
  margin: 12px 0;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.order-card .item-row {
  display: flex;
  justify-content: space-between;
  font-size: 14.5px;
  padding: 4px 0;
}
.order-card .item-row .qty {
  font-weight: 700;
  color: var(--primary-dark);
}
.order-card .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.order-card .total {
  font-weight: 800;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.order-card .foot-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.order-card .foot .btn {
  flex-shrink: 0;
}
/* 처리된 카드 — 옆으로 스르르 사라짐 */
.removing {
  animation: slideOut var(--t-slow) var(--ease-smooth) forwards;
}
@keyframes slideOut {
  to {
    opacity: 0;
    transform: translateX(40px);
    max-height: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 64px 0 30px;
  font-size: 14.5px;
  line-height: 1.55;
}
.empty-state .icon {
  font-size: 42px;
  margin-bottom: 12px;
}

/* ── 관리자 탭 (글래스 세그먼트 컨트롤) ───────────────────────── */
.admin-tabs {
  display: flex;
  gap: 3px;
  max-width: 560px;
  margin: 14px auto 0;
  padding: 4px;
  background: rgba(60, 42, 30, 0.06);
  border-radius: 16px;
}
.admin-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 13px;
  padding: 10px 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--t-base) var(--ease-glide), background var(--t-base) var(--ease-smooth),
    box-shadow var(--t-base) var(--ease-glide);
}
.admin-tab.active {
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), var(--shadow-sm);
}
.view-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 10px 2px 14px;
  line-height: 1.55;
}

/* 메뉴 품절관리 행 */
.menu-admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 13px 15px;
  margin-bottom: 9px;
  transition: opacity var(--t-base) var(--ease-glide);
}
.menu-admin-row.soldout {
  opacity: 0.6;
}
.menu-admin-row .ma-name {
  font-weight: 600;
  font-size: 15px;
  min-width: 0;
  flex: 1;
}
.menu-admin-row .ma-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.del-btn {
  border: none;
  background: rgba(217, 83, 79, 0.1);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  font-size: 15px;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-glide);
}
.del-btn:active {
  transform: scale(0.92);
  background: rgba(217, 83, 79, 0.18);
}
.del-btn:disabled {
  opacity: 0.5;
}
.toggle-btn {
  flex-shrink: 0;
  min-width: 78px;
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  background: var(--primary-light);
  color: var(--primary-dark);
  transition: transform var(--t-fast) var(--ease-out), background var(--t-base) var(--ease-glide),
    color var(--t-base) var(--ease-glide);
}
.toggle-btn:active {
  transform: scale(0.96);
}
.toggle-btn.on {
  background: var(--danger);
  color: #fff;
}
.toggle-btn:disabled {
  opacity: 0.5;
}

/* 메뉴 추가 폼 */
.add-menu-box {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.add-menu-box > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--primary-dark);
  letter-spacing: -0.01em;
}
.add-menu-box > summary::-webkit-details-marker {
  display: none;
}
.add-menu-form {
  padding: 0 16px 18px;
}
.add-menu-form .field-label {
  margin-top: 14px;
}
.add-menu-form .btn {
  margin-top: 20px;
}

/* 커스텀 파일 업로드 */
.file-drop {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1.5px dashed rgba(60, 42, 30, 0.16);
  border-radius: 16px;
  background: var(--field-bg);
  cursor: pointer;
  transition: border-color var(--t-base) var(--ease-glide), background var(--t-base) var(--ease-glide);
}
.file-drop:active {
  background: rgba(125, 86, 64, 0.05);
  border-color: var(--primary);
}
.file-drop .file-ic {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}
.file-drop .file-text {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}
.file-drop .file-sub {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
}
.image-preview {
  position: relative;
  margin-top: 12px;
  width: 110px;
  animation: softIn var(--t-base) var(--ease-out);
}
.image-preview img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  display: block;
}
.file-clear {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: none;
  background: rgba(30, 22, 15, 0.78);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── 커스텀 분류 콤보박스 (Liquid Glass 드롭다운) ───────────────────────── */
.combobox {
  position: relative;
}
.combobox .combo-input {
  padding-right: 44px;
}
.combo-caret {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 42px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--t-base) var(--ease-out), color var(--t-base) var(--ease-glide);
}
.combobox.open .combo-caret {
  transform: rotate(180deg);
  color: var(--primary);
}

.combo-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: var(--glass-blur-strong);
  -webkit-backdrop-filter: var(--glass-blur-strong);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), var(--shadow-pop);
  padding: 7px;
  max-height: 248px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: none;
  transform-origin: top center;
  animation: comboIn var(--t-base) var(--ease-out);
}
.combobox.open .combo-panel {
  display: block;
}
@keyframes comboIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.combo-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-glide);
}
.combo-option .check {
  color: var(--primary);
  font-weight: 800;
  margin-left: auto;
  opacity: 0;
}
.combo-option.selected .check {
  opacity: 1;
}
.combo-option.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.combo-option:active {
  background: var(--primary-light);
}
.combo-option.create {
  color: var(--primary-dark);
  font-weight: 600;
}
.combo-option.create .plus {
  color: var(--primary);
  font-weight: 900;
}
.combo-empty {
  padding: 14px;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
}

/* ── 관리자 PIN 잠금 화면 (Liquid Glass) ───────────────────────── */
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(165deg, #8a6149 0%, #4f3422 100%);
  animation: fadeIn var(--t-base) var(--ease-glide);
}
.lock-box {
  width: 100%;
  max-width: 340px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: var(--glass-blur-strong);
  -webkit-backdrop-filter: var(--glass-blur-strong);
  border-radius: var(--radius-lg);
  padding: 36px 26px calc(30px + env(safe-area-inset-bottom));
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), var(--shadow-lg);
  animation: glideUp var(--t-slow) var(--ease-out);
}
.lock-box .lock-leaf {
  width: 58px;
  height: 58px;
  object-fit: contain;
}
.lock-box h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 12px 0 4px;
}
.lock-box p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 20px;
}
.lock-box .textfield {
  text-align: center;
  letter-spacing: 0.3em;
  font-size: 20px;
  margin-bottom: 12px;
}
.pin-error {
  color: var(--danger);
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 10px;
  font-weight: 600;
}

/* ── 토스트 (Liquid Glass) ───────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%) translateY(16px);
  z-index: 200;
  background: rgba(38, 28, 20, 0.7);
  backdrop-filter: var(--glass-blur-strong);
  -webkit-backdrop-filter: var(--glass-blur-strong);
  color: #fff;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease-glide), transform var(--t-base) var(--ease-out);
  max-width: 90vw;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), var(--shadow-pop);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ff8a8a;
  display: inline-block;
  margin-right: 2px;
  transition: background var(--t-base) var(--ease-glide);
}
.conn-dot.on {
  background: #b9bb4a;
}

/* ── 공용 모션 키프레임 ───────────────────────── */
/* 부드럽게 떠오르며 나타남 (튕김 없음) */
@keyframes glideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* 살짝 커지며 부드럽게 나타남 (오버슈트 없음) */
@keyframes softIn {
  from {
    opacity: 0;
    transform: scale(0.82);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ── 인트로 스플래시 (로고 사르르 등장 → 사라지고 페이지 등장) ───────── */
#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  animation: splashFade 1.9s var(--ease-glide) forwards;
}
#splash img {
  width: 62%;
  max-width: 300px;
  animation: splashLogo 1s var(--ease-out) both;
}
/* 이미 본 세션에서는 스플래시 생략 (head 인라인 스크립트가 클래스 부여) */
.no-splash #splash {
  display: none;
}
@keyframes splashLogo {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}
@keyframes splashFade {
  0%,
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}
