/* Live demo on the Czech home page: staff queue and guest page share one state (assets/demo.js).
   Loaded only there; the app's action colours live here, not in site.css.
   Inside the screens the app's own look: system font, iOS greys, the app's action colours. */
/* Layout (wide): staff phone · wizard steps · guest phone. The live step draws a brick line
   out of the wizard to the button to press, so the instruction never sits on a phone screen.
   Narrow: steps as a row above one phone, the instruction as a line of text. */
.demo { margin-top: 48px; display: grid; gap: 20px; justify-items: start; }
.demo-fallback { width: 280px; border-radius: 32px; margin-top: 8px; }
.demo-hint { margin: 0; max-width: 700px; min-height: 2.6em; }
.demo-do { display: block; font-size: clamp(22px, 3vw, 28px); line-height: 1.2; font-weight: 600; color: var(--ink); }
/* Muted while the tour runs; once it is done it is the only next action, so it lights up. */
.demo-reset { appearance: none; border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; background: transparent; color: var(--muted); font: 500 15px/1 var(--font); cursor: pointer; transition: background 0.2s, color 0.2s; }
.demo-reset.is-done { background: var(--accent); border-color: var(--accent); color: #fff; }
.demo-switch { display: none; }
/* Which guest you play: Lucie (Czech page) or Tom (English page) */
.demo-who { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 15px; color: var(--muted); }
.demo-who span { margin-right: 4px; }
.demo-who button { appearance: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; background: var(--paper); font: 500 14px/1 var(--font); color: var(--ink-2); cursor: pointer; }
.demo-who button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.demo-stage { position: relative; display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-top: 30px; width: 100%; }
@media (min-width: 1100px) {
  .demo-stage { display: grid; grid-template-columns: 340px minmax(0, 1fr) 310px; grid-template-areas: "staff steps guest" "staff reset guest"; column-gap: 64px; row-gap: 20px; align-items: center; }
  .demo-staff { grid-area: staff; } .demo-guest { grid-area: guest; }
  .demo-stage .wizard { grid-area: steps; align-self: end; }
  .demo-reset { grid-area: reset; align-self: start; justify-self: start; }
  .demo-hint { display: none; }
  #jak[data-state="SEATED"] .demo-hint, #jak[data-state="CANCELED"] .demo-hint { display: block; }
  .is-target::after { display: none; }
}


/* Wizard: four steps, all readable; the live one carries the instruction in brick („now“). */
.wizard { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.wizard li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); color: var(--muted); }
.wizard li:last-child { border-bottom: 1px solid var(--line); }
.wizard .table-state { width: 34px; height: 34px; opacity: 0.45; }
.wizard .table-state rect { fill: var(--ink); }
.wz-near .chair-top, .wz-ready .chair-top, .wz-ready .table-top, .wz-reply .chair-top, .wz-reply .table-top { fill: var(--accent); }
.wz-head { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 17px; font-weight: 600; color: var(--ink); }
.wz-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); font: 500 12px/1 var(--font-mono); color: var(--muted); }
.wz-do { margin: 6px 0 0; min-height: 0; font-weight: 600; color: var(--accent); }
.wz-do:empty { display: none; }
.wz-text { margin: 6px 0 0; font-size: 15px; line-height: 1.45; }
.wizard .is-current { color: var(--ink-2); }
.wizard .is-current .table-state { opacity: 1; }
.wizard .is-current .wz-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.wizard .is-done .wz-num { background: var(--ink); border-color: var(--ink); color: #fff; }
.wizard .is-done .table-state { opacity: 0.7; }
.demo-line { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; z-index: 3; }
.demo-line path { fill: none; stroke: var(--accent); stroke-width: 2; }
.demo-line circle { fill: var(--accent); }
@media (max-width: 1099px) {
  .demo-reset { order: 10; flex-basis: 100%; max-width: max-content; margin: 0 auto; }
  /* wizard as a row of four above the phone; the instruction is the text line above */
  .demo-stage .wizard { order: -1; width: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .wizard li { grid-template-columns: 1fr; gap: 6px; padding: 10px 0 0; border: 0; border-top: 2px solid var(--line); }
  .wizard li:last-child { border-bottom: 0; }
  .wizard .is-current { border-top-color: var(--accent); }
  .wizard .table-state { width: 26px; height: 26px; }
  .wz-head { font-size: 13px; gap: 6px; }
  .wz-num { display: none; }
  .wz-do, .wz-text { display: none; }
}

.demo-device { position: relative; margin: 0; width: 340px; max-width: 100%; background: #1d1d1f; padding: 9px; border-radius: 46px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.35); transition: box-shadow 0.3s; }
.demo-guest { width: 310px; }
.demo-device.is-changed { animation: demo-flash 1.4s ease-out; }
@keyframes demo-flash { 0% { box-shadow: 0 0 0 0 rgba(181, 69, 44, 0.55), 0 30px 60px -30px rgba(0, 0, 0, 0.35); } 30% { box-shadow: 0 0 0 10px rgba(181, 69, 44, 0.35), 0 30px 60px -30px rgba(0, 0, 0, 0.35); } 100% { box-shadow: 0 0 0 0 rgba(181, 69, 44, 0), 0 30px 60px -30px rgba(0, 0, 0, 0.35); } }
.demo-screen { height: 640px; overflow: hidden; border-radius: 37px; background: #F2F2F7; color: #000; font: 15px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif; text-align: left; position: relative; }
.demo-screen p, .demo-screen h4 { margin: 0; }
.demo-screen button { font-family: inherit; cursor: pointer; }

/* The button to tap: pulse ring and a brick „Klikněte“ / „Ťukněte“ tag (web layer, not app UI). */
.is-target { position: relative; animation: demo-nudge 1.6s ease-in-out infinite; }
.is-target::after { content: "Klikněte"; position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); padding: 4px 9px; border-radius: 7px; background: #b5452c; color: #fff; font: 600 12px/1.2 var(--font); white-space: nowrap; pointer-events: none; }
:lang(en) .is-target::after { content: "Click"; }
@media (hover: none) { .is-target::after { content: "Ťukněte"; } :lang(en) .is-target::after { content: "Tap"; } }
/* On a queue card the tag sits left of the button, so it never covers the card text above. */
/* Never on a phone screen: there the pulse ring marks the button; the words live outside. */
.demo-screen .is-target::after { display: none; }
@keyframes demo-nudge { 50% { box-shadow: 0 0 0 6px rgba(181, 69, 44, 0.3); } }
@media (prefers-reduced-motion: reduce) { .is-target, .demo-device.is-changed { animation: none; } }

/* Narrow screens: one phone at a time; the demo switches to the side the last tap changed. */
@media (max-width: 760px) {
  .demo-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }
  .demo-switch button { appearance: none; border: 0; border-radius: 999px; padding: 8px 14px; background: none; font: 500 14px/1 var(--font); color: var(--muted); cursor: pointer; }
  .demo-switch button[aria-selected="true"] { background: var(--ink); color: #fff; }
  .demo-stage { padding-top: 4px; justify-content: center; width: 100%; }
  .demo-device .device-tag { display: none; }
  [data-view="staff"] .demo-guest, [data-view="guest"] .demo-staff { display: none; }
  .demo-screen { height: 580px; }
}
/* static queue cards in the staff block */
.staff-cards { display: grid; gap: 6px; padding: 14px 12px; border-radius: 28px; background: #F2F2F7; color: #000; font: 15px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif; }
.staff-cards p { margin: 0; }
.sq-bar i.p45 { width: 45%; } .sq-bar i.p72 { width: 72%; } .sq-bar i.p80 { width: 80%; }

.sq { display: flex; flex-direction: column; padding: 46px 12px 0; }
.sq-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.sq-head b { display: block; font-size: 22px; font-weight: 700; }
.sq-icons { display: inline-flex; gap: 6px; }
.sq-icons svg { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: #fff; fill: none; stroke: #0062CC; stroke-width: 2; stroke-linecap: round; }
.sq-head span { font-size: 13px; color: #57575C; }
.sq-list { flex: 1; overflow: hidden; margin-top: 6px; }
.sq-group { display: flex; align-items: center; gap: 6px; margin: 14px 4px 6px !important; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: #57575C; }
.sq-group span { margin-left: auto; }
.sq-group.tone-positive::before, .sq-group.tone-caution::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sq-group.tone-positive { color: #137338; }
.sq-group.tone-caution { color: #B04E00; }
.sq-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 2px 10px; background: #fff; border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; }
.sq-chrono b { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sq-chrono small { display: block; font-size: 11px; color: #57575C; }
.sq-bar { display: block; height: 3px; margin-top: 4px; border-radius: 2px; background: #E5E5EA; overflow: hidden; }
.sq-bar i { display: block; height: 100%; background: #137338; }
.sq-chrono.is-near b { color: #B04E00; } .sq-chrono.is-near .sq-bar i { background: #D96400; }
.sq-chrono.is-over b { color: #C41C15; } .sq-chrono.is-over .sq-bar i { background: #C41C15; }
.sq-top { display: flex; justify-content: space-between; gap: 8px; }
.sq-top b { font-size: 16px; }
/* GuestCard language tag: bordered micro label after the name */
.sq-top .sq-lang { margin-right: auto; padding: 1px 5px; border: 1px solid #C7C7CC; border-radius: 5px; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; color: #57575C; align-self: center; }
.sq-top .sq-party { margin-left: auto; }
.sq-top span, .sq-sub { font-size: 12px; color: #57575C; }
.sq-line { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 13px; font-weight: 600; }
.sq-line::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sq-line.tone-caution { color: #B04E00; }
.sq-line.tone-positive { color: #137338; }
.sq-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.sq-btn { appearance: none; border: 0; border-radius: 9px; min-height: 36px; padding: 0 12px; background: #F2F2F7; color: #0062CC; font-size: 14px; font-weight: 600; }
.sq-seated { color: #137338; }
.sq-canceled { min-width: 36px; color: #57575C; font-size: 18px; font-weight: 400; }
.sq-approaching.is-primary { background: #D96400; color: #000; }
.sq-called.is-primary { background: #0062CC; color: #fff; }
.sq-seated.is-primary { background: #167A38; color: #fff; }
.sq-add { align-self: flex-end; margin: 0 4px 10px; padding: 10px 16px; border-radius: 999px; background: #0062CC; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 6px 16px -6px rgba(0, 98, 204, 0.6); }
.sq-tabs { display: flex; justify-content: space-around; margin: 0 -12px; padding: 10px 0 20px; font-size: 11px; color: #8E8E93; background: #fff; border-top: 1px solid #E5E5EA; }
.sq-tabs .is-on { color: #0062CC; font-weight: 600; }

.gp { padding: 46px 14px 16px; overflow-y: auto; }
.gp-venue { margin-bottom: 12px; }
.gp-venue b { display: block; font-size: 20px; }
.gp-venue span { font-size: 13px; color: #57575C; }
.gp-card { background: #fff; border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.gp-card h4 { font-size: 21px; margin-bottom: 4px !important; }
.gp-card.tone-caution { background: rgba(217, 100, 0, 0.12); }
.gp-card.tone-caution .gp-eyebrow, .gp-card.tone-caution h4 { color: #B04E00; }
.gp-card.tone-positive { background: rgba(22, 122, 56, 0.12); }
.gp-card.tone-positive .gp-eyebrow, .gp-card.tone-positive h4 { color: #137338; }
.gp-eyebrow { margin-bottom: 4px !important; font-size: 13px; font-weight: 600; color: #57575C; }
.gp-label, .gp-meta { font-size: 14px; color: #57575C; }
.gp-big { font-size: 36px; font-weight: 700; line-height: 1.1; }
.gp-note { margin-top: 10px !important; font-size: 14px; color: #1d1d1f; }
.gp-quit { margin-top: 4px; padding-top: 8px; border-top: 1px solid rgba(60, 60, 67, 0.16); text-align: center; }
.gp-quit .gp-text { color: #57575C; }
.gp-live::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #1F9D55; }
.gp-actions, .gp-confirm, .gp-ack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.gp-btn { appearance: none; border: 0; border-radius: 12px; padding: 12px; background: #fff; color: #0062CC; font-size: 15px; font-weight: 600; }
.gp-primary { background: #0062CC; color: #fff; }
.gp-danger { color: #C41C15; }
.gp-text { appearance: none; border: 0; background: none; padding: 8px 0; color: #0062CC; font-size: 15px; }
.gp-q, .gp-ack p { font-weight: 600; }
.gp-foot { margin-top: 16px !important; font-size: 11px; color: #66666C; text-align: center; }
