/* Racha Bar — mobile first, fundo claro quente, ações em laranja vivo. */

:root {
  /* Paleta da marca: verde #163D32 · amarelo #F4C542 · creme #F7F0DF · laranja #D9633B */
  --brand-green: #163d32;
  --brand-yellow: #f4c542;
  --brand-cream: #f7f0df;
  --brand-orange: #d9633b;

  --bg: var(--brand-cream);
  --bg-deep: #ede2c6;
  --surface: #fffaee;
  --paper: #fffcf5;
  --ink: var(--brand-green);
  --ink-2: #33524a;
  --muted: #5e6a60;
  --line: #e4d8bb;
  --line-strong: #cdbd96;
  --on-ink-muted: #c9d3c8;
  /* laranja um tom abaixo nos fundos de botão para o texto branco ter contraste AA */
  --accent: #c4532d;
  --accent-press: #b84a26;
  --accent-text: #b84a26;
  --accent-soft: #f9dccf;
  --beer: var(--brand-yellow);
  --beer-deep: #d9a92a;
  --beer-ink: var(--brand-green);
  --ok: #2a7347;
  --ok-soft: #dcecdf;
  --warn: #9a4a12;
  --warn-soft: #fbe4c8;
  --credit: #1f5f8b;
  --credit-soft: #dbe9f3;
  --danger: #b3261e;
  --whats: var(--brand-green);
  --whats-press: #0f2e25;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 0 rgba(22, 61, 50, 0.05), 0 8px 24px -12px rgba(22, 61, 50, 0.28);
  --font-display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --dock-h: 84px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 100% 0%, #fbe7b8 0%, transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body.has-sheet {
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.i {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.muted {
  color: var(--muted);
  font-weight: 400;
}

.app {
  max-width: 520px;
  margin: 0 auto;
}

.screen {
  padding: 16px 16px calc(40px + var(--safe-b));
}

body[data-route='mesa'] .screen {
  padding-bottom: calc(var(--dock-h) + 32px + var(--safe-b));
}

/* ------------------------------------------------------------ tipografia */

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.section-title {
  margin: 28px 4px 10px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-2);
}

.hint {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.hint.tight {
  margin-top: 6px;
  font-size: 13px;
}

.hint.pad {
  margin: 0 4px 14px;
}

.hint b {
  color: var(--ink-2);
}

.empty-hint {
  margin: 18px 4px;
  padding: 16px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

.empty-hint b {
  color: var(--ink-2);
}

/* ------------------------------------------------------------ botões */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.1;
  text-align: center;
  transition: transform 0.08s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.block {
  width: 100%;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px -8px var(--accent);
}

.btn.primary:hover {
  background: var(--accent-press);
}

.btn.secondary {
  background: var(--ink);
  color: var(--surface);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.5);
}

.btn.danger {
  background: var(--danger);
  color: #fff;
}

.btn.beer {
  background: var(--beer);
  color: var(--beer-ink);
  box-shadow: inset 0 -3px 0 var(--beer-deep);
}

.btn.beer:hover {
  background: #f7d06a;
}

.btn.whats {
  background: var(--whats);
  color: #fff;
}

.btn.whats:hover {
  background: var(--whats-press);
}

.btn.small {
  min-height: 42px;
  padding: 0 14px;
  font-size: 14px;
}

.btn.small .i {
  width: 18px;
  height: 18px;
}

.btn.tiny {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  background: var(--ink);
  color: var(--surface);
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--accent-text);
  font-weight: 700;
  font-size: 15px;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.link-btn.small {
  min-height: 32px;
  font-size: 14px;
}

.link-btn.danger {
  color: var(--danger);
  justify-content: center;
  width: 100%;
  margin-top: 8px;
}

.link-btn .i {
  width: 18px;
  height: 18px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line);
  color: var(--ink);
}

.icon-btn.small {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: transparent;
}

.icon-btn.small .i {
  width: 19px;
  height: 19px;
}

.icon-btn-spacer {
  width: 46px;
  flex: none;
}

/* ------------------------------------------------------------ topo */

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.topbar-text {
  flex: 1;
  min-width: 0;
  text-align: center;
}

/* ------------------------------------------------------------ início */

.home {
  padding-top: 28px;
}

.brand img {
  display: block;
  width: min(230px, 62vw);
  height: auto;
}

.hero {
  margin: 36px 0 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(38px, 11vw, 52px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero em {
  font-style: normal;
  color: var(--brand-orange);
}

.lede {
  margin: 0 0 28px;
  max-width: 34ch;
  font-size: 17px;
  color: var(--ink-2);
}

.continue {
  display: grid;
  gap: 4px;
  width: 100%;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--surface);
  text-align: left;
  box-shadow: var(--shadow);
}

.continue-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--beer);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--beer);
  box-shadow: 0 0 0 0 rgba(244, 197, 66, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px rgba(244, 197, 66, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(244, 197, 66, 0);
  }
}

.continue-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 24px;
}

.continue-meta {
  font-size: 14px;
  color: var(--on-ink-muted);
}

.choices {
  display: grid;
  gap: 12px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line), var(--shadow);
  text-align: left;
  transition: transform 0.08s ease;
}

.choice:active {
  transform: scale(0.98);
}

.choice-main {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px -12px var(--accent);
}

.choice-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 14px;
  background: var(--beer);
  color: var(--beer-ink);
}

.choice-icon .i {
  width: 28px;
  height: 28px;
}

.choice-icon.alt {
  background: var(--bg-deep);
  color: var(--ink);
}

.choice-main .choice-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.choice-text {
  display: grid;
  gap: 2px;
  flex: 1;
}

.choice-text strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.choice-text small {
  font-size: 14px;
  opacity: 0.85;
}

.choice-chev {
  opacity: 0.6;
}

.home .link-btn {
  margin-top: 18px;
}

.footnote {
  margin: 28px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.notice {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--warn-soft);
  color: var(--warn);
}

.notice strong {
  color: var(--ink);
}

.notice p {
  margin: 4px 0 10px;
  font-size: 14px;
  color: var(--ink-2);
}

.notice-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------ cartões / formulários */

.card {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line), var(--shadow);
}

.card-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
}

.form-card {
  display: grid;
  gap: 14px;
}

.form-card .hint {
  margin-top: -6px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field > span:first-child,
.field legend span {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}

.field legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  margin-bottom: 6px;
}

.field input,
.money-input,
.pct-input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  font-size: 18px;
}

.field input:focus,
.money-input:focus-within,
.pct-input:focus-within {
  outline: none;
  box-shadow: inset 0 0 0 2.5px var(--accent);
}

.money-input,
.pct-input {
  display: flex;
  align-items: center;
  gap: 6px;
}

.money-input b,
.pct-input b {
  color: var(--muted);
  font-weight: 600;
}

.money-input input,
.pct-input input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 19px;
}

.money-input input:focus,
.pct-input input:focus {
  outline: none;
  box-shadow: none;
}

.field.inline {
  grid-template-columns: 1fr 120px;
  align-items: center;
  margin-top: 14px;
}

.pct-input.mini {
  display: inline-flex;
  width: 74px;
  min-height: 36px;
  padding: 0 8px;
  vertical-align: middle;
  font-size: 15px;
}

.pct-input.mini input {
  min-height: 34px;
  font-size: 15px;
  text-align: right;
}

.field-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f9ddd8;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.stepper {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 4px;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}

.stepper button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 9px;
  background: var(--bg-deep);
}

.stepper button:disabled {
  opacity: 0.35;
}

.stepper output {
  min-width: 44px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 20px;
}

.form-card .stepper {
  width: 180px;
}

.segmented {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--bg-deep);
}

.segmented button {
  min-height: 46px;
  padding: 0 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink-2);
}

.segmented button[aria-checked='true'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(22, 61, 50, 0.15);
}

.sub-fields {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.sub-fields .hint {
  margin-top: -4px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--ink-2);
}

.check > input {
  width: 22px;
  height: 22px;
  flex: none;
  accent-color: var(--accent);
}

/* ------------------------------------------------------------ comanda */

.total-card {
  position: sticky;
  top: 8px;
  z-index: 5;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--surface);
  box-shadow: 0 14px 30px -18px rgba(14, 40, 33, 0.8);
}

.total-card .eyebrow {
  color: var(--beer);
}

.total-value {
  margin: 2px 0 2px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.total-break {
  margin: 0;
  font-size: 14px;
  color: var(--on-ink-muted);
}

.total-split {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 250, 240, 0.25);
  font-size: 14px;
  color: var(--on-ink-muted);
}

.total-split b {
  font-family: var(--font-mono);
  color: var(--surface);
}

.price-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin: 14px 0 4px;
  padding: 0 14px 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--beer);
  color: var(--beer-ink);
  font-size: 14px;
}

.price-chip .i {
  width: 20px;
  height: 20px;
}

.price-chip b {
  font-family: var(--font-mono);
}

.price-chip u {
  text-underline-offset: 3px;
  font-weight: 700;
}

.people {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.person {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line), var(--shadow);
}

.person.is-left {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.person.is-left .person-name {
  color: var(--ink-2);
}

.person.bump {
  animation: bump 0.35s ease;
}

@keyframes bump {
  40% {
    transform: scale(1.02);
    box-shadow: inset 0 0 0 2px var(--beer), 0 10px 30px -12px var(--beer-deep);
  }
}

.person-top {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    'name amount'
    'badge amount';
  align-items: center;
  column-gap: 12px;
  row-gap: 4px;
}

.person-name {
  grid-area: name;
  margin: 0;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-amount {
  grid-area: amount;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 20px;
}

.person-top .badge {
  grid-area: badge;
  justify-self: start;
}

.person-items {
  margin: 8px 0 14px;
  font-size: 14px;
  color: var(--ink-2);
}

.person-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.person-actions .btn {
  min-height: 50px;
  padding: 0 10px;
  font-size: 15px;
}

.person-actions .btn .i {
  width: 20px;
  height: 20px;
}

.person-actions .btn.beer {
  font-size: 17px;
}

.person-actions .btn:only-child {
  grid-column: span 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.idle {
  background: var(--bg-deep);
  color: var(--muted);
}

.badge.open {
  background: var(--accent-soft);
  color: var(--accent-press);
}

.badge.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge.credit {
  background: var(--credit-soft);
  color: var(--credit);
}

.dock {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--safe-b));
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 8px;
  width: calc(100% - 24px);
  max-width: 496px;
  padding: 8px;
  border-radius: 22px;
  background: rgba(22, 61, 50, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -16px rgba(14, 40, 33, 0.7);
  transform: translateX(-50%);
}

.dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 60px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: var(--surface);
  font-size: 13px;
  font-weight: 700;
}

.dock-btn:active {
  background: rgba(255, 255, 255, 0.08);
}

.dock-btn.main {
  flex-direction: row;
  gap: 6px;
  background: var(--accent);
  font-size: 17px;
}

.dock-btn.main .i {
  width: 24px;
  height: 24px;
  stroke-width: 2.6;
}

/* ------------------------------------------------------------ comanda impressa (resumo) */

.receipt {
  position: relative;
  margin-bottom: 26px;
  padding: 20px 18px 22px;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 14px;
  box-shadow: 0 1px 0 var(--line), 0 14px 30px -18px rgba(22, 61, 50, 0.45);
  --zig: 10px;
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--zig) 100%;
  mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--zig) 100%;
  padding-bottom: 30px;
}

.receipt.small {
  margin-bottom: 16px;
}

.r-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 2px dashed var(--line-strong);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 13px;
  color: var(--ink-2);
}

.r-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.r-row.simple {
  align-items: baseline;
  font-family: var(--font-body);
  font-size: 15px;
}

.r-row.simple b {
  font-family: var(--font-mono);
  font-size: 17px;
  white-space: nowrap;
}

.r-row.simple small {
  font-size: 12px;
  color: var(--muted);
}

.r-who {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.r-who strong {
  font-family: var(--font-body);
  font-size: 16px;
}

.r-who small {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
}

.receipt .btn,
.receipt .badge {
  font-family: var(--font-body);
  white-space: nowrap;
}

.r-amt {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 6px;
}

.r-amt b {
  font-size: 16px;
  white-space: nowrap;
}

.r-empty {
  padding: 16px 0;
  color: var(--muted);
  font-family: var(--font-body);
}

.r-totals {
  display: grid;
  gap: 6px;
  padding-top: 14px;
}

.r-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.r-totals .r-grand {
  margin: 4px 0;
  padding: 8px 0;
  border-top: 2px dashed var(--line-strong);
  border-bottom: 2px dashed var(--line-strong);
  font-weight: 600;
  font-size: 17px;
}

.r-grand span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ok-icon {
  width: 18px;
  height: 18px;
  color: var(--ok);
  stroke-width: 2.6;
}

.r-pending {
  font-weight: 600;
  color: var(--accent-press);
}

.r-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-2);
}

.service-card {
  margin-bottom: 18px;
}

.stack {
  display: grid;
  gap: 10px;
}

/* ------------------------------------------------------------ lançamentos */

.entries {
  display: grid;
  gap: 8px;
}

.entry {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 8px 12px 14px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.entry-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.entry-main strong {
  font-size: 16px;
}

.entry-math {
  font-family: var(--font-mono);
  font-size: 14px;
}

.entry-who {
  font-size: 13px;
  color: var(--muted);
}

.entry-side {
  display: flex;
  align-items: flex-start;
  gap: 2px;
}

.entry-time {
  padding: 10px 4px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* ------------------------------------------------------------ folhas */

.sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 40, 33, 0.45);
  animation: fade 0.2s ease;
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  padding: 10px 18px calc(20px + var(--safe-b));
  border-radius: 24px 24px 0 0;
  background: var(--surface);
  box-shadow: 0 -10px 40px -10px rgba(14, 40, 33, 0.4);
  animation: rise 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

.sheet form {
  display: grid;
  gap: 14px;
}

.sheet-grip {
  width: 40px;
  height: 5px;
  margin: 0 auto 12px;
  border-radius: 3px;
  background: var(--line-strong);
}

.sheet-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.sheet-text {
  margin: 0 0 18px;
  color: var(--ink-2);
}

.sheet-text.small {
  margin: -6px 0 12px;
  font-size: 14px;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin-top: 4px;
}

.sheet-stack {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.rejoin-slot:empty {
  display: none;
}

@keyframes rise {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.quick-items {
  display: flex;
  gap: 8px;
  margin: 0 -18px;
  padding: 0 18px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.qi {
  flex: none;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--bg-deep);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.qi small {
  font-family: var(--font-mono);
  color: var(--muted);
}

.pchips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  font-weight: 700;
  font-size: 15px;
}

.pchip small {
  font-weight: 500;
  color: var(--muted);
}

.pchip-check {
  display: none;
  width: 18px;
  height: 18px;
  stroke-width: 3;
}

.pchip[aria-pressed='true'] {
  background: var(--ink);
  color: var(--surface);
  box-shadow: none;
}

.pchip[aria-pressed='true'] .pchip-check {
  display: block;
}

.pchip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.order-preview:empty {
  display: none;
}

.order-preview {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 2px 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--beer);
  color: var(--beer-ink);
}

.order-preview b {
  font-family: var(--font-mono);
  font-size: 22px;
}

.order-preview small {
  grid-column: 1 / -1;
  font-size: 13px;
}

.bill {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-family: var(--font-mono);
}

.bill div {
  display: flex;
  justify-content: space-between;
}

.bill dt {
  font-family: var(--font-body);
  color: var(--ink-2);
}

.bill dd {
  margin: 0;
}

.bill-total {
  padding-top: 8px;
  border-top: 2px dashed var(--line-strong);
  font-size: 20px;
  font-weight: 600;
}

.bill-total dt {
  font-weight: 700;
  color: var(--ink);
}

/* ------------------------------------------------------------ banner e toast */

.banner {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 14px;
}

.banner span {
  color: var(--ink-2);
}

.banner strong {
  color: var(--ink);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--dock-h) + 24px + var(--safe-b));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 12px 12px 16px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--surface);
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 14px 30px -12px rgba(14, 40, 33, 0.7);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

body:not([data-route='mesa']) .toast {
  bottom: calc(20px + var(--safe-b));
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.toast-undo {
  flex: none;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: var(--beer);
  color: var(--beer-ink);
  font-weight: 800;
}

.noscript {
  padding: 24px;
  text-align: center;
}

@media (min-width: 560px) {
  .screen {
    padding-top: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================================
   Visual v2 — segue os mockups da marca (logo central, xadrez,
   ilustrações, avatares, comanda serrilhada).
   ============================================================ */

body {
  background: var(--bg);
}

.center {
  text-align: center;
}

/* faixa xadrez de toalha de bar, no topo e no rodapé das telas internas */
.checker,
.screen:not(.home)::after {
  height: 26px;
  margin: -16px -16px 6px;
  background: repeating-conic-gradient(#efdcae 0 25%, transparent 0 50%) 0 0 / 26px 26px;
  -webkit-mask: linear-gradient(#000 20%, transparent);
  mask: linear-gradient(#000 20%, transparent);
}

.screen:not(.home)::after {
  content: '';
  display: block;
  margin: 40px -16px calc(-40px - var(--safe-b));
  -webkit-mask: linear-gradient(transparent, #000 80%);
  mask: linear-gradient(transparent, #000 80%);
}

.screen-logo {
  margin: 4px 0 14px;
  text-align: center;
}

.screen-logo img {
  display: inline-block;
  width: min(200px, 56vw);
  height: auto;
}

.home-logo {
  margin: 0 0 26px;
}

.home-logo img {
  width: min(240px, 64vw);
}

.topbar {
  align-items: flex-start;
}

.topbar-text .title {
  font-size: 32px;
  color: var(--ink);
}

.topbar-text .eyebrow {
  margin: 2px 0;
  letter-spacing: 0.12em;
  color: var(--ink-2);
}

/* ------------------------------------------------ início */

.home {
  padding-top: 24px;
}

.hero {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(42px, 12.5vw, 56px);
}

.hero-row {
  position: relative;
  min-height: 262px;
  margin-bottom: 6px;
}

.hero-row .lede {
  position: relative;
  z-index: 2;
  max-width: 15ch;
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  color: var(--ink);
}

.hero-art {
  position: absolute;
  top: 46px;
  right: -4px;
  width: 290px;
  height: 220px;
}

.hero-receipt {
  position: absolute;
  top: 6px;
  left: 0;
  z-index: 2;
}

.hero-coin {
  position: absolute;
  top: 34px;
  right: 0;
}

.receipt-art,
.coin-art {
  display: block;
  filter: drop-shadow(0 10px 14px rgba(22, 61, 50, 0.18));
}

.hero-burst {
  position: absolute;
  top: -22px;
  left: 172px;
  width: 36px;
  height: 36px;
}

.continue {
  background: var(--brand-green);
  padding: 16px 20px;
}

.continue-tag {
  font-size: 15px;
  color: var(--brand-yellow);
}

.continue-main {
  font-size: 30px;
  font-weight: 800;
}

.continue-meta {
  font-size: 16px;
}

.choice {
  gap: 16px;
  padding: 18px 18px 18px 22px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px rgba(22, 61, 50, 0.55);
  color: var(--ink);
}

.choice-yellow {
  background: var(--brand-yellow);
  box-shadow: 0 10px 22px -16px rgba(22, 61, 50, 0.6);
}

.choice-icon,
.choice-icon.alt,
.choice-main .choice-icon {
  width: 44px;
  height: 52px;
  border-radius: 0;
  background: none;
  color: var(--ink);
}

.choice-icon .i {
  width: 40px;
  height: 40px;
  stroke-width: 2.2;
}

.choice-text {
  padding-left: 18px;
  border-left: 2px solid currentColor;
}

.choice-text strong {
  font-size: 23px;
}

.choice-text small {
  font-size: 15px;
  opacity: 1;
  color: var(--ink-2);
}

.choice-chev {
  opacity: 1;
}

.home .link-btn {
  margin-top: 16px;
  font-size: 17px;
}

.footnote {
  margin-top: 14px;
  text-align: center;
  color: var(--ink-2);
}

/* ------------------------------------------------ comanda */

.total-card {
  overflow: hidden;
  padding: 18px 20px 26px;
  background: var(--brand-green);
  border-radius: 18px 18px 0 0;
  box-shadow: none;
  -webkit-mask: radial-gradient(circle at 50% 100%, #0000 5px, #000 5.5px) 0 0 / 15px 100% repeat-x;
  mask: radial-gradient(circle at 50% 100%, #0000 5px, #000 5.5px) 0 0 / 15px 100% repeat-x;
}

.total-card .eyebrow {
  font-size: 14px;
  color: var(--brand-yellow);
}

.total-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 46px;
  letter-spacing: -0.02em;
}

.total-break {
  position: relative;
  font-size: 15px;
  color: var(--surface);
}

.total-mark {
  position: absolute;
  top: 50%;
  right: -14px;
  width: 128px;
  height: 128px;
  color: rgba(247, 240, 223, 0.13);
  transform: translateY(-58%);
  pointer-events: none;
}

.total-split {
  align-items: center;
  border-top-color: rgba(247, 240, 223, 0.3);
  font-size: 15px;
  color: var(--surface);
}

.total-split b,
.price-chip b {
  font-family: var(--font-body);
  font-weight: 800;
}

.total-split i,
.price-chip i {
  width: 1.5px;
  height: 20px;
  background: currentColor;
  opacity: 0.35;
}

.price-chip {
  gap: 12px;
  min-height: 48px;
  margin-top: 16px;
  padding: 0 18px 0 16px;
  font-size: 16px;
}

.price-chip .i {
  width: 22px;
  height: 22px;
}

.price-chip u {
  font-weight: 800;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 2px 0;
}

.section-head .section-title,
.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 800;
  color: var(--ink);
}

h2.section-title {
  margin: 24px 2px 0;
}

.section-head .section-title {
  margin: 0;
}

.section-head span {
  font-size: 15px;
  color: var(--ink-2);
}

.person {
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px rgba(22, 61, 50, 0.45);
}

.person.is-left {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(22, 61, 50, 0.3);
}

.person-top {
  grid-template-columns: auto 1fr auto;
  grid-template-areas: none;
  align-items: center;
  column-gap: 14px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
}

.av0 {
  background: var(--brand-orange);
  color: #fff;
}

.av1 {
  background: var(--brand-yellow);
  color: var(--brand-green);
}

.av2 {
  background: var(--brand-green);
  color: var(--brand-cream);
}

.is-left .avatar {
  opacity: 0.55;
}

.person-id {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-width: 0;
}

.person-name {
  grid-area: auto;
  font-size: 22px;
}

.person-amount {
  grid-area: auto;
  align-self: start;
  margin-top: 4px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 23px;
  color: var(--ink);
}

.person-items {
  margin: 12px 0 14px;
  font-size: 15px;
}

.person-actions .btn.ghost {
  box-shadow: inset 0 0 0 1.5px var(--brand-green);
}

.dock {
  background: var(--brand-green);
}

.dock-btn.main {
  background: var(--brand-orange);
  font-size: 19px;
}

/* ------------------------------------------------ comanda impressa: serrilha em cima e embaixo */

.receipt {
  --zig: 12px;
  padding: 26px 18px 30px;
  background: var(--paper);
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--zig) 51% repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--zig) 51% repeat-x;
  mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--zig) 51% repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--zig) 51% repeat-x;
  filter: drop-shadow(0 6px 10px rgba(22, 61, 50, 0.12));
}

.r-head {
  border-bottom-color: var(--brand-yellow);
  color: var(--ink);
}

.r-row {
  border-bottom: 1.5px dashed var(--brand-yellow);
}

.r-who strong {
  font-size: 18px;
  font-weight: 800;
}

.r-who small {
  font-size: 14px;
  color: var(--ink-2);
}

.r-amt b {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
}

.r-totals .r-grand {
  border-color: var(--brand-yellow);
}

.r-pending {
  color: var(--brand-orange);
  font-size: 17px;
}

.btn.tiny {
  min-height: 38px;
  font-size: 14px;
  background: var(--brand-green);
}

.service-card {
  box-shadow: inset 0 0 0 1.5px var(--line);
}

/* ------------------------------------------------ lançamentos */

.entry {
  align-items: center;
  padding: 14px 12px 14px 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}

.entry-main strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
}

.entry-math {
  font-size: 16px;
}

.entry-who {
  font-size: 15px;
  color: var(--ink-2);
}

.entry-side {
  align-items: center;
  gap: 8px;
}

.entry-time {
  align-self: flex-start;
  padding: 2px 4px 0 0;
  font-size: 13px;
}

.icon-btn.small {
  width: 46px;
  height: 46px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  color: var(--ink);
}

/* ------------------------------------------------ folhas */

.sheet {
  padding-left: 22px;
  padding-right: 22px;
  background: var(--brand-cream);
}

.sheet-title {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 27px;
  color: var(--ink);
}

.burst {
  flex: none;
  width: 28px;
  height: 28px;
  margin-top: -10px;
}

.sheet-head-art {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sheet-head-art .sheet-title {
  margin: 0;
}

.sheet-head-art .receipt-art {
  margin: -6px 4px 0 0;
}

.info-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #fbefc8;
  color: var(--ink);
}

.info-box .i {
  width: 34px;
  height: 34px;
  stroke-width: 1.8;
}

.info-box p {
  margin: 0;
  font-size: 15px;
}

.info-box.warn .i {
  color: var(--danger);
}

.swap-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 6px 0 16px;
}

.swap-art .receipt-art:last-of-type {
  margin-top: 18px;
}

.swap-burst {
  position: absolute;
  top: -8px;
  right: 14%;
  width: 30px;
  height: 30px;
}

.swap-arrow {
  flex: none;
}

.sheet .info-box + .sheet-actions {
  margin-top: 18px;
}

.field input:not(:focus),
.money-input:not(:focus-within),
.pct-input:not(:focus-within) {
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}

.field input:focus,
.money-input:focus-within,
.pct-input:focus-within {
  box-shadow: inset 0 0 0 2px var(--brand-orange);
}

.quick-items {
  gap: 10px;
}

.qi {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 18px 8px 14px;
  border-radius: 14px;
  background: #f6e6bd;
  color: var(--ink);
  text-align: left;
}

.qi .i {
  width: 32px;
  height: 32px;
  stroke-width: 1.8;
}

.qi span {
  display: grid;
  line-height: 1.2;
}

.qi b {
  font-size: 16px;
}

.qi small {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

.pchip,
.pchip[aria-pressed='true'] {
  gap: 10px;
  min-height: 46px;
  padding: 0 16px 0 12px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}

.pchip-box {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  box-shadow: inset 0 0 0 2px var(--brand-green);
}

.pchip-box .i {
  width: 16px;
  height: 16px;
  stroke-width: 3.2;
  color: #fff;
  visibility: hidden;
}

.pchip[aria-pressed='true'] .pchip-box {
  background: var(--brand-green);
}

.pchip[aria-pressed='true'] .pchip-box .i {
  visibility: visible;
}

.bill {
  background: var(--surface);
}

.toast {
  background: var(--brand-green);
}

.person-id .badge {
  grid-area: auto;
}

.money-input input,
.money-input input:focus,
.pct-input input,
.pct-input input:focus {
  box-shadow: none !important;
}

.topbar-text .title {
  font-size: clamp(25px, 7.4vw, 32px);
  white-space: nowrap;
}

/* ============================================================
   Novas funcionalidades: couvert, desconto, pagamentos, relógio,
   metas (termômetro), conferência e Rei do Chopp.
   ============================================================ */

.time-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: -4px 0 14px;
  font-size: 14px;
  color: var(--ink-2);
}

.time-line .i {
  width: 18px;
  height: 18px;
}

.closed-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fbefc8;
  color: var(--ink);
}

.closed-banner > .i {
  width: 28px;
  height: 28px;
}

.closed-banner div {
  display: grid;
  flex: 1;
  font-size: 14px;
}

.closed-banner .btn {
  flex: none;
}

.total-avg {
  position: relative;
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--on-ink-muted);
}

.total-avg b {
  color: var(--brand-yellow);
}

/* termômetro da meta: cor + número + texto (nunca só a cor) */
.thermo {
  margin: -4px 0 12px;
}

.thermo-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-deep);
}

.thermo-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.3s ease;
}

.thermo.ok .thermo-bar span {
  background: var(--ok);
}

.thermo.near .thermo-bar span {
  background: var(--brand-yellow);
}

.thermo.over .thermo-bar span {
  background: var(--brand-orange);
}

.thermo-text {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-2);
}

.thermo.ok .thermo-text b {
  color: var(--ok);
}

.thermo.near .thermo-text b {
  color: var(--warn);
}

.thermo.over .thermo-text b {
  color: var(--accent-press);
}

.person-pay {
  margin: -4px 0 10px;
  font-size: 13px;
  color: var(--ink-2);
}

.person-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: -6px 0 8px;
}

.person-links .link-btn {
  min-height: 36px;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration-color: var(--line-strong);
}

.person-links .link-btn .i {
  width: 16px;
  height: 16px;
}

.dock-two {
  grid-template-columns: 1fr 1.6fr;
}

.continue.is-closed {
  background: var(--ink-2);
}

.continue.is-closed .dot {
  animation: none;
}

/* folhas */
.kind-tabs {
  margin-bottom: 14px;
}

.chopp-check .i {
  width: 18px;
  height: 18px;
  margin-right: 4px;
  vertical-align: -3px;
  color: var(--beer-deep);
}

.chopp-check small {
  color: var(--muted);
}

.pchip[aria-checked='true'] .pchip-box {
  background: var(--brand-green);
}

.pchip[aria-checked='true'] .pchip-box .i {
  visibility: visible;
}

.pchip-box.round {
  border-radius: 50%;
}

.entry-pick small {
  font-weight: 600;
}

.money-input .unit-post,
.money-input.is-pct .unit-pre {
  display: none;
}

.money-input.is-pct .unit-post {
  display: inline;
}

.method-pick button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.method-pick .i {
  width: 18px;
  height: 18px;
}

.pay-balance {
  margin: -4px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}

.pay-balance:empty {
  display: none;
}

/* conta */
.r-paid {
  color: var(--ink) !important;
}

.r-discount {
  color: var(--ok);
}

.adv-card,
.check-card {
  margin-bottom: 18px;
}

.adv-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.adv-list li {
  display: grid;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fbefc8;
}

.adv-list small {
  color: var(--ink-2);
}

.check-ok,
.check-diff {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
}

.check-ok {
  background: var(--ok-soft);
  color: var(--ok);
  font-weight: 700;
}

.check-diff {
  background: var(--warn-soft);
  color: var(--ink);
}

.check-diff .i {
  color: var(--warn);
}

.small-check {
  margin-top: 12px;
  font-size: 14px;
}

.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-deep);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 3px;
  color: var(--ink-2);
}

.tag.beer {
  background: var(--brand-yellow);
  color: var(--brand-green);
}

.tag.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.segmented button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Rei do Chopp */
.rei-hero {
  position: relative;
  margin-bottom: 18px;
  padding: 24px 20px 26px;
  border-radius: 22px;
  background: var(--brand-green);
  color: var(--surface);
  text-align: center;
  overflow: hidden;
}

.rei-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(from 0deg at 50% 38%, rgba(244, 197, 66, 0.1) 0 10deg, transparent 10deg 20deg);
}

.rei-hero > * {
  position: relative;
}

.crown-art {
  display: block;
  width: 140px;
  height: auto;
  margin: 0 auto 6px;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.25));
  animation: crown 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

@keyframes crown {
  from {
    transform: translateY(-30px) rotate(-12deg) scale(0.6);
    opacity: 0;
  }
}

.rei-hero .eyebrow {
  color: var(--brand-yellow);
}

.rei-burst {
  position: absolute;
  top: 18px;
  right: 22%;
  width: 34px;
  height: 34px;
}

.rei-name {
  margin: 4px 0 2px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 10vw, 46px);
  line-height: 1.05;
  color: var(--brand-yellow);
}

.rei-sub {
  margin: 0;
  font-size: 17px;
}

.rank {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.rank li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.rank li.top {
  background: #fbefc8;
  box-shadow: inset 0 0 0 2px var(--brand-yellow);
}

.rank .avatar {
  width: 38px;
  height: 38px;
  font-size: 18px;
}

.rank-pos {
  width: 30px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
}

.rank-name {
  flex: 1;
  font-weight: 700;
  font-size: 17px;
}

.rank-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
}

.rank-count .i {
  width: 18px;
  height: 18px;
}

.rei-empty {
  padding: 30px 10px;
  text-align: center;
  color: var(--ink-2);
}

.rei-actions .hint {
  margin: 0 0 4px;
}

.topbar-text .eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.07em;
}

/* ============================================================
   Layout por largura disponível + fundo decorativo.
   < 640      celular: app em tela cheia, sem imagem nem vídeo.
   640–1023   tela média: imagem estática nas laterais, app mais largo.
   1024–1279  tela larga (tablet deitado): vídeo, coluna de 430 a 520 px.
   >= 1280    desktop: vídeo, coluna de 430 px.
   ============================================================ */

:root {
  --col-w: 100vw;
}

.app {
  max-width: none;
}

.column {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
}

.bg-layer {
  display: none;
}

@media (min-width: 640px) {
  :root {
    --col-w: min(620px, calc(100vw - 48px));
  }

  .bg-layer {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: #f5e9cf url('../assets/bg/background-static.webp') center / cover no-repeat;
  }

  .column {
    width: var(--col-w);
    margin: 0 auto;
    background: var(--bg);
    box-shadow:
      0 0 0 1px rgba(22, 61, 50, 0.08),
      0 30px 80px -30px rgba(22, 61, 50, 0.5);
  }
}

@media (min-width: 1024px) {
  :root {
    --col-w: clamp(430px, 42vw, 520px);
  }
}

@media (min-width: 1280px) {
  :root {
    --col-w: 430px;
  }
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.bg-layer.is-playing .bg-video {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .bg-video {
    display: none;
  }
}

/* elementos fixos acompanham a coluna */
.banner {
  position: sticky;
}

.dock {
  width: calc(var(--col-w) - 24px);
  max-width: none;
}

.toast {
  max-width: calc(var(--col-w) - 32px);
}

/* ------------------------------------------------ folhas e teclado */

.sheet-wrap {
  inset: auto 0 auto 0;
  top: var(--vvt, 0px);
  height: var(--vvh, 100vh);
  height: var(--vvh, 100dvh);
}

.sheet {
  max-width: var(--col-w);
  max-height: calc(100% - 12px);
  padding-bottom: 0;
  overscroll-behavior: contain;
}

/* botões das folhas sempre visíveis, mesmo com formulário longo ou teclado aberto */
.sheet .sheet-actions,
.sheet .sheet-stack {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 6px;
  padding: 14px 0 calc(16px + var(--safe-b));
  background: linear-gradient(rgba(247, 240, 223, 0), var(--brand-cream) 14px);
}

.sheet .sheet-stack {
  margin-top: 16px;
}

.kb-open .dock,
.kb-open .toast {
  display: none;
}

/* ------------------------------------------------ toque: alvos de 44 px e fonte >= 16 px nos campos */

.link-btn.small,
.person-links .link-btn,
.btn.tiny {
  min-height: 44px;
}

.btn.tiny {
  padding: 0 14px;
}

input,
select,
textarea,
.pct-input.mini input {
  font-size: max(16px, 1em);
}

.field-error {
  scroll-margin: 80px;
}

/* ============================================================
   Rodadas e cobrança individual no WhatsApp
   ============================================================ */

.total-rounds {
  position: relative;
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px dashed rgba(247, 240, 223, 0.3);
  font-size: 14px;
  color: var(--on-ink-muted);
}

.total-rounds b {
  color: var(--surface);
}

.person-prev {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin: -4px 0 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg-deep);
  font-size: 14px;
}

.prev-open {
  font-weight: 800;
  color: var(--accent-press);
}

.prev-ok {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: var(--ok);
}

.prev-ok .i {
  width: 16px;
  height: 16px;
}

.person-total {
  margin: -4px 0 10px;
  font-size: 15px;
}

.btn.tiny.outline {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--brand-green);
}

.btn.tiny .i {
  width: 16px;
  height: 16px;
}

.r-rounds {
  color: var(--ink) !important;
  font-weight: 600;
}

.r-totals .r-round {
  font-size: 13px;
  color: var(--ink-2);
}

.round-head {
  margin: 14px 2px 2px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-2);
}

.round-head:first-child {
  margin-top: 0;
}

.msg-preview {
  max-height: 220px;
  overflow-y: auto;
  padding: 12px 14px;
  border-radius: 12px 12px 12px 2px;
  background: #dcf3d0;
  box-shadow: inset 0 0 0 1px rgba(22, 61, 50, 0.12);
  font-size: 14px;
  line-height: 1.45;
  color: #1c2b22;
  white-space: normal;
  word-break: break-word;
}

.rei-tabs {
  margin-bottom: 14px;
}

.hint.center {
  text-align: center;
}

.stack .hint.tight {
  margin: -2px 0 2px;
}

.receipt .r-row {
  flex-wrap: wrap;
}

.r-who {
  flex: 1;
}

.r-actions {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

/* ============================================================
   Enviar no WhatsApp: número digitado ou contato salvo
   ============================================================ */

.msg-details {
  margin: -4px 0 14px;
}

.msg-details summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
}

.msg-details .msg-preview {
  margin-top: 6px;
}

.mini-label {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}

.contacts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.contact-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 12px;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--brand-green);
  color: var(--ink);
  text-align: left;
}

.contact-chip .i {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--whats);
}

.contact-chip span {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.contact-chip b,
.contact-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-chip small {
  font-size: 12px;
  color: var(--ink-2);
}

.contact-chip.is-sent {
  background: var(--ok-soft);
  box-shadow: inset 0 0 0 1.5px var(--ok);
}

.contact-chip.is-sent .i {
  color: var(--ok);
}

.row-send {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 10px;
}

@media (max-width: 380px) {
  .row-send {
    grid-template-columns: 1fr;
  }
}

.sent-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 14px;
  font-weight: 700;
}

.sent-line .i {
  width: 18px;
  height: 18px;
  flex: none;
}

.sheet form > .center {
  margin-top: -6px;
}

/* logo do topo das telas internas: volta ao início */
.logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 2px 10px;
  border-radius: 12px;
  transition: transform 0.12s ease, background-color 0.15s ease;
}

.logo-link:hover {
  background: rgba(22, 61, 50, 0.06);
}

.logo-link:active {
  transform: scale(0.97);
}

.logo-link img {
  pointer-events: none;
}

/* ============================================================
   Movimento: efeitos, botões vivos e entradas.
   Tudo desliga com "reduzir movimento" (regra global no início do arquivo).
   ============================================================ */

.fx-canvas {
  position: fixed;
  inset: 0;
  z-index: 70;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.fx-float {
  position: fixed;
  z-index: 71;
  pointer-events: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  color: var(--brand-orange);
  text-shadow: 0 2px 0 #fff6e3, 0 6px 14px rgba(22, 61, 50, 0.25);
  transform: translate(-50%, -50%);
  animation: float-up 0.95s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

.fx-float.beer {
  color: var(--brand-green);
}

@keyframes float-up {
  0% {
    opacity: 0;
    transform: translate(-50%, -30%) scale(0.6);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -80%) scale(1.15);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -260%) scale(1);
  }
}

/* onda no toque */
.btn,
.dock-btn,
.choice,
.qi,
.pchip,
.contact-chip,
.segmented button,
.icon-btn,
.price-chip,
.continue {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.ripple {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.18;
  pointer-events: none;
  transform: scale(0);
  animation: ripple 0.6s ease-out forwards;
}

@keyframes ripple {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* botões: cor muda ao passar/apertar, brilho atravessando nos principais */
.btn,
.dock-btn,
.pchip,
.qi,
.contact-chip,
.choice,
.price-chip {
  transition: transform 0.12s ease, background-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.btn:active,
.dock-btn:active,
.pchip:active,
.qi:active,
.contact-chip:active,
.price-chip:active {
  transform: scale(0.96);
}

.btn.primary:active {
  background: var(--brand-green);
}

.btn.beer:active {
  background: var(--brand-orange);
  color: #fff;
  box-shadow: inset 0 -3px 0 #b84a26;
}

.dock-btn.main:active {
  background: var(--brand-yellow);
  color: var(--brand-green);
}

@media (hover: hover) {
  .btn.ghost:hover {
    background: rgba(244, 197, 66, 0.22);
  }

  .pchip:not(:disabled):hover,
  .qi:hover,
  .contact-chip:hover {
    box-shadow: inset 0 0 0 2px var(--brand-orange);
  }

  .choice:hover {
    transform: translateY(-2px);
  }

  .dock-btn:not(.main):hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .btn.primary::after,
  .btn.whats::after,
  .btn.beer::after,
  .dock-btn.main::after,
  .choice-yellow::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
    pointer-events: none;
  }

  .btn.primary:hover::after,
  .btn.whats:hover::after,
  .btn.beer:hover::after,
  .dock-btn.main:hover::after,
  .choice-yellow:hover::after {
    transform: translateX(120%);
  }
}

/* +1 chopp: caneca brinda e o botão acende */
.btn.cheers {
  animation: cheers-btn 0.55s ease;
}

.btn.cheers .i {
  animation: cheers-mug 0.55s ease;
}

@keyframes cheers-btn {
  30% {
    background: var(--brand-orange);
    color: #fff;
    transform: scale(1.06);
  }
}

@keyframes cheers-mug {
  25% {
    transform: rotate(-28deg) translateY(-2px);
  }
  55% {
    transform: rotate(14deg);
  }
}

/* cartão pulando (lançamento) */
.person.bump {
  animation: bump 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}

@keyframes bump {
  40% {
    transform: scale(1.025);
    box-shadow: inset 0 0 0 2.5px var(--brand-yellow), 0 14px 30px -14px var(--beer-deep);
  }
}

/* pessoa chegou */
.person.arrive {
  animation: arrive 0.6s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.person.arrive .avatar {
  animation: avatar-pop 0.7s cubic-bezier(0.2, 1.8, 0.4, 1);
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.95);
  }
}

@keyframes avatar-pop {
  0% {
    transform: scale(0) rotate(-40deg);
  }
  70% {
    transform: scale(1.2) rotate(8deg);
  }
}

/* números contando */
.is-counting {
  color: var(--brand-orange);
  transition: color 0.3s ease;
}

.total-value.is-counting {
  color: var(--brand-yellow);
}

/* selo "Pago" carimbando */
.badge.stamp {
  animation: stamp 0.55s cubic-bezier(0.2, 1.6, 0.4, 1);
}

@keyframes stamp {
  0% {
    transform: scale(2.6) rotate(-14deg);
    opacity: 0;
  }
  60% {
    transform: scale(0.92) rotate(3deg);
    opacity: 1;
  }
}

/* meta subiu de faixa: a barra treme */
.thermo.level-up .thermo-bar {
  animation: shake 0.5s ease;
}

.thermo.level-up .thermo-text b {
  animation: pulse-text 0.6s ease;
}

@keyframes shake {
  20%,
  60% {
    transform: translateX(-4px);
  }
  40%,
  80% {
    transform: translateX(4px);
  }
}

@keyframes pulse-text {
  40% {
    transform: scale(1.18);
  }
}

.thermo-bar span {
  transition: width 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2), background-color 0.3s ease;
}

/* caixinha marcando */
.pchip[aria-pressed='true'] .pchip-box,
.pchip[aria-checked='true'] .pchip-box {
  animation: tick 0.3s cubic-bezier(0.2, 1.8, 0.4, 1);
}

@keyframes tick {
  from {
    transform: scale(0.5);
  }
}

/* entrada em sequência ao chegar numa tela */
.screen.enter > *,
.screen.enter .people > .person,
.screen.enter .entries > * {
  animation: rise-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.screen.enter > *:nth-child(2) { animation-delay: 0.03s; }
.screen.enter > *:nth-child(3) { animation-delay: 0.06s; }
.screen.enter > *:nth-child(4) { animation-delay: 0.09s; }
.screen.enter > *:nth-child(5) { animation-delay: 0.12s; }
.screen.enter > *:nth-child(6) { animation-delay: 0.15s; }
.screen.enter > *:nth-child(n + 7) { animation-delay: 0.18s; }
.screen.enter .people > .person:nth-child(1) { animation-delay: 0.16s; }
.screen.enter .people > .person:nth-child(2) { animation-delay: 0.22s; }
.screen.enter .people > .person:nth-child(3) { animation-delay: 0.28s; }
.screen.enter .people > .person:nth-child(4) { animation-delay: 0.34s; }
.screen.enter .people > .person:nth-child(n + 5) { animation-delay: 0.4s; }

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* tela inicial: moeda e comanda flutuando */
.home .hero-coin {
  animation: bob 4.2s ease-in-out infinite;
}

.home .hero-receipt {
  animation: bob-tilt 5s ease-in-out infinite;
}

.home .hero-burst {
  animation: burst-blink 2.4s ease-in-out infinite;
}

@keyframes bob {
  50% {
    transform: translateY(-8px) rotate(6deg);
  }
}

@keyframes bob-tilt {
  50% {
    transform: translateY(-6px) rotate(-2deg);
  }
}

@keyframes burst-blink {
  0%,
  60%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  70% {
    transform: scale(1.25);
  }
  80% {
    transform: scale(0.9);
    opacity: 0.7;
  }
}

/* rabisco laranja ao lado dos títulos das folhas "pisca" ao abrir */
.sheet .burst {
  animation: burst-in 0.5s 0.15s cubic-bezier(0.2, 1.8, 0.4, 1) both;
}

@keyframes burst-in {
  from {
    transform: scale(0) rotate(-30deg);
  }
}

/* troca de tela */
::view-transition-old(root) {
  animation: vt-out 0.18s ease both;
}

::view-transition-new(root) {
  animation: vt-in 0.28s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

@keyframes vt-out {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes vt-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

/* ============================================================
   Avisos de brincadeira (chopp, meta, líder) e tela embaçada dos 20
   ============================================================ */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 16px 0 4px;
}

.chip-row .price-chip {
  margin: 0;
}

.price-chip.soft {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  padding: 0 14px;
}

.alerts {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 65;
  display: grid;
  gap: 8px;
  width: calc(var(--col-w) - 24px);
  transform: translateX(-50%);
  pointer-events: none;
}

.alert-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 10px 14px 14px;
  border-radius: 16px;
  background: var(--brand-green);
  color: var(--surface);
  box-shadow: 0 18px 40px -16px rgba(14, 40, 33, 0.75);
  pointer-events: auto;
  animation: alert-in 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.alert-card.goal {
  background: #fbefc8;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--brand-yellow), 0 18px 40px -16px rgba(14, 40, 33, 0.5);
}

.alert-card.leader {
  background: var(--brand-orange);
  color: #fff;
}

.alert-card.leaving {
  animation: alert-out 0.25s ease forwards;
}

.alert-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
}

.alert-card.chopp .alert-icon {
  background: var(--brand-yellow);
  color: var(--brand-green);
}

.alert-card.goal .alert-icon {
  background: var(--brand-yellow);
}

.alert-icon .i {
  width: 24px;
  height: 24px;
}

.alert-card.chopp .alert-icon .i {
  animation: cheers-mug 0.9s 0.35s ease;
}

.alert-text {
  flex: 1;
  min-width: 0;
}

.alert-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
}

.alert-text p {
  margin: 3px 0 0;
  font-size: 15px;
  line-height: 1.35;
}

.alert-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  margin: -8px -2px -8px 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
}

.alert-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.alert-close .i {
  width: 20px;
  height: 20px;
}

@keyframes alert-in {
  from {
    opacity: 0;
    transform: translateY(-24px) scale(0.92) rotate(-2deg);
  }
}

@keyframes alert-out {
  to {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }
}

/* 20 chopps: o app por trás embaça e balança */
body.is-tipsy .column,
body.is-tipsy .dock {
  filter: blur(3px) saturate(1.2);
  animation: tipsy-sway 2.6s ease-in-out infinite;
}

body.is-tipsy .dock {
  animation-name: tipsy-sway-dock;
}

@keyframes tipsy-sway {
  0%,
  100% {
    transform: rotate(0) translateX(0);
  }
  25% {
    transform: rotate(-1.4deg) translateX(-10px);
  }
  75% {
    transform: rotate(1.4deg) translateX(10px);
  }
}

@keyframes tipsy-sway-dock {
  0%,
  100% {
    transform: translateX(-50%) rotate(0);
  }
  25% {
    transform: translateX(calc(-50% - 10px)) rotate(-1.4deg);
  }
  75% {
    transform: translateX(calc(-50% + 10px)) rotate(1.4deg);
  }
}

.tipsy {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: rgba(22, 61, 50, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade 0.3s ease;
}

.tipsy.leaving {
  animation: alert-out 0.3s ease forwards;
}

.tipsy-card {
  width: min(380px, 100%);
  padding: 26px 22px 22px;
  border-radius: 24px;
  background: var(--brand-cream);
  text-align: center;
  box-shadow: 0 30px 60px -20px rgba(14, 40, 33, 0.7);
  animation: tipsy-card 3.2s ease-in-out infinite;
}

.tipsy-card .eyebrow {
  color: var(--accent-text);
}

.tipsy-card h2 {
  margin: 6px 0 8px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink);
}

.tipsy-card p:not(.eyebrow) {
  margin: 0 0 18px;
  color: var(--ink-2);
}

.tipsy-mug {
  width: 64px;
  height: 64px;
  color: var(--brand-orange);
  stroke-width: 1.6;
  animation: tipsy-mug 1.4s ease-in-out infinite;
}

@keyframes tipsy-card {
  0%,
  100% {
    transform: rotate(-1.5deg);
  }
  50% {
    transform: rotate(1.5deg) translateY(-4px);
  }
}

@keyframes tipsy-mug {
  0%,
  100% {
    transform: rotate(-12deg);
  }
  50% {
    transform: rotate(12deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.is-tipsy .column,
  body.is-tipsy .dock {
    animation: none;
  }
}

/* ajustes dos avisos */
.switches {
  display: grid;
  gap: 4px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-strong);
  cursor: pointer;
}

.switch-row span {
  display: grid;
  gap: 2px;
}

.switch-row small {
  font-size: 13px;
  color: var(--ink-2);
}

.switch-row input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 52px;
  height: 30px;
  flex: none;
  margin: 0;
  border-radius: 999px;
  background: var(--line-strong);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.switch-row input::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(14, 40, 33, 0.3);
  transition: transform 0.25s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.switch-row input:checked {
  background: var(--ok);
}

.switch-row input:checked::after {
  transform: translateX(22px);
}

.alerts-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.alerts-card .card-title {
  margin-bottom: 2px;
}

@media (max-width: 420px) {
  .price-chip.soft {
    width: 48px;
    padding: 0;
    justify-content: center;
  }

  .price-chip.soft span {
    display: none;
  }
}

/* ---- avisos mais visíveis: mais baixo, cor que contrasta e flutuação leve ---- */
.alerts {
  top: calc(22vh + env(safe-area-inset-top, 0px));
  top: calc(22dvh + env(safe-area-inset-top, 0px));
  width: calc(var(--col-w) - 32px);
  max-width: 420px;
}

.alert-card {
  padding: 16px 10px 16px 16px;
  border-radius: 18px;
  box-shadow:
    0 0 0 4px rgba(247, 240, 223, 0.9),
    0 24px 50px -14px rgba(14, 40, 33, 0.65);
  animation:
    alert-in 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both,
    alert-bob 3.2s 0.5s ease-in-out infinite;
}

/* chopp: amarelo com borda verde (não some em cima do painel verde) */
.alert-card.chopp {
  background: var(--brand-yellow);
  color: var(--brand-green);
  box-shadow:
    inset 0 0 0 2.5px var(--brand-green),
    0 0 0 4px rgba(247, 240, 223, 0.9),
    0 24px 50px -14px rgba(14, 40, 33, 0.65);
}

.alert-card.chopp .alert-icon {
  background: var(--brand-green);
  color: var(--brand-yellow);
}

/* meta: creme com borda laranja */
.alert-card.goal {
  background: var(--paper);
  color: var(--ink);
  box-shadow:
    inset 0 0 0 2.5px var(--brand-orange),
    0 0 0 4px rgba(247, 240, 223, 0.9),
    0 24px 50px -14px rgba(14, 40, 33, 0.65);
}

.alert-card.goal .alert-icon {
  background: var(--brand-orange);
  color: #fff;
}

/* líder: laranja com borda amarela */
.alert-card.leader {
  box-shadow:
    inset 0 0 0 2.5px var(--brand-yellow),
    0 0 0 4px rgba(247, 240, 223, 0.9),
    0 24px 50px -14px rgba(14, 40, 33, 0.65);
}

.alert-card.leader .alert-icon {
  background: var(--brand-yellow);
  color: var(--brand-green);
}

.alert-card.chopp .alert-close:hover,
.alert-card.goal .alert-close:hover {
  background: rgba(22, 61, 50, 0.08);
}

@keyframes alert-bob {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-6px) rotate(-0.6deg);
  }
}

.alerts {
  top: calc(28vh + env(safe-area-inset-top, 0px));
  top: calc(28dvh + env(safe-area-inset-top, 0px));
}

/* ============================================================
   Atalho na tela inicial e conteúdo estático (SEO)
   ============================================================ */

.install-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: var(--radius);
  background: #fbefc8;
  box-shadow: inset 0 0 0 1.5px var(--brand-yellow);
  animation: rise-in 0.5s 0.2s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.install-card img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 6px 14px -6px rgba(22, 61, 50, 0.5);
}

.install-text {
  display: grid;
  gap: 2px;
}

.install-text strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.15;
}

.install-text small {
  font-size: 13.5px;
  color: var(--ink-2);
}

.install-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.install-actions .btn {
  flex: 1;
}

.install-actions .link-btn {
  color: var(--ink-2);
}

.steps {
  display: grid;
  gap: 12px;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 16px;
}

.step-n {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  background: var(--brand-yellow);
  font-family: var(--font-display);
  font-weight: 800;
}

.inline-i {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
}

.seo-list {
  margin: 0 0 20px;
  padding-left: 20px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
}

.seo-static .lede {
  max-width: none;
  margin-bottom: 16px;
}

/* ============================================================
   Abertura (pré-carregamento): fundo amarelo do ícone, símbolo se montando
   ============================================================ */

.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--brand-yellow);
  color: var(--brand-green);
  cursor: pointer;
}

.splash.leaving {
  animation: splash-out 0.6s cubic-bezier(0.7, 0, 0.3, 1) forwards;
  pointer-events: none;
}

.splash-mark {
  width: min(150px, 38vw);
  height: auto;
  overflow: visible;
}

.sp-dots circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: sp-pop 0.42s cubic-bezier(0.2, 1.8, 0.4, 1) both;
}

.sp-dots circle:nth-child(1) { animation-delay: 0.1s; }
.sp-dots circle:nth-child(2) { animation-delay: 0.22s; }
.sp-dots circle:nth-child(3) { animation-delay: 0.34s; }

.sp-arcs path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: sp-draw 0.45s 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.sp-arcs path:nth-child(2) { animation-delay: 0.55s; }
.sp-arcs path:nth-child(3) { animation-delay: 0.65s; }

.sp-core {
  transform-box: fill-box;
  transform-origin: center;
  animation: sp-pop 0.5s 0.75s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

.sp-div {
  transform-box: fill-box;
  transform-origin: center;
  animation: sp-spin 0.5s 1s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.splash-name {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: 0.06em;
  animation: sp-rise 0.45s 0.95s ease both;
}

.splash-tag {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  animation: sp-rise 0.45s 1.1s ease both;
}

@keyframes sp-pop {
  from {
    transform: scale(0);
  }
}

@keyframes sp-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes sp-spin {
  from {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }
}

@keyframes sp-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes splash-out {
  to {
    transform: translateY(-100%);
    border-radius: 0 0 50% 50% / 0 0 18% 18%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sp-arcs path {
    stroke-dashoffset: 0;
  }

  .splash.leaving {
    animation: none;
    opacity: 0;
    transition: opacity 0.2s ease;
  }
}

.choices + .install-card {
  margin: 14px 0 0;
}

/* ============================================================
   Ajustes (avisos, atalho, dúvidas) e guia "Como funciona"
   ============================================================ */

.home-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 18px;
  margin-top: 10px;
}

.home-links .link-btn {
  color: var(--ink-2);
  text-decoration-color: var(--line-strong);
}

.home-links .link-btn .i {
  width: 18px;
  height: 18px;
}

.set-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 2px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.set-title:first-child {
  margin-top: 0;
}

.set-i {
  width: 20px;
  height: 20px;
}

.set-desc {
  margin: 0 0 10px;
}

.install-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
}

.install-status.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.install-status .i {
  width: 20px;
  height: 20px;
  flex: none;
}

.install-manual {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 14px 12px 30px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 14.5px;
}

.sheet-actions.one {
  grid-template-columns: 1fr;
}

.guide {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: passo;
}

.guide li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.guide-i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: var(--brand-yellow);
  color: var(--brand-green);
}

.guide-i .i {
  width: 22px;
  height: 22px;
}

.guide b {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}

.guide p {
  margin: 3px 0 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink-2);
}

.guide p b {
  display: inline;
  font-family: var(--font-body);
  font-size: inherit;
  font-weight: 700;
  color: var(--ink);
}

/* ============================================================
   Tela travada no celular, frase numa linha, links e rodapé
   ============================================================ */

/* nada escorrega para o lado (inclusive durante pulinhos e balanço das animações);
   toque duplo não dá zoom (pinça continua funcionando) */
html {
  overflow-x: hidden;
  touch-action: manipulation;
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

body {
  overscroll-behavior-x: none;
}

/* tela inicial mais compacta: tudo sobe */
.home {
  padding-top: 14px;
}

.home-logo {
  margin-bottom: 16px;
}

.hero {
  margin-bottom: 8px;
}

.hero em {
  display: inline-block;
  font-size: clamp(28px, 8.4vw, 46px);
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.hero-row {
  min-height: 214px;
}

.hero-art {
  top: 34px;
  width: 250px;
  height: 180px;
}

.hero-coin .coin-art {
  width: 124px;
  height: auto;
}

.hero-receipt .receipt-art {
  width: 146px;
  height: auto;
}

.hero-coin {
  top: 26px;
}

.hero-burst {
  left: 140px;
}

.home .link-btn {
  margin-top: 10px;
}

/* "Como funciona · Atalho" juntos e centralizados */
.home-links {
  align-items: center;
  gap: 0 4px;
  margin-top: 2px;
}

.home-links .link-btn {
  min-height: 40px;
  margin-top: 0;
  padding: 0 4px;
  font-size: 14px;
  gap: 5px;
}

.dot-sep {
  color: var(--line-strong);
  font-weight: 800;
}

.home .footnote {
  margin-top: 6px;
}

.app-footer {
  margin: 22px 0 0;
  font-size: 12.5px;
  text-align: center;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.app-footer a {
  color: var(--ink-2);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
}

.home .app-footer {
  margin-top: 14px;
}

.sheet .app-footer {
  margin: 4px 0 calc(8px + var(--safe-b));
}

@media (max-width: 379px) {
  .choice-text strong {
    font-size: 20px;
  }

  .choice {
    padding-left: 18px;
    gap: 12px;
  }

  .choice-text {
    padding-left: 14px;
  }

  .hero-art {
    top: 52px;
    width: 226px;
  }

  .hero-receipt .receipt-art {
    width: 128px;
  }

  .hero-coin .coin-art {
    width: 108px;
  }

  .hero-burst {
    left: 120px;
  }
}

/* ============================================================
   Barra de rolagem nas cores do app (computador e tablet com mouse)
   ============================================================ */

@media (hover: hover) and (pointer: fine) {
  html,
  .sheet,
  .msg-preview,
  .quick-items {
    scrollbar-width: thin;
    scrollbar-color: var(--brand-green) var(--bg-deep);
  }

  /* Safari e navegadores mais antigos */
  ::-webkit-scrollbar {
    width: 12px;
    height: 10px;
  }

  ::-webkit-scrollbar-track {
    background: var(--bg-deep);
  }

  ::-webkit-scrollbar-thumb {
    background: var(--brand-green);
    border: 3px solid var(--bg-deep);
    border-radius: 999px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: var(--brand-orange);
  }

  ::-webkit-scrollbar-corner {
    background: var(--bg-deep);
  }

  html:hover {
    scrollbar-color: var(--brand-green) var(--bg-deep);
  }
}

/* ============================================================
   Carinhas (avatares)
   ============================================================ */

.avatar.has-img {
  padding: 0;
  overflow: hidden;
  background: transparent;
}

.avatar.has-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-btn {
  display: inline-flex;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.avatar-btn:active {
  transform: scale(0.92);
}

@media (hover: hover) {
  .avatar-btn:hover .avatar {
    box-shadow: 0 0 0 3px var(--brand-yellow);
  }
}

.person-top .avatar {
  width: 48px;
  height: 48px;
}

.av-picker legend small {
  font-weight: 500;
  color: var(--muted);
}

.av-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.av-opt {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  overflow: visible;
  transition: transform 0.15s ease;
}

.av-opt img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.av-opt[aria-pressed='true'] {
  transform: scale(1.06);
}

.av-opt[aria-pressed='true']::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--brand-orange);
}

.av-opt[aria-pressed='true']::before {
  content: '✓';
  position: absolute;
  right: -4px;
  bottom: -4px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-orange);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 0 0 2px var(--brand-cream);
}

.av-opt.in-use img {
  opacity: 0.4;
  filter: grayscale(0.6);
}

.av-pick {
  animation: av-pick 0.45s cubic-bezier(0.2, 1.8, 0.4, 1);
}

@keyframes av-pick {
  40% {
    transform: scale(1.18) rotate(-8deg);
  }
}

.form-card .av-picker {
  margin-top: 2px;
}

/* ============================================================
   Ajuste fino: frase pela largura da coluna, brilho na comanda,
   rodapé sempre no pé da tela
   ============================================================ */

/* tamanho do título segue a coluna do app (não a janela): não encosta no desktop */
.home {
  container-type: inline-size;
}

.hero {
  font-size: clamp(38px, 12.4cqi, 54px);
}

.hero em {
  display: block;
  margin-top: 0.06em;
  font-size: clamp(26px, 8.3cqi, 40px);
  line-height: 1;
}

/* brilho na ponta de cima da comanda "RACHA BAR" */
.hero-burst {
  top: -30px;
  left: 114px;
  width: 34px;
  height: 34px;
  transform: rotate(-8deg);
}

@media (max-width: 379px) {
  .hero-burst {
    top: -28px;
    left: 98px;
  }
}

/* rodapé sempre no pé: em telas curtas sobra espaço no meio; nas longas ele desce junto */
main.screen {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

.screen > .app-footer {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(36px + var(--safe-b));
  margin: 0;
}

.home > .app-footer {
  bottom: calc(14px + var(--safe-b));
}

.mesa > .app-footer {
  bottom: calc(var(--dock-h) + 26px + var(--safe-b));
}

/* faixa quadriculada do pé também presa ao fundo da tela, abaixo do rodapé */
.screen:not(.home) {
  padding-bottom: calc(84px + var(--safe-b));
}

.screen:not(.home)::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
}

body[data-route='mesa'] .screen {
  padding-bottom: calc(var(--dock-h) + 70px + var(--safe-b));
}

/* ============================================================
   Bebida da mesa e categorias dos pedidos
   ============================================================ */

.drink-types {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.drink-type {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-height: 70px;
  padding: 8px 4px;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}

.drink-type .i {
  width: 26px;
  height: 26px;
}

.drink-type[aria-checked='true'] {
  background: var(--brand-yellow);
  box-shadow: inset 0 0 0 2px var(--brand-green);
}

.row-drink {
  grid-template-columns: 1fr 1fr;
}

.field small.opt {
  font-weight: 500;
  color: var(--muted);
}

.drink-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fbefc8;
  font-size: 14px;
}

.drink-preview .i {
  width: 22px;
  height: 22px;
  flex: none;
}

.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 700;
}

.cat-chip .i {
  width: 16px;
  height: 16px;
}

.cat-chip[aria-checked='true'] {
  background: var(--brand-green);
  color: var(--surface);
  box-shadow: none;
}

.qi-cat {
  flex: none;
  align-self: center;
  padding: 0 2px 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  max-height: 58px;
  overflow: hidden;
}

.r-totals .r-cat {
  padding-left: 10px;
  font-size: 13px;
  color: var(--ink-2);
}

.r-cat span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
}

.r-cat .i {
  width: 14px;
  height: 14px;
}

@media (max-width: 379px) {
  .drink-type {
    font-size: 11px;
  }

  .row-drink {
    grid-template-columns: 1fr;
  }
}

/* etiqueta de categoria na faixa de itens: horizontal */
.qi-cat {
  writing-mode: horizontal-tb;
  transform: none;
  max-height: none;
  align-self: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--brand-green);
  color: var(--brand-yellow);
  font-size: 10.5px;
  white-space: nowrap;
}

/* nome da bebida longo encolhe; Ajustes fica na mesma linha */
.chip-row {
  flex-wrap: nowrap;
}

.chip-row .price-chip:first-child {
  flex: 0 1 auto;
  min-width: 0;
}

.chip-row .price-chip:first-child > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-row .price-chip:first-child > u,
.chip-row .price-chip:first-child > i,
.chip-row .price-chip:first-child > .i {
  flex: none;
}

.chip-row .price-chip.soft {
  flex: none;
}

.chip-row .price-chip:first-child > span.pc-text {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  overflow: visible;
  min-width: 0;
}

.pc-text .pc-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-text b {
  flex: none;
  white-space: nowrap;
}

/* ============================================================
   Bebida principal: rótulo do atalho, "?" e textos cabendo nos cartões
   ============================================================ */

.chip-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 16px 2px -8px;
}

.chip-label > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.chip-label > span .i {
  width: 16px;
  height: 16px;
}

.chip-label small {
  font-weight: 600;
  color: var(--muted);
}

.info-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  color: var(--ink-2);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  position: relative;
}

/* área de toque de 44px sem aumentar o círculo */
.info-dot::before {
  content: '';
  position: absolute;
  inset: -8px;
}

.info-dot[aria-expanded='true'] {
  background: var(--brand-green);
  color: var(--brand-yellow);
  box-shadow: none;
}

.chip-help {
  position: relative;
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--brand-green);
  color: var(--surface);
  font-size: 14px;
  line-height: 1.4;
  animation: rise-in 0.3s ease both;
}

.chip-help::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 28px;
  width: 12px;
  height: 12px;
  background: var(--brand-green);
  transform: rotate(45deg);
}

.chip-help b {
  color: var(--brand-yellow);
}

/* cartões de tipo de bebida: texto sempre dentro */
.drink-type {
  min-width: 0;
  padding: 8px 2px;
  font-size: 11.5px;
}

.drink-type span {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  hyphens: none;
}

@media (max-width: 379px) {
  .drink-type {
    font-size: 10.5px;
  }

  .drink-type .i {
    width: 22px;
    height: 22px;
  }
}

/* atalhos com nome longo ("Long neck Heineken") não estouram o cartão */
.qi span b {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* engrenagem de Ajustes na linha de cima: botão da bebida ocupa a largura toda */
.chip-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.gear-dot .i {
  width: 16px;
  height: 16px;
}

.chip-row .price-chip:first-child {
  flex: 1 1 auto;
  justify-content: flex-start;
}

.chip-row .price-chip:first-child > u {
  margin-left: auto;
}

/* ============================================================
   Roleta
   ============================================================ */

.dock:not(.dock-two) {
  grid-template-columns: 1fr 1.25fr 1fr 1fr;
  gap: 4px;
}

.dock:not(.dock-two) .dock-btn.main {
  font-size: 17px;
}

.roleta .segmented {
  margin-bottom: 6px;
}

.wheel-wrap {
  position: relative;
  width: min(340px, 100%);
  margin: 18px auto 14px;
  aspect-ratio: 1;
}

.wheel {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 16px 26px rgba(22, 61, 50, 0.3));
  will-change: transform;
}

.wheel text {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.wheel .slice.won path {
  stroke: var(--brand-yellow);
  stroke-width: 5;
  filter: brightness(1.08);
}

.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  z-index: 2;
  width: 34px;
  height: 44px;
  transform: translateX(-50%);
  transform-origin: 50% 20%;
  background: var(--brand-orange);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  filter: drop-shadow(0 3px 0 var(--brand-green));
}

.wheel-pointer::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-cream);
  transform: translateX(-50%);
}

.wheel-wrap.spinning .wheel-pointer {
  animation: pointer-tick 0.11s ease-in-out infinite alternate;
}

@keyframes pointer-tick {
  from {
    transform: translateX(-50%) rotate(-7deg);
  }
  to {
    transform: translateX(-50%) rotate(7deg);
  }
}

.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0;
  width: 86px;
  height: 86px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--brand-cream);
  box-shadow: 0 0 0 5px var(--brand-green), 0 8px 18px rgba(14, 40, 33, 0.35);
  color: var(--brand-green);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease;
}

.wheel-hub .i {
  width: 24px;
  height: 24px;
}

.wheel-hub:active {
  transform: translate(-50%, -50%) scale(0.94);
}

.wheel-hub:disabled {
  opacity: 1;
  cursor: progress;
}

.spin-result:empty {
  display: none;
}

.spin-result {
  margin-bottom: 14px;
}

.result-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--brand-green);
  color: var(--surface);
  box-shadow: 0 16px 30px -16px rgba(14, 40, 33, 0.7);
}

.result-card > .i {
  width: 34px;
  height: 34px;
  flex: none;
  color: var(--brand-yellow);
}

.result-card .avatar {
  width: 52px;
  height: 52px;
  flex: none;
}

.result-card small {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-yellow);
}

.result-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
}

.spin-btn {
  margin-bottom: 10px;
}

.fair-note {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.fair-note .i {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
  color: var(--ok);
}

.spin-history ol {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.spin-history li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-weight: 700;
}

.spin-history li small {
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--muted);
}

.opt-list {
  display: grid;
  gap: 8px;
}

.opt-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.opt-row input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  font-size: 16px;
}

.opt-row input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--brand-orange);
}

.opt-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ============================================================
   Aviso de versão nova
   ============================================================ */

.update-bar {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(var(--col-w) - 24px);
  max-width: 440px;
  padding: 10px 8px 10px 16px;
  border-radius: 16px;
  background: var(--brand-yellow);
  color: var(--brand-green);
  box-shadow:
    inset 0 0 0 2px var(--brand-green),
    0 18px 36px -16px rgba(14, 40, 33, 0.6);
  transform: translateX(-50%);
  animation: alert-in 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.update-bar span {
  display: grid;
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}

.update-bar b {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 800;
}

.update-bar small {
  font-size: 12.5px;
  font-weight: 600;
}

.update-go {
  flex: none;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--brand-green);
  color: var(--brand-yellow);
  font-weight: 800;
  font-size: 15px;
}

.update-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 44px;
  flex: none;
  border: 0;
  background: none;
  color: var(--brand-green);
  font-size: 24px;
  line-height: 1;
}

/* ============================================================
   Bilhete da conta: imprime e se destaca (rasga)
   ============================================================ */

.tear-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 20px 16px;
  background: rgba(14, 40, 33, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  animation: fade 0.25s ease;
}

.tear-overlay.leaving {
  animation: alert-out 0.28s ease forwards;
}

.tear-stage {
  position: relative;
  width: min(300px, 82vw);
}

.printer {
  position: relative;
  z-index: 2;
  height: 46px;
  border-radius: 14px 14px 10px 10px;
  background: var(--brand-green);
  box-shadow: inset 0 -3px 0 #0f2e25, 0 10px 20px -8px rgba(0, 0, 0, 0.5);
}

.printer-led {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-yellow);
  box-shadow: 0 0 8px var(--brand-yellow);
  animation: led 0.35s steps(2) 4;
}

@keyframes led {
  50% {
    opacity: 0.2;
  }
}

.printer-slot {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 6px;
  border-radius: 3px;
  background: #0a1f19;
}

/* janela abaixo da impressora: o papel "sai" de dentro dela */
.tear-window {
  position: relative;
  margin: -6px 22px 0;
  padding-bottom: 40px;
  overflow: hidden;
}

.tear-paper {
  position: relative;
  padding: 18px 16px 26px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.45);
  transform-origin: 20% 0;
  /* borda de cima serrilhada (onde rasga) e de baixo também */
  --zig: 10px;
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--zig) 51% repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--zig) 51% repeat-x;
  mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--zig) 51% repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--zig) 51% repeat-x;
  animation:
    print-out 1.35s cubic-bezier(0.3, 0.1, 0.4, 1) both,
    tear-off 0.75s 1.55s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}

@keyframes print-out {
  0% {
    transform: translateY(-102%);
  }
  /* sai aos solavancos, como impressora térmica */
  30% {
    transform: translateY(-70%);
  }
  38% {
    transform: translateY(-66%);
  }
  65% {
    transform: translateY(-30%);
  }
  72% {
    transform: translateY(-26%);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes tear-off {
  0% {
    transform: translateY(0) rotate(0);
  }
  25% {
    transform: translateY(-4px) rotate(-2deg);
  }
  100% {
    transform: translateY(26px) rotate(-5deg);
  }
}

.tr-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 2px dashed var(--brand-yellow);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.tr-head small {
  font-size: 11px;
  letter-spacing: 0;
}

.tr-title {
  margin: 10px 0 6px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
}

.tr-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0;
}

.tr-line.big {
  font-size: 17px;
  font-weight: 600;
}

.tr-cut {
  margin: 8px 0;
  border-top: 2px dashed var(--line-strong);
}

.tr-thanks {
  margin-top: 6px;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 700;
}

.tr-stamp {
  position: absolute;
  top: 46%;
  left: 50%;
  padding: 6px 12px;
  border: 3px solid var(--brand-orange);
  border-radius: 8px;
  color: var(--brand-orange);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-14deg);
  opacity: 0;
  animation: tr-stamp 0.45s 2.15s cubic-bezier(0.2, 1.6, 0.4, 1) both;
  mix-blend-mode: multiply;
}

@keyframes tr-stamp {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-14deg) scale(2.4);
  }
  100% {
    opacity: 0.92;
    transform: translate(-50%, -50%) rotate(-14deg) scale(1);
  }
}

.tear-tap {
  margin: 0;
  color: var(--on-ink-muted);
  font-size: 13px;
  font-weight: 600;
  animation: fade 0.4s 2.4s both;
}

@media (prefers-reduced-motion: reduce) {
  .tr-stamp {
    opacity: 0.92;
  }
}

/* tirinha que fica presa na impressora quando o bilhete se solta */
.tear-stub {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  height: 14px;
  background: var(--paper);
  --zig: 10px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--zig) 100% repeat-x;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--zig) 100% repeat-x;
  opacity: 0;
  animation: stub-show 0.2s 1.6s ease both, stub-shake 0.35s 1.6s ease;
}

@keyframes stub-show {
  to {
    opacity: 1;
  }
}

@keyframes stub-shake {
  30% {
    transform: translateX(-2px);
  }
  60% {
    transform: translateX(2px);
  }
}

@keyframes tear-off {
  0% {
    transform: translateY(0) rotate(0);
  }
  20% {
    transform: translateY(-5px) rotate(-1.5deg);
  }
  100% {
    transform: translateY(34px) rotate(-6deg);
  }
}

.tear-window {
  padding-bottom: 56px;
}

@media (prefers-reduced-motion: reduce) {
  .tear-stub {
    opacity: 1;
  }
}

.tear-window.free {
  overflow: visible;
}


/* ---------------------------------------------------------------- nome do bar na comanda */
.place-tag {
  display: flex; align-items: center; gap: 6px; margin: -4px auto 12px; max-width: 100%;
  padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  font: 500 13px/1.2 'Figtree', sans-serif; color: var(--muted); cursor: pointer;
}
.place-tag span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-tag b { color: var(--brand-green); font-weight: 700; }
.place-tag svg { width: 14px; height: 14px; flex: none; color: var(--accent-text); }
.place-tag .place-edit { color: var(--muted); opacity: .7; }
.place-tag.is-empty { border-style: dashed; background: transparent; }
.place-tag:active { transform: scale(.97); }
.tr-place { text-align: center; font-size: 12px; margin: -2px 0 6px; text-transform: uppercase; letter-spacing: .06em; }
