:root {
  color-scheme: light;
  --bg: #fff7ed;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --accent: #ff813f;
  --accent-dark: #e85d1f;
  --ring: rgba(255, 129, 63, 0.25);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 129, 63, 0.24), transparent 34rem),
    linear-gradient(135deg, #fff7ed, #fffbeb 55%, #fef3c7);
  color: var(--ink);
}

.shell {
  width: min(100% - 2rem, 680px);
  margin: 0 auto;
  padding: 7vh 0 4rem;
}
.card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 24px 70px rgba(146, 64, 14, 0.18);
  border-radius: 32px;
  padding: clamp(1.5rem, 4vw, 3rem);
  backdrop-filter: blur(14px);
}
.avatar {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff3e8;
  box-shadow: inset 0 0 0 1px rgba(255, 129, 63, 0.22);
  font-size: 2.6rem;
}
.eyebrow {
  margin: 1.5rem 0 0.25rem;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 800;
}
h1 {
  margin: 0;
  font-size: clamp(2.3rem, 8vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}
.lede {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.6;
  max-width: 42rem;
}
.tip-form {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}
label {
  display: grid;
  gap: 0.45rem;
  color: #374151;
  font-weight: 750;
}
.optional { color: var(--muted); font-weight: 500; font-size: 0.9em; }
input, textarea {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 0.95rem 1rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
  outline: none;
}
input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--ring);
}
textarea { min-height: 90px; resize: vertical; }
.amount-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding-left: 1rem;
  background: #fff;
  font-size: 1.8rem;
  font-weight: 850;
}
.amount-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.amount-row input {
  border: 0;
  box-shadow: none;
  font-size: inherit;
  font-weight: inherit;
  padding-left: 0;
}
.quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}
.quick-amounts button {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 999px;
  padding: 0.75rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.quick-amounts button.selected,
.quick-amounts button:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.wallet-container {
  min-height: 60px;
  border: 1px dashed #fdba74;
  border-radius: 18px;
  padding: 1rem;
  background: #fffaf5;
}
.loading { color: var(--muted); text-align: center; }
.pay-button {
  appearance: none;
  border: 0;
  border-radius: 18px;
  padding: 1rem 1.25rem;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(255, 129, 63, 0.3);
}
.pay-button:hover:not(:disabled) { background: var(--accent-dark); }
.pay-button:disabled { opacity: 0.55; cursor: not-allowed; }
.status { min-height: 1.5rem; color: var(--muted); margin: 0; }
.status.ok { color: #047857; font-weight: 800; }
.status.error { color: #b91c1c; font-weight: 800; }
.fine-print {
  color: #7c2d12;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 1rem;
  padding: 0 1rem;
}
@media (max-width: 520px) {
  .quick-amounts { grid-template-columns: repeat(2, 1fr); }
}
