:root {
  --green-950: #082a1e;
  --green-900: #0e4632;
  --green-800: #11553c;
  --green-700: #1a6749;
  --green-600: #24795a;
  --green-ok: #3f8f4f;

  --gold: #e5a24b;
  --gold-soft: #f7d79a;
  --gold-bright: #fff2cf;
  --gold-deep: #b06e22;
  --gold-ink: #8c4f18;
  --gold-matte: #c6903f;
  --on-gold: #2a1e06;

  --amber: #db7327;
  --amber-deep: #b8551a;
  --danger: #c0392b;
  --rani: #8a2a4e;

  --cream: #f6f2ea;
  --cream-2: #efe8db;
  --paper: #fffdf8;
  --line: #e3dccb;
  --line-strong: #d4cab3;

  --ink: #1c2620;
  --ink-soft: #55605a;
  --ink-faint: #8a938c;
  --on-dark: #f3eee2;
  --on-dark-soft: #c3bca9;
  --line-dark: rgba(229, 162, 75, 0.26);

  --f-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --f-serif: "Cormorant Garamond", Georgia, serif;
  --f-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 4px;
  --radius-lg: 8px;
  --shadow: 0 1px 2px rgba(8, 42, 30, 0.06), 0 2px 8px rgba(8, 42, 30, 0.05);
  --shadow-lift: 0 2px 4px rgba(8, 42, 30, 0.08), 0 10px 24px rgba(8, 42, 30, 0.1);
  --rail: 104px;
  --tap: 52px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--gold-soft);
  color: var(--ink);
}

h1,
h2,
p {
  margin: 0;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

button:disabled {
  cursor: default;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon {
  width: 22px;
  height: 22px;
  flex: none;
}

.booting,
.boot-fail {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  min-height: 100vh;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--on-dark-soft);
  background: var(--green-950);
  text-align: center;
}

.boot-fail h1 {
  font-family: var(--f-head);
  font-style: normal;
  color: var(--on-dark);
}

/* Frame */

.frame {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  height: 100vh;
  height: 100dvh;
}

.stage {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 24px 20px;
}

.rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--rail);
  min-width: var(--rail);
  box-sizing: border-box;
  background: var(--green-950);
  color: var(--on-dark);
  padding: 14px 6px max(14px, env(safe-area-inset-bottom));
  border-right: 1px solid var(--line-dark);
}

.rail-brand {
  display: grid;
  justify-items: center;
  justify-self: center;
  width: 100%;
  gap: 2px;
  padding: 4px 0 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line-dark);
}

.rail-brand img {
  width: 56px;
  height: auto;
}

.rail-brand span,
.rail-brand-name {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 11px;
  line-height: 1.2;
  color: var(--gold-soft);
  letter-spacing: 0.01em;
  text-align: center;
}

.rail-links {
  display: grid;
  gap: 6px;
  width: 100%;
  min-width: 0;
  justify-items: stretch;
}

.rail-link {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px 2px 10px;
  border-radius: var(--radius-lg);
  color: var(--on-dark-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  overflow: hidden;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.rail-link span {
  max-width: 100%;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.rail-link .icon {
  width: 26px;
  height: 26px;
}

.rail-link:active {
  background: var(--green-800);
}

.rail-link[aria-current="page"] {
  background: var(--green-800);
  color: var(--gold-soft);
  box-shadow: inset 0 0 0 1px var(--line-dark);
}

.rail-badge {
  position: absolute;
  top: 6px;
  right: 4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--on-gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 20px;
}

.rail-foot {
  margin-top: auto;
  display: grid;
  justify-items: center;
  width: 100%;
  gap: 4px;
}

.clock {
  font-family: var(--f-head);
  font-size: 19px;
  font-weight: 600;
  color: var(--on-dark);
  font-variant-numeric: lining-nums tabular-nums;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
}

.live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
}

.live.is-on::before {
  background: #6fcf86;
}

/* Shared */

.page-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.page-head h1,
.order-title h1 {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.page-action {
  margin-left: auto;
}

.floor-summary {
  color: var(--ink-soft);
  font-size: 15px;
}

.floor-summary strong {
  color: var(--gold-ink);
  font-weight: 600;
}

.empty-line {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 20px;
  color: var(--ink-faint);
  padding: 18px 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: var(--tap);
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.12s var(--ease);
}

.btn .icon {
  width: 19px;
  height: 19px;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  background: var(--cream-2);
  border-color: var(--line);
  color: var(--ink-faint);
  box-shadow: none;
}

.btn-gold {
  background: var(--gold-matte);
  border-color: var(--gold-matte);
  color: var(--on-gold);
  box-shadow: 0 1px 3px rgba(8, 42, 30, 0.18);
}

.btn-gold:active:not(:disabled) {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
}

.btn-green {
  background: var(--green-900);
  border-color: var(--green-900);
  color: var(--on-dark);
}

.btn-green:active:not(:disabled) {
  background: var(--green-950);
}

.btn-outline {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--paper);
}

.btn-quiet {
  color: var(--ink-soft);
  padding: 0 14px;
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--radius);
  color: var(--ink-soft);
}

.icon-btn .icon {
  width: 20px;
  height: 20px;
}

.icon-btn:active {
  background: var(--cream-2);
}

.chip {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.chip.is-on {
  background: var(--green-900);
  border-color: var(--green-900);
  color: var(--gold-soft);
}

.pills {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill-new {
  background: var(--gold-soft);
  color: var(--gold-ink);
}

.pill-in_prep {
  background: #f8dcc6;
  color: var(--amber-deep);
}

.pill-served {
  background: #d7ead9;
  color: #24603a;
}

.pill-paid {
  background: var(--ink);
  color: var(--on-dark);
}

.pill-part {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--gold-matte);
  color: var(--gold-ink);
}

.pill-void {
  background: var(--cream-2);
  color: var(--ink-faint);
}

.pill-due {
  background: var(--gold-matte);
  color: var(--on-gold);
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: var(--ink-faint);
}

.dot-new {
  background: var(--gold);
}

.dot-in_prep {
  background: var(--amber);
}

.dot-served {
  background: var(--green-ok);
}

.type-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px 0 7px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid currentColor;
}

.type-tag .icon {
  width: 15px;
  height: 15px;
}

.type-dine_in {
  color: var(--green-700);
}

.type-takeaway {
  color: var(--amber-deep);
}

.type-delivery {
  color: var(--rani);
}

/* Service floor */

.floor,
.pass,
.takings,
.bookings,
.discounts,
.order {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.seg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px 0 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.seg b {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--cream-2);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0;
  line-height: 22px;
  text-align: center;
}

.seg[aria-selected="true"] {
  background: var(--green-900);
  color: var(--gold-soft);
}

.seg[aria-selected="true"] b {
  background: var(--gold);
  color: var(--on-gold);
}

.floor > .floor-summary {
  margin: -4px 0 14px;
}

.plates {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(170px, 1fr));
  gap: 14px;
}

.plate {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding: 14px 16px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
  min-width: 0;
}

.plate:active {
  transform: scale(0.985);
}

.plate-no {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 56px;
  line-height: 0.95;
  font-variant-numeric: lining-nums;
}

.plate.is-free {
  justify-content: space-between;
  border-style: dashed;
  border-color: var(--line-strong);
  background: transparent;
  box-shadow: none;
  color: var(--ink-faint);
}

.plate.is-free .plate-no {
  color: var(--ink-soft);
}

.plate-state {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.plate.is-seated {
  background: var(--green-900);
  border-color: var(--green-800);
  color: var(--on-dark);
}

.plate.is-seated .plate-no {
  color: var(--gold-soft);
}

.plate.is-due {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold), var(--shadow-lift);
}

.plate-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
}

.plate-depts {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding-top: 10px;
  font-size: 13px;
  color: var(--on-dark-soft);
}

.plate-dept {
  display: flex;
  align-items: center;
  gap: 7px;
}

.plate-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-dark);
  font-size: 13px;
  color: var(--on-dark-soft);
}

.plate-foot strong {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 20px;
  color: var(--gold-soft);
  font-variant-numeric: lining-nums tabular-nums;
}

.empty-state {
  flex: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

.empty-icon {
  width: 44px;
  height: 44px;
  color: var(--gold-matte);
}

.offsite-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  align-content: start;
  gap: 14px;
  padding-bottom: 8px;
}

.offsite {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  text-align: left;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--green-900);
  color: var(--on-dark);
  border: 1px solid var(--green-800);
  box-shadow: var(--shadow);
  min-height: 190px;
}

.offsite.is-ready {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold), var(--shadow-lift);
}

.offsite-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.offsite-no {
  font-family: var(--f-head);
  font-size: 18px;
  color: var(--gold-soft);
  font-variant-numeric: lining-nums;
}

.offsite-name {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.15;
  margin-top: 4px;
}

.offsite-meta {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 14px;
  color: var(--on-dark-soft);
}

.offsite-meta .icon {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--gold);
}

.offsite-address {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.offsite-address .icon {
  display: inline-block;
  vertical-align: -3px;
  margin-right: 6px;
}

.offsite .plate-foot {
  margin-top: auto;
}

/* Order screen */

.order-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: var(--tap);
  padding: 0 16px 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--paper);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.order-title {
  min-width: 0;
  flex: 1;
}

.order-title h1 {
  font-size: 28px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 14px;
}

.order-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.order-meta > span .icon {
  width: 16px;
  height: 16px;
  color: var(--gold-ink);
}

.composer {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr) 352px;
  gap: 16px;
}

.cats {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 2px;
}

.cat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-ink);
  padding: 8px 12px 4px;
}

.cat-label:not(:first-child) {
  margin-top: 8px;
}

.cat {
  min-height: 48px;
  padding: 8px 12px;
  border-radius: var(--radius);
  text-align: left;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.2;
  color: var(--ink);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.cat:active {
  background: var(--cream-2);
}

.cat[aria-current="true"] {
  background: var(--green-900);
  color: var(--gold-soft);
  font-weight: 600;
}

.menu {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.menu-tools {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.search,
.note {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 180px;
}

.search .icon {
  position: absolute;
  left: 13px;
  width: 19px;
  height: 19px;
  color: var(--ink-faint);
  pointer-events: none;
}

.search input,
.note input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 15px;
}

.search input {
  padding-left: 40px;
}

.search input::placeholder,
.note input::placeholder {
  color: var(--ink-faint);
}

.search input:focus,
.note input:focus,
.form input:focus,
.form textarea:focus,
.form select:focus,
.tender input:focus {
  outline: none;
  border-color: var(--gold-matte);
  box-shadow: 0 0 0 3px rgba(229, 162, 75, 0.3);
}

.spice {
  display: flex;
  gap: 6px;
}

.menu-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 4px 12px 0;
}

.group-title {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 19px;
  padding: 10px 0 8px;
}

.group-title:first-child {
  padding-top: 2px;
}

.dishes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.dish {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-height: 104px;
  padding: 12px 14px 11px;
  text-align: left;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: transform 0.12s var(--ease), border-color 0.15s var(--ease);
}

.dish:active {
  transform: scale(0.97);
  border-color: var(--gold-matte);
}

.dish-name {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  padding-right: 22px;
}

.dish-detail {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dish-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 4px;
}

.dish-price {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 17px;
  color: var(--gold-ink);
  font-variant-numeric: lining-nums tabular-nums;
}

.marks {
  display: inline-flex;
  gap: 4px;
}

.mark {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 5px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid currentColor;
}

.mark-V,
.mark-Ve {
  color: var(--green-700);
}

.mark-S {
  color: var(--danger);
}

.mark-opt {
  color: var(--ink-soft);
  border-color: var(--line-strong);
  font-weight: 500;
}

.dish-count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 14px;
  background: var(--green-900);
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 600;
  line-height: 28px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--cream);
}

/* Ticket */

.ticket {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}

.ticket-depts {
  display: grid;
  gap: 8px;
  padding: 14px 16px 12px;
  background: var(--green-950);
  color: var(--on-dark);
}

.dept {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dept-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.dept-name .icon {
  width: 18px;
  height: 18px;
}

.steps {
  display: flex;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(243, 238, 226, 0.45);
  background: rgba(243, 238, 226, 0.06);
}

.steps li.done {
  color: var(--on-dark-soft);
}

.steps li.now {
  background: var(--gold);
  color: var(--on-gold);
}

.steps-none {
  font-size: 12px;
  color: rgba(243, 238, 226, 0.45);
}

.ticket-lines {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 8px 8px 16px;
}

.round {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 12px 0 4px;
}

.round-new {
  color: var(--gold-ink);
}

.line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.line:last-child {
  border-bottom: 0;
}

.line-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
  padding-top: 3px;
}

.line-name {
  font-weight: 500;
  line-height: 1.3;
}

.line-name em {
  font-style: normal;
  color: var(--ink-soft);
}

.line-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}

.line-price {
  padding-top: 3px;
  font-weight: 600;
  white-space: nowrap;
}

.line.is-draft .line-name {
  color: var(--ink);
}

.qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.qty .icon-btn {
  border: 1px solid var(--line-strong);
  background: var(--paper);
}

.qty > span {
  min-width: 28px;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
}

.ticket-foot {
  display: grid;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  background: var(--cream);
}

.total-row,
.sub-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.total-row span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.total-row strong {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 30px;
  font-variant-numeric: lining-nums tabular-nums;
}

.sub-row {
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: -4px;
}

.hint {
  font-size: 13px;
  color: var(--ink-soft);
}

.foot-row {
  display: flex;
  gap: 8px;
}

.foot-row .btn-green {
  flex: 1;
}

/* Pass */

.board {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.column {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--cream-2);
  border: 1px solid var(--line);
}

.column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.column h2 {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 20px;
}

.column > header span {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  text-align: center;
  line-height: 28px;
  font-weight: 600;
}

.column-new > header span {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
  color: var(--gold-ink);
}

.column-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 12px;
}

.tk {
  display: grid;
  gap: 8px;
  padding: 12px 12px 12px;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.tk.is-late {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger), var(--shadow);
}

.tk.is-late .tk-age {
  background: var(--danger);
  color: #fff;
}

.tk-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.tk-table {
  display: grid;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 44px;
  line-height: 0.95;
  font-variant-numeric: lining-nums;
}

.tk-table small {
  font-family: var(--f-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 2px;
}

.tk-name {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.15;
  min-width: 0;
  overflow-wrap: anywhere;
}

.tk-side {
  display: grid;
  justify-items: end;
  gap: 4px;
  flex: none;
}

.tk-no {
  font-size: 12px;
  color: var(--ink-soft);
}

.tk-age {
  padding: 2px 8px;
  border-radius: var(--radius);
  background: var(--cream-2);
  font-weight: 600;
  font-size: 13px;
}

.tk-lines {
  display: grid;
  gap: 6px;
}

.tk-line {
  display: flex;
  align-items: stretch;
  gap: 4px;
}

.tk-item {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
  text-align: left;
  font-weight: 500;
}

.tk-item:active:not(:disabled) {
  background: var(--cream-2);
}

.tk-item.is-served {
  color: var(--ink-faint);
  background: var(--cream);
}

.tk-item.is-served .tk-text {
  text-decoration: line-through;
  text-decoration-color: var(--line-strong);
}

.tk-text {
  min-width: 0;
}

.tk-text small {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-ink);
}

.tk-note {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--amber-deep);
}

.tk-also {
  font-size: 13px;
  color: var(--ink-soft);
}

/* Takings */

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr;
  gap: 14px;
  margin-bottom: 18px;
}

.stat {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px 12px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.stat .icon {
  grid-row: span 2;
  width: 30px;
  height: 30px;
  color: var(--gold-ink);
}

.stat span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.stat strong {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.1;
  font-variant-numeric: lining-nums tabular-nums;
}

.stat-total {
  grid-template-columns: 1fr;
  background: var(--green-900);
  border-color: var(--green-800);
  color: var(--on-dark);
}

.stat-total span {
  color: var(--gold-soft);
}

.stat-total strong {
  color: var(--gold-soft);
  font-size: 38px;
}

.stat-total small {
  font-size: 13px;
  color: var(--on-dark-soft);
}

.ledgers {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.ledgers h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 21px;
  margin-bottom: 10px;
}

.ledgers h2 span {
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.rows {
  display: grid;
  gap: 8px;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 10px 14px;
  text-align: left;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
}

.row:disabled {
  color: inherit;
}

.row-name {
  display: grid;
  min-width: 0;
}

.row-name strong {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-name small {
  font-size: 13px;
  color: var(--ink-soft);
}

.row-total {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 18px;
  min-width: 76px;
  text-align: right;
  font-variant-numeric: lining-nums tabular-nums;
}

/* Bookings */

.booking-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.15fr);
  gap: 20px;
}

.calendar-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  align-self: start;
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.cal-nav h2 {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 24px;
  text-align: center;
}

.cal-next {
  transform: scaleX(-1);
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-cell {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 64px;
  padding: 8px 4px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--cream);
  color: var(--ink);
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.cal-cell.is-empty {
  background: transparent;
  min-height: 64px;
}

.cal-day {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
}

.cal-count {
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--gold-matte);
  color: var(--on-gold);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
}

.cal-count.is-blank {
  background: transparent;
  color: transparent;
}

.cal-cell.has-bookings {
  background: #fff8ea;
  border-color: rgba(198, 144, 63, 0.35);
}

.cal-cell.is-today .cal-day {
  color: var(--green-800);
}

.cal-cell.is-selected {
  background: var(--green-900);
  border-color: var(--green-900);
  color: var(--on-dark);
}

.cal-cell.is-selected .cal-day,
.cal-cell.is-selected.is-today .cal-day {
  color: var(--gold-bright);
}

.cal-cell.is-selected .cal-count {
  background: var(--gold);
}

.cal-cell:active:not(.is-empty) {
  transform: scale(0.98);
}

.booking-day {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 12px;
  align-content: start;
}

.booking-empty {
  min-height: 280px;
}

.booking-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.booking-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.booking-time {
  font-family: var(--f-head);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  color: var(--green-900);
  font-variant-numeric: lining-nums tabular-nums;
}

.booking-party {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
}

.booking-party .icon {
  width: 18px;
  height: 18px;
}

.booking-name {
  font-family: var(--f-head);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px;
}

.booking-source {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 8px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--cream-2);
  color: var(--green-800);
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  vertical-align: middle;
}

.booking-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 14px;
}

.booking-meta .icon {
  width: 16px;
  height: 16px;
}

.booking-notes {
  margin-top: 8px;
  color: var(--ink);
  font-size: 15px;
}

.booking-actions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.sheet-booking {
  width: min(640px, 100%);
}

.dish-price s,
.discount-prices s,
.option strong s {
  color: var(--ink-faint);
  font-weight: 500;
  margin-right: 6px;
}

.dish-off {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gold-bright);
  color: var(--gold-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.discount-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  margin-bottom: 16px;
  background: var(--green-900);
  color: var(--on-dark);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.discount-banner-copy h2 {
  font-family: var(--f-head);
  font-size: 24px;
  font-weight: 600;
  color: var(--gold-soft);
}

.discount-banner-copy p {
  margin-top: 4px;
  color: var(--on-dark-soft);
  font-size: 14px;
}

.discount-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.discount-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.discount-field input {
  width: 64px;
  min-height: 48px;
  border: 0;
  background: transparent;
  font-family: var(--f-head);
  font-size: 24px;
  font-weight: 600;
  text-align: right;
}

.discount-field span {
  font-weight: 700;
  color: var(--ink-soft);
}

.discount-field-lg {
  background: var(--paper);
  border-color: transparent;
}

.discount-field-lg input {
  width: 78px;
  color: var(--green-900);
}

.discount-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.discount-cats {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  max-width: 100%;
}

.discount-search {
  width: min(280px, 100%);
}

.discount-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 8px;
  align-content: start;
}

.discount-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.discount-row.is-on {
  border-color: rgba(198, 144, 63, 0.45);
  background: #fff8ea;
}

.discount-copy h3 {
  margin: 0;
  font-family: var(--f-head);
  font-size: 18px;
  font-weight: 600;
}

.discount-copy p {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.discount-prices {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 96px;
  font-variant-numeric: lining-nums tabular-nums;
}

.discount-prices strong {
  font-family: var(--f-head);
  font-size: 18px;
  color: var(--gold-ink);
}

.discount-spacer {
  width: 132px;
}

/* Sheets */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 42, 30, 0.55);
  animation: fade 0.18s var(--ease-out);
}

.sheet {
  width: min(520px, 100%);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 26px 28px 24px;
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: 0 24px 60px rgba(8, 42, 30, 0.35);
  animation: rise 0.22s var(--ease-out);
}

.sheet h2 {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.15;
}

.sheet-sub {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.sheet-text {
  color: var(--ink-soft);
  margin-top: 8px;
}

.sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.form label,
.tender {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.form input,
.form textarea,
.form select {
  width: 100%;
  height: 52px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  resize: none;
  box-sizing: border-box;
}

.form textarea {
  height: auto;
  min-height: 96px;
}

.form input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.form input[type="number"]::-webkit-outer-spin-button,
.form input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.form select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.optional {
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ink-faint);
}

.form-error {
  color: var(--danger);
  font-weight: 500;
}

.addr-suggestions:empty {
  display: none;
}

.addr-suggestions {
  margin-top: 8px;
}

.addr-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 264px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.addr-list li + li {
  border-top: 1px solid var(--line);
}

.addr-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: var(--tap);
  padding: 8px 14px;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  font-size: 16px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.addr-option .icon {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--gold-deep);
}

.addr-option:active,
.addr-option:focus-visible {
  background: var(--gold-bright);
  outline: none;
}

.addr-hint {
  margin: 0 2px;
  font-size: 14px;
  color: var(--ink-soft);
}

.form .sheet-actions {
  margin-top: 6px;
}

.options {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 17px;
  font-weight: 500;
}

.option strong {
  font-family: var(--f-head);
  font-weight: 600;
  color: var(--gold-ink);
  font-variant-numeric: lining-nums tabular-nums;
}

.option:active {
  border-color: var(--gold-matte);
  background: var(--gold-bright);
}

.due {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 46px;
  line-height: 1.1;
  margin-top: 6px;
  font-variant-numeric: lining-nums tabular-nums;
}

.receipt {
  list-style: none;
  margin: 12px 0 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-height: 168px;
  overflow-y: auto;
  font-size: 14px;
}

.receipt li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
}

.paid-list {
  max-height: 110px;
}

.paid-list li span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.paid-list .icon {
  width: 16px;
  height: 16px;
  color: var(--gold-deep);
}

.sub-row-disc {
  color: var(--gold-ink);
}

.receipt-discount {
  color: var(--gold-ink);
  font-weight: 600;
}

.foot-row-quiet .btn {
  flex: 1;
}

.sub-row-owed {
  color: var(--ink);
  margin-top: 0;
}

.sub-row-owed strong {
  font-family: var(--f-head);
  font-size: 20px;
  font-variant-numeric: lining-nums tabular-nums;
}

.method:disabled {
  opacity: 0.4;
}

.methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.method {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 22px 12px;
  border-radius: var(--radius-lg);
  background: var(--green-900);
  color: var(--gold-soft);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.method .icon {
  width: 34px;
  height: 34px;
}

.method:active {
  background: var(--green-950);
}

.tender {
  margin-top: 18px;
}

.tender-field {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  padding-left: 14px;
}

.tender-field span {
  font-family: var(--f-head);
  font-size: 24px;
  color: var(--ink-soft);
}

.tender-field input {
  flex: 1;
  min-width: 0;
  min-height: 58px;
  padding: 0 14px 0 6px;
  border: 0;
  background: transparent;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
}

.tender-field:focus-within {
  border-color: var(--gold-matte);
  box-shadow: 0 0 0 3px rgba(229, 162, 75, 0.3);
}

.tender-field input:focus {
  box-shadow: none;
}

.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.change {
  margin-top: 14px;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 22px;
  color: var(--green-700);
}

.approved {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 36px;
  color: var(--green-700);
  margin-top: 4px;
}

.approved .icon {
  width: 38px;
  height: 38px;
}

.toast {
  position: fixed;
  left: calc(50% + var(--rail) / 2);
  bottom: 24px;
  z-index: 30;
  transform: translateX(-50%);
  max-width: min(560px, calc(100vw - var(--rail) - 48px));
  padding: 14px 22px;
  border-radius: var(--radius);
  background: var(--green-950);
  color: var(--on-dark);
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(8, 42, 30, 0.3);
  animation: rise 0.22s var(--ease-out);
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.toast {
  animation-name: toast-in;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
}

/* Smaller landscape tablets */

@media (max-width: 1100px) {
  :root {
    --rail: 96px;
  }

  .rail-link {
    font-size: 9.5px;
    letter-spacing: 0.03em;
  }

  .stage {
    padding: 16px 16px 16px;
  }

  .composer {
    grid-template-columns: 150px minmax(0, 1fr) 316px;
    gap: 12px;
  }

  .dishes {
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  }

  .search {
    flex-basis: 100%;
  }

  .note {
    flex-basis: 140px;
  }

  .spice .chip {
    padding: 0 12px;
  }

  .plate-no {
    font-size: 48px;
  }

  .seg {
    padding: 0 14px 0 12px;
  }

  .steps li {
    padding: 4px 6px;
    font-size: 10.5px;
  }
}

@media (max-height: 800px) {
  .page-head {
    margin-bottom: 12px;
  }

  .page-head h1 {
    font-size: 28px;
  }

  .plates {
    grid-template-rows: repeat(2, minmax(150px, 1fr));
  }

  .cat {
    min-height: 44px;
    padding: 6px 12px;
  }

  .cat-label {
    padding-top: 4px;
  }
}

/* PIN lock */

.lock {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
  background: var(--green-950);
  color: var(--on-dark);
}

.lock-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(340px, 100%);
  text-align: center;
}

.lock-card img {
  width: 72px;
  height: auto;
}

.lock-card h1 {
  font-family: var(--f-head);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--gold-soft);
}

.lock-sub {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 20px;
  color: var(--on-dark-soft);
}

.pin-dots {
  display: flex;
  gap: 18px;
  margin: 12px 0 4px;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  transition: background 0.12s var(--ease);
}

.pin-dot.is-filled {
  background: var(--gold);
}

.pin-dots.is-error {
  animation: pin-shake 0.32s var(--ease);
}

@keyframes pin-shake {
  25% {
    transform: translateX(-8px);
  }
  75% {
    transform: translateX(8px);
  }
}

.lock-error {
  min-height: 24px;
  font-size: 15px;
  font-weight: 500;
  color: #ffb4a8;
}

.pinpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}

.pin-key {
  display: grid;
  place-items: center;
  height: 68px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  background: var(--green-900);
  color: var(--on-dark);
  font-family: var(--f-head);
  font-size: 28px;
  font-weight: 600;
  font-variant-numeric: lining-nums;
  transition: background 0.12s var(--ease);
}

.pin-key:active:not(:disabled) {
  background: var(--green-700);
}

.pin-key:disabled {
  opacity: 0.45;
}

.pin-key-back {
  background: transparent;
  border-color: transparent;
  color: var(--on-dark-soft);
}

.pin-key-back .icon {
  width: 28px;
  height: 28px;
}

.rail-links {
  min-height: 0;
  overflow-y: auto;
}

.rail-lock {
  display: grid;
  justify-items: center;
  gap: 3px;
  width: 100%;
  padding: 8px 2px;
  border-radius: var(--radius-lg);
  color: var(--on-dark-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rail-lock:active {
  background: var(--green-800);
}

@media (max-height: 700px) {
  .rail-link {
    gap: 3px;
    padding: 8px 2px 7px;
  }

  .rail-brand {
    padding-bottom: 8px;
  }

  .pin-key {
    height: 56px;
  }

  .lock-card img {
    display: none;
  }
}

/* Portrait or narrow fallback */

@media (max-width: 860px) {
  body {
    overflow: auto;
  }

  .frame {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: auto;
    min-height: 100dvh;
  }

  .rail {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .rail-brand {
    border: 0;
    padding: 0;
    margin: 0;
  }

  .rail-brand img {
    width: 44px;
  }

  .rail-brand span,
  .rail-brand-name {
    display: none;
  }

  .rail-links {
    grid-auto-flow: column;
    flex: 1;
  }

  .rail-foot {
    margin: 0;
  }

  .composer {
    grid-template-columns: 1fr;
  }

  .cats {
    flex-direction: row;
    overflow-x: auto;
  }

  .cat-label {
    display: none;
  }

  .cat {
    white-space: nowrap;
  }

  .plates {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: none;
  }

  .board,
  .ledgers,
  .stats,
  .booking-layout,
  .form-row,
  .discount-banner,
  .discount-row {
    grid-template-columns: 1fr;
  }

  .booking-card {
    grid-template-columns: 1fr;
  }

  .booking-actions {
    grid-auto-flow: column;
    justify-content: start;
  }

  .discount-prices {
    justify-items: start;
  }

  .discount-spacer {
    display: none;
  }

  .toast {
    left: 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
