:root {
  --ink: #171411;
  --ink-soft: #3e3934;
  --muted: #706b64;
  --line: #e2e0db;
  --surface: #ffffff;
  --paper: #f7f7f3;
  --paper-deep: #eeeee8;
  --butcher: #b9322a;
  --butcher-dark: #7f211c;
  --sage: #2f604d;
  --sage-soft: #e8f0eb;
  --shadow: 0 18px 44px rgba(23, 20, 17, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper-deep);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  min-height: 100vh;
  max-width: 1240px;
  margin: 0 auto;
  background: var(--surface);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.icon-button,
.cart-button,
.back-button,
.text-button,
.secondary-action,
.primary-action,
.category-chip,
.nav-item,
.add-button,
.remove-button {
  border: 0;
}

.menu-button {
  display: grid;
  place-items: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: var(--paper);
}

.menu-button span {
  display: block;
  width: 19px;
  height: 2px;
  background: var(--ink);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 900;
}

.brand-lockup p,
.brand-lockup strong {
  display: block;
  margin: 0;
  line-height: 1.05;
}

.brand-lockup p {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-lockup strong {
  margin-top: 3px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.cart-button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.cart-button strong {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--butcher);
  font-size: 13px;
}

main {
  padding: 16px 14px 24px;
}

.view {
  display: none;
}

.view-active {
  display: block;
}

.order-hero {
  display: grid;
  gap: 20px;
  min-height: 300px;
  padding: 22px;
  align-items: end;
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(23, 20, 17, 0.94) 0%, rgba(23, 20, 17, 0.68) 52%, rgba(23, 20, 17, 0.08) 100%),
    url("https://images.unsplash.com/photo-1604503468506-a8da13d82791?auto=format&fit=crop&w=1400&q=84");
  background-position: center;
  background-size: cover;
  color: #fff;
}

.hero-content {
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--butcher);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.order-hero .eyebrow {
  color: #f4c4bc;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 48px;
  font-weight: 800;
  line-height: 0.98;
}

h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  line-height: 1.05;
}

h3 {
  margin-bottom: 7px;
  font-size: 19px;
  line-height: 1.16;
}

.hero-copy {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
  line-height: 1.55;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badges span {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.primary-action,
.secondary-action,
.back-button {
  min-height: 48px;
  border-radius: 4px;
  font-weight: 900;
}

.primary-action {
  padding: 0 20px;
  background: var(--butcher);
  color: #fff;
  box-shadow: 0 16px 28px rgba(185, 50, 42, 0.18);
}

.primary-action:hover,
.add-button:hover {
  background: var(--butcher-dark);
}

.secondary-action {
  padding: 0 20px;
  background: var(--paper);
  color: var(--ink);
}

.full-width {
  width: 100%;
}

.category-panel {
  display: flex;
  gap: 10px;
  margin: 18px 0 14px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.category-chip span {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
}

.category-chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.category-chip.active span {
  background: #fff;
  color: var(--ink);
}

.line-strip {
  display: grid;
  gap: 5px;
  margin: 12px 0 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}

.line-strip div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.line-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--sage);
  box-shadow: 0 0 0 5px rgba(47, 96, 77, 0.12);
}

.section-heading,
.page-heading,
.admin-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

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

.section-note {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  text-align: right;
}

.product-grid {
  display: grid;
  gap: 16px;
}

.product-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(23, 20, 17, 0.04);
}

.product-photo {
  position: relative;
  min-height: 232px;
  overflow: hidden;
  background: var(--paper);
  background-position: center;
  background-size: cover;
}

.product-photo::after {
  position: absolute;
  left: 12px;
  bottom: 12px;
  content: "Photo pending";
  padding: 5px 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.photo-chicken-1 {
  background-image: url("https://images.unsplash.com/photo-1604503468506-a8da13d82791?auto=format&fit=crop&w=800&q=84");
}

.photo-chicken-2,
.photo-chicken-3 {
  background-image: url("https://images.unsplash.com/photo-1587593810167-a84920ea0781?auto=format&fit=crop&w=800&q=84");
}

.photo-rice {
  background-image: url("https://images.unsplash.com/photo-1586201375761-83865001e31c?auto=format&fit=crop&w=800&q=84");
}

.product-info {
  display: grid;
  gap: 10px;
  padding: 16px;
  min-width: 0;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--sage);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tag.hot {
  background: #fde7e4;
  color: var(--butcher);
}

.product-description {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.price-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
}

.price-line strong {
  color: var(--butcher);
  font-size: 26px;
  line-height: 1;
}

.price-line span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.quantity-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding-top: 2px;
}

.stepper {
  display: grid;
  grid-template-columns: 38px 42px 38px;
  align-items: center;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.stepper button {
  height: 100%;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.stepper input {
  width: 100%;
  height: 100%;
  border: 0;
  text-align: center;
  font-weight: 900;
}

.add-button {
  min-height: 42px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.page-heading {
  align-items: flex-start;
  flex-direction: column;
  margin-bottom: 20px;
}

.page-heading p {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.back-button {
  min-height: 40px;
  padding: 0 14px;
  background: var(--paper);
  color: var(--ink);
}

.panel,
.checkout-form,
.admin-login,
.admin-dashboard,
.success-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--shadow);
}

.panel {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.cart-items {
  display: grid;
  gap: 14px;
}

.cart-empty {
  padding: 24px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--muted);
  text-align: center;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.cart-item:last-child {
  border-bottom: 0;
}

.cart-item p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

.remove-button {
  background: transparent;
  color: var(--butcher);
  font-weight: 900;
}

.summary-card {
  display: grid;
  gap: 13px;
  padding: 16px;
  border-radius: 4px;
  background: var(--paper);
}

.summary-card div,
.checkout-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.summary-card span,
.checkout-total span {
  color: var(--muted);
}

.summary-total {
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.summary-total strong,
.checkout-total strong {
  color: var(--butcher);
  font-size: 25px;
}

.checkout-form {
  display: grid;
  gap: 15px;
  padding: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
}

input,
select {
  min-height: 48px;
  padding: 0 12px;
}

textarea {
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(185, 50, 42, 0.15);
  border-color: var(--butcher);
}

.checkout-total {
  padding: 15px;
  border-radius: 4px;
  background: var(--paper);
}

.success-card {
  display: grid;
  gap: 16px;
  padding: 26px 18px;
  text-align: center;
}

.success-card h1 {
  margin-bottom: 0;
}

.success-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.notification-list {
  display: grid;
  gap: 8px;
}

.notification-list span {
  padding: 10px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 900;
}

.admin-login,
.admin-dashboard {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.helper-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.hidden {
  display: none;
}

.admin-toolbar {
  align-items: center;
}

.admin-toolbar label {
  width: 132px;
}

.admin-orders {
  display: grid;
  gap: 14px;
}

.admin-order {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.admin-order-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.admin-order-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-status {
  min-height: 42px;
}

.admin-line {
  display: grid;
  grid-template-columns: 1fr 72px 92px;
  gap: 8px;
  align-items: center;
}

.admin-line span {
  min-width: 0;
  font-weight: 900;
}

.admin-line input {
  min-height: 42px;
}

.admin-total {
  display: grid;
  grid-template-columns: 1fr 132px;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.admin-total strong,
.admin-total span {
  display: block;
}

.admin-total strong {
  color: var(--butcher);
  font-size: 22px;
}

.admin-total input {
  min-height: 42px;
  color: var(--butcher);
  font-weight: 900;
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 14px 16px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.nav-item {
  min-height: 44px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--muted);
  font-weight: 900;
}

.nav-item.active {
  background: var(--ink);
  color: #fff;
}

@media (min-width: 740px) {
  body {
    padding: 24px;
  }

  .app-shell {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(23, 20, 17, 0.05);
  }

  main {
    padding: 28px 30px 38px;
  }

  .order-hero {
    grid-template-columns: 1fr auto;
    min-height: 360px;
    padding: 42px;
  }

  h1 {
    font-size: 58px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-photo {
    min-height: 300px;
  }

  .panel {
    grid-template-columns: 1fr 340px;
    align-items: start;
  }

  .checkout-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wide-field,
  .checkout-total,
  .checkout-form .full-width {
    grid-column: 1 / -1;
  }

  .success-card {
    max-width: 560px;
    margin: 48px auto;
  }

  .bottom-nav {
    padding-right: 30px;
    padding-left: 30px;
  }
}

@media (min-width: 1080px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-card {
    min-height: 100%;
  }
}

@media (max-width: 430px) {
  .cart-button span {
    display: none;
  }

  .order-hero {
    min-height: 320px;
  }

  h1 {
    font-size: 46px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-note {
    max-width: none;
    text-align: left;
  }

  .quantity-row {
    grid-template-columns: 1fr;
  }

  .add-button {
    width: 100%;
  }

  .admin-line,
  .admin-total {
    grid-template-columns: 1fr;
  }
}
