:root {
  --bg: #faf9f7;
  --card: #ffffff;
  --text: #2d2a26;
  --muted: #6b6560;
  --accent: #6f4e37;
  --accent-light: #f3e9e0;
  --border: #e8e3de;
  --danger: #e74c3c;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.site-header {
  text-align: center;
  padding: 24px 20px 8px;
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 0 20px 16px;
}

.top-nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
}

.top-nav a:hover {
  text-decoration: underline;
}

.page-nav {
  margin-bottom: 16px;
}

.page-nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
}

.page-title {
  margin: 0 0 20px;
  font-size: 1.5rem;
  font-weight: 600;
}

.site-header h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 600;
}

.site-header p {
  margin: 0;
  color: var(--muted);
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.menu-category {
  margin-bottom: 36px;
}

.menu-category h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.menu-item {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.item-info {
  flex: 1;
}

.item-info h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.item-info p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.item-price {
  font-weight: 600;
  color: var(--accent);
  font-size: 1.1rem;
}

.item-options-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.option-name {
  font-size: 0.85rem;
  color: var(--muted);
  margin-right: 4px;
  min-width: 64px;
}

.option-choice {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.option-choice:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.option-choice.selected {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.option-choice.forbidden {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f5f5f5;
  border-color: var(--border);
  color: var(--muted);
}

.option-hint {
  width: 100%;
  font-size: 0.85rem;
  color: var(--danger);
  margin-top: 2px;
}

.add-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.add-btn:hover {
  background: #5a3f2d;
}

.add-btn:disabled {
  background: var(--muted);
  cursor: not-allowed;
}

.cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 100%;
  height: 100%;
  background: var(--card);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.cart.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.cart-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.close-cart {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-empty {
  color: var(--muted);
  text-align: center;
  margin-top: 40px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

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

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 500;
}

.cart-item-options {
  font-size: 0.85rem;
  color: var(--muted);
}

.cart-item-price {
  font-weight: 600;
  white-space: nowrap;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 4px;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
}

.cart-total {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.submit-btn {
  width: 100%;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.submit-btn:hover {
  background: #5a3f2d;
}

.submit-btn:disabled {
  background: var(--muted);
  cursor: not-allowed;
}

.cancel-btn {
  flex: 1;
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cancel-btn:hover {
  background: var(--bg);
}

.cart-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 90;
}

.cart-icon {
  font-size: 1.5rem;
}

.cart-count {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #e74c3c;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-content {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  max-width: 360px;
  width: 90%;
  box-shadow: var(--shadow);
}

.modal-content h2 {
  margin-top: 0;
}

.pickup-label {
  color: var(--muted);
  margin-bottom: 0;
  font-size: 1rem;
}

.pickup-number {
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 16px;
}

.confirm-items {
  text-align: left;
  margin: 16px 0;
  max-height: 240px;
  overflow-y: auto;
}

.confirm-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.confirm-item:last-child {
  border-bottom: none;
}

.confirm-item-name {
  font-weight: 500;
}

.confirm-item-options {
  color: var(--muted);
  font-size: 0.85rem;
}

.confirm-total {
  font-size: 1.1rem;
  font-weight: 600;
  text-align: right;
  margin-bottom: 20px;
}

.confirm-actions {
  display: flex;
  gap: 12px;
}

.orders-list {
  max-width: 720px;
  margin: 0 auto;
}

.loading {
  text-align: center;
  color: var(--muted);
}

.order-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.order-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.order-time {
  color: var(--muted);
  font-size: 0.9rem;
}

.order-items {
  margin: 0;
  padding-left: 20px;
}

.order-items li {
  margin-bottom: 4px;
}

.order-total {
  margin-top: 12px;
  font-weight: 600;
}

@media (max-width: 600px) {
  .menu-item {
    flex-direction: column;
  }

  .add-btn {
    width: 100%;
    margin-top: 12px;
  }

  .option-group {
    align-items: flex-start;
  }

  .option-name {
    width: 100%;
    margin-bottom: 4px;
  }
}
