* { box-sizing: border-box; }
body {
  font-family: -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  background: #f6f3ee;
  color: #333;
  margin: 0;
  padding: 16px;
  max-width: 720px;
  margin-inline: auto;
}
h1 { font-size: 1.4rem; margin-bottom: 4px; }
.sub { color: #888; margin-top: 0; margin-bottom: 20px; }
a.back { display: inline-block; margin-bottom: 16px; color: #a5673f; text-decoration: none; }
a.back:hover { text-decoration: underline; }

.card-grid { display: grid; gap: 16px; margin-top: 24px; }
.card {
  display: block;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-decoration: none;
  color: #333;
}
.card h2 { margin: 0 0 6px; font-size: 1.15rem; color: #a5673f; }
.card p { margin: 0; color: #777; font-size: 0.92rem; }

.panel {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.panel h2 { margin-top: 0; font-size: 1.05rem; }

.panel.announcement { border: 2px solid #e0574a; }
.panel.announcement h2 { color: #c0392b; }

.poster {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 12px;
}

.rule-list { margin: 0; padding-left: 1.2em; font-size: 0.92rem; line-height: 1.7; }
.rule-list li { margin-bottom: 4px; }

.section-title { font-size: 1.05rem; color: #a5673f; margin: 24px 0 10px; }

.menu h3 {
  font-size: 0.98rem;
  color: #6b4a2f;
  border-bottom: 1px solid #eee;
  padding-bottom: 6px;
  margin: 22px 0 8px;
}
.menu h3:first-of-type { margin-top: 0; }
.menu-note { display: block; font-weight: normal; font-size: 0.8rem; color: #999; margin-top: 2px; }
p.menu-note { margin: 8px 0 0; }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed #f0e9e0;
  font-size: 0.92rem;
}
.menu-list li:last-child { border-bottom: none; }
.menu-list .tag {
  background: #a5673f;
  color: #fff;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.menu-list .name { flex: 1; }
.menu-list .price { color: #a5673f; font-weight: bold; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.field { flex: 1; min-width: 120px; display: flex; flex-direction: column; }
label { font-size: 0.85rem; color: #666; margin-bottom: 4px; }
input, select, textarea {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
}
button {
  background: #a5673f;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}
button:hover { background: #8a5330; }
button.danger { background: #b04a3f; }
button.small { padding: 6px 12px; font-size: 0.85rem; }

.error {
  background: #fde8e6;
  color: #a8382e;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.success {
  background: #eaf7ee;
  color: #256b3b;
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 2px solid #4caf7d;
}
.success h2 { margin-top: 0; }
.success .rule-list { color: #256b3b; }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
th, td { padding: 10px; text-align: left; border-bottom: 1px solid #eee; font-size: 0.9rem; }
th { background: #efe7db; color: #6b4a2f; }
tr:last-child td { border-bottom: none; }
.status-cancel { color: #999; text-decoration: line-through; }

tr.low-stock { outline: 2px solid #d9362b; outline-offset: -2px; background: #fdf0ef; }
.qty-low { color: #d9362b; font-weight: bold; }
.low-badge {
  display: inline-block;
  margin-left: 6px;
  background: #d9362b;
  color: #fff;
  font-size: 0.7rem;
  font-weight: normal;
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: middle;
}

.operator-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.operator-bar label { margin: 0; font-weight: bold; color: #a5673f; }
.operator-bar select { width: auto; min-width: 140px; }
.operator-bar .menu-note { width: 100%; margin: 4px 0 0; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin-right: 6px; }
.inline-form input[type=number] { width: 70px; }
.inline-form input[type=text] { width: 60px; }

.step-btn { width: 36px; font-weight: bold; }
.step-btn.plus { background: #3f8a5c; }
.step-btn.plus:hover { background: #336f4a; }
.step-btn.minus { background: #b04a3f; }
.step-btn.minus:hover { background: #90392f; }

.delta-input { width: 64px; display: inline-block; text-align: center; }

.update-all-btn {
  display: block;
  width: 100%;
  margin: 20px 0 40px;
  padding: 16px;
  font-size: 1.15rem;
  position: sticky;
  bottom: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

@media (max-width: 480px) {
  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  tr { margin-bottom: 12px; border-bottom: 2px solid #eee; padding-bottom: 8px; }
  td { border: none; padding: 4px 6px; }
  td::before { content: attr(data-label); font-weight: bold; color: #a5673f; display: inline-block; width: 80px; }
}
