/* ============================================================
   THE LUNCH BUNCH — 1950s lunch-counter diner
   cream paper · ketchup red · mustard · booth teal · chrome
   ============================================================ */

:root {
  --cream: #fdf3e0;
  --paper: #fffaf0;
  --red: #c8102e;
  --red-dark: #8f0a20;
  --mustard: #efa00b;
  --mustard-light: #ffd166;
  --teal: #1d7a74;
  --teal-dark: #135a55;
  --ink: #2b2118;
  --ink-soft: #6b5d4f;
  --line: #e4d5bb;
  --shadow: 0 4px 0 rgba(43, 33, 24, 0.85);
  --font-display: "Alfa Slab One", serif;
  --font-script: "Yellowtail", cursive;
  --font-body: "Karla", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(rgba(43, 33, 24, 0.05) 1px, transparent 1.5px) 0 0 / 22px 22px,
    var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- checkerboard trim ---------- */
.checker-strip {
  height: 18px;
  background: repeating-conic-gradient(var(--ink) 0% 25%, var(--paper) 0% 50%) 0 0 / 36px 36px;
  border-bottom: 3px solid var(--ink);
}
.footer .checker-strip { border-bottom: none; border-top: 3px solid var(--ink); }

/* ---------- marquee header ---------- */
.marquee {
  background:
    linear-gradient(180deg, var(--red) 0%, var(--red) 78%, var(--red-dark) 100%);
  border-bottom: 4px solid var(--ink);
  padding: 1.4rem 1.5rem 0;
}
.marquee-inner { max-width: 1100px; margin: 0 auto; }
.sign { display: block; text-decoration: none; color: inherit; text-align: center; position: relative; padding-bottom: .4rem; }
.sign-the {
  font-family: var(--font-display);
  color: var(--mustard-light);
  letter-spacing: .55em;
  font-size: .85rem;
}
.sign-main {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  color: var(--paper);
  letter-spacing: .04em;
  line-height: 1;
  text-shadow: 4px 4px 0 var(--ink), 6px 6px 0 rgba(0,0,0,.25);
  -webkit-text-stroke: 1.5px var(--ink);
}
.sign-tag {
  font-family: var(--font-script);
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  color: var(--mustard-light);
  display: inline-block;
  transform: rotate(-2deg);
  text-shadow: 2px 2px 0 rgba(0,0,0,.3);
  animation: flicker 6s infinite;
}
@keyframes flicker {
  0%, 92%, 96%, 100% { opacity: 1; }
  94% { opacity: .55; }
}

.menu-tabs { display: flex; justify-content: center; gap: .5rem; margin-top: 1rem; }
.tab {
  font-family: var(--font-display);
  font-size: .85rem;
  letter-spacing: .06em;
  text-decoration: none;
  color: var(--paper);
  background: var(--red-dark);
  border: 3px solid var(--ink);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  padding: .55rem 1.1rem .65rem;
  transform: translateY(4px);
  transition: transform .15s ease, background .15s ease;
}
.tab:hover { transform: translateY(0); }
.tab-on { background: var(--cream); color: var(--ink); transform: translateY(1px); }

/* ---------- layout ---------- */
.counter { flex: 1; max-width: 1100px; width: 100%; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.footer { text-align: center; }
.footer p {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: .7rem;
  letter-spacing: .18em;
  color: var(--ink-soft);
  padding: .9rem 1rem 1.2rem;
  background: var(--cream);
}

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: .03em;
  text-shadow: 3px 3px 0 var(--mustard-light);
}
.crumb { display: inline-block; font-weight: 800; color: var(--teal); text-decoration: none; margin-bottom: 1rem; }
.crumb:hover { text-decoration: underline wavy; }

.board-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: .12em;
  background: var(--ink);
  color: var(--mustard-light);
  padding: .45rem .9rem;
  border-radius: 6px;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.board-label.small { font-size: .78rem; }
.fine { font-family: var(--font-body); font-weight: 400; opacity: .7; font-size: .7rem; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }

/* ticket cards: receipt with punch hole + scalloped bottom */
.ticket {
  position: relative;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 14px 14px 0 0;
  box-shadow: var(--shadow);
  padding: 1.6rem 1.5rem 2.2rem;
}
.ticket::after {
  content: "";
  position: absolute;
  left: -3px; right: -3px; bottom: -14px;
  height: 14px;
  background:
    radial-gradient(circle at 8px -2px, transparent 9px, var(--ink) 9px 11px, transparent 11px) 0 0 / 24px 14px repeat-x,
    radial-gradient(circle at 8px -4px, transparent 9px, var(--paper) 9px) 0 0 / 24px 14px repeat-x;
}
.ticket-punch {
  position: absolute;
  top: 14px; right: 16px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--cream);
  border: 3px solid var(--ink);
}
.pick-ticket { text-align: center; }
.pick-emoji { font-size: 4rem; line-height: 1; filter: drop-shadow(3px 3px 0 rgba(43,33,24,.2)); }
.pick-name { font-family: var(--font-display); font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-top: .4rem; }
.pick-meta { font-weight: 800; letter-spacing: .14em; font-size: .72rem; text-transform: uppercase; color: var(--ink-soft); margin: .35rem 0 1rem; }

.reason-chips { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: center; margin-bottom: 1.2rem; }
.chip {
  font-size: .78rem;
  font-weight: 800;
  background: var(--mustard-light);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: .25rem .7rem;
  box-shadow: 2px 2px 0 var(--ink);
}

.wildcard {
  margin-top: 1.6rem;
  background: var(--teal);
  color: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: .85rem 1.1rem;
  display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap;
  transform: rotate(-1deg);
}
.wildcard-tag { font-family: var(--font-display); font-size: .75rem; letter-spacing: .1em; background: var(--ink); color: var(--mustard-light); padding: .2rem .55rem; border-radius: 5px; }
.wildcard-name { font-weight: 800; font-size: 1.05rem; }
.wildcard-why { font-family: var(--font-script); font-size: 1.05rem; color: var(--mustard-light); }

.specials-board { margin-top: 1.6rem; background: var(--paper); border: 3px dashed var(--ink); border-radius: 12px; padding: 1rem 1.2rem; }
.special-line { padding: .3rem 0; border-bottom: 1px dotted var(--line); font-size: .95rem; }
.special-line:last-child { border-bottom: none; }
.special-line.off { opacity: .45; text-decoration: line-through; }

/* ---------- wheel ---------- */
.hero-right { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.wheel-stand { position: relative; display: flex; flex-direction: column; align-items: center; }
#wheel {
  max-width: 100%;
  border-radius: 50%;
  border: 10px solid var(--ink);
  box-shadow: 0 0 0 6px var(--mustard), 0 10px 0 rgba(43,33,24,.7), inset 0 0 30px rgba(0,0,0,.15);
  background: var(--paper);
}
.wheel-pointer {
  position: absolute;
  top: -18px; left: 50%;
  transform: translateX(-50%);
  font-size: 2.2rem;
  color: var(--red);
  text-shadow: 2px 2px 0 var(--ink);
  z-index: 2;
  animation: bobble 1.6s ease-in-out infinite;
}
@keyframes bobble { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(3px); } }
.spin-btn { margin-top: 1.2rem; }
.wheel-result {
  text-align: center;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1rem 1.4rem;
  animation: pop .35s cubic-bezier(.2, 1.6, .4, 1);
}
.wheel-result-name { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: .4rem; }
.wheel-result-reasons { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-bottom: .8rem; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-display);
  font-size: .85rem;
  letter-spacing: .07em;
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: .6rem 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
  color: var(--paper);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(43,33,24,.85); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(43,33,24,.85); }
.btn-red { background: var(--red); }
.btn-teal { background: var(--teal); }
.btn-mustard { background: var(--mustard); color: var(--ink); }
.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-big { font-size: 1.05rem; padding: .85rem 1.7rem; }
.mini-btn { font-size: .7rem; border: 2px solid var(--ink); background: var(--cream); border-radius: 6px; cursor: pointer; padding: .1rem .45rem; margin-left: .4rem; font-weight: 800; }

/* ---------- panels / rows ---------- */
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2rem; }
@media (max-width: 860px) { .row-2 { grid-template-columns: 1fr; } }
.panel {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1.3rem 1.4rem;
  margin-top: 1.5rem;
}
.row-2 .panel { margin-top: 0; }
.panel-cta { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; background: var(--mustard-light); }
.cta-script { font-family: var(--font-script); font-size: 1.9rem; transform: rotate(-2deg); }
.empty { color: var(--ink-soft); font-style: italic; padding: .5rem 0; }

.receipt-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.receipt-table td { padding: .45rem .4rem; border-bottom: 1px dashed var(--line); }
.rt-date { font-weight: 800; color: var(--ink-soft); white-space: nowrap; font-size: .8rem; }
.rt-name { font-weight: 800; }
.rt-people { color: var(--ink-soft); font-size: .85rem; }
.rt-rating { color: var(--mustard); font-weight: 800; white-space: nowrap; }

/* ---------- roster ---------- */
.tier-section { margin-bottom: 2.2rem; }
.tier-head { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-bottom: .9rem; }
.tier-title { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: .04em; }
.tier-sub { font-family: var(--font-script); font-size: 1.15rem; color: var(--teal); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 1rem; }

.rest-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1rem 1rem .9rem;
  transition: transform .14s ease, box-shadow .14s ease;
  overflow: hidden;
}
.rest-card:hover { transform: translateY(-4px) rotate(-.5deg); box-shadow: 0 8px 0 rgba(43,33,24,.85); }
.rest-card.retired { opacity: .55; filter: grayscale(.6); }
.rc-emoji { font-size: 2rem; line-height: 1; }
.rc-name { font-family: var(--font-display); font-size: .95rem; margin-top: .35rem; line-height: 1.25; }
.rc-meta { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin: .25rem 0 .5rem; }
.rc-stats { display: flex; gap: .7rem; font-size: .8rem; font-weight: 800; }
.rc-new { background: var(--teal); color: var(--paper); font-size: .62rem; letter-spacing: .1em; padding: .12rem .45rem; border-radius: 4px; }
.rc-special { margin-top: .55rem; font-size: .78rem; background: var(--mustard-light); border: 2px dashed var(--ink); border-radius: 6px; padding: .25rem .5rem; }
.rc-retired { position: absolute; inset: auto 0 0 0; background: var(--ink); color: var(--paper); text-align: center; font-size: .68rem; font-weight: 800; letter-spacing: .2em; padding: .2rem; }

.stamp {
  position: absolute;
  top: 12px; right: -2px;
  font-family: var(--font-display);
  font-size: .68rem;
  letter-spacing: .12em;
  color: var(--red);
  border: 3px double var(--red);
  border-radius: 6px;
  padding: .15rem .5rem;
  transform: rotate(12deg);
  opacity: .85;
}

/* ---------- forms ---------- */
.add-form { margin-bottom: 1.5rem; }
.add-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .7rem; align-items: center; }
input[type="text"], input[type="date"], select {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .92rem;
  border: 3px solid var(--ink);
  border-radius: 8px;
  padding: .55rem .7rem;
  background: var(--cream);
  color: var(--ink);
  width: 100%;
}
input:focus, select:focus { outline: 3px solid var(--mustard); outline-offset: 1px; }
.inline-check { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: .85rem; }
.inline-form { display: flex; gap: .6rem; margin-top: .9rem; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; flex: 1 1 140px; }

.field { display: block; margin-bottom: 1rem; }
.field-label { display: block; font-weight: 800; font-size: .72rem; letter-spacing: .16em; margin-bottom: .35rem; color: var(--ink-soft); }

/* ---------- detail page ---------- */
.detail-head { display: flex; gap: 1.3rem; align-items: center; flex-wrap: wrap; background: var(--paper); border: 3px solid var(--ink); border-radius: 14px; box-shadow: var(--shadow); padding: 1.4rem 1.5rem; }
.detail-emoji { font-size: 3.6rem; filter: drop-shadow(3px 3px 0 rgba(43,33,24,.2)); }
.detail-id { flex: 1; min-width: 220px; }
.detail-meta { font-weight: 800; letter-spacing: .12em; font-size: .74rem; text-transform: uppercase; color: var(--ink-soft); margin-top: .3rem; }
.detail-stats { display: flex; gap: 1.1rem; margin-top: .55rem; font-weight: 800; font-size: .88rem; flex-wrap: wrap; }
.detail-actions { display: flex; flex-direction: column; gap: .6rem; }
.ret { color: var(--red); }

.visit-row { display: flex; gap: 1rem; align-items: center; padding: .5rem 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.visit-date { font-weight: 800; font-size: .8rem; color: var(--ink-soft); min-width: 90px; }
.visit-people { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.visit-stars { color: var(--mustard); font-size: .8rem; margin-right: .5rem; }
.visit-comments { font-size: .83rem; color: var(--ink-soft); }
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--paper);
  font-weight: 800;
  font-size: .78rem;
  border: 2px solid var(--ink);
}
.change-line { padding: .45rem 0; border-bottom: 1px dotted var(--line); }
.change-by { display: block; font-size: .76rem; color: var(--ink-soft); }

/* ---------- stats ---------- */
.big-counters { display: flex; gap: .8rem; flex-wrap: wrap; }
.counter-tile {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: .55rem 1rem;
  text-align: center;
}
.counter-tile b { font-family: var(--font-display); font-size: 1.4rem; display: block; }
.counter-tile span { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.scooter-tile { background: var(--mustard-light); }

.lb-row { display: grid; grid-template-columns: 28px 1fr 90px auto; gap: .6rem; align-items: center; padding: .4rem 0; border-bottom: 1px dashed var(--line); }
.lb-rank { font-family: var(--font-display); color: var(--red); }
.lb-name { font-weight: 800; font-size: .92rem; display: flex; align-items: center; gap: .4rem; }
.lb-bar { background: var(--cream); border: 2px solid var(--ink); border-radius: 999px; height: 14px; overflow: hidden; }
.lb-bar i { display: block; height: 100%; background: var(--red); }
.lb-bar.gold i { background: var(--mustard); }
.lb-bar.teal i { background: var(--teal); }
.lb-val { font-weight: 800; font-size: .82rem; white-space: nowrap; }
.drought-val { color: var(--red); }

.cuisine-row { display: flex; gap: .45rem; flex-wrap: wrap; }
.cuisine-pill {
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: .3rem .8rem;
  font-weight: 800;
  font-size: .82rem;
  text-align: center;
}
.cuisine-pill b { color: var(--red); }

/* ---------- modal ---------- */
.modal-backdrop[hidden] { display: none; }
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(43, 33, 24, .55);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  padding: 1rem;
}
.modal { width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; }
.ticket-head { display: flex; align-items: center; gap: .8rem; border-bottom: 3px dashed var(--ink); padding-bottom: .8rem; margin-bottom: 1.1rem; }
.ticket-head h2 { font-family: var(--font-display); font-size: 1rem; letter-spacing: .06em; flex: 1; }
.modal-x { background: none; border: none; font-size: 1.2rem; cursor: pointer; font-weight: 800; color: var(--ink); }

.chip-row { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .55rem; }
.crew-chip {
  font-weight: 800;
  font-size: .85rem;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: .3rem .8rem;
  cursor: pointer;
  transition: all .12s ease;
  user-select: none;
}
.crew-chip.on { background: var(--teal); color: var(--paper); box-shadow: 2px 2px 0 var(--ink); }

.rate-row { display: grid; grid-template-columns: minmax(70px, auto) auto 1fr; gap: .6rem; align-items: center; padding: .35rem 0; }
.rate-name { font-weight: 800; font-size: .88rem; }
.stars { display: inline-flex; gap: .1rem; }
.star { font-size: 1.25rem; cursor: pointer; color: #d9c9a8; transition: transform .1s ease; background: none; border: none; padding: 0; }
.star.lit { color: var(--mustard); text-shadow: 1px 1px 0 var(--ink); }
.star:hover { transform: scale(1.25); }
.rate-row input { font-size: .8rem; padding: .3rem .5rem; }

/* ---------- toasts ---------- */
#toast-rack { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: .5rem; align-items: center; }
.toast {
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  border: 3px solid var(--mustard);
  border-radius: 999px;
  padding: .6rem 1.3rem;
  box-shadow: 0 6px 0 rgba(0,0,0,.3);
  animation: toast-in .3s cubic-bezier(.2, 1.6, .4, 1);
}
.toast.scooter { background: var(--mustard); color: var(--ink); border-color: var(--ink); }
@keyframes toast-in { from { transform: translateY(30px); opacity: 0; } }

/* ---------- entrance animations ---------- */
.pop-in { animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) backwards; }
.pop-delay { animation-delay: .12s; }
.pop-delay2 { animation-delay: .24s; }
@keyframes pop { from { transform: scale(.92) translateY(14px); opacity: 0; } }

/* ---------- confetti ---------- */
.confetto {
  position: fixed;
  width: 10px; height: 14px;
  z-index: 99;
  pointer-events: none;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(105vh) rotate(720deg); opacity: .7; }
}
