:root {
  color: #1f2328;
  background: #f6f5f2;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.app {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 16px 32px;
  background: #ffffff;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
}

.account-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.account-actions button {
  padding-right: 10px;
  padding-left: 10px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #687076;
  font-size: 13px;
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  color: #ffffff;
  background: #1f7a4d;
  font-weight: 700;
}

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

.ghost {
  border: 1px solid #cbd5d0;
  color: #1f2328;
  background: #ffffff;
}

.danger {
  background: #b42318;
}

.hidden {
  display: none !important;
}

.panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #e6e0d8;
  border-radius: 8px;
  background: #fbfaf8;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.panel.locked {
  opacity: 0.72;
}

.form {
  display: grid;
  gap: 10px;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input,
textarea {
  width: 100%;
  border: 1px solid #d6d0c8;
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

.list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.item h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

.item p {
  margin: 0;
  color: #687076;
  line-height: 1.5;
}

.detail {
  margin-top: 14px;
}

.detail h2 {
  margin-bottom: 8px;
}

.detail p {
  margin: 0 0 8px;
  color: #687076;
  line-height: 1.5;
}

.muted {
  color: #687076;
  line-height: 1.5;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #374151;
}

.check-row input {
  width: auto;
}

.sublist {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.recipe-row {
  grid-template-columns: 72px 1fr;
}

.recipe-image {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  background: #f3f4f6;
}

.recipe-info {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.row strong {
  display: block;
  overflow-wrap: anywhere;
}

.row p {
  margin: 6px 0 0;
  color: #687076;
  line-height: 1.4;
}

.actions {
  display: grid;
  gap: 8px;
}

.qty-control {
  display: grid;
  grid-template-columns: 38px 28px 38px;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.qty-control button {
  width: 38px;
  height: 38px;
  padding: 0;
}

.qty-control span {
  font-weight: 700;
}

.order-summary {
  margin-bottom: 10px;
  color: #1f2328;
  line-height: 1.5;
}

#orderNote {
  margin-bottom: 10px;
}

.order-card {
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.order-card p {
  margin: 8px 0 0;
  color: #687076;
  line-height: 1.4;
}

.order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inline-actions {
  grid-template-columns: 1fr 1fr;
  margin-top: 10px;
}

.rating-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.rating-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  color: #374151;
}

.rating-buttons {
  display: grid;
  grid-template-columns: repeat(5, 30px);
  gap: 4px;
}

.rating-button {
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 13px;
}

.rating-button.selected {
  border-color: #1f7a4d;
  color: #ffffff;
  background: #1f7a4d;
}

@media (max-width: 360px) {
  .topbar {
    align-items: flex-start;
  }

  .account-actions {
    flex-direction: column;
  }

  .item,
  .row,
  .inline-form,
  .rating-row {
    grid-template-columns: 1fr;
  }
}
