/* Clean Apple-style look (light and dark), right-to-left aware. */

/* Thmanyah Sans (ثمانية), used for all text. */
@font-face {
  font-family: "Thmanyah Sans";
  src: url("/fonts/thmanyahsans-Regular.woff2") format("woff2");
  font-weight: 100 449;
  font-display: swap;
}
@font-face {
  font-family: "Thmanyah Sans";
  src: url("/fonts/thmanyahsans-Medium.woff2") format("woff2");
  font-weight: 450 599;
  font-display: swap;
}
@font-face {
  font-family: "Thmanyah Sans";
  src: url("/fonts/thmanyahsans-Bold.woff2") format("woff2");
  font-weight: 600 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --sep: rgba(0, 0, 0, 0.1);
  --fill: rgba(120, 120, 128, 0.12);
  --fill-2: rgba(120, 120, 128, 0.2);
  --primary: #0071e3;
  --primary-hover: #0077ed;
  --on-primary: #ffffff;
  --primary-soft: rgba(0, 113, 227, 0.1);
  --gold: #b25000;
  --gold-line: #ff9f0a;
  --gold-soft: rgba(255, 159, 10, 0.18);
  --ok: #1d8a3a;
  --ok-soft: rgba(52, 199, 89, 0.16);
  --red: #d70015;
  --red-soft: rgba(255, 59, 48, 0.12);
  --wa: #1fa855;
  --purple: #8944c8;
  --bar: rgba(245, 245, 247, 0.72);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 28px rgba(0, 0, 0, 0.06);
  --radius: 20px;
  --font: "Thmanyah Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Arabic", "Helvetica Neue", "Segoe UI", "Geeza Pro",
    Tahoma, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8e8e93;
    --sep: rgba(255, 255, 255, 0.14);
    --fill: rgba(120, 120, 128, 0.24);
    --fill-2: rgba(120, 120, 128, 0.36);
    --primary: #0a84ff;
    --primary-hover: #409cff;
    --on-primary: #ffffff;
    --primary-soft: rgba(10, 132, 255, 0.18);
    --gold: #ff9f0a;
    --gold-line: #ff9f0a;
    --gold-soft: rgba(255, 159, 10, 0.18);
    --ok: #30d158;
    --ok-soft: rgba(48, 209, 88, 0.18);
    --red: #ff453a;
    --red-soft: rgba(255, 69, 58, 0.18);
    --purple: #bf5af2;
    --bar: rgba(0, 0, 0, 0.72);
    --shadow: none;
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  /* No double-tap zoom: tapping + twice quickly must not zoom the page. */
  touch-action: manipulation;
}
button,
a,
input,
select,
textarea,
label {
  touch-action: manipulation;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] h1 {
  letter-spacing: -0.01em;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(30px, 8vw, 40px);
  line-height: 1.2;
  font-weight: 700;
  text-wrap: balance;
}
h2 {
  font-size: 21px;
  line-height: 1.3;
  font-weight: 700;
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
}
html[lang="en"] .eyebrow {
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.muted {
  color: var(--text-2);
}
.small {
  font-size: 14px;
}
.num,
bdi.num {
  font-variant-numeric: tabular-nums;
}
[hidden] {
  display: none !important;
}

/* Buttons */
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 16px;
  border: 0;
  border-radius: 980px;
  background: var(--fill);
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, opacity 0.15s;
}
.btn svg {
  width: 18px;
  height: 18px;
}
.btn:hover {
  background: var(--fill-2);
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}
.btn.primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn.primary:hover {
  background: var(--primary-hover);
}
.btn.wa {
  background: var(--wa);
  color: #fff;
}
.btn.wa:hover {
  filter: brightness(1.06);
}
.btn.danger {
  color: var(--red);
}
.btn.plain {
  background: none;
  padding-inline: 10px;
}
.btn.plain:hover {
  background: var(--fill);
}
.btn.icon-only {
  width: 38px;
  padding: 0;
}
.btn.large {
  width: 100%;
  min-height: 54px;
  font-size: 17px;
}
/* Language switch: short and grey. */
.lang-switch {
  min-width: 38px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-3);
}
:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 2px;
}

/* Forms */
.field {
  display: block;
}
.field + .field {
  margin-top: 16px;
}
.field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
}
.field .hint {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-3);
}
.input {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--fill);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.input {
  min-height: 150px;
  resize: vertical;
  line-height: 1.6;
}
.input::placeholder {
  color: var(--text-3);
}
.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
input[type="tel"],
.ltr {
  direction: ltr;
}
html[dir="rtl"] input[type="tel"] {
  text-align: right;
}
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 6px;
  border-radius: 14px;
  background: var(--fill);
}
.stepper button {
  width: 44px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: var(--card);
  color: var(--primary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.stepper button:disabled {
  opacity: 0.35;
}
.stepper output {
  font-weight: 600;
}
.segmented {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--fill);
}
.segmented button {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
}
.segmented button[aria-checked="true"] {
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.error {
  margin-top: 14px;
  color: var(--red);
  font-size: 15px;
}
.error:empty {
  display: none;
}
.note {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 14px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 980px;
  background: var(--fill);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.gold {
  background: var(--gold-soft);
  color: var(--gold);
}
.badge.ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.badge.red {
  background: var(--red-soft);
  color: var(--red);
}

/* ---------- Guest ---------- */

.guest {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 460px;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 22px max(26px, env(safe-area-inset-bottom));
}
/* Language switch on the left, logo centred: the same in Arabic and English. */
.guest-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: 2px 0 34px;
}
.guest-top .lang-switch {
  justify-self: start;
  margin-left: -10px;
}
.guest .screen {
  display: flex;
  flex: 1;
  flex-direction: column;
  animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
.guest h1 + p {
  margin-top: 10px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-2);
}
.guest .card {
  margin-top: 24px;
  padding: 22px;
}
.guest .actions {
  display: grid;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding-top: 26px;
}
.policy {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-3);
  text-align: center;
}
.wa-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--wa);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.wa-link svg {
  width: 20px;
  height: 20px;
}
.center {
  align-items: center;
  text-align: center;
}
.hero-number {
  margin-top: 4px;
  font-size: clamp(100px, 34vw, 140px);
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  text-align: start;
}
.facts > div + div {
  padding-inline-start: 18px;
  border-inline-start: 1px solid var(--sep);
}
.facts strong {
  display: block;
  font-size: 21px;
}
.symbol {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 8px 0 26px;
  border-radius: 50%;
  background: var(--fill);
  color: var(--text-2);
}
.symbol.ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.symbol svg {
  width: 40px;
  height: 40px;
}
.ring {
  position: relative;
  width: 228px;
  height: 228px;
  margin: 28px auto 0;
}
.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
html[dir="rtl"] .ring svg {
  transform: rotate(-90deg) scaleY(-1);
}
.ring circle {
  fill: none;
  stroke-width: 8;
  stroke: var(--fill-2);
}
.ring circle.progress {
  stroke: var(--primary);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.4s linear, stroke 0.3s;
}
.ring.urgent circle.progress {
  stroke: var(--red);
}
.ring .inside {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ring .time {
  direction: ltr;
  font-size: 54px;
  line-height: 1.05;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.table-pill {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 20px;
  border-radius: 980px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 18px;
  font-weight: 600;
}

/* ---------- Host ---------- */
.login {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 22px;
}
.login .card {
  width: min(380px, 100%);
  padding: 34px 28px 28px;
  text-align: center;
}
.login h2 {
  margin-top: 4px;
}
.login .input {
  margin: 22px 0 14px;
  text-align: center;
  font-size: 24px;
  letter-spacing: 0.3em;
  direction: ltr;
}
.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--sep);
}
.bar-inner,
.page {
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: 22px;
}
.bar-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-height: 60px;
  padding-block: 8px;
}
.bar-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-inline-end: auto;
}
.bar-title strong {
  font-size: 17px;
  font-weight: 600;
}
.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-inline-end: 4px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
}
.switch input {
  appearance: none;
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  margin: 0;
  border-radius: 14px;
  background: var(--fill-2);
  cursor: pointer;
  transition: background 0.2s;
}
.switch input::after {
  content: "";
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}
.switch input:checked {
  background: #34c759;
}
.switch input:checked::after {
  transform: translateX(18px);
}
html[dir="rtl"] .switch input:checked::after {
  transform: translateX(-18px);
}
.page {
  padding-block: 30px 70px;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}
.stat {
  padding: 16px 18px;
}
.stat strong {
  display: block;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stat .label {
  font-size: 14px;
  font-weight: 600;
}
.stat .sub {
  font-size: 12.5px;
  color: var(--text-3);
}
.stat.gold strong {
  color: var(--gold);
}
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 22px;
}
.stack {
  display: grid;
  gap: 22px;
}
.panel {
  padding: 22px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}
.rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
.row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 14px 0;
}
.row + .row {
  border-top: 1px solid var(--sep);
}
.row .pos {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--fill);
  font-size: 15px;
  font-weight: 700;
}
.row .pos.solid {
  background: var(--primary);
  color: var(--on-primary);
}
.row .who {
  flex: 1 1 170px;
  min-width: 0;
}
.row .who strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.row .who .meta {
  display: block;
  font-size: 14px;
  color: var(--text-2);
}
.row .who a {
  color: var(--primary);
  text-decoration: none;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}
.row .acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-inline-start: auto;
}
.empty {
  padding: 26px 0 14px;
  text-align: center;
  color: var(--text-3);
}
.floor-head {
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
}
.tables {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  min-height: 84px;
  padding: 10px 12px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--fill);
  text-align: start;
  cursor: pointer;
}
.tile .tn {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
}
.tile b {
  font-size: 20px;
  line-height: 1.1;
}
.tile .cap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  color: var(--text-3);
}
.tile .cap svg {
  width: 13px;
  height: 13px;
}
.tile .st {
  overflow: hidden;
  font-size: 12px;
  color: var(--text-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile.called {
  background: var(--gold-soft);
}
.tile.called .st {
  color: var(--gold);
}
.tile.confirmed {
  background: var(--ok-soft);
}
.tile.confirmed .st {
  color: var(--ok);
}
.tile.seated {
  background: var(--primary-soft);
}
.tile.seated .st {
  color: var(--primary);
}
.tile.blocked {
  background: repeating-linear-gradient(135deg, var(--fill), var(--fill) 6px, transparent 6px, transparent 12px);
  border-color: var(--fill-2);
}
.tile.blocked b {
  color: var(--text-3);
}
.tile.fits:not(:disabled) {
  border-color: var(--gold-soft);
}
.tile:disabled {
  opacity: 0.4;
  cursor: default;
}
.tile[aria-pressed="true"] {
  border-color: var(--gold-line);
  background: var(--gold-soft);
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-2);
}
.legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-inline-end: 5px;
  border-radius: 50%;
  background: var(--fill-2);
}
.legend .called i {
  background: var(--gold-line);
}
.tile .type-mark {
  display: inline-flex;
  color: var(--text-2);
}
.legend .confirmed i {
  background: var(--ok);
}
.legend .seated i {
  background: var(--primary);
}
.legend .blocked i {
  background: repeating-linear-gradient(135deg, var(--text-3), var(--text-3) 2px, transparent 2px, transparent 4px);
}
.segmented.compact button {
  min-height: 32px;
  padding-inline: 12px;
  font-size: 13.5px;
}
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline li {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 9px 0 9px 0;
  font-size: 14.5px;
}
.timeline .dot {
  flex: none;
  width: 9px;
  height: 9px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--fill-2);
}
.timeline .dot.gold {
  background: var(--gold-line);
}
.timeline .dot.ok {
  background: var(--ok);
}
.timeline .dot.red {
  background: var(--red);
}
.timeline .dot.green {
  background: var(--primary);
}
.timeline time {
  margin-inline-start: auto;
  flex: none;
  font-size: 12.5px;
  color: var(--text-3);
  direction: ltr;
}

/* Sheets */
dialog.sheet {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 26px;
  border: 0;
  border-radius: 26px;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
  animation: rise 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
dialog.sheet::backdrop {
  background: rgba(10, 18, 14, 0.45);
}
.sheet h2 + p {
  margin-top: 6px;
}
.sheet .body {
  margin-top: 18px;
}
.sheet .picker {
  max-height: 46dvh;
  overflow: auto;
  padding: 2px;
}
.sheet .picker .floor-head:first-child {
  margin-top: 0;
}
.sheet-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.sheet-actions .btn {
  min-height: 46px;
  padding-inline: 20px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.grid-2 .field {
  margin: 0;
}
.menu {
  display: grid;
  overflow: hidden;
  border-radius: 16px;
  background: var(--fill);
}
.menu-item {
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  background: none;
  font-size: 16px;
  font-weight: 500;
  text-align: start;
  color: var(--primary);
  cursor: pointer;
}
.menu-item + .menu-item {
  border-top: 1px solid var(--sep);
}
.menu-item:hover {
  background: var(--fill);
}
.menu-item.danger {
  color: var(--red);
}
.table-editor {
  display: grid;
  gap: 8px;
  max-height: 48dvh;
  overflow: auto;
  padding: 2px;
}
.table-editor .te-row {
  display: grid;
  grid-template-columns: 76px 76px 1fr auto auto;
  align-items: center;
  gap: 8px;
}
.table-editor .te-head {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-3);
}
.table-editor .input {
  min-height: 42px;
  padding: 8px 12px;
}

/* Toasts */
.toasts {
  position: fixed;
  z-index: 50;
  inset-inline-end: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 36px));
}
.toast {
  padding: 13px 16px;
  border-radius: 16px;
  border-inline-start: 4px solid var(--primary);
  background: var(--card);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
  font-size: 15px;
  animation: rise 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition: opacity 0.4s;
}
.toast.ok {
  border-color: var(--ok);
}
.toast.red {
  border-color: var(--red);
}
.toast.out {
  opacity: 0;
}

/* Poster */
.poster {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 52px 28px;
  text-align: center;
}
.poster h1 {
  margin-top: 10px;
  font-size: 44px;
}
.poster .en {
  margin-top: 6px;
  font-size: 20px;
  color: var(--text-2);
}
.poster > img {
  width: min(330px, 78vw);
  margin: 34px 0 24px;
  padding: 22px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}
.poster .steps {
  font-size: 18px;
  color: var(--text-2);
}
.poster .url {
  margin-top: 12px;
  direction: ltr;
  overflow-wrap: anywhere;
}
.poster .tools {
  display: flex;
  gap: 10px;
  margin-top: 34px;
}


@media (max-width: 880px) {
  .cols {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .stats {
    gap: 8px;
  }
  .stat {
    padding: 12px;
  }
  .stat strong {
    font-size: 26px;
  }
  .stat .sub {
    display: none;
  }
  .bar-inner,
  .page {
    padding-inline: 16px;
  }
  .panel {
    padding: 18px;
  }
  .row .acts {
    width: 100%;
    margin-inline-start: 52px;
  }
  .table-editor .te-row {
    grid-template-columns: 58px 58px 1fr auto auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
@media print {
  body,
  .poster-page {
    background: #fff;
    color: #000;
  }
  .no-print {
    display: none !important;
  }
}

.mt-12 {
  margin-top: 12px;
}
.mt-16 {
  margin-top: 16px;
}
.offscreen {
  position: fixed;
  opacity: 0;
  pointer-events: none;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  cursor: pointer;
}
.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
}
.prefs {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--sep);
}
.prefs > .eyebrow {
  margin-bottom: 12px;
}
.btn.wa-label svg {
  width: 17px;
  height: 17px;
}
.msg-controls {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.join-title {
  margin-top: 28px;
}
.guest .join-title + form .card,
.guest .join-title + .screen .card {
  margin-top: 12px;
}
.segmented.grid2 {
  grid-auto-flow: row;
  grid-template-columns: 1fr 1fr;
}

/* Welcome on two staggered lines: «حي الله» at the start (right in Arabic),
   «من جانا» lower and toward the other side. */
h1.welcome {
  display: flex;
  flex-direction: column;
  margin: 6px 0 4px;
  color: var(--purple);
  font-size: clamp(54px, 17vw, 72px);
  line-height: 1.05;
}
h1.welcome .line1 {
  align-self: flex-start;
}
h1.welcome .line2 {
  align-self: flex-end;
  margin-inline-end: 9%;
}
html[lang="en"] h1.welcome {
  font-size: clamp(32px, 9.4vw, 44px);
}
h2.join-title {
  font-size: 24px;
  margin-top: 26px;
}

.facts.single {
  grid-template-columns: 1fr;
}
.be-ready {
  margin-top: 10px;
  max-width: 32ch;
  font-size: 18px;
  font-weight: 500;
  color: var(--purple);
}

.stat.ok strong {
  color: var(--ok);
}
.row .pos.solid.ok {
  background: var(--ok);
}
/* Guests who cancelled / ran out of time: own sections at the end. */
.row.dropped {
  opacity: 0.6;
}
.row.dropped .who strong {
  text-decoration: line-through;
}
/* Floor and seating wishes as small coloured flags. */
.flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.flag {
  padding: 2px 10px;
  border-radius: 980px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--fill);
  color: var(--text-2);
}
.flag.floor-ground {
  background: rgba(142, 142, 147, 0.18);
  color: var(--text);
}
.flag.floor-upper {
  background: var(--primary-soft);
  color: var(--primary);
}
.flag.seat-closed {
  background: rgba(175, 82, 222, 0.15);
  color: var(--purple);
}
.flag.seat-outdoor {
  background: var(--ok-soft);
  color: var(--ok);
}
.flag.seat-regular {
  background: var(--fill);
  color: var(--text-2);
}

/* Staff-only table number */
.row .pos.has-table {
  width: auto;
  min-width: 38px;
  padding-inline: 8px;
  border-radius: 12px;
  font-size: 14px;
}
.staff-table {
  color: var(--text);
}

.flag.floor-any,
.flag.seat-any {
  background: none;
  box-shadow: inset 0 0 0 1px var(--sep);
  color: var(--text-2);
}
/* Staff already reached out to this guest. */
.flag.contacted {
  background: rgba(142, 142, 147, 0.22);
  color: var(--text-2);
}

/* Logo */
.logo {
  display: block;
  line-height: 0;
}
.logo img {
  display: block;
  width: 100%;
  height: auto;
}
.guest-logo {
  width: 132px;
}
.bar-logo {
  width: 92px;
}
.login-logo {
  width: 170px;
  margin: 0 auto 18px;
}
.poster-logo {
  width: min(320px, 70vw);
  margin-bottom: 6px;
}

/* Menu link on the guest screens */
.menu-btn svg {
  width: 20px;
  height: 20px;
}
.menu-card {
  display: grid;
  gap: 6px;
  justify-items: center;
  width: 100%;
  text-align: center;
}
.menu-card strong {
  font-size: 22px;
  color: var(--purple);
}
.menu-card .btn {
  margin-top: 10px;
}

/* Seated today: same layout as the dropped list, not crossed out. */
.row.past {
  opacity: 0.75;
}
.mode-switch button[aria-checked="true"] {
  color: var(--text);
}
.state-title {
  margin-top: 30px;
}
.nowait-card {
  display: grid;
  gap: 8px;
  margin-top: 26px;
  padding: 22px;
  text-align: center;
}
.nowait-card h2 {
  color: var(--purple);
}

/* Waiting screen (signed up, before the table is ready) */
.guest .screen.wait {
  justify-content: flex-start;
  padding-top: 4vh;
}
.wait .wait-hero {
  display: grid;
  justify-items: center;
}
.wait .small-symbol {
  width: 64px;
  height: 64px;
  margin: 0 0 18px;
}
.wait .small-symbol svg {
  width: 30px;
  height: 30px;
}
.wait .hi {
  font-size: 16px;
}
.wait h1 {
  margin-top: 4px;
  font-size: clamp(28px, 8vw, 34px);
}
.wait .sub {
  margin-top: 8px;
  color: var(--text-2);
}
.wait .place-label {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-3);
}
.wait .hero-number {
  margin-top: 0;
  font-size: clamp(96px, 30vw, 128px);
}
.wait .near-title {
  font-size: clamp(24px, 7vw, 30px);
}
.guest .wait .be-ready {
  margin-top: 8px;
  font-size: 17px;
  color: var(--purple);
}
.wait-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
}
.wait-chips .flag {
  font-size: 13.5px;
  padding: 4px 12px;
}
.wait-actions {
  gap: 6px;
}
.leave-link {
  justify-self: center;
  font-size: 15px;
  font-weight: 500;
}
.keep-open {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-3);
  text-align: center;
}

/* Table requests per floor */
.req-floors {
  margin: 0;
  padding: 0;
  list-style: none;
}
.req-floor {
  padding: 14px 0;
}
.req-floor + .req-floor {
  border-top: 1px solid var(--sep);
}
.req-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.req-name {
  font-size: 16px;
}
.req-name.floor-upper {
  color: var(--primary);
}
.req-floor .flags {
  margin-top: 8px;
}
.req-floor .flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  padding: 4px 6px 4px 12px;
}
html[dir="rtl"] .req-floor .flag {
  padding: 4px 12px 4px 6px;
}
.flag .count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--card);
  color: var(--text);
  font-size: 12.5px;
}
