/* The demo page at /demo: a short explanation, and the real page it explains.
   Phone: explanation on top, the page in the middle as it looks on a phone, Back and Next underneath.
   Wide screen: explanation down the left, the page on the right at the size of the device it is used on. */
html, body, #app { height: 100%; }
body { background: var(--fairway-deep); overflow: hidden; }
.tour { --note: #fffdf5; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "note" "stage" "nav"; }

/* ---------- the explanation ---------- */
.tour-note { grid-area: note; padding: 10px 14px 12px; background: var(--note); border-bottom: 4px solid var(--flag); }
.tour-brand { display: none; }
.tour-top-vendi { height: 24px; }
.tour-top { display: flex; align-items: center; gap: 8px; min-height: 30px; font-size: 0.84rem; color: var(--muted); }
.tour-part { font-weight: 600; color: var(--fairway-deep); }
.tour-count { font-variant-numeric: tabular-nums; }
.tour-all { margin-left: auto; min-height: 30px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: 600 0.82rem/1.2 var(--body); cursor: pointer; }
.tour-title { margin: 2px 0 4px; font-size: 1.5rem; }
.tour-text { margin: 0; max-width: 62ch; font-size: 0.95rem; line-height: 1.42; }
.tour-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.tour-extra:empty { display: none; }
.tour-hint { margin: 0; font-size: 0.9rem; line-height: 1.35; color: var(--muted); }
.tour-hint strong { color: var(--fairway-deep); }
.tour-problem { margin: 0; color: var(--bad); font-size: 0.9rem; }

/* ---------- the real page ---------- */
.tour-stage { grid-area: stage; min-height: 0; padding: 8px; }
.tour-fit { height: 100%; }
.tour-device { height: 100%; display: flex; flex-direction: column; overflow: hidden; border: 3px solid #0b120e; border-radius: 16px; background: #0b120e; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.tour-frame { display: block; flex: 1 1 auto; width: 100%; min-height: 0; border: 0; background: var(--desk); }
.tour-bar { display: none; flex: none; align-items: center; gap: 8px; height: 28px; padding: 0 10px; background: #e6eae3; }
.tour[data-part="staff"] .tour-bar { display: flex; }
.tour-lights { display: inline-flex; gap: 5px; }
.tour-lights i { width: 8px; height: 8px; border-radius: 50%; background: #c2c9c0; }
.tour-address { flex: 1 1 auto; min-width: 0; padding: 2px 12px; border-radius: 999px; background: #fff; color: var(--muted); font-size: 0.76rem; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tour-caption { display: none; }

/* ---------- Back and Next ---------- */
.tour-nav { grid-area: nav; display: flex; align-items: center; gap: 10px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--note); border-top: 1px solid var(--line); }
.tour-back, .tour-next { flex: none; min-width: 86px; }
.tour-next[hidden] { display: none; }
.tour-dots { flex: 1 1 auto; display: flex; justify-content: center; gap: 3px; margin: 0; padding: 0; list-style: none; }
.tour-dots li { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.tour-dots li.is-on { background: var(--fairway); }
.tour-dots li.is-gap { margin-left: 8px; }

/* ---------- the list of pages ---------- */
.tour-list { display: none; background: var(--note); }
.tour-list.is-open { display: block; position: fixed; z-index: 5; inset: auto 0 0 0; max-height: 84%; overflow: auto; padding: 12px 14px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 18px 18px 0 0; box-shadow: 0 -14px 44px rgba(0, 0, 0, 0.4); }
.tour-list-head { display: flex; align-items: center; justify-content: space-between; font-size: 1.05rem; }
.tour-group h2 { display: flex; flex-direction: column; margin: 14px 8px 4px; font-size: 1.1rem; }
.tour-group h2 span { font: 400 0.82rem/1.3 var(--body); color: var(--muted); }
.tour-group ol { margin: 0; padding: 0; list-style: none; }
.tour-group button { display: flex; align-items: baseline; gap: 10px; width: 100%; min-height: 40px; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.tour-group button:hover { background: var(--paper); }
.tour-group button[aria-current] { background: var(--fairway-tint); font-weight: 600; }
.tour-num { flex: none; min-width: 1.5em; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.tour-ask { display: inline-block; margin: 14px 8px 0; color: var(--fairway-deep); font-weight: 600; }

@media (max-width: 349px) {
  .tour-dots { visibility: hidden; }
}

@media (min-width: 1000px) and (min-height: 560px) {
  .tour { grid-template-columns: 384px minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "note stage" "nav stage" "list stage"; background: var(--note); }
  .tour-note { padding: 26px 30px 6px; border-bottom: 0; }
  .tour-brand { display: block; margin: 0 0 26px; color: var(--muted); font-size: 0.95rem; }
  .tour-brand strong { color: var(--fairway-deep); font: 600 1.3rem/1.1 var(--display); }
  .tour-by { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
  .tour-by .vendi-logo { height: 34px; }
  .tour-top { min-height: 0; font-size: 0.92rem; }
  .tour-all { display: none; }
  .tour-top-vendi { display: none; }
  .tour-title { margin: 6px 0 10px; font-size: 2.1rem; }
  .tour-text { font-size: 1.03rem; line-height: 1.5; }
  .tour-extra { margin-top: 12px; }
  .tour-hint { font-size: 0.97rem; }
  .tour-nav { padding: 14px 30px 20px; border-top: 0; }
  .tour-back, .tour-next { min-width: 104px; }
  .tour-dots { display: none; }
  .tour-list, .tour-list.is-open { display: block; position: static; max-height: none; min-height: 0; overflow: auto; padding: 4px 22px 22px; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
  .tour-list-head { display: none; }
  .tour-group button { min-height: 34px; padding: 5px 8px; font-size: 0.95rem; }
  .tour-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 0; border-left: 4px solid var(--flag); background: var(--fairway-deep); }
  .tour-fit { flex: none; height: auto; }
  .tour-device { transform-origin: 0 0; padding: 18px; border: 0; border-radius: 36px; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45); }
  .tour-frame { border-radius: 18px; }
  .tour[data-part="staff"] .tour-device { padding: 0; border-radius: 12px; background: #e6eae3; }
  .tour[data-part="staff"] .tour-frame { border-radius: 0; }
  .tour[data-part="staff"] .tour-bar { height: 38px; padding: 0 14px; }
  .tour[data-part="staff"] .tour-address { max-width: 520px; font-size: 0.85rem; }
  .tour-lights i { width: 11px; height: 11px; }
  .tour-caption { display: block; margin: 0; color: rgba(255, 255, 255, 0.8); font-size: 0.92rem; }
}
