/* DS components. Grease is decoration only — never small text on paper. */

.ds-ticket-shell {
  position: relative;
  background-color: transparent;
  color: var(--ink, #1A140C);
  font-family: var(--font-title, "Courier Prime", ui-monospace, monospace);
}

.ds-ticket-shell h1,
.ds-ticket-shell .mark-full,
.ds-ticket-shell .mark-short {
  font-family: var(--font-body, "Source Serif 4", Georgia, serif);
  color: var(--ink, #1A140C);
}

/* TotalsRow — plate $ / food cost % / suggest $ — three cards, centered in the ticket */
html body main.wrap .ticket.proto-ticket-stage .ds-totals,
html body main.wrap .ticket.proto-ticket-stage .proto-cards-row {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-left: auto !important;
  margin-right: auto !important;
  justify-content: center !important;
  justify-items: stretch !important;
  align-items: stretch !important;
  gap: clamp(8px, 1.5vw, 16px) !important;
  padding-left: clamp(1.25rem, 6vw, 3.25rem) !important;
  padding-right: clamp(1.25rem, 6vw, 3.25rem) !important;
}
html body main.wrap .ticket.proto-ticket-stage .ds-totals > :not(.proto-card) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
}
html body main.wrap .ticket.proto-ticket-stage .ds-totals > .proto-card,
html body main.wrap .ticket.proto-ticket-stage .proto-card {
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
@media (max-width: 639px) {
  html body main.wrap .ticket.proto-ticket-stage .ds-totals,
  html body main.wrap .ticket.proto-ticket-stage .proto-cards-row {
    grid-template-columns: 1fr !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}
.ds-totals .proto-card-title,
.ds-totals .stub-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ds-totals .proto-card-val,
.ds-totals .stub-val {
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  font-weight: 700;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

html body main.wrap .ticket.proto-ticket-stage .proto-card.card-plate {
  background: var(--paper-inner, #F7EDD6) !important;
  color: var(--ink, #1A140C) !important;
}
html body main.wrap .ticket.proto-ticket-stage .proto-card.card-plate,
html body main.wrap .ticket.proto-ticket-stage .proto-card.card-plate * {
  color: var(--ink, #1A140C) !important;
}
html body main.wrap .ticket.proto-ticket-stage .proto-card.card-pct {
  background: var(--grease, #E2B93A) !important;
  color: var(--ink, #1A140C) !important;
}
html body main.wrap .ticket.proto-ticket-stage .proto-card.card-pct,
html body main.wrap .ticket.proto-ticket-stage .proto-card.card-pct * {
  color: var(--ink, #1A140C) !important;
}
html body main.wrap .ticket.proto-ticket-stage .proto-card.card-suggest {
  background: var(--ticket-red, #B42318) !important;
}
html body main.wrap .ticket.proto-ticket-stage .proto-card.card-suggest,
html body main.wrap .ticket.proto-ticket-stage .proto-card.card-suggest * {
  color: var(--white, #FFFBF2) !important;
}
html body main.wrap .ticket.proto-ticket-stage .proto-card.card-plate .proto-card-line {
  background: var(--grease, #E2B93A) !important;
}
html body main.wrap .ticket.proto-ticket-stage .proto-card.card-pct .proto-card-line {
  background: var(--ink, #1A140C) !important;
}
html body main.wrap .ticket.proto-ticket-stage .proto-card.card-suggest .proto-card-line {
  background: var(--grease, #E2B93A) !important;
}

/* TicketField */
.ds-ticket-field {
  border: 2px dashed var(--ink, #1A140C);
  background: var(--paper-inner, #F7EDD6);
  padding: 0.75rem;
  margin: 0 0 0.75rem;
}
.ds-ticket-field:focus-within {
  border-style: solid;
  box-shadow: inset 0 -6px 0 var(--grease, #E2B93A);
}
.ds-ticket-field.is-missing,
.ds-ticket-field.ds-ticket-field--error {
  border-color: var(--ticket-red, #B42318);
  border-style: solid;
}
.ds-missing-dollar {
  display: block;
  width: min(140px, 42%);
  height: auto;
  margin: 0.35rem 0 0 auto;
  transform: rotate(-8deg);
}
.ds-ticket-field input {
  background: transparent;
  border: 0;
  border-bottom: 1px dashed var(--ink, #1A140C);
  color: var(--ink, #1A140C);
  font-family: var(--font-title, "Courier Prime", ui-monospace, monospace);
  min-height: 44px;
}

/* StampButton */
button.ds-stamp {
  display: inline-block;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  min-height: 0;
  transform: rotate(-8deg);
}
.ds-stamp-face {
  display: block;
  width: min(240px, 78vw);
  height: 110px;
  background: url("/ds/components/stamps/stamp-cost-this-dish-default.png") center / contain no-repeat;
  filter: drop-shadow(1px 2px 0 rgba(26, 20, 12, 0.25));
}
button.ds-stamp:hover .ds-stamp-face {
  background-image: url("/ds/components/stamps/stamp-cost-this-dish-hover.png");
}
button.ds-stamp:active .ds-stamp-face {
  background-image: url("/ds/components/stamps/stamp-cost-this-dish-pressed.png");
}
button.ds-stamp:disabled,
button.ds-stamp[aria-disabled="true"] {
  cursor: not-allowed;
}
button.ds-stamp:disabled .ds-stamp-face,
button.ds-stamp[aria-disabled="true"] .ds-stamp-face {
  background-image: url("/ds/components/stamps/stamp-cost-this-dish-disabled.png");
}
button.ds-stamp--pour .ds-stamp-face {
  width: min(220px, 72vw);
  background-image: url("/ds/components/stamps/stamp-cost-a-pour.svg");
}

/* SmearButton $29 */
.ds-smear {
  display: inline-block;
  border: 0;
  background: transparent;
  padding: 0;
}
.ds-smear img {
  width: min(280px, 82vw);
  height: auto;
}

/* IconButton */
.ds-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 2px solid var(--ink, #1A140C);
  background: var(--paper, #F3E6C9);
  color: var(--ink, #1A140C);
  cursor: pointer;
}
.ds-icon-btn img {
  width: 22px;
  height: 22px;
}

/* FooterMarks — exactly 3 */
.ds-footer-marks {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 0.5rem;
  padding: 0.75rem 0 0;
  border-top: 2px solid var(--ink, #1A140C);
  font-family: var(--font-title, "Courier Prime", ui-monospace, monospace);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
}
.ds-footer-marks a {
  color: var(--ink, #1A140C);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
}
.ds-footer-marks a img {
  width: 18px;
  height: 18px;
}

/* Dock = same 3 marks on phone */
.dock a {
  font-family: var(--font-title, "Courier Prime", ui-monospace, monospace);
}

/* A11y */
:where(a, button, input, select, textarea):focus-visible {
  outline: var(--ds-focus, 2px dashed #1A140C);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  button.ds-stamp img,
  .ds-missing-dollar {
    transform: none !important;
    transition: none !important;
  }
}

/* Never grease as small body type */
.lede,
.fine,
.kicker,
.ds-micro {
  color: var(--ink, #1A140C);
}
.ds-micro {
  font-family: var(--font-title, "Courier Prime", ui-monospace, monospace);
  font-size: 0.9rem;
}

.ing-cutout {
  object-fit: contain;
  mix-blend-mode: multiply;
  background: transparent;
}
