*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.desktop-only {
  display: none;
}

.mobile-only {
  display: block;
}

@media (min-width: 768px) {
  .desktop-only {
    display: flex;
  }

  .mobile-only {
    display: none !important;
  }
}

.tag-pill {
  display: inline-block;
  padding: 4px 12px;
  margin: 0 8px 8px 0;
  border-radius: 999px;
  font-size: 12px;
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.icon-dish-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0ebe4;
  border: 1px dashed #d4cbc0;
  border-radius: var(--radius-md);
}

.icon-dish-empty--sm {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
}

.icon-dish-empty--lg {
  width: 88px;
  height: 88px;
  margin-bottom: 12px;
}

.icon-dish-empty__label {
  font-size: 14px;
  color: var(--color-text-muted);
}

.state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  color: var(--color-text-muted);
  text-align: center;
}

.state-box__text {
  margin: 0;
}

.state-box__hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--color-primary);
}

.state-box--tap {
  cursor: pointer;
}

.state-box__spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-height) + 16px);
  z-index: 1000;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(44, 44, 44, 0.92);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 768px) {
  .toast {
    bottom: 32px;
  }
}
