:root {
  --cream: #f6efe4;
  --cream-deep: #f0e0d0;
  --paper: #fffdf9;
  --yellow: #f8c838;
  --yellow-deep: #f0b429;
  --brown: #c07828;
  --brown-dark: #6b3b12;
  --ink: #2c241c;
  --muted: #7c6b59;
  --line: #eadccb;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(107, 59, 18, 0.08);
  --display: "Baloo 2", "Avenir Next", "Trebuchet MS", sans-serif;
  --body: "Nunito", "Avenir Next", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.5;
  background:
    radial-gradient(900px 420px at 50% -80px, #ffe9a8 0%, transparent 70%),
    var(--cream);
}

img {
  max-width: 100%;
  height: auto;
}

button,
input {
  font: inherit;
}

a {
  color: var(--brown-dark);
  font-weight: 800;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 2;
}

.skip:focus {
  top: 12px;
}

.topbar,
.hero,
main,
footer {
  width: min(720px, calc(100% - 32px));
  margin-inline: auto;
}

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

.brand {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
}

.topbar nav {
  display: flex;
  gap: 6px;
}

.topbar nav a {
  padding: 8px 12px;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  color: var(--brown-dark);
  font-size: 0.98rem;
}

.topbar nav a[aria-current="page"] {
  background: white;
  border-color: var(--brown);
}

.hero {
  padding: 36px 0 8px;
  text-align: center;
}

.logo {
  display: block;
  width: 148px;
  height: 148px;
  margin-inline: auto;
  border-radius: 50%;
  background: var(--cream-deep);
  filter: drop-shadow(0 10px 18px rgba(192, 120, 40, 0.18));
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  margin: 8px 0 8px;
  font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  line-height: 1.02;
}

h1 span {
  display: block;
  margin-top: 2px;
  font-size: 0.48em;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.lede {
  margin: 0 auto;
  max-width: 58ch;
  color: var(--brown-dark);
}

.progress {
  display: flex;
  gap: 8px;
  margin: 28px 0 14px;
  padding: 0;
  list-style: none;
}

.progress li {
  flex: 1;
}

.progress button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.7);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.progress button span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cream-deep);
  font-family: var(--display);
  font-size: 0.85rem;
}

.progress button[aria-current="step"] {
  background: white;
  border-color: var(--brown);
  color: var(--brown-dark);
}

.progress button[aria-current="step"] span,
.progress button.is-done span {
  background: var(--yellow);
  color: var(--brown-dark);
}

.progress button:disabled {
  cursor: default;
}

.panel {
  background: var(--paper);
  border: 2px solid #f3e4d0;
  border-radius: 28px;
  padding: 22px 18px 20px;
  box-shadow: var(--shadow);
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--brown);
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 600;
}

h2 {
  margin: 0 0 16px;
  font-size: 1.55rem;
  line-height: 1.2;
}

.req {
  color: var(--danger);
  text-decoration: none;
  font-weight: 800;
}

.item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 12px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 22px;
  background: white;
  text-align: left;
  cursor: pointer;
}

.item.is-added {
  border-color: #f0d48a;
  cursor: default;
}

.item:hover {
  border-color: var(--brown);
}

.cake-icon {
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #fff6df;
  border: 2px solid #f3ddb0;
}

.item h3 {
  margin: 0;
  font-size: 1.12rem;
}

.item p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

.add-btn,
.stepper button {
  width: 44px;
  height: 44px;
  flex: none;
  border: 2px solid var(--brown);
  background: var(--yellow);
  color: var(--brown-dark);
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.add-btn {
  margin-left: auto;
  border-radius: 50%;
  box-shadow: 0 2px 0 var(--brown);
}

.stepper {
  margin-left: auto;
  display: flex;
  align-items: center;
  border: 2px solid var(--brown);
  border-radius: 999px;
  overflow: hidden;
  background: white;
}

.stepper button {
  border: 0;
  border-radius: 0;
}

.stepper button:first-child {
  border-right: 2px solid var(--brown);
}

.stepper button:last-child {
  border-left: 2px solid var(--brown);
}

.stepper input {
  width: 52px;
  height: 44px;
  border: 0;
  background: white;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.2rem;
  text-align: center;
  -moz-appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stepper input:focus {
  outline: none;
}

.add-btn:focus-visible,
.stepper button:focus-visible,
.stepper input:focus-visible {
  outline: 3px solid var(--yellow-deep);
  outline-offset: 2px;
}

.amount {
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: 20px;
  background: #fff8e8;
  border: 2px dashed #f0d48a;
}

.amount-label,
.amount-note,
.hint,
.pay-lead,
.send-note {
  color: var(--muted);
}

.amount-label {
  margin: 0;
  font-weight: 800;
}

.amount-value {
  margin: 2px 0;
  font-family: var(--display);
  font-size: 2.4rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.amount-note {
  margin: 0;
}

.field {
  margin-bottom: 18px;
}

label,
.field > label {
  display: block;
  font-weight: 800;
}

.hint {
  margin: 2px 0 8px;
  font-size: 0.95rem;
}

.hint.center {
  text-align: center;
}

input[type="text"],
input[type="tel"],
input[type="date"],
select {
  width: 100%;
  margin-top: 8px;
  padding: 14px 14px;
  border: 2px solid #ead9c4;
  border-radius: 14px;
  background: white;
  color: var(--ink);
  font: inherit;
}

input:focus {
  outline: 3px solid var(--yellow);
  border-color: var(--brown);
}

.field.is-invalid input,
.field.is-invalid select,
.upload.is-invalid {
  border-color: var(--danger);
}

.error {
  margin: 8px 0 0;
  color: var(--danger);
  font-weight: 800;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.actions.stack {
  flex-direction: column;
  align-items: stretch;
}

.btn,
.progress button,
.text-btn {
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 2px solid var(--brown);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--brown-dark);
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--brown);
  cursor: pointer;
}

.btn:hover {
  background: #ffd45a;
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--brown);
}

.btn-ghost {
  background: white;
  box-shadow: none;
}

.btn:focus-visible,
.progress button:focus-visible,
.text-btn:focus-visible {
  outline: 3px solid var(--yellow-deep);
  outline-offset: 2px;
}

.pay-lead {
  margin-top: 0;
}

.reference {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--cream);
}

.reference strong {
  font-family: var(--display);
  font-size: 1.25rem;
}

.bank {
  margin-bottom: 20px;
  padding: 16px 16px 12px;
  border-radius: 20px;
  border: 2px solid var(--line);
  border-left: 8px solid var(--yellow);
}

.bank h3,
.summary h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.bank dl,
.summary-meta {
  margin: 0;
}

.bank dl div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  align-items: center;
  padding: 8px 0;
}

.bank dd {
  grid-column: 1;
}

.copy-one {
  grid-column: 2;
  grid-row: 1 / span 2;
  border: 0;
  border-radius: 999px;
  background: #fff6df;
  color: var(--brown-dark);
  font-weight: 800;
  padding: 8px 14px;
  cursor: pointer;
}

.copy-one:focus-visible {
  outline: 3px solid var(--yellow-deep);
  outline-offset: 2px;
}

.summary-meta div {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 8px;
  padding: 6px 0;
}

.bank dt,
.summary-meta dt {
  color: var(--muted);
  font-weight: 800;
}

.bank dd,
.summary-meta dd {
  margin: 0;
  font-weight: 800;
}

.text-btn {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brown-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.copied {
  margin: 6px 0 0;
  color: var(--brown-dark);
  font-weight: 800;
}

.upload {
  margin-top: 8px;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 22px 16px;
  border: 2px dashed #e3c98a;
  border-radius: 18px;
  background: #fffaf0;
  text-align: center;
  cursor: pointer;
}

.upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.upload-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: white;
  color: var(--brown);
  border: 2px solid #f0ddb4;
}

.upload-cta {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--brown-dark);
}

.upload-hint {
  color: var(--muted);
  font-size: 0.92rem;
}

.upload.is-drag {
  background: #fff1c9;
  border-color: var(--brown);
}

.preview {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--line);
}

.preview p {
  margin: 0 0 4px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.thanks {
  text-align: center;
}

.thanks-logo {
  width: 112px;
  height: 112px;
  border-radius: 50%;
}

.thanks h2 {
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1.1;
}

.thanks-lead {
  margin: 0 auto 4px;
  max-width: 36ch;
  font-size: 1.15rem;
}

.summary {
  margin: 20px 0;
  padding: 16px;
  text-align: left;
  border-radius: 20px;
  background: #fff8e8;
}

.summary ul {
  margin: 0;
  padding-left: 1.1rem;
}

.summary li + li {
  margin-top: 4px;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding-top: 10px;
  border-top: 1px dashed #efd7a0;
  font-weight: 800;
}

.summary-total strong {
  font-family: var(--display);
  font-size: 1.35rem;
}

.send-note {
  margin: 0 0 14px;
}

footer {
  padding: 28px 0 40px;
  text-align: center;
  color: var(--muted);
}

footer p {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .topbar {
    flex-wrap: wrap;
  }

  .topbar nav {
    width: 100%;
  }

  .topbar nav a {
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .progress button {
    gap: 4px;
    padding-inline: 4px;
    font-size: 0.86rem;
  }

  .summary-meta div {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (min-width: 720px) {
  .panel {
    padding: 32px 32px 26px;
  }

  .actions.split .btn {
    min-width: 140px;
  }
}

.item .open-cake {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

dialog {
  width: min(440px, calc(100% - 28px));
  padding: 22px 22px 26px;
  border: 3px solid #f3ddb0;
  border-radius: 28px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(44, 36, 28, 0.46);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  background: transparent;
  color: var(--brown-dark);
  font-weight: 800;
  cursor: pointer;
}

.dialog-art {
  display: grid;
  place-items: center;
  margin: 8px 0 4px;
}

.dialog-art svg {
  width: min(260px, 78vw);
  height: auto;
}

#cake-dialog h3 {
  margin: 8px 0 0;
  text-align: center;
  font-size: 1.7rem;
}

#dialog-price {
  margin: 0 0 14px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.dialog-stepper {
  width: fit-content;
  margin: 0 auto;
}

.about {
  padding-bottom: 12px;
}

.hello {
  text-align: center;
  padding-top: 12px;
}

.cheesy-hero {
  width: min(280px, 72vw);
  height: auto;
  border-radius: 50%;
  background: #f3e6d0;
  filter: drop-shadow(0 16px 24px rgba(192, 120, 40, 0.18));
}

.hello-bubble {
  display: inline-block;
  margin: 8px 0 0;
  padding: 10px 18px 12px;
  border: 3px solid var(--brown);
  border-radius: 28px;
  background: white;
  font-family: var(--display);
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  line-height: 1.1;
}

.facts {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.facts p {
  margin: 0;
  padding: 16px 18px;
  border-radius: 20px;
  background: white;
  border: 2px solid #f3e4d0;
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1.25;
}

.joke-art {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 100%;
  padding: 18px 16px 16px;
  border: 3px solid var(--brown);
  border-radius: 28px;
  background:
    radial-gradient(120px 80px at 50% 0%, #fff6c8, transparent 70%),
    var(--yellow);
  box-shadow: 0 4px 0 var(--brown);
  cursor: pointer;
  color: var(--brown-dark);
}

.joke-art img {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #f6efe4;
}

.joke-art span {
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  line-height: 1.05;
}

.joke-art small {
  font-weight: 800;
}

.about-order {
  display: flex;
  justify-content: center;
  margin: 22px 0 0;
}

.about-order .btn {
  text-decoration: none;
}

.joke-stage {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.joke-card {
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: white;
  border: 2px solid var(--brown);
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1.25;
  animation: fling 0.5s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}

@keyframes fling {
  from {
    opacity: 0;
    transform: translate(var(--drift), 28px) rotate(calc(var(--spin) * -1)) scale(0.7);
  }
  to {
    opacity: 1;
    transform: translate(0, 0) rotate(var(--spin)) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .progress button,
  .text-btn {
    transition: none;
  }

  .joke-card {
    animation: none;
  }
}
