.public-lunch-slot {
  width: 100%;
  max-width: 32rem;
  margin-block-start: 1.5rem;
}

.public-lunch-slot:empty {
  display: none;
}

.lunch-wallet {
  text-align: start;
}

.lunch-card-flip {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
}

.lunch-card-flip:focus-visible {
  outline: 2px solid #f1d584;
  outline-offset: -5px;
}

.card-page .lunch-card-stage {
  height: 9.25rem;
  aspect-ratio: auto;
}

.lunch-card-stage .card-face {
  padding: .7rem clamp(.75rem, 4cqw, 1.2rem);
}

.lunch-card-stage .lunch-card-front {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(.5rem, 3.5cqw, 1.2rem);
  text-align: start;
}

.lunch-card-front::before {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 37%;
  pointer-events: none;
  background: radial-gradient(ellipse at 110% 108%,
    transparent 34%, #e3b95346 35% 36%, transparent 37% 48%,
    #e3b95330 49% 50%, transparent 51% 63%,
    #e3b95320 64% 65%, transparent 66%);
  mask-image: linear-gradient(to right, transparent, #000 40%);
}

.lunch-card-logo {
  width: clamp(2.75rem, 13cqw, 4rem);
  height: auto;
}

.lunch-card-front h2 {
  margin: 0;
  color: #fffaf0;
  font: 400 clamp(1.2rem, 5cqw, 1.6rem)/1.08 Georgia, "Times New Roman", serif;
}

.lunch-card-stage .lunch-card-back {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: .35rem;
}

.lunch-card-header {
  display: grid;
  gap: .15rem;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: start;
  cursor: pointer;
}

.lunch-card-customer {
  overflow: hidden;
  color: #fffaf0;
  font: 400 1rem/1.08 Georgia, "Times New Roman", serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lunch-card-balance {
  display: grid;
  align-content: center;
  gap: .2rem;
  margin: 0;
  color: #e0d5b2;
  font-size: .75rem;
}

.lunch-card-balance strong {
  color: #f1d584;
  font: 400 clamp(1.65rem, 7cqw, 2.25rem)/1 Georgia, "Times New Roman", serif;
}

.lunch-card-body {
  display: grid;
  grid-template-columns: clamp(5.2rem, 25cqw, 7rem) minmax(0, 1fr);
  gap: .35rem;
}

.lunch-stack {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: stretch;
  justify-content: end;
  gap: 0;
}

.lunch-stack-edges {
  display: flex;
  min-width: 0;
}

.lunch-stack-edges i {
  min-width: 0;
  width: clamp(3px, 1.75cqw, 9px);
  border: 1px solid #ae873f;
  border-right: 0;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(160deg, #80612d, #302515 85%);
}

.lunch-stack-current {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  align-content: center;
  gap: clamp(.25rem, 1.75cqw, .65rem);
  flex: 0 0 82%;
  min-width: min(8.3rem, 100%);
  padding: .35rem clamp(.4rem, 2cqw, .8rem);
  border: 1px solid #c6a45b;
  border-left: 2px dashed #c6a45b;
  border-radius: 0 6px 6px 0;
  background: linear-gradient(145deg, #514023, #271e12 80%);
  box-shadow: inset 0 0 0 2px #e6bd6614;
  text-align: start;
}

button.lunch-stack-current {
  position: relative;
  grid-template-columns: minmax(0, 1fr) clamp(1.35rem, 8cqw, 2.35rem);
  align-content: stretch;
  gap: 0;
  padding: 0;
  background-image:
    repeating-linear-gradient(135deg, #f6d9980d 0 1px, transparent 1px 6px),
    linear-gradient(145deg, #514023, #271e12 80%);
  cursor: pointer;
}

button.lunch-stack-current::before {
  content: "";
  position: absolute;
  inset: 4px;
  pointer-events: none;
  --corner: linear-gradient(#d9b96c, #d9b96c);
  background:
    var(--corner) top left / 8px 1px no-repeat,
    var(--corner) top left / 1px 6px no-repeat,
    var(--corner) top right / 8px 1px no-repeat,
    var(--corner) top right / 1px 6px no-repeat,
    var(--corner) bottom left / 8px 1px no-repeat,
    var(--corner) bottom left / 1px 6px no-repeat,
    var(--corner) bottom right / 8px 1px no-repeat,
    var(--corner) bottom right / 1px 6px no-repeat;
}

button.lunch-stack-current:hover {
  border-color: #f2d58d;
  background-color: #65502b;
  background-blend-mode: screen, normal;
}

button.lunch-stack-current:focus-visible {
  outline: 2px solid #ffe3a1;
  outline-offset: -4px;
}

.lunch-stack-label {
  padding: .35rem .45rem;
  color: #fff3d5;
  font: 400 clamp(.65rem, 3.25cqw, .95rem)/1.1 Georgia, "Times New Roman", serif;
  text-align: center;
}

.lunch-stack-arrow {
  display: grid;
  place-items: center;
  align-self: stretch;
  margin-block: 4px;
  border-inline-start: 1px dashed #d9b96c80;
  background: #f1ce7f12;
  color: #e9cc89;
  font-size: 1.2rem;
  line-height: 1;
}

.lunch-stack-current[hidden] {
  display: none;
}

.lunch-stack-detached {
  position: absolute;
  z-index: 1;
  inset: 0 0 0 auto;
  pointer-events: none;
  background: linear-gradient(145deg, #e3c179, #8b622d 85%);
}

.lunch-animated-modal {
  transform-origin: top left;
}

.lunch-card-history {
  justify-self: center;
  color: #e0d5b2;
  font-size: .75rem;
}

.public-lunch-details .lunch-history ul {
  max-height: 12rem;
  overflow: auto;
  color: #d1c5a9;
  font-size: .75rem;
}

.staff-lunch-wallet {
  margin-block: 1.5rem;
}

.lunch-wallet h2 {
  margin-block: 0 .5rem;
}

.lunch-history {
  margin-block-start: 1rem;
}

.lunch-history summary {
  cursor: pointer;
}

.lunch-history ul {
  display: grid;
  gap: .5rem;
  list-style: none;
  padding: 0;
}

.lunch-history li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .75rem;
}

.lunch-history li strong {
  min-width: 2ch;
}

.lunch-redemption-modal {
  max-width: 25rem;
  padding: clamp(1rem, 5vw, 1.5rem);
  border-color: #af8e4a80;
  background: radial-gradient(ellipse at 12% 0, #272218, transparent 68%), #10100f;
}

.lunch-redemption-modal .modal-head {
  margin-block-end: .85rem;
}

.lunch-ticket {
  display: grid;
  justify-items: center;
  gap: .75rem;
  text-align: center;
}

.lunch-redemption-modal .lunch-ticket p {
  margin: 0;
}

.lunch-ticket-credentials {
  width: 100%;
  max-width: 17rem;
  padding-block-start: .85rem;
  border: 1px solid #bfa06772;
  border-radius: .75rem;
  background: linear-gradient(150deg, #302719, #17140f);
}

.lunch-ticket svg {
  display: block;
  margin-inline: auto;
  width: min(9rem, 88%);
  height: auto;
}

.lunch-ticket svg > rect {
  fill: #f4ead4;
}

.lunch-ticket-code {
  display: grid;
  gap: .25rem;
  margin-block-start: .85rem;
  padding: .65rem .35rem .75rem;
  border-block-start: 1px dashed #bfa06772;
  color: #e0cda5;
  font-size: .7rem;
}

[data-lunch-display] {
  color: #ffebba;
  font-size: clamp(1.5rem, 7vw, 2rem);
  line-height: 1.1;
  letter-spacing: .2em;
  text-indent: .2em;
  font-variant-numeric: tabular-nums;
}

.lunch-redemption-modal .lunch-ticket [data-lunch-expiration] {
  padding: .3rem .7rem;
  border: 1px solid #bfa06744;
  border-radius: 1rem;
  color: #ebd5a1;
  font-variant-numeric: tabular-nums;
}

.lunch-buffet {
  max-width: 32rem;
}

.lunch-buffet video {
  width: 100%;
  max-height: 18rem;
  border-radius: .75rem;
  object-fit: cover;
}

[data-lunch-result]:not(:empty) {
  margin-block-start: 1rem;
  font-weight: 600;
}
