@font-face {
  font-family: "Inter";
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #101318;
  --ink-2: #2a2e35;
  --muted: #61656d;
  --rule: #e4e1da;
  --accent: #a8501a;
  --dark: #0a0c0f;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: #fff;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.demo { max-width: 430px; margin: 0 auto; padding: 28px 22px 40px; padding-top: max(28px, env(safe-area-inset-top)); padding-bottom: max(40px, env(safe-area-inset-bottom)); }
.pay, .btn, .link { -webkit-tap-highlight-color: transparent; }

.scr-k { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.scr-h { margin: 0 0 26px; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); }

.prod { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 16px; padding: 16px 0 20px; border-bottom: 1px solid var(--rule); }
.prod img { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; display: block; }
.prod b { display: block; font-size: 16px; color: var(--ink); }
.prod span { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }
.prod em { font-style: normal; font-size: 18px; font-weight: 600; color: var(--ink); }

.row { display: flex; justify-content: space-between; align-items: baseline; padding: 15px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.row span { color: var(--muted); }
.row b { font-weight: 500; color: var(--ink); }
.row.total { border-bottom: 0; padding-top: 18px; }
.row.total span { color: var(--ink); font-weight: 600; }
.row.total b { font-size: 20px; font-weight: 700; }

.pay {
  display: block; width: 100%; margin: 22px 0 0; padding: 18px 20px;
  border: 0; border-radius: 12px; background: var(--ink); color: #fff;
  font: inherit; text-align: center; cursor: pointer;
}
.pay span { display: block; font-size: 17px; font-weight: 600; }
.pay small { display: block; margin-top: 4px; font-size: 12px; color: rgba(255, 255, 255, 0.6); }
.pay:active { transform: scale(0.99); }

.scr-done { padding-top: 24px; text-align: center; }
.tick { width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.tick svg { width: 36px; height: 36px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.scr-done .scr-h { margin-bottom: 10px; }
.scr-sub { margin: 0 0 26px; font-size: 15px; color: var(--muted); }
.prod-mini { grid-template-columns: 64px 1fr; text-align: left; border-top: 1px solid var(--rule); }
.prod-mini img { width: 64px; height: 64px; }

.after { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--rule); text-align: left; }
.after p { margin: 0 0 16px; font-size: 15.5px; color: var(--ink-2); }
.btn { display: block; margin: 26px 0 0; padding: 16px 20px; border-radius: 12px; background: var(--accent); color: #fff; text-align: center; font-weight: 600; text-decoration: none; }
.link { display: block; margin: 18px 0 0; text-align: center; font-size: 15px; font-weight: 500; color: var(--ink); }

.note { margin: 40px 0 0; font-size: 12px; line-height: 1.5; color: #8a8e96; text-align: center; }

@media (prefers-reduced-motion: no-preference) {
  .scr-done.in .tick { animation: pop .5s cubic-bezier(.2, 1.3, .4, 1) both; }
  .scr-done.in .scr-h, .scr-done.in .scr-sub, .scr-done.in .prod-mini, .scr-done.in .after { animation: rise .6s ease .15s both; }
  @keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
}

@media (max-width: 340px) {
  .demo { padding-left: 16px; padding-right: 16px; }
  .scr-h { font-size: 26px; }
  .prod { grid-template-columns: 64px 1fr auto; gap: 12px; }
  .prod img { width: 64px; height: 64px; }
  .prod b { font-size: 15px; }
  .prod em { font-size: 16px; }
}

/* On a large screen, present the phone as a phone */
@media (min-width: 700px) {
  body { background: var(--dark); min-height: 100vh; display: grid; place-items: center; padding: 48px 0; }
  /* A 390 x 844 handset (19.5:9); grows only if a screen's content needs more room */
  .demo { position: relative; width: 390px; max-width: none; min-height: 844px; margin: 0; padding: 72px 24px 34px; border-radius: 48px; background: #fff; box-shadow: 0 0 0 11px #1c1f24, 0 0 0 13px #2b2f36, 0 40px 100px rgba(0, 0, 0, 0.6); display: flex; flex-direction: column; }
  .demo::before { content: ""; position: absolute; left: 50%; top: 14px; width: 110px; height: 30px; transform: translateX(-50%); border-radius: 16px; background: var(--dark); }
  .demo::after { content: "9:41"; position: absolute; left: 32px; top: 20px; font-size: 14px; font-weight: 600; color: var(--ink); }
  .screen { flex: 1 0 auto; display: flex; flex-direction: column; }
  .screen[hidden] { display: none; }
  .screen .pay { margin-top: auto; }
  .scr-done .after { margin-top: auto; padding-top: 24px; }
  .scr-done .after p { font-size: 14.5px; }
  .note { margin-top: 28px; padding-top: 10px; }
}
