:root {
  color-scheme: light;
  --baemin-mint: #2ac1bc;
  --baemin-mint-strong: #14a6a1;
  --page-bg: #f6f7f8;
  --surface: #ffffff;
  --surface-secondary: #f1f4f4;
  --surface-tertiary: #e7f6f5;
  --foreground: #17191c;
  --muted: #64706f;
  --border: #e6eceb;
  --shadow-surface: 0 10px 28px rgba(23, 25, 28, 0.08);
  --shadow-overlay: 0 18px 48px rgba(23, 25, 28, 0.16);
  --cursor-interactive: pointer;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Noto Sans KR', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(circle at top left, rgba(42, 193, 188, 0.13), transparent 32rem),
    var(--page-bg);
  color: var(--foreground);
}

button,
a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  line-height: 1;
}
.symbol-fill { font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }

.custom-scrollbar::-webkit-scrollbar,
.no-scrollbar::-webkit-scrollbar { display: none; }
.custom-scrollbar,
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.app-shell { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.pb-safe { padding-bottom: env(safe-area-inset-bottom); }

.pressable,
button,
[data-nav],
.category-tab { cursor: var(--cursor-interactive); }
.pressable { transition: transform 150ms ease, opacity 150ms ease; }
.pressable:active { transform: scale(0.97); }

.baemin-card {
  background: var(--surface);
  border: 1px solid rgba(230, 236, 235, 0.82);
  border-radius: 1.5rem;
  box-shadow: var(--shadow-surface);
}
.baemin-soft-card {
  background: var(--surface-secondary);
  border-radius: 1.25rem;
}
.baemin-gradient {
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.34), transparent 11rem),
    linear-gradient(135deg, #2ac1bc 0%, #16b5b0 54%, #079d99 100%);
}
.home-hero {
  position: relative;
  min-height: 23rem;
  overflow: hidden;
  border-radius: 2rem;
  padding: 1.35rem;
  color: var(--foreground);
  background: var(--baemin-mint);
}
.home-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.64) 0%, rgba(255, 255, 255, 0.34) 42%, rgba(255, 255, 255, 0.06) 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(42, 193, 188, 0.08) 100%);
}
.home-hero-copy {
  position: relative;
  z-index: 1;
}
.home-hero-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.86);
  padding: 0.45rem 0.78rem;
  color: #087b78;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  box-shadow: 0 10px 24px rgba(23, 25, 28, 0.08);
}
.home-hero h1 {
  margin: 1rem 0 0;
  max-width: 17.5rem;
  color: #111315;
  font-size: clamp(2.05rem, 8vw, 2.75rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.065em;
}
.home-hero h1 span {
  color: #fff;
  text-shadow: 0 2px 0 rgba(8, 123, 120, 0.18);
}
.home-hero p {
  margin: 0.8rem 0 0;
  max-width: 16rem;
  color: rgba(17, 19, 21, 0.72);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: -0.035em;
  word-break: keep-all;
}
.home-hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.1rem;
}
.home-hero-meta > div {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.82);
  padding: 0.9rem 1rem;
  box-shadow: 0 12px 24px rgba(9, 112, 109, 0.12);
}
.home-hero-meta span {
  display: block;
  color: rgba(17, 19, 21, 0.58);
  font-size: 0.75rem;
  font-weight: 900;
}
.home-hero-meta strong {
  display: block;
  margin-top: 0.2rem;
  color: #111315;
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.045em;
}
.home-hero-cta {
  display: inline-flex;
  width: 100%;
  min-height: 3.35rem;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.85rem;
  border-radius: 1.15rem;
  background: #fff;
  color: #087b78;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.035em;
  box-shadow: 0 14px 28px rgba(9, 112, 109, 0.16);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.home-hero-cta:active {
  transform: scale(0.98);
  box-shadow: 0 8px 18px rgba(9, 112, 109, 0.14);
}

@media (max-width: 430px) {
  .home-hero {
    min-height: 23.5rem;
  }
}
.baemin-primary-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 1rem;
  background: var(--baemin-mint);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(42, 193, 188, 0.24);
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}
.baemin-inverse-button {
  background: #fff !important;
  color: var(--baemin-mint-strong) !important;
  box-shadow: none !important;
}
.baemin-inverse-button .material-symbols-outlined {
  color: var(--baemin-mint-strong);
}
.baemin-primary-button:active { transform: scale(0.98); }
.baemin-primary-button:disabled,
.baemin-outline-button:disabled {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
}
.baemin-outline-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  background: #fff;
  color: var(--foreground);
  font-weight: 800;
}
.is-saved { background: #17191c !important; color: #fff !important; box-shadow: none !important; }

.category-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.125rem;
  white-space: nowrap;
}
.category-tab__count {
  display: inline-grid;
  min-width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border-radius: 9999px;
  background: var(--surface-secondary);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}
.category-tab-active {
  border-color: transparent;
  background: var(--foreground);
  color: #fff;
  box-shadow: 0 8px 18px rgba(23, 25, 28, 0.12);
}
.category-tab-active .category-tab__count {
  background: #fff;
  color: var(--foreground);
}

.menu-summary-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 255, 255, 0.34), transparent 8rem),
    linear-gradient(135deg, #2ac1bc 0%, #18aaa6 58%, #0b8f8b 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 14px 34px rgba(12, 142, 138, 0.22);
}
.menu-summary-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.28);
  pointer-events: none;
}
.menu-summary-card__badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1.1rem;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.14);
}

.image-frame {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
}
.image-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(23, 25, 28, 0.08);
  border-radius: inherit;
  pointer-events: none;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.active-order-card {
  display: block;
  padding: 1.25rem;
  border-radius: 1.5rem;
  background: #17191c;
  color: #fff;
  box-shadow: var(--shadow-surface);
}
.active-order-card__body {
  min-width: 0;
}
.active-order-card__store {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.875rem;
  font-weight: 800;
}
.active-order-card__title {
  margin-top: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}
.active-order-card__desc {
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5rem;
}
.active-order-card__eta {
  flex-shrink: 0;
  text-align: right;
}
.active-order-card__eta strong {
  display: block;
  color: var(--baemin-mint);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.active-order-card__eta span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.75rem;
  font-weight: 900;
}
.active-order-card__track {
  height: 0.5rem;
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.16);
}
.active-order-card__track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--baemin-mint);
  transition: width 500ms ease;
}

.bottom-nav {
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid rgba(230, 236, 235, 0.86);
  box-shadow: 0 -12px 32px rgba(23, 25, 28, 0.08);
  backdrop-filter: blur(18px);
}
.nav-item {
  min-width: 58px;
  border-radius: 1rem;
  padding: 0.45rem 0.55rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.nav-item[aria-current='page'],
.nav-item.nav-item-active {
  background: var(--surface-tertiary);
  color: var(--baemin-mint-strong);
  box-shadow: 0 7px 16px rgba(23, 25, 28, 0.06);
}
.nav-item:active {
  transform: scale(0.96);
}
.nav-item:focus-visible {
  outline: 3px solid rgba(42, 193, 188, 0.28);
  outline-offset: 3px;
}

.circular-progress {
  --progress: 75%;
  background:
    radial-gradient(closest-side, #fff 76%, transparent 77% 100%),
    conic-gradient(var(--baemin-mint) var(--progress), #e4eaea 0);
}

.route-map {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 1.25rem;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.6) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.6) 1px, transparent 1px),
    radial-gradient(circle at 20% 22%, rgba(42, 193, 188, 0.24), transparent 6rem),
    radial-gradient(circle at 78% 72%, rgba(42, 193, 188, 0.18), transparent 7rem),
    #eef6f5;
  background-size: 44px 44px, 44px 44px, auto, auto, auto;
}
.route-line {
  position: absolute;
  left: 2.25rem;
  right: 2.25rem;
  top: 50%;
  height: 0.55rem;
  transform: translateY(-50%) rotate(-10deg);
  overflow: hidden;
  border-radius: 9999px;
  background: rgba(23, 25, 28, 0.1);
}
.route-line span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--baemin-mint);
  transition: width 500ms ease;
}
.rider-dot {
  position: absolute;
  left: 14%;
  top: 50%;
  display: grid;
  height: 3rem;
  width: 3rem;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 4px solid #fff;
  border-radius: 9999px;
  background: var(--baemin-mint);
  color: #fff;
  box-shadow: var(--shadow-overlay);
  transition: left 500ms ease, background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

.rider-dot.rider-dot-waiting {
  background: #ffffff;
  color: var(--baemin-mint);
  box-shadow: 0 10px 28px rgba(23, 25, 28, 0.12);
}

.rider-dot.rider-dot-arrived {
  background: #17191c;
  color: #ffffff;
}

.toast-enter { animation: toastEnter 220ms ease-out both; }
@keyframes toastEnter {
  from { opacity: 0; transform: translate(-50%, 12px) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
.toast-leave {
  opacity: 0 !important;
  transform: translate(-50%, 10px) scale(0.98) !important;
  transition: opacity 250ms ease, transform 250ms ease;
}

@keyframes floatReward {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.float-reward { animation: floatReward 4s ease-in-out infinite; }

@media (min-width: 768px) {
  .desktop-bottom-gap { padding-bottom: 48px; }
}
