* {
  box-sizing: border-box;
}

:root {
  --hola-bg: #f8f5f0;
  --hola-panel: #ffffff;
  --hola-text: #2b2b2b;
  --hola-muted: #6b7280;
  --hola-accent: #c2410c;
  --hola-accent-hover: #ea580c;
  --hola-success: #16a34a;
  --hola-error: #dc2626;
  --hola-warning: #f59e0b;
  --hola-border: #e5e0d8;
  --hola-soft: #fff7ed;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  color: var(--hola-text);
  background: var(--hola-bg);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  touch-action: manipulation;
}

button,
input,
select {
  min-height: 42px;
  border: 1px solid var(--hola-border);
  color: var(--hola-text);
  background: var(--hola-panel);
  font: inherit;
  font-weight: 900;
}

button {
  cursor: pointer;
}

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

h1,
h2,
p {
  margin: 0;
}

.hidden {
  display: none !important;
}

.self-shell {
  min-height: 100dvh;
  padding: 12px;
  padding-bottom: 90dvh;
}

.hero {
  display: grid;
  gap: 8px;
  margin: -12px -12px 8px;
  padding: 8px 12px;
  color: #ffffff;
  background: var(--hola-text);
}

.place-summary {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.place-summary strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-summary p {
  color: #d6d0c7;
  font-size: 12px;
}

.hero-actions {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 8px;
}

.hero-actions button {
  min-height: 38px;
  padding: 0 10px;
  font-size: 13px;
}

.language-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 104px;
  min-width: 104px;
  min-height: 38px;
  border: 1px solid var(--hola-border);
  background: var(--hola-panel);
}

.language-toggle button {
  width: 100%;
  min-height: 36px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--hola-text);
  line-height: 1;
  white-space: nowrap;
}

.language-toggle button + button {
  border-left: 1px solid var(--hola-border);
}

.language-toggle .active {
  color: #ffffff;
  background: var(--hola-accent);
}

.waiter-button,
.submit-button,
.menu-card button,
.mode-tabs .active,
.category-row .active {
  color: #ffffff;
  border-color: var(--hola-accent);
  background: var(--hola-accent);
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.mode-tabs button {
  position: relative;
}

.mode-tabs b {
  position: absolute;
  top: 4px;
  right: 8px;
  min-width: 18px;
  min-height: 18px;
  display: grid;
  place-items: center;
  color: var(--hola-accent);
  background: #ffffff;
  font-size: 11px;
}

.category-row {
  display: flex;
  gap: 8px;
  margin: 0 -12px 10px;
  padding: 0 12px 4px;
  overflow-x: auto;
}

.category-row button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 12px;
}

.menu-list,
.order-lines,
.cart-lines {
  display: grid;
  gap: 10px;
}

.menu-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--hola-border);
  background: var(--hola-panel);
}

.menu-card.unavailable {
  filter: grayscale(1);
  opacity: .62;
}

.menu-card img,
.placeholder {
  width: 104px;
  height: 104px;
  object-fit: cover;
  background: var(--hola-bg);
}

.placeholder {
  display: grid;
  place-items: center;
  color: var(--hola-muted);
  font-size: 36px;
  font-weight: 900;
}

.menu-card-body {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
}

.menu-card strong {
  font-size: 16px;
}

.menu-card p {
  color: var(--hola-muted);
  font-size: 12px;
  line-height: 1.35;
}

.menu-card em {
  color: var(--hola-error);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.menu-card-body > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.menu-card span {
  color: var(--hola-accent);
  font-size: 18px;
  font-weight: 900;
}

.menu-card button {
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
}

.order-panel,
.state-panel {
  padding: 14px;
  border: 1px solid var(--hola-border);
  background: var(--hola-panel);
}

.order-head,
.cart-head,
.order-line,
.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-head {
  margin-bottom: 12px;
}

.order-head span,
.cart-head span {
  color: var(--hola-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.order-head h2 {
  margin-top: 4px;
  font-size: 20px;
}

.refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 108px;
}

.refresh-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(43, 43, 43, .2);
  border-top-color: var(--hola-accent);
  animation: refresh-spin .75s linear infinite;
}

@keyframes refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.order-line,
.cart-line {
  padding: 10px;
  background: #fbfaf8;
}

.order-line.cancelled {
  opacity: .5;
}

.order-line span {
  display: block;
  margin-top: 3px;
  color: var(--hola-muted);
  font-size: 12px;
}

.order-line b {
  color: var(--hola-accent);
  font-size: 12px;
}

.totals {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  color: #ffffff;
  background: var(--hola-text);
}

.totals span {
  color: rgba(255, 255, 255, .7);
}

.cart-panel {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: grid;
  gap: 10px;
  max-height: 58dvh;
  padding: 12px;
  overflow: auto;
  border-top: 1px solid var(--hola-border);
  background: var(--hola-panel);
  box-shadow: 0 -12px 34px rgba(43, 43, 43, .16);
}

.cart-head b {
  color: var(--hola-accent);
  font-size: 20px;
}

.cart-head > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.cart-line div {
  display: grid;
  grid-template-columns: 34px 34px 34px;
  align-items: center;
  text-align: center;
}

.cart-line button {
  min-width: 34px;
  min-height: 34px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--hola-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  padding: 0 10px;
}

.submit-button {
  min-height: 48px;
  font-size: 16px;
}

.state-logo {
  width: min(320px, 100%);
  height: auto;
  display: block;
  margin-bottom: 12px;
}

.state-panel {
  margin-top: 24px;
}

.state-panel p {
  color: var(--hola-muted);
  line-height: 1.45;
}

.toast {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 50;
  padding: 12px;
  color: #ffffff;
  background: var(--hola-text);
  font-weight: 800;
}

@media (min-width: 640px) {
  .self-shell {
    width: 430px;
    margin: 0 auto;
    border-right: 1px solid var(--hola-border);
    border-left: 1px solid var(--hola-border);
  }

  .cart-panel {
    right: calc((100vw - 430px) / 2);
    left: calc((100vw - 430px) / 2);
  }
}
