/* the counter: hero, order pad, and the guest check */

/* --- hero ----------------------------------------------------------------- */
.hero {
  border-bottom: 2px solid var(--ink);
  background:
    radial-gradient(120% 100% at 80% 0%, rgba(46, 156, 155, 0.16), transparent 60%),
    linear-gradient(180deg, var(--cream-2), rgba(246, 238, 220, 0));
}
.hero-inner {
  max-width: var(--max); margin: 0 auto; padding: clamp(2.4rem, 6vw, 4.6rem) var(--gutter) clamp(2.6rem, 6vw, 4rem);
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: clamp(1.6rem, 5vw, 3.4rem);
  align-items: center;
}
.hero-eyebrow {
  font-family: var(--display); font-size: 0.72rem; font-weight: 700; font-stretch: 90%;
  text-transform: uppercase; letter-spacing: 0.24em; color: var(--aqua); margin: 0 0 0.9rem;
}
.hero h1 { color: var(--ink); }
.hero h1::after {
  content: ""; display: block; width: 5.2rem; height: 6px;
  background: var(--tomato); margin: 0.9rem 0 0.2rem;
}
.hero-script {
  font-family: var(--script); font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem);
  color: var(--tomato); margin: 0.5rem 0 1rem;
}
.hero-copy { max-width: 46ch; font-size: 1.05rem; }
.hero-cta { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.6rem; }

/* the plate: a slice under two rings, the one ornament on the page */
.hero-plate { display: grid; justify-items: center; gap: 1rem; }
.plate {
  position: relative; width: min(15rem, 46vw); aspect-ratio: 1;
  border-radius: 50%; background: var(--paper);
  border: 3px solid var(--ink); box-shadow: var(--lift);
  display: grid; place-items: center;
}
.plate-ring {
  position: absolute; inset: 12%; border-radius: 50%; border: 2px solid var(--steel);
}
.plate-ring-2 { inset: 20%; border-color: var(--aqua); opacity: 0.5; }
.plate-slice {
  width: 62%; aspect-ratio: 1;
  background: conic-gradient(from 200deg, var(--mustard) 0deg 62deg, transparent 62deg);
  border-radius: 50%;
  position: relative;
  animation: settle 0.8s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
.plate-slice::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 62% 42%, var(--tomato) 0 6px, transparent 7px),
              radial-gradient(circle at 48% 60%, var(--tomato) 0 5px, transparent 6px),
              radial-gradient(circle at 66% 62%, var(--tomato) 0 4px, transparent 5px);
}
@keyframes settle { from { transform: rotate(-14deg) scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }
.plate-note {
  font-family: var(--display); font-weight: 700; font-stretch: 108%; text-transform: uppercase;
  letter-spacing: 0.14em; font-size: 0.78rem; text-align: center; line-height: 1.5; margin: 0;
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-plate { order: -1; justify-items: start; }
}

/* --- the counter ---------------------------------------------------------- */
.counter-inner {
  max-width: var(--max); margin: 0 auto; padding: clamp(2rem, 5vw, 3.4rem) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem); gap: clamp(1.4rem, 3vw, 2.4rem);
  align-items: start;
}
@media (max-width: 940px) { .counter-inner { grid-template-columns: 1fr; } }

.panel {
  background: var(--paper); border: 2px solid var(--ink); box-shadow: var(--lift);
  padding: clamp(1.2rem, 3vw, 2rem);
}
.panel-head { border-bottom: 2px solid var(--ink); padding-bottom: 1rem; margin-bottom: 1.4rem; }
.panel-head p { margin: 0.4rem 0 0; font-size: 0.94rem; opacity: 0.75; }

.group { border: 0; border-top: 1px dashed rgba(34, 27, 24, 0.28); margin: 0; padding: 1.4rem 0 0.4rem; }
.group:first-of-type { border-top: 0; padding-top: 0; }
.group legend {
  font-family: var(--display); font-size: 0.74rem; font-weight: 700; font-stretch: 96%;
  text-transform: uppercase; letter-spacing: 0.2em; color: var(--tomato);
  padding: 0 0.5rem 0 0;
}
.legend-note { font-size: 0.86rem; opacity: 0.72; margin: 0 0 1rem; max-width: 58ch; }

.field { margin-bottom: 1rem; }
.field label {
  display: block; font-family: var(--display); font-size: 0.72rem; font-weight: 700; font-stretch: 92%;
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.35rem;
}
.hint { font-size: 0.8rem; opacity: 0.66; margin: 0.3rem 0 0; }

input[type="number"], select, input[type="text"] {
  font-family: var(--mono); font-size: 0.98rem;
  width: 100%; padding: 0.5rem 0.6rem;
  background: var(--cream); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 2px;
}
select { font-family: var(--body); font-weight: 500; }
.combo { display: flex; gap: 0.4rem; align-items: center; }
.combo select { width: auto; min-width: 4.6rem; }
.combo .suffix, .combo .times {
  font-family: var(--mono); font-size: 0.9rem; opacity: 0.7;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.slider-row { display: grid; grid-template-columns: 1fr 8.2rem; gap: 0.8rem; align-items: center; }
@media (max-width: 560px) { .slider-row { grid-template-columns: 1fr; } }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; background: var(--steel); border: 2px solid var(--ink); border-radius: 999px;
}
input[type="range"]::-moz-range-track {
  height: 6px; background: var(--steel); border: 2px solid var(--ink); border-radius: 999px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin-top: -9px;
  background: var(--tomato); border: 2px solid var(--ink); border-radius: 50%; cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; background: var(--tomato); border: 2px solid var(--ink);
  border-radius: 50%; cursor: pointer;
}

.style-note { font-size: 0.88rem; opacity: 0.8; margin: 0.2rem 0 0; min-height: 1.2em; }

.sizer { margin-top: 0.6rem; border-top: 1px dashed rgba(34, 27, 24, 0.28); padding-top: 0.9rem; }
.sizer summary {
  font-family: var(--display); font-size: 0.72rem; font-weight: 700; font-stretch: 92%;
  text-transform: uppercase; letter-spacing: 0.1em; cursor: pointer; margin-bottom: 0.9rem;
}

/* stages */
.stage {
  display: grid; grid-template-columns: minmax(0, 1.6fr) 5rem 5rem 2rem; gap: 0.5rem;
  align-items: center; margin-bottom: 0.5rem;
}
.stage input { padding: 0.4rem 0.5rem; font-size: 0.9rem; }
.stage input[type="text"] { font-family: var(--body); }
.stage-drop {
  background: none; border: 0; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--tomato);
  font-family: var(--body); padding: 0;
}
.stage-head {
  display: grid; grid-template-columns: minmax(0, 1.6fr) 5rem 5rem 2rem; gap: 0.5rem;
  font-family: var(--display); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; opacity: 0.6; margin-bottom: 0.4rem;
}
@media (max-width: 560px) {
  .stage, .stage-head { grid-template-columns: minmax(0, 1fr) 4rem 4rem 1.6rem; }
}
.stage-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 0.9rem 0; }
.suggestion {
  font-family: var(--mono); font-size: 0.9rem; background: var(--cream);
  border-left: 4px solid var(--aqua); padding: 0.7rem 0.9rem;
}
.suggestion b { color: var(--tomato); }
.watertemp {
  font-family: var(--mono); font-size: 0.95rem; background: var(--cream);
  border-left: 4px solid var(--mustard); padding: 0.7rem 0.9rem; margin: 0.4rem 0 0;
}

/* --- the guest check ------------------------------------------------------ */
.ticket-column { position: sticky; top: 5.4rem; display: grid; gap: 0.9rem; }
@media (max-width: 940px) { .ticket-column { position: static; } }

.ticket-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.8rem; }
.ticket-controls .field { margin-bottom: 0.6rem; }

.check {
  background: var(--paper);
  filter: drop-shadow(0 10px 18px rgba(34, 27, 24, 0.25));
  font-family: var(--mono);
}
/* the torn perforations, top and bottom */
.check-top, .check-bottom {
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--paper) 0 6px, transparent 6px 12px);
}
.check-top { box-shadow: inset 0 3px 0 var(--tomato); }
.check-body { padding: 1.1rem 1.2rem 1.4rem; border-left: 1px solid rgba(34,27,24,.18); border-right: 1px solid rgba(34,27,24,.18); }

.check-head { text-align: center; border-bottom: 2px solid var(--ink); padding-bottom: 0.7rem; margin-bottom: 0.8rem; }
.check-head h2 {
  font-family: var(--display); font-size: 1.05rem; font-stretch: 118%; letter-spacing: 0.14em; margin: 0;
}
.check-head p { font-size: 0.78rem; margin: 0.3rem 0 0; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.1em; }

.check-section {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em;
  border-bottom: 1px dashed rgba(34, 27, 24, 0.4); padding-bottom: 0.2rem; margin: 1rem 0 0.5rem; opacity: 0.75;
}
.check-line {
  display: flex; align-items: baseline; gap: 0.4rem; font-size: 0.92rem; padding: 0.16rem 0;
}
.check-line .lead { flex: 1; border-bottom: 1px dotted rgba(34, 27, 24, 0.45); transform: translateY(-0.22em); }
.check-line .amt { font-weight: 700; white-space: nowrap; }
.check-line .pct { font-size: 0.76rem; opacity: 0.6; min-width: 3.4rem; text-align: right; }
.check-total {
  display: flex; justify-content: space-between; gap: 1rem;
  border-top: 2px solid var(--ink); margin-top: 0.9rem; padding-top: 0.6rem;
  font-size: 0.98rem; font-weight: 700;
}
.check-sub { display: flex; justify-content: space-between; font-size: 0.82rem; opacity: 0.75; }
.check-stamp {
  margin-top: 1rem; text-align: center; font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--tomato);
  border: 2px solid var(--tomato); border-radius: 3px; padding: 0.4rem; transform: rotate(-1.6deg);
}
.check-time { font-size: 0.82rem; display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.12rem 0; }
.check-time .when { opacity: 0.65; white-space: nowrap; }
.check-note { font-size: 0.74rem; opacity: 0.7; margin: 0.8rem 0 0; line-height: 1.5; }

.printing .check-line, .printing .check-time { animation: feed 0.34s ease both; }
@keyframes feed { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }

.ticket-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.ticket-actions .btn { font-size: 0.7rem; padding: 0.5rem 0.8rem; }
.ticket-foot { font-size: 0.8rem; opacity: 0.75; margin: 0; min-height: 1.2em; }

/* --- notes ---------------------------------------------------------------- */
.notes { padding-bottom: 1rem; }
.notes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.6rem; }
.notes-grid h3 { margin-bottom: 0.6rem; }
.notes-grid p { font-size: 0.94rem; }
a.inline { color: var(--tomato); text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 500; }

/* --- mobile ---------------------------------------------------------------
   the check is the output, so on a phone it must stay reachable while the
   thumb is on the form. a fixed bar carries the three numbers that matter and
   gets out of the way once the real check is on screen. */
.checkbar { display: none; }

@media (max-width: 940px) {
  .checkbar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9;
    background: var(--ink); color: var(--cream);
    border-top: 2px solid var(--mustard);
    padding-bottom: env(safe-area-inset-bottom, 0);
    transform: translateY(0); transition: transform 0.25s ease;
  }
  .checkbar[data-tucked="yes"] { transform: translateY(110%); }
  .checkbar-inner {
    display: flex; align-items: center; gap: 0.9rem; justify-content: space-between;
    padding: 0.6rem var(--gutter); text-decoration: none; color: inherit; min-height: 52px;
  }
  .checkbar b { display: block; font-family: var(--mono); font-size: 0.98rem; color: var(--mustard); }
  .checkbar small {
    display: block; font-family: var(--display); font-size: 0.56rem; letter-spacing: 0.16em;
    text-transform: uppercase; opacity: 0.7;
  }
  .checkbar-go {
    font-family: var(--display); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; border: 2px solid var(--mustard); border-radius: 999px;
    padding: 0.45rem 0.7rem; white-space: nowrap;
  }
  .counter { padding-bottom: 4.5rem; }
  .check { scroll-margin-top: 5.5rem; }
  .ticket-actions .btn { flex: 1 1 auto; text-align: center; }
}

@media (max-width: 620px) {
  /* a phone keyboard should never zoom the page: 16px is the threshold */
  input[type="number"], input[type="text"], select { font-size: 16px; min-height: 44px; }
  .stage input { min-height: 40px; }
  .panel { padding: 1rem; }
  .field label { font-size: 0.68rem; }
  .stage, .stage-head { grid-template-columns: minmax(0, 1fr) 4.4rem 4.4rem 2.4rem; gap: 0.4rem; }
  .stage-drop { min-height: 44px; min-width: 40px; font-size: 1.5rem; }
  .sizer summary { padding: 0.6rem 0; }
  input[type="range"] { height: 44px; }
  input[type="range"]::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -12px; }
  input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; }
  .hero-inner { padding-top: 1.8rem; }
  .plate { width: min(11rem, 40vw); }
  .hero-cta .btn { flex: 1 1 auto; text-align: center; }
  .ticket-controls { grid-template-columns: 1fr; }
}

@media print {
  .rail, .foot, .panel, .hero, .notes, .ticket-actions, .ticket-controls, .checkbar { display: none !important; }
  body { background: #fff; }
  .counter-inner { display: block; padding: 0; }
  .check { filter: none; border: 1px solid #000; }
}
