:root {
  --wood-dark: #1a100c;
  --ember: #c43b2d;
  --cream: #fff6e8;
  --cream-dim: #f0e3d4;
  --ink: #1a1210;
  --muted: #6b5348;
  --card: #fffefb;
  --border: rgba(90, 56, 40, 0.16);
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, #2a1810 0%, #1a100c 40%, #24140f 100%);
  padding-bottom: 5.5rem;
}

.qr-top {
  padding: 1.35rem 1.25rem 1.1rem;
  text-align: center;
  background: rgba(26, 16, 12, 0.92);
  border-bottom: 3px solid var(--ember);
  color: var(--cream);
}

.qr-top__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e85d4c;
}

.qr-top h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 400;
}

.qr-top__table {
  margin: 0.35rem 0 0;
  font-weight: 600;
  color: var(--cream-dim);
}

.qr-steps {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
}

.qr-steps li {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 246, 232, 0.45);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.qr-steps li.is-current {
  color: var(--cream);
  border-color: rgba(232, 93, 76, 0.7);
  background: rgba(196, 59, 45, 0.25);
}

.qr-steps li.is-done {
  color: #e8c9b8;
}

main {
  width: min(560px, 100% - 1.5rem);
  margin: 1.25rem auto 2rem;
}

.qr-lead {
  margin: 0 0 1rem;
  color: var(--cream-dim);
  font-size: 0.92rem;
  text-align: center;
}

.qr-status {
  color: var(--cream-dim);
  text-align: center;
  font-size: 0.9rem;
}

.qr-panel h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--cream);
  font-weight: 400;
}

.qr-panel p {
  margin: 0 0 1rem;
  color: var(--cream-dim);
  font-size: 0.9rem;
}

.qr-panel__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.qr-panel__row h2 {
  margin: 0;
}

.qr-link {
  appearance: none;
  background: none;
  border: 0;
  color: #e85d4c;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.qr-tables {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.qr-tables button {
  appearance: none;
  min-height: 3.1rem;
  border: 1px solid rgba(255, 246, 232, 0.18);
  border-radius: 12px;
  background: rgba(255, 254, 251, 0.08);
  color: var(--cream);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.qr-tables button:hover,
.qr-tables button.is-selected {
  background: linear-gradient(180deg, #e85d4c, var(--ember));
  border-color: transparent;
}

.qr-section {
  margin-bottom: 1.5rem;
}

.qr-section h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--cream);
  font-weight: 400;
}

.qr-item {
  display: grid;
  grid-template-columns: 5.25rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.65rem;
  margin-bottom: 0.65rem;
}

.qr-item img {
  width: 5.25rem;
  height: 5.25rem;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.qr-item h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.qr-item p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

.qr-item__price {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

.qr-item__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.qr-item__actions button,
.qr-qty button {
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: var(--ember);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.qr-qty {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.qr-qty span {
  min-width: 1.1rem;
  text-align: center;
  font-weight: 700;
}

.qr-qty button {
  width: 1.8rem;
  padding: 0.2rem 0;
}

.qr-cart {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.qr-cart article {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--card);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
}

.qr-total {
  font-weight: 700;
  color: var(--cream) !important;
  font-size: 1.05rem;
}

.qr-field {
  display: grid;
  gap: 0.3rem;
  color: var(--cream-dim);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.qr-field span {
  font-weight: 500;
  opacity: 0.75;
}

.qr-field input,
.qr-field textarea {
  width: 100%;
  border: 1px solid rgba(255, 246, 232, 0.2);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  background: #fffefb;
  color: var(--ink);
}

.qr-test-note {
  font-size: 0.8rem !important;
  opacity: 0.8;
  text-align: center;
}

.qr-cartbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
  background: #1a100c;
  border-top: 2px solid var(--ember);
  color: var(--cream);
  z-index: 20;
}

.qr-cartbar[hidden] {
  display: none !important;
}

.qr-cartbar button {
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #e85d4c, var(--ember));
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0.65rem 0.95rem;
  cursor: pointer;
}

.qr-foot {
  text-align: center;
  padding: 1.5rem 1.25rem 2.5rem;
  color: var(--cream-dim);
}

.qr-foot p {
  margin: 0 0 0.75rem;
}

.qr-foot__btn {
  display: inline-flex;
  padding: 0.7rem 1.2rem;
  border-radius: 10px;
  background: linear-gradient(180deg, #e85d4c, var(--ember));
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.qr-foot__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.qr-foot__links {
  margin-top: 1rem;
  font-size: 0.88rem;
}

.qr-foot__links a {
  color: #e85d4c;
  text-decoration: none;
}

.qr-error {
  background: rgba(255, 248, 236, 0.1);
  border: 1px solid rgba(255, 246, 232, 0.18);
  border-radius: 12px;
  padding: 1rem;
  color: var(--cream-dim);
}

#dropin-container {
  margin-top: 0.85rem;
  background: #fffefb;
  border-radius: 14px;
}
