.desk-version {
  position: fixed;
  right: 4px;
  bottom: 2px;
  z-index: 2147483000;
  font-size: 9px;
  line-height: 1;
  color: #5D3418;
  opacity: 0.6;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/* ===== 20261127h: every popup fits the Toast / iPhone viewport, centered, opaque ===== */
button.faded-tile {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  text-align: inherit;
  margin: 0;
  cursor: pointer;
}
.item-preview {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 4vw;
  box-sizing: border-box;
  pointer-events: none;
}
.item-preview-back {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(20, 12, 6, 0.55);
  pointer-events: auto;
}
.item-preview-panel {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  width: min(420px, 92vw);
  max-width: 92vw;
  max-height: 90vh;
  overflow: hidden;
  background: #fffdf8;
  border-radius: 18px;
  padding: 0;
  padding-top: 44px;
  box-shadow: 0 16px 40px rgba(20, 10, 0, 0.3);
  box-sizing: border-box;
}
.item-preview-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 8px;
}
.item-preview-media {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.item-preview-media img,
.item-preview-media video {
  max-width: 100%;
  max-height: 35vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: transparent;
}
.item-preview-title {
  margin: 0 0 8px;
  padding-right: 36px;
}
.item-preview-container {
  margin: 8px 0 0;
}
.item-preview-actions {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
  padding: 10px 16px 16px;
  background: #fffdf8;
  position: sticky;
  bottom: 0;
  z-index: 3;
  box-shadow: 0 -8px 16px rgba(255, 253, 248, 0.9);
}
.item-preview-actions .item-preview-add {
  grid-column: 1 / -1;
  min-height: 56px;
  font-size: 1.2rem;
  font-weight: 900;
  background: #1b7a32;
  color: #fff;
  border: 2px solid var(--ink);
}
.item-preview-actions .item-preview-add.hidden,
.item-preview-actions .item-preview-add[hidden] {
  display: none !important;
}
.item-preview-x {
  z-index: 4;
  pointer-events: auto;
}

.confirm-back {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 4vw;
  box-sizing: border-box;
  background: rgba(34, 24, 16, 0.55);
  pointer-events: auto;
}
.confirm-dialog {
  width: min(440px, 92vw);
  max-width: 92vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--paper, #fffdf8);
  box-sizing: border-box;
}
.confirm-dialog h2,
.confirm-dialog p {
  flex: 0 1 auto;
}
.confirm-actions {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  background: var(--paper, #fffdf8);
  padding-top: 8px;
}

.qty-dialpad {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5vh 4vw;
  box-sizing: border-box;
  pointer-events: none;
}
.qty-dialpad-sheet {
  width: min(520px, 92vw);
  max-width: 92vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  padding: 8px 14px 10px;
  box-sizing: border-box;
  pointer-events: auto;
}
.qty-dialpad-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.qty-dialpad-tools {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 8px;
  z-index: 2;
}

.name-picker {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 4vw;
  box-sizing: border-box;
}
.name-picker-panel {
  width: min(480px, 92vw);
  max-width: 92vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fffdf8;
  border-radius: 16px;
  padding: 0;
  box-sizing: border-box;
}
.name-picker-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px 8px;
}
.name-picker-actions {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  background: #fffdf8;
  margin: 0;
  padding: 10px 16px calc(16px + var(--safe-bot, 0px));
}

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 4vw;
  box-sizing: border-box;
  background: rgba(40, 40, 40, 0.45);
}
.modal {
  width: min(560px, 92vw);
  max-width: 92vw;
  max-height: 90vh;
  overflow: auto;
  background: var(--white, #fff);
  box-sizing: border-box;
}

.dofirst-picker {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 4vw;
  box-sizing: border-box;
}
.dofirst-picker-panel {
  width: min(1100px, 92vw);
  max-width: 92vw;
  max-height: 90vh;
  background: #fffdf8;
}

body.qr-checkoff-only .item-preview-add {
  display: none !important;
}

/* patsdesk 20261125g2: Amount button next to Add card, both big and solid. */
.item-preview-actions .item-preview-amount {
  grid-column: 1 / -1;
  min-height: 52px;
  font-size: 1.1rem;
  font-weight: 900;
}
.item-preview-actions .item-preview-amount.hidden,
.item-preview-actions .item-preview-amount[hidden] {
  display: none !important;
}
.item-preview-actions .btn {
  opacity: 1;
}
.item-preview-actions .btn:disabled,
.item-preview-actions .btn[aria-disabled="true"] {
  opacity: 0.58;
}
