/* JOHNNY BOY demo. הטוקנים לפי DESIGN.md. */
:root {
  --bg: #FAF6EF;
  --surface: #FFFFFF;
  --ink: #1E1A16;
  --ink-soft: #5E5349;
  --brand: #5A3A22;
  --brand-soft: #EFE3D3;
  --accent: #E39B2D;
  --accent-soft: #FBEBD2;
  --ok: #26784A;
  --ok-soft: #DDEFE3;
  --warn: #C94A2B;
  --warn-ink: #8F2E17;
  --warn-soft: #F8E1DA;
  --hairline: #E6DDD0;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px rgba(30, 26, 22, .14);
  --shadow-soft: 0 4px 14px rgba(30, 26, 22, .10);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 32px; --space-8: 48px;
  --font: 'Heebo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text-sm: 16px; --text-body: 18px; --text-lg: 20px; --text-xl: 24px;
  --text-2xl: 32px; --text-3xl: 48px;
  --btn-h: 56px; --nav-h: 72px; --appbar-h: 60px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: 1.6;
  min-height: 100dvh;
}
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--radius); }

/* מסגרת טלפון */
.phone {
  position: relative;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
}
@media (min-width: 520px) {
  body { background: var(--brand-soft); }
  .phone { box-shadow: var(--shadow); min-height: 100dvh; }
}

/* שורת האפליקציה */
.appbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--appbar-h);
  display: flex; align-items: center; gap: var(--space-3);
  padding: 0 var(--space-4);
  background: rgba(250, 246, 239, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.logo {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: none; border: 0; padding: var(--space-2) 0;
  font-weight: 900; font-size: var(--text-lg); letter-spacing: .02em;
  color: var(--brand); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.logo-mark svg { width: 18px; height: 18px; }
.no-anim *, .no-anim *::before, .no-anim *::after { animation: none !important; transition: none !important; }
.appbar-title { margin-inline-start: auto; font-weight: 700; color: var(--ink-soft); font-size: var(--text-sm); }

/* מסכים */
main { padding-bottom: calc(var(--nav-h) + var(--space-8) + 64px); }
.screen { padding: var(--space-5) var(--space-4) 0; animation: screen-in 180ms ease-out; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.screen-title { font-size: var(--text-2xl); font-weight: 800; margin-bottom: var(--space-2); }
.lede { color: var(--ink-soft); margin-bottom: var(--space-5); }
.section { margin-top: var(--space-7); }
.section-title { font-size: var(--text-xl); font-weight: 700; margin-bottom: var(--space-3); display: flex; align-items: center; gap: var(--space-2); }
.section-title svg { width: 24px; height: 24px; color: var(--brand); }
.muted { color: var(--ink-soft); font-size: var(--text-sm); }

/* כפתורים */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--btn-h); padding: 0 var(--space-5); border-radius: var(--radius);
  font-size: var(--text-lg); font-weight: 700; border: 0; width: 100%;
  transition: transform 120ms ease, background 120ms ease; }
.btn:active { transform: scale(.98); }
.btn svg { width: 24px; height: 24px; flex: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-secondary { background: var(--brand-soft); color: var(--brand); }
.btn-quiet { background: none; color: var(--brand); min-height: 48px; font-size: var(--text-body); }
.btn-ok { background: var(--ok); color: #fff; }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }
.btn-round { width: 48px; height: 48px; min-height: 48px; padding: 0; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--hairline); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.btn-round svg { width: 22px; height: 22px; }
.btn-row { display: flex; gap: var(--space-3); }
.btn-row > .btn { flex: 1; }

/* כרטיס */
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: var(--space-4); }
.card + .card { margin-top: var(--space-3); }
.card-accent { background: var(--accent-soft); border-color: #F0D2A0; }
.card-brand { background: var(--brand); color: #fff; border-color: var(--brand); }

/* צ'יפים */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 var(--space-4);
  border-radius: 999px; font-size: var(--text-sm); font-weight: 500; border: 1.5px solid var(--hairline);
  background: var(--surface); color: var(--ink); white-space: nowrap; }
.chip svg { width: 18px; height: 18px; }
.chip-on { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip-fit { background: var(--ok); color: #fff; border-color: var(--ok); font-weight: 700; }
.chip-no { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; font-weight: 700; }
.chip-accent { background: var(--accent-soft); color: var(--brand); border-color: transparent; font-weight: 700; }
.chip-sm { height: 32px; padding: 0 10px; font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* מסך סריקה */
.scan { display: flex; flex-direction: column; align-items: center; text-align: center; min-height: calc(100dvh - var(--appbar-h) - 40px); justify-content: center; gap: var(--space-4); }
.scan-mark { width: 96px; height: 96px; border-radius: 28px; background: var(--brand); display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-soft); }
.scan-mark svg { width: 52px; height: 52px; }
.scan h1 { font-size: 40px; font-weight: 900; letter-spacing: .02em; color: var(--brand); }
.scan .tagline { font-size: var(--text-xl); color: var(--ink-soft); margin-bottom: var(--space-4); }
.viewfinder { position: relative; width: 220px; height: 220px; border-radius: 28px; overflow: hidden;
  background: repeating-linear-gradient(45deg, #efe3d3 0 10px, #f5ece0 10px 20px); margin: var(--space-2) auto var(--space-4); }
.viewfinder::before { content: ''; position: absolute; inset: 18px; border: 4px solid var(--brand); border-radius: 18px;
  mask: linear-gradient(#000 0 0) top/100% 34px no-repeat, linear-gradient(#000 0 0) bottom/100% 34px no-repeat, linear-gradient(#000 0 0) left/34px 100% no-repeat, linear-gradient(#000 0 0) right/34px 100% no-repeat; }
.viewfinder .qr { position: absolute; inset: 50px; color: var(--brand); opacity: .35; }
.viewfinder .qr svg { width: 100%; height: 100%; }
.viewfinder .beam { position: absolute; left: 18px; right: 18px; top: 18px; height: 3px; background: var(--accent); box-shadow: 0 0 14px var(--accent); opacity: 0; }
.viewfinder.on .beam { animation: beam 1200ms linear 1 forwards; }
@keyframes beam { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 1; transform: translateY(180px); } }
.scan .btn { max-width: 340px; }

/* תפריט */
.showcase { position: relative; margin: 0 0 var(--space-3); border-radius: var(--radius-lg); overflow: hidden; background: var(--brand-soft); box-shadow: var(--shadow-soft); }
.showcase.no-img { display: none; }
.showcase img { width: 100%; height: auto; aspect-ratio: 1344 / 768; object-fit: cover; }
.hotspot { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); color: var(--brand);
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.25); padding: 0; animation: pulse 1600ms ease-in-out infinite; }
.hotspot svg { width: 20px; height: 20px; }
.hotspot.is-no { border-color: var(--warn); color: var(--warn); animation: none; opacity: .85; }
.hotspot.is-yes { border-color: var(--ok); color: var(--ok); }
@keyframes pulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.12); } }
.showcase-hint { color: var(--ink-soft); font-size: var(--text-sm); margin-bottom: var(--space-5); display: flex; gap: 6px; align-items: center; }
.showcase-hint svg { width: 18px; height: 18px; color: var(--brand); }

.item { display: flex; align-items: center; gap: var(--space-3); width: 100%; text-align: start;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: var(--space-3); }
.item + .item { margin-top: var(--space-2); }
.item img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; flex: none; background: var(--brand-soft); }
.item-body { flex: 1; min-width: 0; }
.item-name { font-weight: 700; font-size: var(--text-lg); line-height: 1.3; }
.item-meta { margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.item-price { font-weight: 800; font-size: var(--text-lg); white-space: nowrap; }
.item.is-no .item-name { color: var(--ink-soft); }
.item.is-no img { filter: grayscale(.7); opacity: .7; }

.cart-bar { position: fixed; bottom: calc(var(--nav-h) + var(--space-3)); left: 0; right: 0; z-index: 25; padding: 0 var(--space-4); pointer-events: none; }
.cart-bar .btn { display: flex; pointer-events: auto; box-shadow: var(--shadow); justify-content: space-between; padding: 0 var(--space-5); max-width: 398px; margin: 0 auto; }
.cart-bar.bump .btn { animation: bump 240ms ease; }
@keyframes bump { 0% { transform: scale(1); } 50% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* ניווט תחתון */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 30;
  background: var(--surface); border-top: 1px solid var(--hairline); display: grid; grid-template-columns: repeat(4, 1fr);
  padding-bottom: env(safe-area-inset-bottom); max-width: 430px; margin: 0 auto; }
.bottom-nav button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--ink-soft); font-size: var(--text-sm); font-weight: 500; position: relative; }
.bottom-nav button svg { width: 26px; height: 26px; }
.bottom-nav button[aria-current="page"] { color: var(--brand); font-weight: 700; }
.bottom-nav button[aria-current="page"]::before { content: ''; position: absolute; top: 0; left: 20%; right: 20%; height: 3px; background: var(--brand); border-radius: 0 0 3px 3px; }
.bottom-nav .badge { position: absolute; top: 8px; inset-inline-end: calc(50% - 26px); background: var(--accent); color: var(--ink); font-size: 16px; font-weight: 800; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; padding: 0 6px; }
@media (max-width: 359px) { .bottom-nav button { font-size: 14px; } }

/* באנר */
.banner { position: sticky; top: var(--appbar-h); z-index: 19; margin: var(--space-3) var(--space-4) 0; background: var(--ok); color: #fff;
  border-radius: var(--radius-lg); padding: var(--space-4); display: flex; align-items: center; gap: var(--space-3); box-shadow: var(--shadow);
  animation: banner-in 320ms var(--ease); }
.banner svg { width: 32px; height: 32px; flex: none; }
.banner-text { flex: 1; font-weight: 700; font-size: var(--text-lg); line-height: 1.3; }
.banner-text small { display: block; font-weight: 500; font-size: var(--text-sm); opacity: .9; margin-top: 2px; }
.banner .btn { width: auto; min-height: 44px; background: #fff; color: var(--ok); font-size: var(--text-body); padding: 0 var(--space-4); }
@keyframes banner-in { from { transform: translateY(-120%); opacity: 0; } to { transform: none; opacity: 1; } }

/* הזמנה */
.order-hero { text-align: center; padding: var(--space-6) 0 var(--space-4); }
.order-hero .big { font-size: var(--text-3xl); font-weight: 900; line-height: 1.05; color: var(--brand); }
.order-hero .timer { font-variant-numeric: tabular-nums; font-size: var(--text-xl); font-weight: 700; color: var(--ink-soft); margin-top: var(--space-2); }
.order-hero.ready .big { color: var(--ok); }
.steps { display: flex; justify-content: center; gap: var(--space-2); margin: var(--space-4) 0; }
.steps span { width: 48px; height: 6px; border-radius: 3px; background: var(--hairline); }
.steps span.on { background: var(--brand); }
.steps span.done { background: var(--ok); }
.lines { display: grid; gap: var(--space-2); }
.line { display: flex; justify-content: space-between; gap: var(--space-3); align-items: baseline; }
.line .sub { color: var(--ink-soft); font-size: var(--text-sm); }
.channels { display: grid; gap: var(--space-3); margin-top: var(--space-3); }
.bubble { border-radius: 18px; padding: var(--space-3) var(--space-4); max-width: 92%; font-size: var(--text-body); line-height: 1.5; position: relative; }
.bubble .who { display: block; font-size: 16px; font-weight: 700; margin-bottom: 2px; opacity: .8; }
.bubble-wa { background: #DCF8C6; color: #0b2b12; border-end-start-radius: 4px; }
.bubble-sms { background: #E9E9EB; color: #111; border-end-start-radius: 4px; }
.bubble-push { background: var(--surface); border: 1px solid var(--hairline); display: flex; gap: var(--space-3); align-items: center; }
.bubble-push .app-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); flex: none; }

/* שולחן */
.people { display: flex; gap: var(--space-3); justify-content: center; margin: var(--space-2) 0 var(--space-5); }
.person { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; padding: var(--space-3) var(--space-2); border-radius: var(--radius-lg); border: 2px dashed transparent; background: var(--surface); border: 1px solid var(--hairline); }
.person.drop-ok { border: 2px dashed var(--brand); background: var(--brand-soft); }
.person .total { font-weight: 800; font-size: var(--text-lg); }
.person .name { font-size: var(--text-sm); color: var(--ink-soft); }
.person.is-paid .total { color: var(--ok); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 20px; background: var(--c, var(--brand)); flex: none; }
.avatar-sm { width: 32px; height: 32px; font-size: 16px; }
.trow { display: flex; align-items: center; gap: var(--space-3); background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: var(--space-3); width: 100%; text-align: start; }
.trow + .trow { margin-top: var(--space-2); }
.trow[draggable="true"] { cursor: grab; }
.trow.dragging { opacity: .5; }
.trow .tname { flex: 1; font-weight: 700; font-size: var(--text-body); }
.trow .tname small { display: block; font-weight: 400; color: var(--ink-soft); font-size: var(--text-sm); }
.trow .tprice { font-weight: 800; }
.trow.is-paid { border-color: var(--ok-soft); background: #F4FAF6; }
.trow .paid-ic { color: var(--ok); width: 24px; height: 24px; }
.trow .paid-ic svg { width: 24px; height: 24px; }
.pay-cta { position: sticky; bottom: calc(var(--nav-h) + var(--space-4)); margin-top: var(--space-5); }
.pay-cta .btn { box-shadow: var(--shadow); }

/* תשלום */
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: var(--brand-soft); padding: 6px; border-radius: var(--radius); }
.segmented button { border: 0; background: transparent; min-height: 44px; border-radius: 10px; font-weight: 700; font-size: var(--text-body); color: var(--brand); }
.segmented button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow-soft); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--text-xl); font-weight: 800; padding: var(--space-3) 0; border-top: 1px solid var(--hairline); margin-top: var(--space-3); }
.cardrow { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; color: var(--ink-soft); }
.cardrow svg { width: 24px; height: 24px; color: var(--brand); }

/* נקודות */
.points-hero { text-align: center; padding: var(--space-5) 0 var(--space-3); }
.points-hero .big { font-size: 64px; font-weight: 900; line-height: 1; color: var(--brand); font-variant-numeric: tabular-nums; }
.points-hero .unit { font-size: var(--text-lg); color: var(--ink-soft); font-weight: 500; }
.promo { display: flex; gap: var(--space-3); align-items: flex-start; }
.promo svg { width: 28px; height: 28px; color: var(--brand); flex: none; margin-top: 2px; }
.promo .ptitle { font-weight: 800; font-size: var(--text-lg); }
.promo .pvenue { font-size: var(--text-sm); color: var(--ink-soft); }
.venue { display: flex; align-items: center; gap: var(--space-3); }
.venue .vbody { flex: 1; min-width: 0; }
.venue .vname { font-weight: 700; font-size: var(--text-lg); }
.venue .vreward { color: var(--ink-soft); font-size: var(--text-sm); }
.venue .btn { width: auto; min-height: 56px; font-size: var(--text-body); padding: 0 var(--space-4); }
.code { font-size: var(--text-2xl); font-weight: 900; letter-spacing: .12em; color: var(--brand); text-align: center; padding: var(--space-4); background: var(--brand-soft); border-radius: var(--radius); font-variant-numeric: tabular-nums; }
.hist { display: grid; gap: var(--space-2); }
.hist .line .delta { font-weight: 800; color: var(--ok); }

/* אני */
.visit { display: flex; gap: var(--space-3); align-items: center; }
.visit svg { width: 24px; height: 24px; color: var(--brand); flex: none; }
.visit .vb { flex: 1; }
.visit .vb small { display: block; color: var(--ink-soft); font-size: var(--text-sm); }

/* שיט ומודאל */
dialog { border: 0; padding: 0; color: var(--ink); background: transparent; max-width: none; }
dialog::backdrop { background: rgba(30, 26, 22, .45); }
.sheet { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 430px; }
.sheet .sheet-body { background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: var(--space-3) var(--space-4) calc(var(--space-5) + env(safe-area-inset-bottom)); animation: sheet-up 260ms var(--ease); max-height: 88dvh; overflow: auto; }
.sheet .grip { width: 44px; height: 5px; border-radius: 3px; background: var(--hairline); margin: 0 auto var(--space-3); }
.sheet .close { position: absolute; top: var(--space-3); inset-inline-start: var(--space-3); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); margin-bottom: var(--space-3); background: var(--brand-soft); }
.sheet-title { font-size: var(--text-xl); font-weight: 800; display: flex; justify-content: space-between; gap: var(--space-3); align-items: baseline; }
.opt-group { margin-top: var(--space-4); }
.opt-label { font-weight: 700; margin-bottom: var(--space-2); font-size: var(--text-sm); color: var(--ink-soft); }
.qty { display: flex; align-items: center; gap: var(--space-4); justify-content: center; margin: var(--space-4) 0; font-size: var(--text-xl); font-weight: 800; }
.modal { position: fixed; inset: 0; margin: auto; width: calc(100% - 48px); max-width: 380px; }
.modal .modal-body { background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-5) var(--space-4); animation: screen-in 180ms ease-out; }
.modal h2 { font-size: var(--text-xl); font-weight: 800; margin-bottom: var(--space-2); }
.modal p { color: var(--ink-soft); margin-bottom: var(--space-5); }
.modal .btn + .btn { margin-top: var(--space-2); }
.demo-panel .modal-body { border: 3px solid var(--accent); }
.demo-panel .row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--hairline); }
.demo-panel .row:last-of-type { border-bottom: 0; }
.switch { width: 56px; height: 32px; border-radius: 16px; background: var(--hairline); border: 0; position: relative; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-soft); transition: transform 160ms var(--ease); }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { transform: translateX(-24px); }

/* טוסט */
.toast { position: fixed; bottom: calc(var(--nav-h) + 84px); left: 50%; transform: translateX(-50%); z-index: 40;
  background: var(--ink); color: #fff; padding: var(--space-3) var(--space-5); border-radius: 999px; font-weight: 700; font-size: var(--text-body); box-shadow: var(--shadow); white-space: nowrap; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis; animation: screen-in 180ms ease-out; }

/* ריק */
.empty { text-align: center; padding: var(--space-8) var(--space-4); color: var(--ink-soft); }
.empty .btn { max-width: 280px; margin: var(--space-5) auto 0; }
.empty svg { width: 48px; height: 48px; color: var(--brand); opacity: .6; margin-bottom: var(--space-3); }

.ok-mark { width: 88px; height: 88px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; margin: 0 auto var(--space-4); }
.ok-mark svg { width: 48px; height: 48px; }
.center { text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
