/* ==========================================================================
   iChicken Table Kiosk — styles
   ========================================================================== */

:root {
  --orange: #F2600F;
  --orange-dark: #C9460A;
  --orange-light: #FF8A3D;
  --ink: #1B1512;
  --ink-soft: #4A423C;
  --cream: #FFF8F1;
  --white: #FFFFFF;
  --line: #EFE2D6;
  --success: #2E9E5B;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-card: 0 2px 10px rgba(27, 21, 18, 0.08);
  --shadow-pop: 0 20px 60px rgba(27, 21, 18, 0.35);
  --header-h: 84px;

  /* Icon glyphs as CSS masks, not text characters — "+"/"−"/"×" in a font
     don't sit at true visual center (most fonts bias them a few px off),
     which is very visible in a small circle. A mask renders the exact
     shape we draw, so it centers perfectly regardless of font metrics,
     and still picks up `color` via currentColor like text would. */
  --icon-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 3v14M3 10h14' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --icon-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10h14' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 5l10 10M15 5L5 15' stroke='%23000' stroke-width='2.1' stroke-linecap='round'/%3E%3C/svg%3E");
  --icon-back: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M12 4l-6 6 6 6' stroke='%23000' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
button { font-family: inherit; cursor: pointer; }

/* Shared icon-in-button rendering — see --icon-* mask definitions above. */
.item-card-add::before, .cart-line-qty button::before, .qty-stepper button::before,
.modal-close::before, .suggest-close::before, .icon-round::before {
  content: '';
  display: block;
  width: 15px; height: 15px;
  background-color: currentColor;
  mask-repeat: no-repeat; mask-position: center; mask-size: contain;
  -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: contain;
}
[data-icon="plus"]::before { mask-image: var(--icon-plus); -webkit-mask-image: var(--icon-plus); }
[data-icon="minus"]::before { mask-image: var(--icon-minus); -webkit-mask-image: var(--icon-minus); }
[data-icon="back"]::before { mask-image: var(--icon-back); -webkit-mask-image: var(--icon-back); }
.modal-close::before, .suggest-close::before, [data-icon="close"]::before { mask-image: var(--icon-close); -webkit-mask-image: var(--icon-close); width: 13px; height: 13px; }
.item-card-add::before { width: 16px; height: 16px; }
h1,h2,h3 { margin: 0; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0; }
img { -webkit-user-drag: none; }

#app { position: relative; width: 100vw; height: 100vh; height: 100dvh; overflow: hidden; }

.screen {
  position: absolute; inset: 0;
  display: none;
  width: 100%; height: 100%;
  background: var(--cream);
}
.screen.active { display: block; }

.btn-primary, .btn-secondary {
  border: none; border-radius: 999px;
  font-weight: 800; font-size: 18px;
  padding: 16px 28px;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--orange-light), var(--orange) 60%, var(--orange-dark));
  color: #fff;
  box-shadow: 0 8px 20px rgba(242, 96, 15, 0.35);
}
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: .4; box-shadow: none; }
.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--line);
}
.btn-secondary:active { transform: scale(0.97); background: #FBF1E8; }
.btn-large { padding: 18px 32px; font-size: 19px; width: 100%; }
.btn-full { width: 100%; }

/* ==========================================================================
   ATTRACT / SCREENSAVER
   ========================================================================== */
#screen-attract { background: var(--ink); }
/* Two stacked background layers, crossfaded by app.js — each gets a slow
   continuous zoom (Ken Burns) so a handful of static photos read as a
   moving "wallpaper" rather than a slideshow, without needing video files. */
.attract-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  /* Darkened directly on the photo (not just an overlay on top) so it
     reads as "black wallpaper with food texture", not a bright photo with
     a translucent film over it — reliable regardless of image content. */
  filter: saturate(1.1) brightness(0.4);
  opacity: 0;
  transform: scale(1);
  transition: opacity 1.4s ease;
}
.attract-bg.on { opacity: 1; z-index: 1; animation: kenBurns 7.5s ease-out forwards; }
@keyframes kenBurns {
  0%   { transform: scale(1); }
  100% { transform: scale(1.08); }
}
.attract-overlay {
  position: absolute; inset: 0;
  /* Light vignette on top of the already-darkened photo, just to guarantee
     text/button legibility toward the center. */
  background: radial-gradient(ellipse at center, rgba(6,4,3,.35) 0%, rgba(6,4,3,.7) 100%);
}
.attract-content {
  position: relative; z-index: 2;
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff;
  padding: 32px;
  animation: fadeIn .6s ease;
}
.attract-logo {
  width: 116px; height: 116px; border-radius: 50%;
  background: #fff; padding: 11px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
  margin-bottom: 18px;
}
.attract-title {
  font-size: clamp(36px, 6vw, 60px);
  letter-spacing: -0.02em;
  text-shadow: 0 4px 24px rgba(0,0,0,.5);
}
.attract-tagline {
  margin-top: 8px;
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 600;
  color: #FFD9BC;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.attract-actions {
  margin-top: 34px;
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  width: 100%; max-width: 460px;
}
.btn-tap-start, .btn-tap-togo {
  width: 100%;
  border: none; border-radius: 999px;
  font-weight: 800;
  padding: 20px 32px;
}
.btn-tap-start {
  font-size: clamp(19px, 2.4vw, 24px);
  color: #fff;
  background: linear-gradient(135deg, var(--orange-light), var(--orange) 55%, var(--orange-dark));
  box-shadow: 0 12px 36px rgba(242,96,15,.45);
}
.btn-tap-start:active { transform: scale(0.98); }
.btn-tap-togo {
  font-size: clamp(15px, 1.8vw, 18px);
  padding: 15px 28px;
  color: #fff;
  background: rgba(255,255,255,.1);
  border: 2px solid rgba(255,255,255,.4);
  backdrop-filter: blur(4px);
}
.btn-tap-togo:active { transform: scale(0.98); background: rgba(255,255,255,.18); }

.attract-utility-row {
  margin-top: 6px;
  display: flex; gap: 12px;
  width: 100%;
}
.btn-utility {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 999px;
  padding: 14px 16px;
  font-size: 14px; font-weight: 700;
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.22);
}
.btn-utility:active { transform: scale(0.96); background: rgba(255,255,255,.16); }
.btn-utility .icon-btn-emoji { font-size: 17px; }

.attract-table {
  position: absolute; bottom: 24px; right: 28px;
  font-size: 14px; color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.1);
  padding: 7px 15px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: translateY(0);} }

/* --------------------------------------------------------------- ad mode
   After 30s idle on the attract screen, this takes over — turning the
   screensaver into rotating billboard space. See ads.js for the slot data
   shape and README for how this maps to a real sponsor-admin backend. */
.ad-layer {
  position: absolute; inset: 0; z-index: 5;
  display: none;
}
#screen-attract.ad-mode .ad-layer { display: block; }
#screen-attract.ad-mode .attract-content { display: none; }
.ad-slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff;
  opacity: 0;
}
.ad-slide.fade { animation: adFadeIn .7s ease forwards; }
@keyframes adFadeIn { from { opacity: 0; } to { opacity: 1; } }
.ad-slide-label { font-size: 12px; letter-spacing: .16em; font-weight: 800; opacity: .55; text-transform: uppercase; }
.ad-slide-name { font-size: clamp(28px, 4.5vw, 46px); font-weight: 800; margin-top: 12px; max-width: 80%; }
.ad-slide-cta { margin-top: 12px; font-size: 15px; opacity: .8; }
.ad-logo-badge {
  position: absolute; top: 28px; left: 28px; z-index: 6;
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(255,255,255,.35);
}
.ad-logo-badge img { width: 100%; height: 100%; object-fit: cover; }
.ad-tap-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 6; color: rgba(255,255,255,.75); font-size: 13px; font-weight: 700;
  background: rgba(255,255,255,.1); padding: 9px 20px; border-radius: 999px;
  backdrop-filter: blur(4px); white-space: nowrap;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.app-header {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.header-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.header-back {
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: var(--cream); color: var(--ink-soft); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.header-back:active { background: var(--line); }
.header-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header-logo { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--line); object-fit: cover; }
.header-name { font-weight: 800; font-size: 19px; line-height: 1.1; }
.header-table { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 10px; }

/* Live, always-editable — separate from the round-type screen shown at
   checkout; this is what lets a guest change their mind mid-browse instead
   of only being asked once at the end. */
.order-type-switch {
  display: flex; background: var(--cream); border-radius: 999px; padding: 3px;
  flex-shrink: 0;
}
.order-type-opt {
  border: none; background: transparent; color: var(--ink-soft);
  border-radius: 999px; padding: 7px 12px;
  font-size: 12.5px; font-weight: 800;
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
.order-type-opt.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-card); }
.order-type-opt span { display: none; }
@media (min-width: 980px) {
  .order-type-opt span { display: inline; }
}

.icon-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: none; background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 11px; font-weight: 700; color: var(--ink-soft);
}
.icon-btn:active { background: var(--line); }
.icon-btn-emoji { font-size: 19px; }

/* Shows when earlier rounds from this table are queued but not yet sent —
   tapping it jumps straight to the "send to kitchen" review. */
.batch-pill {
  border: none; border-radius: 999px;
  background: #FFF1E4; color: var(--orange-dark);
  padding: 8px 14px; font-weight: 800; font-size: 13px;
}
.batch-pill.hidden { display: none; }

.cart-btn {
  display: flex; align-items: center; gap: 8px;
  border: none; border-radius: 999px;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px 10px 14px;
  font-weight: 800; font-size: 15px;
  position: relative;
}
.cart-btn-emoji { font-size: 18px; }
.cart-btn-count {
  background: var(--orange);
  border-radius: 50%;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  position: absolute; top: -4px; left: 22px;
}
.cart-btn-total { margin-left: 4px; }

/* ==========================================================================
   ORDER BODY — category nav + item grid
   ========================================================================== */
.order-body {
  display: flex;
  height: calc(100% - var(--header-h));
}
.category-nav {
  width: 128px; flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 10px 0 90px;
}
.cat-btn {
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: none; background: transparent;
  padding: 14px 6px;
  font-size: 12.5px; font-weight: 700;
  color: var(--ink-soft);
  border-left: 4px solid transparent;
  text-align: center;
  line-height: 1.2;
}
.cat-btn .cat-emoji { font-size: 24px; }
.cat-btn.active {
  color: var(--orange-dark);
  background: var(--cream);
  border-left-color: var(--orange);
}

.item-grid-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px 120px;
}
.item-grid-head { margin-bottom: 14px; }
.item-grid-head h2 { font-size: 24px; }

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.item-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  transition: transform .1s ease;
}
.item-card:active { transform: scale(0.98); }
.item-card-img {
  height: 128px; width: 100%;
  background-size: cover; background-position: center;
  background-color: #F3E7DA;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}
.item-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.item-card-name { font-weight: 800; font-size: 14.5px; line-height: 1.25; min-height: 36px; }
.item-card-desc {
  font-size: 12px; color: var(--ink-soft);
  min-height: 30px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-card-foot {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 6px;
}
.item-card-price { font-weight: 800; color: var(--orange-dark); font-size: 15px; }
.item-card-add {
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: var(--orange); color: #fff;
  font-size: 20px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.item-card-add:active { background: var(--orange-dark); }

/* ==========================================================================
   SUGGEST STRIP (post add-to-cart cross-sell)
   ========================================================================== */
.suggest-strip {
  position: absolute; left: 0; right: 0; bottom: 0;
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.2,.8,.3,1);
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 30px rgba(0,0,0,.12);
  z-index: 20;
  padding: 20px 26px 26px;
}
.suggest-strip.open { transform: translateY(0); }
.suggest-strip-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.suggest-label { font-weight: 800; font-size: 17px; color: var(--success); }
.suggest-close { border: none; background: var(--cream); border-radius: 50%; width: 32px; height: 32px; color: var(--ink-soft); display: flex; align-items: center; justify-content: center; }
.suggest-items { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 2px; }
.suggest-item {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 10px;
  background: var(--cream);
}
.suggest-item-img { width: 60px; height: 60px; border-radius: 50%; background-size: cover; background-position: center; background-color: #F3E7DA; flex-shrink: 0; display:flex; align-items:center; justify-content:center; font-size: 26px;}
.suggest-item-info { display: flex; flex-direction: column; gap: 5px; }
.suggest-item-name { font-size: 15px; font-weight: 700; max-width: 160px; }
.suggest-item-price { font-size: 12.5px; color: var(--ink-soft); }
.suggest-item-add {
  border: none; background: var(--orange); color: #fff;
  border-radius: 999px; padding: 12px 18px; font-size: 13.5px; font-weight: 800;
  flex-shrink: 0; white-space: nowrap;
  transition: background-color .35s ease;
}
.suggest-item-add.in-cart { background: var(--success); }

/* Compact − qty + control shared by suggest-strip and upsell cards. */
.mini-stepper { display: flex; align-items: center; gap: 8px; }
.mini-stepper .icon-round {
  width: 24px; height: 24px; border-radius: 50%; border: none;
  background: #fff; box-shadow: var(--shadow-card); color: var(--orange-dark);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mini-stepper .icon-round::before { width: 10px; height: 10px; }
.mini-stepper span { font-weight: 800; font-size: 13.5px; min-width: 14px; text-align: center; }

/* ==========================================================================
   MICRO-INTERACTIONS (add-to-cart bounce)
   ========================================================================== */
@keyframes bumpPop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.28); }
  60%  { transform: scale(0.93); }
  100% { transform: scale(1); }
}
.bump { animation: bumpPop .38s cubic-bezier(.34,1.56,.64,1); }

/* ==========================================================================
   MODAL OVERLAYS (item detail / cart)
   ========================================================================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 14, 10, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  z-index: 50;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: #fff;
  width: 100%; max-width: 560px;
  border-radius: 24px;
  max-height: 88vh;
  overflow-y: auto;
  transform: scale(0.94) translateY(10px);
  transition: transform .25s cubic-bezier(.2,.8,.3,1);
  position: relative;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-card);
  color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
}

.item-modal-img {
  height: 220px; width: 100%;
  background-size: cover; background-position: center;
  background-color: #F3E7DA;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px;
}
.item-modal-body { padding: 20px 22px 26px; }
.item-modal-body h3 { font-size: 22px; margin-bottom: 8px; }
.item-modal-body p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.5; min-height: 20px; }
.item-modal-row { display: flex; align-items: center; gap: 16px; margin-top: 22px; }

.qty-stepper {
  display: flex; align-items: center; gap: 14px;
  background: var(--cream); border-radius: 999px; padding: 6px 8px;
}
.qty-stepper button {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: #fff; box-shadow: var(--shadow-card);
  color: var(--orange-dark);
  display: flex; align-items: center; justify-content: center;
}
.qty-stepper span { font-weight: 800; font-size: 17px; min-width: 18px; text-align: center; }

.btn-add { flex: 1; }

/* CART PANEL */
.cart-panel { max-width: 480px; }
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px 12px;
  border-bottom: 1px solid var(--line);
}
.cart-header h3 { font-size: 20px; }
.cart-items { padding: 8px 22px; max-height: 40vh; overflow-y: auto; }
.cart-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: none; }
.cart-line-img { width: 52px; height: 52px; border-radius: 12px; background-size: cover; background-position: center; background-color: #F3E7DA; flex-shrink: 0; display:flex; align-items:center; justify-content:center; font-size:20px;}
.cart-line-body { flex: 1; min-width: 0; }
.cart-line-name { font-weight: 700; font-size: 14.5px; }
.cart-line-price { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.cart-line-qty { display: flex; align-items: center; gap: 8px; }
.cart-line-qty button {
  width: 26px; height: 26px; border-radius: 50%; border: none;
  background: var(--cream); color: var(--orange-dark);
  display: flex; align-items: center; justify-content: center;
}
.cart-line-qty button::before { width: 11px; height: 11px; }
.cart-line-qty span { min-width: 16px; text-align: center; font-weight: 700; font-size: 13.5px; }
.cart-empty { display: none; text-align: center; color: var(--ink-soft); padding: 40px 22px; font-size: 14.5px; }
.cart-panel.is-empty .cart-empty { display: block; }
.cart-panel.is-empty .cart-items { display: none; }

.cart-batch-note {
  margin: 0 22px 14px; padding: 10px 12px;
  background: #FFF6EF; border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 700; color: var(--orange-dark);
}
.cart-batch-note.hidden { display: none; }

.cart-footer { padding: 16px 22px 22px; border-top: 1px solid var(--line); }
.cart-subtotal {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 800; font-size: 18px; margin-bottom: 14px;
}
.cart-footer-btns { display: flex; gap: 10px; }
.cart-footer-btns .btn-secondary, .cart-footer-btns .btn-primary { flex: 1; }

/* ==========================================================================
   UPSELL SCREEN
   ========================================================================== */
.upsell-wrap {
  max-width: 900px; margin: 0 auto;
  height: 100%; display: flex; flex-direction: column;
  padding: 40px 30px 30px;
}
.upsell-wrap h2 { font-size: 28px; text-align: center; }
.upsell-sub { text-align: center; color: var(--ink-soft); margin-top: 6px; font-size: 15px; }
.upsell-grid {
  flex: 1; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px; margin: 26px 0;
  align-content: start;
}
.upsell-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
  position: relative;
}
.upsell-card-img { height: 100px; border-radius: 12px; background-size: cover; background-position: center; background-color: #F3E7DA; display:flex; align-items:center; justify-content:center; font-size:34px;}
.upsell-card-name { font-weight: 800; font-size: 14.5px; }
.upsell-card-reason { font-size: 11.5px; color: var(--orange-dark); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.upsell-card-price { font-size: 12.5px; color: var(--ink-soft); }
.upsell-card .mini-stepper { margin-top: auto; padding-top: 4px; }
.upsell-card-add {
  border: none; background: var(--orange); color: #fff; border-radius: 999px;
  padding: 10px 16px; font-weight: 800; font-size: 13px;
  transition: background-color .35s ease;
}
.upsell-card-add.in-cart { background: var(--success); }
.upsell-actions { display: flex; gap: 12px; }
.upsell-actions .btn-secondary, .upsell-actions .btn-primary { flex: 1; }

/* ==========================================================================
   ROUND TYPE — asked per person, not once per table
   ========================================================================== */
.round-type-wrap {
  max-width: 640px; margin: 0 auto;
  height: 100%; display: flex; flex-direction: column; justify-content: center;
  padding: 30px;
  text-align: center;
}
.round-type-back {
  position: absolute; top: 24px; left: 24px;
  border: none; background: none; color: var(--ink-soft);
  font-weight: 700; font-size: 14px; padding: 8px;
}
.round-type-wrap h2 { font-size: 26px; }
.round-type-sub { color: var(--ink-soft); font-size: 14.5px; margin-top: 8px; }
.round-type-options { display: flex; gap: 16px; margin-top: 32px; }
.round-type-btn {
  flex: 1; border: 3px solid var(--line); background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.round-type-emoji { font-size: 44px; }
.round-type-label { font-weight: 800; font-size: 17px; }
.round-type-btn.selected { border-color: var(--orange); background: #FFF6EF; }
.round-type-btn:active { transform: scale(0.97); }

/* ==========================================================================
   NEXT PERSON — queue another round, or send the whole batch
   ========================================================================== */
.next-person-wrap {
  max-width: 560px; margin: 0 auto;
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 30px; text-align: center;
}
.next-person-check {
  width: 64px; height: 64px; border-radius: 50%;
  /* Orange, not the success-green used on the real "sent to kitchen"
     screen — this step hasn't actually reached the kitchen yet, so it
     shouldn't read as "done". */
  background: var(--cream); color: var(--orange-dark);
  border: 2px solid var(--orange);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 16px;
  animation: pop .4s cubic-bezier(.2,.9,.3,1.3);
}
.next-person-wrap h2 { font-size: 24px; }
.next-person-sub { font-size: 13.5px; color: var(--ink-soft); margin-top: 8px; max-width: 380px; line-height: 1.5; }
.batch-summary { width: 100%; margin-top: 22px; max-height: 32vh; overflow-y: auto; text-align: left; }
.batch-round {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 10px;
}
.batch-round-head { display: flex; justify-content: space-between; font-weight: 800; font-size: 14px; }
.batch-round-items { margin-top: 4px; font-size: 12.5px; color: var(--ink-soft); }
.batch-total {
  width: 100%; display: flex; justify-content: space-between;
  font-weight: 800; font-size: 19px;
  padding: 14px 2px; border-top: 2px solid var(--ink); margin-top: 6px;
}
.next-person-actions { width: 100%; display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }

/* ==========================================================================
   CONFIRM SCREEN
   ========================================================================== */
.confirm-wrap {
  max-width: 640px; margin: 0 auto;
  height: 100%; display: flex; flex-direction: column;
  padding: 34px 30px 26px;
}
.confirm-wrap h2 { font-size: 26px; text-align: center; margin-bottom: 16px; }
.confirm-rounds { flex: 1; overflow-y: auto; }
.confirm-round { margin-bottom: 16px; }
.confirm-round-head {
  font-size: 12.5px; font-weight: 800; color: var(--orange-dark);
  text-transform: uppercase; letter-spacing: .02em;
  padding-bottom: 6px; margin-bottom: 4px; border-bottom: 2px solid var(--line);
}
.confirm-line {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px;
}
.confirm-line-img {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  background-size: cover; background-position: center; background-color: #F3E7DA;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.confirm-line-body { flex: 1; min-width: 0; }
.confirm-line-name { font-weight: 700; }
.confirm-line-qty { color: var(--ink-soft); font-weight: 600; margin-right: 6px; }
.confirm-line-price { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.confirm-line-remove {
  width: 28px; height: 28px; border-radius: 50%; border: none; flex-shrink: 0;
  background: var(--cream); color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
}
.confirm-line-remove::before { width: 11px; height: 11px; }
.confirm-line-remove:active { background: var(--line); }
.confirm-total {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 800; font-size: 20px;
  padding: 16px 0; border-top: 2px solid var(--ink);
  margin-top: 6px;
}
.confirm-note-label { font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-top: 4px; }
#confirmNote {
  width: 100%; margin-top: 8px; border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px; font-size: 14.5px; font-family: inherit; resize: none; height: 60px;
}
.confirm-check {
  display: flex; align-items: center; gap: 10px;
  margin-top: 18px; padding: 12px 14px;
  background: var(--cream); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.confirm-check-emoji { font-size: 20px; flex-shrink: 0; }
.confirm-actions { display: flex; gap: 12px; margin-top: 12px; }
.confirm-actions .btn-secondary, .confirm-actions .btn-primary { flex: 1; }

/* ==========================================================================
   SUCCESS SCREEN
   ========================================================================== */
.success-wrap {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 30px;
}
.success-check {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--success); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; font-weight: 800;
  margin-bottom: 22px;
  animation: pop .4s cubic-bezier(.2,.9,.3,1.3);
}
@keyframes pop { from { transform: scale(0); opacity: 0;} to { transform: scale(1); opacity: 1; } }
.success-wrap h2 { font-size: 26px; max-width: 420px; }
.success-meta { margin-top: 10px; font-size: 15px; color: var(--ink-soft); }
.success-eta { margin-top: 4px; font-size: 14px; color: var(--orange-dark); font-weight: 700; }
.success-actions { margin-top: 30px; width: 100%; max-width: 320px; }

/* ==========================================================================
   FLOATING ACTIONS + TOAST
   ========================================================================== */
.floating-actions {
  position: fixed; left: 18px; bottom: 18px; z-index: 40;
  display: flex; flex-direction: column; gap: 10px;
  transition: opacity .2s ease;
}
.floating-actions.hidden { display: none; }
/* Tablet/desktop already has Waiter/Bill in the header — these floating
   shortcuts only exist to cover phone widths, where the header hides them
   (see mobile breakpoint below), so keep them off above that width
   regardless of what app.js's per-screen toggle says. */
@media (min-width: 641px) {
  .floating-actions { display: none !important; }
}
.fab {
  width: 52px; height: 52px; border-radius: 50%;
  border: none; background: #fff; box-shadow: var(--shadow-pop);
  font-size: 22px;
}

.toast {
  position: fixed; top: 24px; left: 50%; transform: translate(-50%, -140%);
  background: var(--ink); color: #fff;
  padding: 14px 24px; border-radius: 999px;
  font-weight: 700; font-size: 14.5px;
  box-shadow: var(--shadow-pop);
  z-index: 100;
  transition: transform .3s cubic-bezier(.2,.8,.3,1);
  white-space: nowrap;
}
.toast.show { transform: translate(-50%, 0); }

/* ==========================================================================
   TABLE SWITCHER (demo/testing helper — pick which table this tablet is)
   ========================================================================== */
.header-brand-text { cursor: pointer; }
.attract-table { cursor: pointer; }
.switch-hint { opacity: .55; font-size: .85em; }
.table-switch-modal { max-width: 480px; }
.table-switch-header { padding: 22px 22px 4px; text-align: center; }
.table-switch-header h3 { font-size: 20px; }
.table-switch-header p { margin-top: 4px; font-size: 13px; color: var(--ink-soft); }
.table-switch-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 10px; padding: 18px 22px 28px;
}
.table-switch-btn {
  aspect-ratio: 1; border-radius: 14px;
  border: 2px solid var(--line); background: var(--cream);
  font-weight: 800; font-size: 16px; color: var(--ink);
}
.table-switch-btn.active {
  background: var(--orange); border-color: var(--orange); color: #fff;
}
.table-switch-btn:active { transform: scale(0.94); }

/* ==========================================================================
   RESPONSIVE: portrait tablets
   ========================================================================== */
@media (max-aspect-ratio: 4/5) {
  .order-body { flex-direction: column; }
  .category-nav {
    width: 100%; display: flex; overflow-x: auto; overflow-y: hidden;
    border-right: none; border-bottom: 1px solid var(--line);
    padding: 8px 6px;
  }
  .cat-btn { flex-direction: row; flex-shrink: 0; width: auto; padding: 10px 16px; border-left: none; border-bottom: 3px solid transparent; gap: 8px;}
  .cat-btn.active { border-left-color: transparent; border-bottom-color: var(--orange); }
  .cat-btn .cat-emoji { font-size: 18px; }
  .item-grid-wrap { padding-bottom: 140px; }
}

@media (min-width: 1400px) {
  .item-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}

/* ==========================================================================
   RESPONSIVE: phones
   Everything above this point was sized for a kiosk tablet mounted at a
   table — comfortable for a stationary 10"+ screen, but oversized and
   cramped when the exact same markup loads on a phone (used for testing
   the flow off the actual hardware). This section only trims spacing/sizes
   and relocates a couple of controls; no layout changes beyond that.
   ========================================================================== */
@media (max-width: 640px) {
  /* Header: logo + name + table + order-type switch + batch pill + waiter +
     bill + cart button was six-plus controls fighting for one 84px-tall
     row. Waiter/Bill move to the floating buttons (bottom-left, see
     .floating-actions above) which only render on phones and only on this
     screen — everywhere else in the header stays, just tightened up. */
  .app-header { padding: 0 12px; gap: 6px; height: 68px; }
  .header-left { gap: 8px; }
  .header-logo { width: 34px; height: 34px; }
  .header-name { font-size: 15px; }
  .header-table { font-size: 11px; }
  .header-back { width: 32px; height: 32px; }
  .header-actions { gap: 6px; }
  .header-actions .icon-btn { display: none; }
  .batch-pill { padding: 6px 10px; font-size: 11.5px; }
  .cart-btn { padding: 8px 12px 8px 10px; font-size: 13px; gap: 6px; }
  .cart-btn-total { display: none; }
  .order-type-switch { padding: 2px; }
  .order-type-opt { padding: 6px 8px; }

  /* Kiosk-scale buttons (18-19px text, 16-18px vertical padding) read
     oversized on a phone — same treatment everywhere a primary/secondary
     button appears (item modal's Dodaj, cart's Nastavi, upsell/confirm/
     next-person actions). */
  .btn-primary, .btn-secondary { padding: 12px 20px; font-size: 15px; }
  .btn-large { padding: 13px 22px; font-size: 16px; }
  .item-modal-body { padding: 16px 18px 20px; }
  /* Stacked, not side-by-side — qty-stepper + "Dodaj — X.XX KM" fighting
     for one row is what was wrapping the button's price onto a second
     line at phone widths. */
  .item-modal-row { flex-direction: column; align-items: stretch; margin-top: 16px; gap: 12px; }
  .qty-stepper { align-self: center; padding: 5px 7px; gap: 10px; }
  .qty-stepper button { width: 32px; height: 32px; }

  /* Suggest strip: cards are horizontally scrollable but nothing on a
     phone hints at that — no visible scrollbar, no partial second card in
     view. A right-edge fade plus snap makes the overflow legible. */
  .suggest-items {
    scroll-snap-type: x proximity;
    mask-image: linear-gradient(to right, #000 82%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 82%, transparent 100%);
  }
  .suggest-item { scroll-snap-align: start; }
}
