:root {
  --ink: #000000;
  --paper: #ffffff;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Helvetica,
    Arial,
    sans-serif;
}

.ticket {
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: calc(12px + var(--safe-top)) 20px calc(12px + var(--safe-bottom));
  max-width: 430px;
  margin: 0 auto;
}

.brand {
  width: 100%;
}

.wordmark {
  margin: 0;
  font-size: clamp(1.05rem, 4.6vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.28em;
  line-height: 1.1;
}

.store {
  margin: 6px 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}

h1 {
  margin: 10px 0 0;
  max-width: 22ch;
  font-size: clamp(1.35rem, 6.2vw, 1.85rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.offer {
  margin: 8px 0 0;
  max-width: 34ch;
  font-size: clamp(0.92rem, 3.6vw, 1.05rem);
  line-height: 1.35;
}

.qr-block {
  margin: 8px 0 4px;
  padding: 14px;
  background: var(--paper);
  width: min(86vw, 48dvh, 340px);
}

.qr {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.qr-block figcaption {
  margin: 10px 0 0;
  font-size: clamp(1rem, 4.2vw, 1.2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.store-info {
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid var(--ink);
  font-size: 0.82rem;
  line-height: 1.35;
}

.directions {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin: 0 0 10px;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.directions:hover,
.directions:focus-visible {
  background: var(--paper);
  color: var(--ink);
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.store-info p {
  margin: 0 0 2px;
}

.store-info .name {
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.store-info .place,
.store-info .hours {
  margin-top: 4px;
}

.phone {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.phone:hover,
.phone:focus-visible {
  text-decoration-thickness: 2px;
}

@media (min-height: 740px) {
  .ticket {
    padding-top: calc(20px + var(--safe-top));
    padding-bottom: calc(20px + var(--safe-bottom));
  }

  h1 {
    margin-top: 16px;
  }

  .qr-block {
    width: min(88vw, 52dvh, 360px);
    padding: 20px;
  }
}

@media (min-width: 768px) {
  body {
    background: var(--paper);
  }

  .ticket {
    max-width: 420px;
    border-left: 1px solid var(--ink);
    border-right: 1px solid var(--ink);
  }
}

.screenshot-now {
  margin: 12px 0 0;
  max-width: 28ch;
  font-size: clamp(0.95rem, 3.8vw, 1.08rem);
  font-weight: 800;
  line-height: 1.3;
}

.deadline {
  margin: 4px 0 10px;
  max-width: 32ch;
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 500;
}

.qr-block figcaption {
  font-size: clamp(0.88rem, 3.4vw, 1.02rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.swing-by {
  margin: 8px 0 0;
  max-width: 28ch;
  font-size: clamp(0.95rem, 3.8vw, 1.08rem);
  font-weight: 800;
  line-height: 1.3;
}
