:root {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #eef5f0;
  color: #17352b;
  accent-color: #13734a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  display: grid;
  place-items: center;
}

.checkout {
  width: min(100%, 470px);
  min-height: 384px;
  background: white;
  border: 1px solid #d5e6db;
  border-radius: 24px;
  padding: clamp(22px, 5vw, 40px);
  box-shadow: 0 18px 58px #183c2510;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  font-weight: 650;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: white;
  background: #176b46;
  border-radius: 9px;
}

h1 { font-size: clamp(1.65rem, 6vw, 2.2rem); margin: 20px 0 28px; }
.mode { margin: -15px 0 25px; color: #52665b; font-size: .875rem; }

.product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid #bdd6c8;
  border-radius: 13px;
  background: #f5faf6;
  font-size: .95rem;
}

.product input { margin: 0; }
.product strong { margin-inline-start: auto; white-space: nowrap; }

button {
  display: block;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 13px;
  color: white;
  background: #176b46;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
button:hover:not(:disabled) { background: #13563a; }
button:disabled { opacity: .6; cursor: wait; }
button:focus-visible, input:focus-visible { outline: 3px solid #297c61; outline-offset: 3px; }
button.secondary { color: #244e3e; background: white; border-color: #c2d6ca; margin-top: 9px; }
button.secondary:hover:not(:disabled) { background: #f0f7f2; }

#receipt { text-align: center; }
.amount { margin: 0 0 10px; font-size: 2rem; font-weight: 720; }
#qr { display: block; margin: 0 auto; max-width: 100%; height: auto; border: 1px solid #d5e6db; border-radius: 12px; }
#state { font-weight: 650; margin: 16px 0 8px; }
#state[data-paid] { color: #176b46; font-size: 1.55rem; }
.order { font-size: .8rem; color: #52665b; overflow-wrap: anywhere; }
#error { color: #a4241d; font-size: .9rem; margin-bottom: 0; }
#error:empty { margin-top: 0; }
