:root {
  --ink: #17130f;
  --paper: #f8f0df;
  --red: #ed3d2f;
  --yellow: #ffd447;
  --blue: #1c92b8;
  --green: #287a56;
  --muted: #6d6256;
  --line: rgba(23, 19, 15, 0.18);
  color: var(--ink);
  background: #cf3429;
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 212, 71, 0.4), transparent 24rem),
    var(--red);
}

button {
  font: inherit;
}

.update-ticket {
  position: fixed;
  z-index: 30;
  right: max(0.85rem, env(safe-area-inset-right));
  bottom: max(0.85rem, env(safe-area-inset-bottom));
  left: max(0.85rem, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
  width: min(32rem, calc(100% - 1.7rem));
  margin-inline: auto;
  padding: 0.85rem;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 0.85rem;
  box-shadow: 0.3rem 0.36rem 0 var(--ink), 0 1rem 2.5rem rgba(23, 19, 15, 0.28);
}

.update-ticket::before,
.update-ticket::after {
  position: absolute;
  left: -0.5rem;
  width: 0.8rem;
  aspect-ratio: 1;
  content: "";
  background: var(--red);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.update-ticket::before {
  top: 0.75rem;
}

.update-ticket::after {
  bottom: 0.75rem;
}

.update-stamp {
  display: grid;
  width: 2.8rem;
  aspect-ratio: 1;
  place-items: center;
  color: white;
  background: var(--red);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: "Cooper Black", Rockwell, Georgia, serif;
  font-size: 0.75rem;
  transform: rotate(-7deg);
}

.update-ticket strong,
.update-ticket p {
  margin: 0;
}

.update-ticket strong {
  font-size: 0.82rem;
}

.update-ticket p {
  margin-top: 0.12rem;
  font-size: 0.66rem;
  font-weight: 700;
}

.update-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.update-actions button {
  min-height: 2.5rem;
  border: 1px solid var(--ink);
  border-radius: 2rem;
  font-size: 0.7rem;
  font-weight: 900;
  cursor: pointer;
}

.update-later {
  color: var(--ink);
  background: transparent;
}

.update-now {
  color: white;
  background: var(--ink);
}

.app-shell {
  position: relative;
  width: min(100%, 760px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(2rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
  overflow: hidden;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(66, 49, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 49, 31, 0.025) 1px, transparent 1px);
  background-size: 11px 11px;
  box-shadow: 0 0 0 1px rgba(23, 19, 15, 0.2), 0 1.5rem 5rem rgba(61, 12, 8, 0.3);
}

.poster-edge {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.45rem;
  background: repeating-linear-gradient(180deg, var(--red) 0 2.5rem, var(--yellow) 2.5rem 5rem, var(--blue) 5rem 7.5rem);
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 0.35rem 0 2rem;
}

.brand-mark {
  display: grid;
  width: 4.25rem;
  aspect-ratio: 1;
  place-items: center;
  color: var(--paper);
  background: var(--ink);
  border: 0.3rem solid var(--yellow);
  border-radius: 50% 47% 52% 45%;
  box-shadow: 0.3rem 0.35rem 0 var(--red);
  transform: rotate(-5deg);
}

.brand-mark span,
h1 {
  font-family: "Cooper Black", Rockwell, Georgia, serif;
}

.brand-mark span {
  font-size: 2.25rem;
  line-height: 1;
  transform: rotate(5deg);
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(2.45rem, 11vw, 5.3rem);
  line-height: 0.91;
  letter-spacing: -0.055em;
}

.intro {
  max-width: 31rem;
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.status-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: center;
  margin: 0 0 2.25rem;
  padding: 1rem;
  background: #fffaf0;
  border: 2px solid var(--ink);
  border-radius: 0.85rem;
  box-shadow: 0.35rem 0.4rem 0 var(--ink);
  transition: background-color 180ms ease;
}

.status-card.ready {
  background: #e5f3e9;
}

.status-card.unavailable {
  background: #ffe3dc;
}

.status-mark {
  display: grid;
  width: 2.7rem;
  aspect-ratio: 1;
  place-items: center;
  color: white;
  background: var(--blue);
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 900;
}

.ready .status-mark {
  background: var(--green);
}

.unavailable .status-mark {
  background: var(--red);
}

.status-label,
.status-detail {
  margin: 0;
}

.status-label {
  font-weight: 850;
}

.status-detail {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.retry-button {
  grid-column: 1 / -1;
  min-height: 2.8rem;
  color: white;
  background: var(--ink);
  border: 0;
  border-radius: 0.55rem;
  font-weight: 800;
  cursor: pointer;
}

.feature-list {
  border-top: 2px solid var(--ink);
}

.feature {
  display: grid;
  grid-template-columns: 2.9rem 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.feature-number {
  padding-top: 0.15rem;
  color: var(--red);
  font-family: "Cooper Black", Rockwell, Georgia, serif;
  font-size: 1.25rem;
}

.feature h2,
.feature p {
  margin: 0;
}

.feature h2 {
  font-family: Rockwell, Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.2;
}

.feature p {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.45;
}

.footer {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-top: 2rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-rule {
  height: 1px;
  flex: 1;
  background: var(--line);
}

@media (min-width: 600px) {
  .app-shell {
    padding-inline: 3.5rem;
  }

  .hero {
    grid-template-columns: 5.5rem 1fr;
    gap: 1.5rem;
    padding-top: 1.5rem;
  }

  .brand-mark {
    width: 5rem;
  }

  .status-card {
    grid-template-columns: auto 1fr auto;
    padding: 1.2rem 1.35rem;
  }

  .retry-button {
    grid-column: auto;
    min-width: 8rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero,
  .status-card,
  .feature {
    animation: settle 520ms both cubic-bezier(0.2, 0.75, 0.25, 1);
  }

  .status-card {
    animation-delay: 80ms;
  }

  .feature:nth-child(1) {
    animation-delay: 140ms;
  }

  .feature:nth-child(2) {
    animation-delay: 200ms;
  }

  .feature:nth-child(3) {
    animation-delay: 260ms;
  }

  @keyframes settle {
    from {
      opacity: 0;
      transform: translateY(0.75rem);
    }
  }
}

.unlock-shell,
.catalog-shell,
.events-shell,
.create-event-shell,
.product-editor-shell,
.overview-shell,
.event-settings-shell,
.loading-shell {
  position: relative;
  width: min(100%, 760px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(66, 49, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 49, 31, 0.025) 1px, transparent 1px);
  background-size: 11px 11px;
  box-shadow: 0 0 0 1px rgba(23, 19, 15, 0.2), 0 1.5rem 5rem rgba(61, 12, 8, 0.3);
}

.unlock-poster {
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(2rem, env(safe-area-inset-top)) max(1.5rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(1.5rem, env(safe-area-inset-left));
}

.compact-brand {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.compact-brand .brand-mark {
  width: 3.65rem;
}

.compact-brand .eyebrow,
.brand-name {
  margin: 0;
}

.brand-name {
  font-family: Rockwell, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 800;
}

.unlock-heading {
  margin-top: clamp(4rem, 13vh, 8rem);
}

.poster-kicker {
  margin: 0 0 0.75rem;
  color: var(--blue);
  font-family: Rockwell, Georgia, serif;
  font-size: 0.92rem;
  font-weight: 800;
}

.pin-form {
  margin-top: 2.25rem;
}

.pin-form label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pin-form input {
  width: 100%;
  min-height: 4.4rem;
  padding: 0.5rem 1rem;
  color: var(--ink);
  background: #fffaf0;
  border: 2px solid var(--ink);
  border-radius: 0.8rem;
  outline: 0;
  box-shadow: 0.35rem 0.4rem 0 var(--ink);
  font-family: Rockwell, Georgia, serif;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.35em;
  text-align: center;
}

.pin-form input:focus {
  border-color: var(--blue);
  box-shadow: 0.35rem 0.4rem 0 var(--blue);
}

.form-error {
  margin: 0.9rem 0 0;
  color: #a9261d;
  font-size: 0.88rem;
  font-weight: 750;
}

.unlock-button {
  width: 100%;
  min-height: 3.8rem;
  margin-top: 1.1rem;
  color: white;
  background: var(--red);
  border: 2px solid var(--ink);
  border-radius: 0.8rem;
  box-shadow: 0.25rem 0.3rem 0 var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.unlock-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.5);
  opacity: 0.5;
}

.pin-note {
  max-width: 26rem;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
  text-align: center;
}

.catalog-shell {
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) 1.1rem max(1.25rem, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
}

.catalog-header .brand-mark {
  width: 3rem;
  border-width: 0.22rem;
  box-shadow: 0.2rem 0.22rem 0 var(--red);
}

.catalog-header .brand-mark span {
  font-size: 1.6rem;
}

.catalog-header .brand-name {
  font-size: 0.9rem;
}

.catalog-header .eyebrow {
  font-size: 0.62rem;
}

.lock-button {
  min-width: 3.5rem;
  min-height: 2.6rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2rem;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.catalog-header-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.edit-catalog-button {
  min-height: 2.6rem;
  padding: 0.45rem 0.7rem;
  color: white;
  background: var(--red);
  border: 1px solid var(--ink);
  border-radius: 2rem;
  font-size: 0.68rem;
  font-weight: 850;
  cursor: pointer;
}

.event-banner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  padding: 1.75rem 1.25rem;
  color: white;
  background: var(--ink);
}

.event-label,
.event-banner h1,
.catalog-intro p {
  margin: 0;
}

.event-label {
  margin-bottom: 0.35rem;
  color: var(--yellow);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.event-banner h1 {
  font-size: clamp(1.7rem, 7vw, 2.6rem);
  letter-spacing: -0.035em;
}

.event-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 1rem 1.25rem 0;
}

.event-actions button {
  min-height: 3rem;
  border: 1px solid var(--ink);
  border-radius: 0.7rem;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.overview-link {
  color: white;
  background: var(--green);
  box-shadow: 0.14rem 0.18rem 0 var(--ink);
}

.overview-link span {
  margin-right: 0.35rem;
  font-family: Georgia, serif;
  font-size: 1rem;
}

.manage-products-link {
  color: var(--ink);
  background: var(--yellow);
}

.manage-products-link:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.event-settings-link {
  color: var(--ink);
  background: var(--paper);
}

.live-badge {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex: 0 0 auto;
  padding: 0.45rem 0.65rem;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 2rem;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.live-badge i {
  width: 0.45rem;
  aspect-ratio: 1;
  background: var(--red);
  border-radius: 50%;
}

.live-badge.closed {
  color: white;
  background: var(--red);
}

.live-badge.closed i {
  background: white;
}

.catalog-intro {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 1.25rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.catalog-intro span {
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 0 1.25rem;
}

.product-card {
  position: relative;
  min-height: 14rem;
  padding: 0.9rem;
  overflow: hidden;
  background: #fffaf0;
  border: 2px solid var(--ink);
  border-radius: 1rem;
  box-shadow: 0.2rem 0.25rem 0 var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.product-card:active {
  box-shadow: 0.08rem 0.1rem 0 var(--ink);
  transform: translate(0.12rem, 0.15rem);
}

.product-card:disabled {
  cursor: not-allowed;
  filter: grayscale(0.8);
  opacity: 0.5;
}

.product-card:disabled:active {
  box-shadow: 0.2rem 0.25rem 0 var(--ink);
  transform: none;
}

.product-topline {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 1.65rem;
  justify-content: space-between;
  align-items: start;
  gap: 0.35rem;
}

.product-number {
  color: var(--muted);
  font-family: Rockwell, Georgia, serif;
  font-size: 0.75rem;
  font-weight: 900;
}

.offer-label {
  padding: 0.3rem 0.45rem;
  color: var(--ink);
  background: var(--yellow);
  border: 1px solid var(--ink);
  border-radius: 0.35rem;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
  transform: rotate(2deg);
}

.product-shape {
  display: grid;
  width: 5.5rem;
  aspect-ratio: 1;
  margin: 0.6rem auto;
  place-items: center;
  color: white;
  background: var(--red);
  border: 2px solid var(--ink);
  border-radius: 48% 52% 43% 57%;
  box-shadow: 0.18rem 0.2rem 0 var(--ink);
  transform: rotate(-4deg);
}

.product-shape span {
  font-family: "Cooper Black", Rockwell, Georgia, serif;
  font-size: 2.4rem;
  transform: rotate(4deg);
}

.product-tone-1 .product-shape {
  background: var(--blue);
  border-radius: 58% 42% 54% 46%;
}

.product-tone-2 .product-shape {
  color: var(--ink);
  background: var(--yellow);
  border-radius: 45% 55% 58% 42%;
}

.product-tone-3 .product-shape {
  background: var(--green);
  border-radius: 52% 48% 40% 60%;
}

.product-copy h2,
.product-price {
  margin: 0;
}

.product-copy h2 {
  min-height: 2.5em;
  font-family: Rockwell, Georgia, serif;
  font-size: 0.92rem;
  line-height: 1.2;
}

.product-price {
  margin-top: 0.45rem;
  color: var(--red);
  font-family: "Cooper Black", Rockwell, Georgia, serif;
  font-size: 1.35rem;
}

.catalog-footer {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 2rem 1.25rem 0;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.loading-shell {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
}

.loading-mark {
  display: grid;
  width: 5rem;
  aspect-ratio: 1;
  place-items: center;
  color: var(--paper);
  background: var(--ink);
  border: 0.3rem solid var(--yellow);
  border-radius: 50%;
  box-shadow: 0.3rem 0.35rem 0 var(--red);
  font-family: "Cooper Black", Rockwell, Georgia, serif;
  font-size: 2.5rem;
}

.error-mark {
  background: var(--red);
}

@media (min-width: 640px) {
  .unlock-poster {
    padding-inline: 4rem;
  }

  .pin-form {
    max-width: 30rem;
  }

  .catalog-header,
  .event-banner,
  .catalog-intro,
  .product-grid,
  .catalog-footer {
    padding-inline: 2.5rem;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.events-shell,
.create-event-shell {
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

.events-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  padding: 2.2rem 1.25rem 1.6rem;
  color: white;
  background: var(--ink);
}

.events-hero h1 {
  max-width: 12ch;
  margin: 0;
  font-family: "Cooper Black", Rockwell, Georgia, serif;
  font-size: clamp(2rem, 9vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.create-event-button {
  display: flex;
  min-height: 3.1rem;
  gap: 0.45rem;
  align-items: center;
  flex: 0 0 auto;
  padding: 0.55rem 0.85rem;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--paper);
  border-radius: 2rem;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.create-event-button span {
  font-size: 1.25rem;
  line-height: 1;
}

.event-list {
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem;
}

.event-card {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  gap: 0.9rem;
  align-items: center;
  width: 100%;
  min-height: 6.5rem;
  padding: 0.85rem;
  color: var(--ink);
  background: #fffaf0;
  border: 2px solid var(--ink);
  border-radius: 0.9rem;
  box-shadow: 0.22rem 0.26rem 0 var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.event-card:active {
  box-shadow: 0.08rem 0.1rem 0 var(--ink);
  transform: translate(0.14rem, 0.16rem);
}

.event-card.closed {
  background: #e9e3d8;
}

.event-card.closed .event-date-tile {
  background: var(--muted);
}

.event-date-tile {
  display: grid;
  width: 3.4rem;
  aspect-ratio: 0.88;
  place-content: center;
  color: white;
  background: var(--red);
  border: 2px solid var(--ink);
  border-radius: 0.55rem;
  text-align: center;
  transform: rotate(-2deg);
}

.event-date-tile span {
  font-size: 0.52rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-date-tile strong {
  font-family: "Cooper Black", Rockwell, Georgia, serif;
  font-size: 1.45rem;
  line-height: 1;
}

.event-card-copy h2,
.event-card-copy p {
  margin: 0;
}

.event-card-copy h2 {
  margin: 0.18rem 0 0.3rem;
  font-family: Rockwell, Georgia, serif;
  font-size: 1.05rem;
}

.event-card-copy p {
  color: var(--muted);
  font-size: 0.72rem;
}

.event-card-date {
  font-weight: 750;
}

.event-arrow {
  color: var(--red);
  font-family: Rockwell, Georgia, serif;
  font-size: 1.5rem;
  font-weight: 900;
}

.empty-events {
  display: grid;
  max-width: 32rem;
  justify-items: center;
  margin: 3.5rem auto 1rem;
  padding: 0 1.5rem;
  text-align: center;
}

.empty-ticket {
  display: grid;
  width: 5.2rem;
  aspect-ratio: 1.35;
  place-items: center;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 0.25rem 0.3rem 0 var(--red);
  font-family: "Cooper Black", Rockwell, Georgia, serif;
  font-size: 1.55rem;
  transform: rotate(-4deg);
}

.empty-kicker {
  margin: 1.7rem 0 0.45rem;
  color: var(--red);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.empty-events h2,
.empty-events > p:not(.empty-kicker) {
  margin: 0;
}

.empty-events h2 {
  font-family: "Cooper Black", Rockwell, Georgia, serif;
  font-size: 1.8rem;
  letter-spacing: -0.035em;
}

.empty-events > p:not(.empty-kicker) {
  margin-top: 0.7rem;
  color: var(--muted);
  line-height: 1.5;
}

.empty-events .unlock-button {
  margin-top: 1.5rem;
}

.form-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.form-header .compact-brand {
  grid-column: 2;
}

.back-button {
  justify-self: start;
  min-height: 2.65rem;
  padding: 0.45rem 0.7rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2rem;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.back-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.create-heading {
  padding: 2.5rem 1.25rem 1.4rem;
}

.create-heading h1,
.create-heading p {
  margin: 0;
}

.create-heading h1 {
  max-width: 11ch;
  font-family: "Cooper Black", Rockwell, Georgia, serif;
  font-size: clamp(2.4rem, 11vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.create-heading > p:last-child {
  max-width: 30rem;
  margin-top: 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.event-form {
  padding: 0 1.25rem;
}

.event-form label {
  display: block;
  margin: 1.2rem 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-form input {
  width: 100%;
  min-height: 3.8rem;
  padding: 0.75rem 0.9rem;
  color: var(--ink);
  background: #fffaf0;
  border: 2px solid var(--ink);
  border-radius: 0.75rem;
  outline: 0;
  box-shadow: 0.2rem 0.24rem 0 var(--ink);
  font-family: Rockwell, Georgia, serif;
  font-size: 1rem;
  font-weight: 750;
}

.event-form input:focus {
  border-color: var(--blue);
  box-shadow: 0.2rem 0.24rem 0 var(--blue);
}

.catalog-navigation {
  justify-content: space-between;
}

.sale-notice {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin: 1rem 1.25rem 0;
  padding: 0.8rem 0.9rem;
  color: #174c37;
  background: #e5f3e9;
  border: 2px solid var(--green);
  border-radius: 0.75rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.sale-notice span {
  display: grid;
  width: 1.65rem;
  aspect-ratio: 1;
  place-items: center;
  flex: 0 0 auto;
  color: white;
  background: var(--green);
  border-radius: 50%;
}

.sale-notice.pending {
  color: #5a4400;
  background: #fff4c5;
  border-color: #c89e0a;
}

.sale-notice.pending span {
  color: var(--ink);
  background: var(--yellow);
}

.sale-notice.failed {
  color: #782019;
  background: #ffe1dc;
  border-color: var(--red);
}

.sale-notice.failed span {
  background: var(--red);
}

.sync-status {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  margin: 1rem 1.25rem 0;
  padding: 0.72rem 0.8rem;
  color: #554200;
  background: #fff4c5;
  border: 1px solid #c89e0a;
  border-radius: 0.7rem;
}

.sync-status.synced {
  color: #174c37;
  background: #e5f3e9;
  border-color: var(--green);
}

.sync-status.failed {
  color: #782019;
  background: #ffe1dc;
  border-color: var(--red);
}

.sync-dot {
  width: 0.7rem;
  aspect-ratio: 1;
  background: #c89e0a;
  border-radius: 50%;
  box-shadow: 0 0 0 0.22rem rgba(200, 158, 10, 0.18);
}

.sync-status.synced .sync-dot {
  background: var(--green);
  box-shadow: 0 0 0 0.22rem rgba(40, 122, 86, 0.16);
}

.sync-status.failed .sync-dot {
  background: var(--red);
  box-shadow: 0 0 0 0.22rem rgba(237, 61, 47, 0.16);
}

.sync-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.sync-copy strong {
  font-size: 0.76rem;
}

.sync-copy span {
  font-size: 0.62rem;
  font-weight: 700;
  opacity: 0.7;
}

.sync-errors {
  display: grid;
  gap: 0.2rem;
  margin: 0.2rem 0 0;
  padding: 0;
  list-style: none;
}

.sync-errors li {
  display: flex;
  gap: 0.3rem;
  font-size: 0.62rem;
}

.sync-errors li span {
  flex: 0 0 auto;
  font-weight: 900;
  opacity: 1;
}

.sync-errors li span::after {
  content: ":";
}

.sync-status button {
  min-height: 2.2rem;
  padding: 0.35rem 0.65rem;
  color: white;
  background: var(--ink);
  border: 0;
  border-radius: 2rem;
  font-size: 0.65rem;
  font-weight: 850;
  cursor: pointer;
}

.sync-status button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  align-items: end;
  padding-top: env(safe-area-inset-top);
  background: rgba(23, 19, 15, 0.68);
  backdrop-filter: blur(4px);
}

.sale-modal {
  width: min(100%, 34rem);
  margin: 0 auto;
  padding: 1.1rem max(1.25rem, env(safe-area-inset-right)) max(1.4rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(rgba(66, 49, 31, 0.035) 1px, transparent 1px);
  background-size: 11px 11px;
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: 0 -0.5rem 2.5rem rgba(0, 0, 0, 0.28);
  text-align: center;
}

.modal-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-topline p {
  margin: 0;
  color: var(--red);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-close {
  display: grid;
  width: 2.6rem;
  aspect-ratio: 1;
  place-items: center;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.45rem;
  cursor: pointer;
}

.modal-close:disabled {
  opacity: 0.4;
}

.modal-product-mark {
  display: grid;
  width: 4.8rem;
  aspect-ratio: 1;
  margin: 0.5rem auto 0.8rem;
  place-items: center;
  color: white;
  background: var(--red);
  border: 2px solid var(--ink);
  border-radius: 48% 52% 43% 57%;
  box-shadow: 0.2rem 0.24rem 0 var(--ink);
  font-family: "Cooper Black", Rockwell, Georgia, serif;
  font-size: 2rem;
  transform: rotate(-3deg);
}

.sale-modal h2,
.modal-unit-price,
.modal-offer {
  margin: 0;
}

.sale-modal h2 {
  font-family: "Cooper Black", Rockwell, Georgia, serif;
  font-size: 1.65rem;
  letter-spacing: -0.035em;
}

.modal-unit-price {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.modal-offer {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.35rem 0.55rem;
  background: var(--yellow);
  border: 1px solid var(--ink);
  border-radius: 0.35rem;
  font-size: 0.72rem;
  font-weight: 900;
  transform: rotate(1deg);
}

.quantity-label {
  margin-top: 1.25rem;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quantity-stepper {
  display: grid;
  grid-template-columns: 3.6rem minmax(5rem, 1fr) 3.6rem;
  gap: 0.65rem;
  align-items: center;
  max-width: 17rem;
  margin: 0.55rem auto 0;
}

.quantity-stepper button {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  color: white;
  background: var(--ink);
  border: 0;
  border-radius: 50%;
  font-size: 1.7rem;
  font-weight: 700;
  cursor: pointer;
}

.quantity-stepper button:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

.quantity-stepper output {
  font-family: "Cooper Black", Rockwell, Georgia, serif;
  font-size: 2.7rem;
  line-height: 1;
}

.register-sale-button {
  width: 100%;
  min-height: 3.8rem;
  margin-top: 1.25rem;
  color: white;
  background: var(--green);
  border: 2px solid var(--ink);
  border-radius: 0.8rem;
  box-shadow: 0.22rem 0.26rem 0 var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.register-sale-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.product-editor-shell {
  padding-bottom: max(7rem, env(safe-area-inset-bottom));
}

.product-editor-heading {
  padding: 2.2rem 1.25rem 1.7rem;
  color: white;
  background: var(--ink);
}

.product-editor-heading h1,
.product-editor-heading p {
  margin: 0;
}

.product-editor-heading h1 {
  max-width: 11ch;
  font-size: clamp(2.25rem, 10vw, 4rem);
  line-height: 0.95;
}

.product-editor-heading > p:last-child {
  max-width: 35rem;
  margin-top: 0.9rem;
  color: #d8cdbb;
  font-size: 0.82rem;
  line-height: 1.5;
}

.product-editor-list {
  display: grid;
  gap: 0.9rem;
  padding: 1.25rem;
}

.product-editor-card {
  padding: 0.9rem;
  background: #fffaf0;
  border: 2px solid var(--ink);
  border-radius: 0.9rem;
  box-shadow: 0.18rem 0.22rem 0 var(--ink);
}

.product-editor-topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.editor-number {
  color: var(--red);
  font-family: "Cooper Black", Rockwell, Georgia, serif;
  font-size: 1.1rem;
}

.reorder-actions {
  display: flex;
  gap: 0.35rem;
}

.reorder-actions button {
  min-width: 2.35rem;
  min-height: 2.35rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2rem;
  font-weight: 900;
  cursor: pointer;
}

.reorder-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.reorder-actions .remove-product-button {
  padding-inline: 0.65rem;
  color: var(--red);
  font-size: 0.65rem;
}

.product-editor-card label,
.product-editor-card label > span {
  display: block;
}

.product-editor-card label > span {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-editor-card input {
  width: 100%;
  min-height: 3rem;
  padding: 0.6rem 0.7rem;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  outline: 0;
  font-size: 0.88rem;
  font-weight: 750;
}

.product-editor-card input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 0.18rem rgba(28, 146, 184, 0.15);
}

.editor-price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.editor-price-grid label:first-child {
  grid-column: 1 / -1;
}

.product-editor-actions {
  position: sticky;
  z-index: 10;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  padding: 0.9rem max(1.25rem, env(safe-area-inset-right)) max(0.9rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
  background: rgba(248, 240, 223, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.product-editor-actions button {
  min-height: 3.2rem;
  border: 2px solid var(--ink);
  border-radius: 0.75rem;
  font-weight: 900;
  cursor: pointer;
}

.product-editor-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.add-product-button {
  color: var(--ink);
  background: var(--yellow);
}

.save-products-button {
  color: white;
  background: var(--green);
  box-shadow: 0.16rem 0.2rem 0 var(--ink);
}

.product-editor-actions .form-error {
  grid-column: 1 / -1;
  margin: 0;
}

.event-settings-shell {
  padding-bottom: max(3rem, env(safe-area-inset-bottom));
}

.event-settings-heading {
  padding: 2.2rem 1.25rem 1.7rem;
  color: white;
  background: var(--ink);
}

.event-settings-heading h1,
.event-settings-heading p {
  margin: 0;
}

.event-settings-heading h1 {
  max-width: 11ch;
  font-size: clamp(2.25rem, 10vw, 4rem);
  line-height: 0.94;
}

.event-settings-heading > p:last-child {
  max-width: 35rem;
  margin-top: 0.9rem;
  color: #d8cdbb;
  font-size: 0.8rem;
  line-height: 1.5;
}

.event-settings-form {
  max-width: 38rem;
  padding: 1.4rem 1.25rem;
}

.event-settings-form > label,
.status-selector legend {
  display: block;
  margin: 1rem 0 0.45rem;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.event-settings-form > input {
  width: 100%;
  min-height: 3.4rem;
  padding: 0.7rem 0.8rem;
  color: var(--ink);
  background: #fffaf0;
  border: 2px solid var(--ink);
  border-radius: 0.7rem;
  outline: 0;
  font-weight: 750;
}

.event-settings-form > input:focus {
  border-color: var(--blue);
}

.status-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 1.3rem 0 0;
  padding: 0;
  border: 0;
}

.status-selector legend {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 0;
}

.status-selector > label {
  display: block;
  padding: 0.85rem;
  background: #fffaf0;
  border: 2px solid var(--line);
  border-radius: 0.75rem;
  cursor: pointer;
}

.status-selector > label.selected {
  border-color: var(--green);
  box-shadow: 0.15rem 0.18rem 0 var(--green);
}

.status-selector > label:last-child.selected {
  border-color: var(--red);
  box-shadow: 0.15rem 0.18rem 0 var(--red);
}

.status-selector input {
  position: absolute;
  opacity: 0;
}

.status-selector span {
  display: grid;
  gap: 0.2rem;
}

.status-selector strong {
  font-size: 0.82rem;
}

.status-selector small {
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.35;
}

.save-event-button {
  width: 100%;
  min-height: 3.4rem;
  margin-top: 1.4rem;
  color: white;
  background: var(--green);
  border: 2px solid var(--ink);
  border-radius: 0.75rem;
  box-shadow: 0.18rem 0.22rem 0 var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.save-event-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.overview-shell {
  padding-bottom: max(3rem, env(safe-area-inset-bottom));
}

.refresh-overview-button {
  min-height: 2.6rem;
  padding: 0.45rem 0.75rem;
  color: white;
  background: var(--green);
  border: 1px solid var(--ink);
  border-radius: 2rem;
  font-size: 0.7rem;
  font-weight: 850;
  cursor: pointer;
}

.overview-hero {
  display: grid;
  gap: 1.5rem;
  padding: 2rem 1.25rem;
  color: white;
  background: var(--ink);
}

.overview-hero h1,
.overview-hero p {
  margin: 0;
}

.overview-hero h1 {
  max-width: 10ch;
  font-size: clamp(2.35rem, 11vw, 4.5rem);
  line-height: 0.92;
}

.revenue-ticket {
  position: relative;
  display: grid;
  padding: 1rem;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid white;
  border-radius: 0.8rem;
  box-shadow: 0.25rem 0.3rem 0 var(--red);
  transform: rotate(-1deg);
}

.revenue-ticket::after {
  position: absolute;
  top: 50%;
  right: -0.55rem;
  width: 0.9rem;
  aspect-ratio: 1;
  content: "";
  background: var(--ink);
  border: 2px solid white;
  border-radius: 50%;
  transform: translateY(-50%);
}

.revenue-ticket span,
.revenue-ticket small {
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.revenue-ticket strong {
  margin: 0.15rem 0;
  font-family: "Cooper Black", Rockwell, Georgia, serif;
  font-size: clamp(2.2rem, 13vw, 4rem);
  line-height: 1;
}

.local-totals {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
  margin: 1rem 1.25rem 0;
  padding: 0.85rem;
  color: #5a4400;
  background: #fff4c5;
  border: 1px dashed #9f7b00;
  border-radius: 0.7rem;
}

.local-totals-mark {
  display: grid;
  width: 2.4rem;
  aspect-ratio: 1;
  place-items: center;
  background: var(--yellow);
  border-radius: 50%;
  font-weight: 900;
}

.local-totals strong,
.local-totals p {
  margin: 0;
}

.local-totals p {
  margin-top: 0.15rem;
  font-size: 0.68rem;
}

.overview-error {
  margin: 1rem 1.25rem 0;
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 800;
}

.overview-notice {
  margin: 1rem 1.25rem 0;
  padding: 0.75rem 0.85rem;
  color: #174c37;
  background: #e5f3e9;
  border: 1px solid var(--green);
  border-radius: 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.undo-sale {
  margin: 1rem 1.25rem 0;
}

.undo-latest-button {
  width: 100%;
  min-height: 2.8rem;
  color: var(--red);
  background: transparent;
  border: 1px dashed var(--red);
  border-radius: 0.7rem;
  font-size: 0.7rem;
  font-weight: 900;
  cursor: pointer;
}

.undo-blocked {
  margin: 0;
  padding: 0.7rem 0.8rem;
  color: var(--muted);
  background: rgba(109, 98, 86, 0.08);
  border-radius: 0.65rem;
  font-size: 0.68rem;
  line-height: 1.45;
}

.undo-confirmation {
  padding: 0.85rem;
  background: #ffe1dc;
  border: 2px solid var(--red);
  border-radius: 0.75rem;
}

.undo-confirmation strong,
.undo-confirmation p {
  margin: 0;
}

.undo-confirmation p {
  margin-top: 0.2rem;
  font-size: 0.72rem;
}

.undo-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.undo-actions button {
  min-height: 2.75rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0.6rem;
  font-size: 0.66rem;
  font-weight: 900;
  cursor: pointer;
}

.undo-actions button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.undo-actions .confirm-void-button {
  color: white;
  background: var(--red);
}

.overview-section {
  padding: 1.7rem 1.25rem 0;
}

.overview-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.7rem;
}

.overview-section-heading p,
.overview-section-heading span {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overview-section-heading span {
  color: var(--muted);
  font-size: 0.56rem;
}

.product-totals,
.recent-sales {
  overflow: hidden;
  background: #fffaf0;
  border: 2px solid var(--ink);
  border-radius: 0.8rem;
  box-shadow: 0.17rem 0.2rem 0 var(--ink);
}

.product-total-row {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr) auto auto;
  gap: 0.6rem;
  align-items: center;
  min-height: 3.5rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
}

.product-total-row:last-child,
.recent-sale-row:last-child {
  border-bottom: 0;
}

.product-total-number {
  color: var(--red);
  font-family: Rockwell, Georgia, serif;
  font-weight: 900;
}

.product-total-row > span:not(.product-total-number) {
  color: var(--muted);
  white-space: nowrap;
}

.recent-sale-row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  min-height: 3.7rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.recent-sale-row time {
  color: var(--red);
  font-size: 0.65rem;
  font-weight: 900;
}

.recent-sale-row div {
  display: grid;
  gap: 0.12rem;
}

.recent-sale-row strong {
  font-size: 0.78rem;
}

.recent-sale-row span {
  color: var(--muted);
  font-size: 0.64rem;
}

.recent-sale-row b,
.product-total-row b {
  font-size: 0.75rem;
  white-space: nowrap;
}

.recent-sale-row.voided {
  color: var(--muted);
  background: rgba(109, 98, 86, 0.08);
}

.recent-sale-row.voided strong,
.recent-sale-row.voided b {
  text-decoration: line-through;
}

.overview-empty {
  padding: 1.5rem;
  color: var(--muted);
  background: #fffaf0;
  border: 1px dashed var(--line);
  border-radius: 0.7rem;
  font-size: 0.78rem;
  text-align: center;
}

@media (min-width: 640px) {
  .modal-backdrop {
    place-items: center;
    padding: 1.5rem;
  }

  .sale-modal {
    border-bottom: 2px solid var(--ink);
    border-radius: 1.25rem;
  }

  .sale-notice {
    margin-inline: 2.5rem;
  }

  .sync-status {
    margin-inline: 2.5rem;
  }

  .product-editor-heading,
  .product-editor-list,
  .product-editor-actions,
  .event-settings-heading,
  .event-settings-form,
  .overview-hero,
  .overview-section {
    padding-inline: 2.5rem;
  }

  .overview-hero {
    grid-template-columns: minmax(0, 1fr) 19rem;
    align-items: end;
  }

  .local-totals,
  .overview-error,
  .overview-notice,
  .undo-sale {
    margin-inline: 2.5rem;
  }

  .editor-price-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .editor-price-grid label:first-child {
    grid-column: auto;
  }
}

@media (min-width: 640px) {
  .events-hero,
  .event-list,
  .events-shell > .catalog-footer,
  .create-heading,
  .event-form {
    padding-inline: 2.5rem;
  }

  .event-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-form {
    max-width: 36rem;
  }
}
