@font-face {
  font-family: "September Spirit";
  src: url("/fonts/september-spirit.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plex-mono-400-latinext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plex-mono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/plex-mono-500-latinext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/plex-mono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/plex-mono-600-latinext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/plex-mono-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
  --bg: #f7f7f6;
  --paper: #fff;
  --ink: #222;
  --grey: #8a8a86;
  --muted: #737370;
  --label: #81817e;
  --faint: #bdbcb8;
  --hair: #e4e3df;
  --line: #e4e4e2;
  --wash: #eeeded;
  --blue: #2414ed;
  --blue-deep: #1a0fc2;
  --red: #e44332;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --pad: clamp(20px, 4.2vw, 56px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 Inter, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11";
}

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

button, a, input, select, summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

button:disabled { cursor: wait; opacity: 0.55; }

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

[hidden] { display: none !important; }

.wrap {
  width: min(620px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 88px;
}

.dash-wrap {
  width: min(1040px, calc(100% - var(--pad) * 2));
  margin: 0 auto;
  padding: 36px 0 96px;
}

.kicker,
.lab,
.item-num,
.rcpt-kicker,
.group-label,
.table-head th,
.live,
.toggle,
.index-note {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.kicker {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 8vw, 44px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  max-width: 36em;
}

.note {
  margin: 12px 0 0;
  color: var(--grey);
  font-size: 13.5px;
}

.field-block { margin-top: 22px; }

label,
.field-label {
  display: block;
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--label);
}

.hint {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  font-family: Inter, Arial, sans-serif;
  letter-spacing: 0;
  text-transform: none;
}

input[type="text"],
textarea,
select {
  width: 100%;
  padding: 11px 0 9px;
  border: 0;
  border-bottom: 1.5px solid var(--hair);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 16px/1.4 Inter, -apple-system, "Helvetica Neue", Arial, sans-serif;
  appearance: none;
  -webkit-appearance: none;
}

textarea {
  min-height: 76px;
  resize: vertical;
  border: 1px dashed var(--hair);
  padding: 10px 12px;
  background: #fff;
}

select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path fill='none' stroke='%238a8a86' stroke-width='1.4' d='M3.5 6 8 10.5 12.5 6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: 28px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--blue);
}

input.invalid,
textarea.invalid,
select.invalid {
  border-color: var(--red);
}

/* Ticket / receipt */
.ticket,
.mini-receipt,
.receipt {
  position: relative;
  background: var(--paper);
  color: var(--ink);
}

.ticket {
  margin-top: 28px;
  padding: 28px 22px 26px;
}

.mini-receipt,
.receipt {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.5;
}

.mini-receipt {
  margin: 28px 0 22px;
  padding: 28px 22px 24px;
}

.receipt {
  width: min(560px, 100%);
  padding: 36px 32px 30px;
}

/* Zig-zag ticket edges */
.ticket::before,
.ticket::after,
.mini-receipt::before,
.mini-receipt::after,
.receipt::before,
.receipt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  background-repeat: repeat-x;
  pointer-events: none;
  z-index: 1;
}

.ticket::before,
.mini-receipt::before,
.receipt::before {
  top: 0;
  background-image:
    linear-gradient(135deg, var(--bg) 50%, transparent 50%),
    linear-gradient(225deg, var(--bg) 50%, transparent 50%);
  background-size: 10px 10px;
  background-position: 0 0, 5px 0;
}

.ticket::after,
.mini-receipt::after,
.receipt::after {
  bottom: 0;
  background-image:
    linear-gradient(45deg, var(--bg) 50%, transparent 50%),
    linear-gradient(-45deg, var(--bg) 50%, transparent 50%);
  background-size: 10px 10px;
  background-position: 0 0, 5px 0;
}

.ticket-meta {
  margin: 0 0 18px;
}

.store {
  margin: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}

.store-title {
  margin: 6px 0 2px;
  text-align: center;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.store-sub {
  margin: 0 0 14px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--grey);
}

.section {
  margin-top: 8px;
  padding: 18px 0 6px;
  background: transparent;
  border: 0;
  border-top: 1px dashed var(--hair);
  border-radius: 0;
  box-shadow: none;
}

.section-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.idx {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--blue);
  padding-top: 1px;
  font-variant-numeric: tabular-nums;
}

.section h2 {
  margin: 0 0 3px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section .intro {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
  font-family: Inter, Arial, sans-serif;
}

.item-card {
  padding: 14px 0 4px;
  border-top: 1px dashed var(--hair);
}

.item-card:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.item-num {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--label);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}

@media (max-width: 520px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.row { margin-bottom: 12px; }

.actions {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.go,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 14px 28px;
  border: 0;
  border-radius: 40px;
  background: var(--blue);
  color: #fff;
  font: 600 17px/1.2 Inter, Arial, sans-serif;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
}

.go:hover,
.btn:hover { background: var(--blue-deep); }

.btn-ghost,
.quiet-btn {
  background: transparent;
  color: var(--grey);
  border: 0;
  border-radius: 0;
  min-height: 0;
  padding: 10px 0;
  font: 500 16px/1.4 Inter, Arial, sans-serif;
}

.btn-ghost:hover,
.quiet-btn:hover { color: var(--ink); }

.btn-small,
.quiet-btn.small {
  min-height: 0;
  padding: 8px 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.error {
  display: none;
  margin: 12px 0 0;
  padding: 10px 0;
  color: var(--red);
  font-size: 14px;
}

.error.show { display: block; }

.signoff {
  margin: 40px 0 0;
  text-align: center;
  color: var(--grey);
  font-size: 13px;
}

.signoff .by,
.receipt .signoff .by {
  font-family: "September Spirit", cursive;
  font-size: 28px;
  color: var(--blue);
  margin-left: 6px;
  line-height: 1;
}

.thanks { display: none; }
.thanks.show { display: block; }
form.hidden { display: none; }

.rcpt-kicker {
  margin: 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 500;
}

.rcpt-title {
  margin: 6px 0 2px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rcpt-sub {
  margin: 0 0 14px;
  text-align: center;
  font-size: 11px;
  color: var(--grey);
}

.rule {
  border: 0;
  border-top: 1px dashed var(--hair);
  margin: 12px 0;
}

.rule-solid {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 14px 0;
}

.rcpt-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 3px 0;
}

.rcpt-item { margin: 10px 0; }
.rcpt-item .who { color: var(--grey); }
.rcpt-item .why {
  margin: 2px 0 0;
  color: #444;
  font-style: italic;
}
.rcpt-item .price {
  color: var(--grey);
  font-size: 12px;
}

.stamp {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 10px;
  border: 2px solid var(--blue);
  color: var(--blue);
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--mono);
  text-transform: uppercase;
  transform: rotate(-8deg);
}

.thanks-line {
  margin: 14px 0 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

.barcode {
  display: block;
  width: 72%;
  height: 36px;
  margin: 14px auto 6px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--ink) 0 1px,
    transparent 1px 3px,
    var(--ink) 3px 4px,
    transparent 4px 6px,
    var(--ink) 6px 9px,
    transparent 9px 11px,
    var(--ink) 11px 12px,
    transparent 12px 15px,
    var(--ink) 15px 18px,
    transparent 18px 20px
  );
}

.barcode-cap {
  margin: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--grey);
}

/* Dashboard */
.dash-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 28px;
  margin-bottom: 28px;
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  padding-bottom: 4px;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--grey);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 0 rgba(36, 20, 237, 0.45);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(36, 20, 237, 0.4); }
  70% { box-shadow: 0 0 0 7px rgba(36, 20, 237, 0); }
  100% { box-shadow: 0 0 0 0 rgba(36, 20, 237, 0); }
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}

.toggle input { accent-color: var(--blue); width: 15px; height: 15px; }

.receipt-stage {
  display: flex;
  justify-content: center;
  padding: 18px 0 40px;
}

.receipt h2 {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dots {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 2px 0;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.dots .label { flex: 0 1 auto; }
.dots .fill {
  flex: 1;
  border-bottom: 1px dotted #c8c7c2;
  transform: translateY(-4px);
  min-width: 12px;
}
.dots .qty {
  flex: 0 1 auto;
  font-weight: 500;
  text-align: right;
  max-width: 62%;
  overflow-wrap: anywhere;
}

.r-item .name, .r-item .why, .mini-receipt {
  overflow-wrap: anywhere;
}

.item-list { margin: 10px 0 4px; }

.r-item { margin: 0 0 11px; }
.r-item .top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.r-item .name { font-weight: 500; }
.r-item .meta { color: var(--grey); white-space: nowrap; }
.r-item .why { margin: 1px 0 0; font-style: italic; color: #3f3f3c; }
.r-item .price { color: var(--grey); font-size: 12px; }

.group-label {
  margin: 12px 0 6px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--ink);
}

.rcpt-sec {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.regret-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.star-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #c4c3be;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.star-btn:hover,
.star-btn.on { color: var(--blue); }

.stamp-wrap {
  text-align: right;
  min-height: 12px;
}

.stamp.big {
  margin-top: 4px;
  font-size: 12px;
  padding: 7px 11px;
}

.empty {
  text-align: center;
  padding: 18px 8px 10px;
  color: var(--muted);
  font-family: Inter, Arial, sans-serif;
}

.rcpt-stack { margin: 8px 0 4px; }
.rcpt-stack .stack-label { color: var(--grey); }
.rcpt-stack .stack-value { font-weight: 500; overflow-wrap: anywhere; }

.receipt .signoff {
  margin: 16px 0 2px;
  font-family: Inter, Arial, sans-serif;
}

.table-panel {
  margin-top: 12px;
  padding: 22px 0 8px;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.table-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.table-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
}

th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--label);
  font-weight: 500;
  white-space: nowrap;
  background: var(--wash);
}

td.why { color: #444; }

th:first-child, td:first-child { white-space: nowrap; }

.locked, .denied {
  max-width: 520px;
  margin: 14vh auto 0;
  text-align: center;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 640px) {
  .receipt { padding: 30px 18px 24px; font-size: 12.5px; }
  .dash-wrap { width: min(1040px, calc(100% - 24px)); }
  .ticket { padding: 24px 16px 22px; }
}

.opt {
  font-family: Inter, Arial, sans-serif;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--faint);
}

.sec-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 6px;
}

.sec-head-row h2 { margin: 0; }

.seg {
  display: inline-flex;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.seg-btn {
  color: var(--grey);
  font: 500 11px var(--mono);
  letter-spacing: 0.04em;
  padding: 0;
  background: none;
}

.seg-btn.on,
.seg-btn:hover { color: var(--blue); }

.cat-block { margin: 4px 0 10px; }

.cat-head {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 0;
  background: none;
  cursor: pointer;
}

.cat-head .dots { margin: 0; }

.cat-head .chev {
  flex: 0 0 auto;
  color: var(--grey);
  margin-left: 4px;
  font-size: 11px;
}

.cat-block .item-list { margin: 6px 0 0 0; }
.cat-block .r-item { margin: 0 0 8px; }

.more-btn {
  display: inline-block;
  margin: 0 0 2px;
  padding: 0;
  background: none;
  color: var(--blue);
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.04em;
}

.more-btn:hover { color: var(--blue-deep); }

.cat-edit {
  display: block;
  width: auto;
  max-width: 100%;
  margin: 4px 0 2px;
  padding: 2px 18px 3px 0;
  border: 0;
  border-bottom: 1px solid var(--hair);
  border-radius: 0;
  background-color: transparent;
  background-position: right 0 center;
  color: var(--blue);
  font: 500 11px/1.3 var(--mono);
  letter-spacing: 0.01em;
  cursor: pointer;
}

.cat-edit:focus {
  outline: none;
  border-bottom-color: var(--blue);
}
