:root {
  font-family:
    "Inter",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    system-ui,
    sans-serif;
  color: #30261f;
  background: #fffaf5;
  line-height: 1.5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top, rgba(255, 209, 102, 0.24), transparent 30%),
    linear-gradient(180deg, #fff8f1 0%, #fffaf5 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 16px
    max(32px, env(safe-area-inset-bottom)) 16px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.auth-card {
  width: min(100%, 460px);
  padding: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 133, 82, 0.12);
  border-radius: 24px;
  box-shadow: 0 18px 36px rgba(143, 81, 44, 0.08);
}

.hero-card,
.recommend-card,
.category-nav-card,
.notice-banner,
.category-section,
.dish-card,
.sheet,
.empty-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 133, 82, 0.12);
  border-radius: 24px;
  box-shadow: 0 18px 36px rgba(143, 81, 44, 0.08);
}

.hero-card {
  padding: 24px;
  display: grid;
  gap: 16px;
}

.hero-copy,
.recommend-card p,
.section-heading p,
.toolbar-note,
.dish-card__meta {
  color: #725f52;
}

.hero-card h1,
.recommend-card h2,
.section-heading h2,
.sheet__header h2 {
  margin: 0;
  line-height: 1.1;
}

.hero-actions,
.dish-card__actions,
.sheet__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.category-manage-page {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.category-manage-list-card,
.category-manage-detail-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 133, 82, 0.12);
  border-radius: 24px;
  box-shadow: 0 18px 36px rgba(143, 81, 44, 0.08);
  padding: 18px;
}

.category-manage-list-card__header h2,
.category-manage-detail-card__header h2,
.category-action-card__header h3 {
  margin: 0;
  line-height: 1.1;
}

.category-manage-list-card__header p,
.category-manage-detail-card__header p,
.category-action-card__header p,
.category-manage-list__item p {
  margin: 6px 0 0;
  color: #725f52;
}

.category-manage-list {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.category-manage-list__item {
  padding: 14px 16px;
  border: 1px solid rgba(255, 133, 82, 0.12);
  border-radius: 18px;
  background: #fffaf7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-manage-list__item h3 {
  margin: 0;
  font-size: 1.05rem;
}

.category-manage-list__item.is-active {
  border-color: rgba(255, 133, 82, 0.28);
  box-shadow: 0 10px 20px rgba(255, 133, 82, 0.08);
}

.category-manage-list__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #ffefe7;
  color: #b1613e;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.category-manage-detail-card__header {
  margin-bottom: 14px;
}

.category-action-card {
  padding: 16px;
  border: 1px solid rgba(255, 133, 82, 0.12);
  border-radius: 20px;
  background: #fffaf7;
}

.category-action-card + .category-action-card {
  margin-top: 14px;
}

.category-action-card__header {
  margin-bottom: 12px;
}

.category-action-card--danger {
  background: #fff7f5;
  border-color: rgba(220, 89, 58, 0.14);
}

.category-manage-sort {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.category-manage-sort form {
  margin: 0;
}

.category-danger-button {
  color: #c25334;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: #c0643f;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-button,
.ghost-button,
.icon-button {
  min-height: 46px;
  border: 0;
  border-radius: 16px;
  padding: 0 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-actions form,
.dish-card__actions form {
  margin: 0;
}

.primary-button {
  background: linear-gradient(135deg, #ff8552, #ff9f6e);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(255, 133, 82, 0.26);
}

.ghost-button,
.icon-button {
  background: #fff1e8;
  color: #a65838;
}

.ghost-button:disabled,
.icon-button:disabled,
.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.notice-banner {
  margin-top: 16px;
  padding: 14px 16px;
  color: #8a4a33;
}

.recommend-card {
  margin-top: 18px;
  padding: 20px;
}

.category-nav-card {
  margin-top: 18px;
  padding: 16px;
}

.category-nav-card__header h2 {
  margin: 0;
  line-height: 1.1;
  font-size: 1.35rem;
}

.category-filter,
.category-jump-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.category-filter::-webkit-scrollbar,
.category-jump-nav::-webkit-scrollbar {
  display: none;
}

.category-jump-nav {
  margin-top: 10px;
}

.category-chip,
.jump-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(255, 133, 82, 0.18);
  background: #fff8f2;
  color: #8a5a43;
  font-size: 0.95rem;
}

.category-chip.is-active {
  background: #ff8552;
  color: #fff;
  border-color: transparent;
}

.category-chip.is-dimmed {
  opacity: 0.5;
  background: #fbf4ee;
}

.search-card {
  margin-top: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 133, 82, 0.12);
  border-radius: 24px;
  box-shadow: 0 18px 36px rgba(143, 81, 44, 0.08);
}

.search-form {
  display: grid;
  gap: 12px;
}

.search-form__field {
  margin: 0;
}

.search-form__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search-form__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.search-form__toggle {
  min-height: 46px;
}

.search-summary {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: #725f52;
}

.search-summary strong {
  color: #8a4a33;
}

.toggle {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: #5f4c41;
}

.category-section {
  padding: 18px;
  margin-top: 16px;
  scroll-margin-top: 16px;
}

.section-heading {
  margin-bottom: 14px;
}

.dish-list {
  display: grid;
  gap: 12px;
}

.dish-card {
  padding: 16px;
  scroll-margin-top: 16px;
}

.dish-card.is-archived {
  opacity: 0.8;
}

.dish-card.is-newly-created {
  border-color: rgba(255, 133, 82, 0.45);
  box-shadow:
    0 18px 36px rgba(143, 81, 44, 0.08),
    0 0 0 3px rgba(255, 133, 82, 0.16);
  animation: new-dish-pulse 2.8s ease-out;
}

@keyframes new-dish-pulse {
  0% {
    transform: translateY(0);
    box-shadow:
      0 18px 36px rgba(143, 81, 44, 0.08),
      0 0 0 0 rgba(255, 133, 82, 0.32);
  }

  50% {
    transform: translateY(-1px);
    box-shadow:
      0 18px 36px rgba(143, 81, 44, 0.08),
      0 0 0 6px rgba(255, 133, 82, 0.12);
  }

  100% {
    transform: translateY(0);
    box-shadow:
      0 18px 36px rgba(143, 81, 44, 0.08),
      0 0 0 3px rgba(255, 133, 82, 0.16);
  }
}

.dish-card__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.dish-card__title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.dish-card__meta {
  margin: 6px 0 0;
}

.match-badge {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff2d9;
  color: #9a5a00;
  font-size: 0.82rem;
  font-weight: 700;
}

.search-highlight {
  padding: 0 3px;
  border-radius: 6px;
  background: #ffe08a;
  color: inherit;
}

.dish-card__actions {
  margin-top: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}

.status-pill.active {
  background: #edfbea;
  color: #2c7a3f;
}

.status-pill.archived {
  background: #f2efe9;
  color: #7d6c61;
}

.empty-card {
  padding: 18px;
  color: #7d6c61;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  padding: 20px 16px max(24px, env(safe-area-inset-bottom));
  background: rgba(47, 38, 31, 0.36);
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.sheet-backdrop.hidden {
  display: none;
}

.sheet {
  width: min(100%, 760px);
  max-height: 90vh;
  overflow: auto;
  padding: 20px;
}

.sheet__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.sheet__form {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
  color: #5d4a40;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(160, 113, 84, 0.18);
  border-radius: 16px;
  padding: 14px 16px;
  background: #fffdfb;
  color: #2f261f;
}

.field textarea {
  resize: vertical;
  min-height: 96px;
}

.checkbox-field {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: #5d4a40;
}

.auth-submit {
  width: 100%;
}

@media (min-width: 720px) {
  .hero-card {
    grid-template-columns: minmax(0, 1.8fr) auto;
    align-items: end;
  }

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

  .category-manage-page {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: start;
  }
}
