/* The five examples share a phone frame. The working controls occupy its tab bar. */
#app-preview .preview-harbour {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
}
#app-preview #how {
  position: relative;
  padding: 17px 12px 14px;
  border-radius: inherit;
  background: linear-gradient(to bottom, rgb(244 238 226 / .66), transparent 21% 80%, rgb(244 238 226 / .80));
  text-align: center;
  scroll-margin-top: 16px;
}

#app-preview #tabs-heading {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.2;
}

#app-preview .tabs-lede {
  margin: 3px auto 13px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.4;
}

#app-preview .app-frame {
  position: relative;
  width: min(100%, 286px);
  margin-inline: auto;
  container-type: inline-size;
}

#app-preview .tabs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: visible;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#app-preview .app-frame .tabs-row > li {
  min-width: 0;
  margin: 0;
  opacity: 1;
  transform: none;
  transition: none;
}

#app-preview .tabs-row > li[hidden] { display: none; }
#app-preview .tabs-row > li:focus-visible { outline: 3px solid var(--green-ink); outline-offset: 6px; border-radius: 22px; }

#app-preview .app-frame {
  --phone-height: min(168cqi, 490px);
  --bezel: 7px;
  --tab-height: 52px;
}

#app-preview .tb-phone {
  width: 100%;
  height: var(--phone-height);
  aspect-ratio: auto;
  padding: var(--bezel);
  font-size: clamp(9px, 3.75cqi, 11px);
  text-align: left;
  box-shadow: 0 15px 26px -16px #2b12196b;
}

#app-preview .tb-screen { padding-top: 2em; }
#app-preview .tb-trip { display: grid; grid-template-columns: 5.3em minmax(0, 1fr); align-content: start; gap: .22em .75em; }
#app-preview .tb-trip .tb-pic { grid-column: 1; grid-row: 1 / span 4; width: 100%; height: 100%; min-height: 3em; margin: 0; border-radius: .65em; }
#app-preview .tb-trip .tb-pic.a1 { background: #98bed2 url("img/steps/lofoten-mountains.webp") center / cover no-repeat; }
#app-preview .tb-trip .tb-pic.a2 { background: #e8ba86 url("img/steps/lofoten-coast.webp") center / cover no-repeat; }
#app-preview .tb-trip > :not(.tb-pic) { grid-column: 2; }
#app-preview .tb-trip .tb-ppl { margin: .15em 0; }
#app-preview .tb-trip .tb-wait { grid-column: 1 / -1; }
#app-preview .tb-trip .tb-wait:empty { display: none; }
#app-preview .tb-trip:last-child { margin-bottom: 0; }
#app-preview .tb-face { width: 3.5em; height: 3.5em; }
#app-preview .tb-card { padding: .7em .9em; }
#app-preview .tb-screen > .tb-card:last-child { margin-bottom: 0 !important; }
#app-preview .interactive .tb-phone { padding-bottom: calc(var(--tab-height) + var(--bezel)); }
#app-preview .interactive .tb-bar { display: none; }
#app-preview .interactive .tb-screen { border-radius: 2.8em 2.8em 0 0; }
#app-preview .tabs-row h3 { margin: 14px 0 2px; }
#app-preview .tabs-row li > p { margin: 12px auto 0; padding: 6px 10px; border-radius: 8px; background: var(--paper); color: var(--ink-2); font-size: 15px; line-height: 1.35; }

#app-preview .interactive .tabs-row h3 {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

#app-preview .app-selector {
  position: absolute;
  z-index: 1;
  top: calc(var(--phone-height) - var(--bezel) - var(--tab-height));
  inset-inline: var(--bezel);
  height: var(--tab-height);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid #d5c6b0;
  border-radius: 0 0 26px 26px;
  background: var(--paper);
}

#app-preview .app-selector button {
  position: relative;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-2);
  font: 520 clamp(11px, 4.65cqi, 14px)/1.2 WilderOutfit, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}

#app-preview .app-selector button[aria-selected="true"] { color: var(--plum); font-weight: 750; }
#app-preview .app-selector button[aria-selected="true"]::before {
  content: "";
  position: absolute;
  inset: -1px 22% auto;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: var(--plum);
}
#app-preview .app-selector button:hover { text-decoration: underline; text-underline-offset: 3px; }
#app-preview .app-selector button:focus-visible { outline: 3px solid var(--green-ink); outline-offset: -5px; border-radius: 15px; }

@media (max-height: 650px) {
  #app-preview .app-frame { --phone-height: min(160cqi, 460px); }
  #app-preview .tb-screen { padding-top: 1.2em; }
  #app-preview .tb-trip { margin-bottom: .5em; padding: .6em; gap: .12em .65em; }
  #app-preview .tb-me { padding: .65em; margin-bottom: .6em; }
  #app-preview .tb-card { padding-block: .55em; }
  #app-preview .tb-kinds { row-gap: .65em; }
  #app-preview .tb-kinds i { width: 3.7em; height: 3.7em; }
}

#app-preview .demo-phone { background: #2b1219; }
#app-preview .demo-screen {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: 18px 13px 10px;
  border-radius: 2.8em 2.8em 0 0;
  background: #fcf6eb;
  color: #2b1219;
  font: 470 14px/1.3 WilderOutfit, sans-serif;
  text-align: left;
}
#app-preview .demo-screen:focus-visible { outline: 3px solid #337657; outline-offset: -4px; }
#app-preview .demo-eyebrow { margin: 0 0 5px; font-size: 13px; font-weight: 580; color: #34674f; }
#app-preview .demo-screen h4 { margin: 0; font-size: 27px; line-height: 1.05; letter-spacing: -.05em; }
#app-preview .demo-dates { border: 0; padding: 0; margin: 8px 0 10px; min-width: 0; }
#app-preview .demo-dates legend { color: #635045; padding: 0; font-size: 14px; }
#app-preview .demo-options { margin-top: 9px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
#app-preview .demo-options label { position: relative; display: block; cursor: pointer; }
#app-preview .demo-options input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
#app-preview .demo-options span {
  display: grid; min-height: 49px; align-content: center; justify-items: center;
  border: 1px solid #bda996; border-radius: 10px; line-height: 1.15; background: #fffaf3;
}
#app-preview .demo-options strong { font-size: 17px; }
#app-preview .demo-options small { font-size: 12px; }
#app-preview .demo-options label:hover span { border-color: #704b50; }
#app-preview .demo-options input:checked + span { background: #38252d; color: #fffaf3; border-color: #38252d; }
#app-preview .demo-options input:focus-visible + span { outline: 3px solid #287150; outline-offset: 1px; }
#app-preview .demo-result { overflow: hidden; border: 1px solid #ddd0bc; border-radius: 13px; background: #fffaf2; }
#app-preview .demo-illustration { height: 77px; background: #e4d7ba url("img/steps/6.jpg") center 85% / cover; }
#app-preview .demo-result[data-state="match"] .demo-illustration { background-image: url("img/steps/lofoten-mountains.webp"); background-position: center 60%; }
#app-preview .demo-message { padding: 9px 10px; }
#app-preview .demo-message strong { font-size: 17px; font-weight: 660; letter-spacing: -.025em; }
#app-preview .demo-message p { font-size: 14px; margin: 3px 0 0; color: #635045; }
#app-preview .demo-offer-link, #app-preview .demo-survey, #app-preview .demo-back {
  display: inline-flex; min-height: 44px; align-items: center; font: 600 14px/1.24 WilderOutfit,sans-serif;
  cursor: pointer; border: 0;
}
#app-preview .demo-offer-link { margin: 0 0 5px 8px; padding: 0 8px; border-radius: 9px; background: transparent; color: #872044; text-decoration: underline; text-underline-offset: .2em; }
#app-preview .demo-back { padding: 0 4px; background: transparent; color: #614d43; }
#app-preview .demo-browse { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; margin-top: 4px; color: var(--green-ink); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
#app-preview [data-demo-offer] .demo-screen { padding-top: 2px; }
#app-preview .demo-offer-picture { display: block; width: 100%; height: 82px; object-fit: cover; object-position: 50% 62%; border-radius: 10px; margin-bottom: 10px; }
#app-preview .demo-offer-dates { margin: 4px 0 8px; color: #635045; }
#app-preview .demo-includes { margin: 0; }
#app-preview .demo-price { margin: 8px 0; }
#app-preview .demo-price strong { font-size: 20px; letter-spacing: -.025em; }
#app-preview .demo-survey { padding: 0 13px; border-radius: 25px; background: #38252d; color: #fffaf3; text-decoration: none; }
@media (max-width: 360px), (max-height: 650px) {
  #app-preview .demo-illustration, #app-preview .demo-offer-picture { height: 46px; }
  #app-preview .demo-screen { padding: 12px 10px 8px; }
}
@media (prefers-reduced-motion: no-preference) {
  #app-preview .demo-result:not([data-state="waiting"]) .demo-message,
  #app-preview [data-demo-offer]:not([hidden]) .demo-offer-picture { animation: group-date-in .18s ease-out; }
  @keyframes group-date-in {
    from { opacity: .35; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
