*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
  scrollbar-color: var(--oxblood) var(--night);
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--night);
  /* painted plaster: faint grain over the night wall */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .9 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: var(--text-md);
  line-height: 1.5;
  caret-color: var(--gold);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.has-orderbar {
  padding-bottom: 5.5rem;
}

::selection {
  background: var(--red);
  color: var(--cream);
}

::-webkit-scrollbar {
  width: 10px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--night);
}
::-webkit-scrollbar-thumb {
  background: var(--oxblood);
  border-radius: 8px;
  border: 2px solid var(--night);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--rule-strong);
}

a:hover {
  text-decoration-color: currentColor;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--s4);
  top: -4rem;
  z-index: 50;
  padding: var(--s2) var(--s4);
  background: var(--gold);
  color: var(--night);
  font-weight: 700;
  border-radius: var(--radius);
}
.skip:focus {
  top: var(--s4);
}

/* Painted lettering: sign-paint caps with the painter's drop shade */
.paint {
  font-family: var(--font-paint);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.95;
  text-shadow: var(--shade);
}
.paint--gold {
  color: var(--gold);
}

/* Painted panel: the field and its brushed outline are one authored SVG,
   9-sliced so the edge keeps its weight at any size. The field colour is
   --panel (#1B1513) and the outline --cream-2 (#CDBFAD), baked into the SVG. */
.frame {
  position: relative;
  isolation: isolate;
  --frame-inset: 10px;
}
.frame::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 3px;
  border: 14px solid transparent;
  border-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='120'%20height='120'%20viewBox='0%200%20120%20120'%3E%3Cfilter%20id='e'%20x='-10%25'%20y='-10%25'%20width='120%25'%20height='120%25'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.03%200.08'%20numOctaves='2'%20seed='7'%20result='w'/%3E%3CfeDisplacementMap%20in='SourceGraphic'%20in2='w'%20scale='4'%20xChannelSelector='R'%20yChannelSelector='G'/%3E%3C/filter%3E%3Cfilter%20id='b'%20x='-10%25'%20y='-10%25'%20width='120%25'%20height='120%25'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.03%200.08'%20numOctaves='2'%20seed='7'%20result='w'/%3E%3CfeDisplacementMap%20in='SourceGraphic'%20in2='w'%20scale='5'%20xChannelSelector='R'%20yChannelSelector='G'%20result='d'/%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.7'%20numOctaves='1'%20seed='3'%20result='g'/%3E%3CfeColorMatrix%20in='g'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20-2.4%201.75'%20result='m'/%3E%3CfeComposite%20in='d'%20in2='m'%20operator='in'/%3E%3C/filter%3E%3Crect%20x='9.5'%20y='9.5'%20width='101'%20height='101'%20fill='%231B1513'%20filter='url(%23e)'/%3E%3Cg%20filter='url(%23b)'%20fill='none'%20stroke='%23CDBFAD'%20stroke-linecap='round'%3E%3Cpath%20d='M10.5%2011.2%20L109%2010.4'%20stroke-width='4.6'%20stroke-opacity='.5'/%3E%3Cpath%20d='M109.4%209.8%20L110.2%20109.6'%20stroke-width='3.8'%20stroke-opacity='.42'/%3E%3Cpath%20d='M110.6%20109.2%20L10.2%20110.4'%20stroke-width='5.2'%20stroke-opacity='.48'/%3E%3Cpath%20d='M10.8%20110.8%20L9.6%2010.2'%20stroke-width='4.2'%20stroke-opacity='.45'/%3E%3C/g%3E%3C/svg%3E") 22 fill stretch;
  pointer-events: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 3.25rem;
  padding: 0 var(--s5);
  border: 0;
  border-radius: var(--radius);
  font-family: var(--font-paint);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  transition: transform var(--dur-quick) var(--ease-out), background-color var(--dur-quick) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active {
  transform: translateY(1px) scale(0.985);
}
.btn__icon,
[data-icon] {
  display: inline-flex;
}
.btn__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.btn--paint {
  background: var(--red-ink);
  color: var(--cream);
  box-shadow: 0 3px 6px -1px rgb(0 0 0 / 0.55), 0 10px 22px -12px rgb(0 0 0 / 0.85);
}
.btn--paint:hover {
  background: var(--red);
}

.btn--wa {
  background: var(--wa);
  color: var(--wa-ink);
  box-shadow: 0 3px 6px -1px rgb(0 0 0 / 0.5), 0 10px 22px -12px rgb(0 0 0 / 0.8);
}
.btn--wa:hover {
  background: #3ee07a;
}

.btn--ghost {
  background: transparent;
  color: var(--cream);
  box-shadow: inset 0 0 0 2px var(--rule-strong);
}
.btn--ghost:hover {
  box-shadow: inset 0 0 0 2px var(--cream-2);
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  max-width: 82rem;
  margin: 0 auto;
  padding: var(--s3) var(--gutter);
}
.topbar__where {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--cream-2);
}
.topbar__where svg {
  color: var(--gold);
  flex: none;
}

.tally {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: var(--tap);
  padding: 0 var(--s2) 0 var(--s4);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--rule-strong);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: box-shadow var(--dur) var(--ease-out);
}
.tally__count {
  display: inline-grid;
  place-items: center;
  min-width: 1.9rem;
  height: 1.9rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--panel-2);
  font-family: var(--font-paint);
  font-weight: 900;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  transition: background-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
/* live state: only the order shares the sign's glow */
.tally.is-live {
  box-shadow: inset 0 0 0 1.5px rgb(234 11 11 / 0.6);
}
.tally.is-live .tally__count {
  background: var(--red-ink);
  box-shadow: 0 0 0 1px rgb(255 120 100 / 0.35), 0 2px 14px rgb(234 11 11 / 0.65);
}

/* Rolling digits */
.roll {
  display: inline-flex;
  font-variant-numeric: tabular-nums;
}
.roll__cell {
  display: inline-block;
  height: 1em;
  line-height: 1;
  overflow: hidden;
}
.roll__strip {
  display: block;
  width: 1ch;
  line-height: 1;
  word-break: break-all;
  white-space: normal;
  transform: translateY(calc(var(--d) * -1em));
  transition: transform 560ms var(--ease-out);
}
.roll__glyph {
  display: inline-block;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
