/* CShark mobile preview. The application and its external demo console remain separate. */
:root {
  --showcase-ink: #10212e;
  --showcase-muted: #4b6170;
  --showcase-line: rgba(16, 33, 46, .14);
  --showcase-gutter: 20px;
  --showcase-radius: 24px;
}

/* Let enlarged text turn the external toolbar into one column naturally. */
.app-immersive .app-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.app-immersive .app-toolbar :is(.open-scenarios, .close-app) {
  flex: 1 1 9em;
  max-width: 24rem;
  order: 0;
}
.app-immersive .app-toolbar #tour-progress { flex: 1 0 100%; order: 1; }

.showcase-intro h1 {
  letter-spacing: -.025em;
  line-height: 1.1;
  font-weight: 650;
}

.showcase-intro p {
  max-width: 44ch;
  margin-inline: auto;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  color: var(--showcase-muted);
  overflow-wrap: normal;
}

.showcase-intro .eyebrow {
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .12em;
  font-weight: 600;
}

.showcase-intro .tour-explainer {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.showcase-start {
  gap: 12px;
  margin-top: 24px;
}

.showcase-start button,
.app-toolbar button,
.close-scenarios {
  min-height: 48px;
  border-color: var(--showcase-line);
  border-radius: 16px;
  background: #f8fbfa;
  color: var(--showcase-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: inset 0 1px 0 #fff;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
  touch-action: manipulation;
}

.showcase-start .tour-start {
  background: #10212e;
  border-color: #10212e;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 5px 14px rgba(16, 33, 46, .1);
}

.showcase-start button:active,
.app-toolbar button:active,
.close-scenarios:active {
  box-shadow: inset 0 0 0 2px rgba(16, 33, 46, .18);
}

.scenario-panel h2 {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 650;
  letter-spacing: -.015em;
  color: var(--showcase-ink);
}

.scenario-group {
  border-color: var(--showcase-line);
}

.scenario-group summary {
  min-height: 48px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--showcase-ink);
}

.scenario-group > div {
  gap: 8px;
  padding-bottom: 12px;
}

.scenario-choice {
  min-height: 48px;
  padding: 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: normal;
  transition: background-color .18s ease, border-color .18s ease;
  touch-action: manipulation;
}

.scenario-detail {
  padding-block: 20px;
}

.scenario-detail h3,
.tour-guide h3 {
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -.02em;
  font-weight: 650;
}

.scenario-detail p,
.scenario-detail ol,
.event-panel > p,
.tour-guide p:last-child {
  font-size: 14px;
  line-height: 1.6;
  color: var(--showcase-muted);
  overflow-wrap: normal;
}

.event-panel {
  padding: 18px;
  border: 1px solid var(--showcase-line);
  border-radius: var(--showcase-radius);
  background: linear-gradient(145deg, #fff, #f0f5f3);
  box-shadow: inset 0 1px 0 #fff;
}

.event-panel summary {
  min-height: 44px;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.45;
}

.event-panel summary > span,
#scenario-state,
.tour-guide-label,
.tour-log {
  font-size: 13px;
  line-height: 1.5;
  color: var(--showcase-muted);
}

#scenario-events {
  gap: 8px;
}

#scenario-events button,
#scenario-reset {
  min-height: 48px;
  padding: 11px 12px;
  border-radius: 13px;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: normal;
  touch-action: manipulation;
}

.phone-stage > small,
.scope-note {
  font-size: 13px;
  line-height: 1.6;
  color: var(--showcase-muted);
  overflow-wrap: normal;
}

.tour-guide {
  padding: 18px;
  border: 1px solid #cad7e8;
  border-radius: 20px;
  background: #edf3fb;
}

.app-immersive .app-toolbar {
  background: #f2f6f5;
  border-bottom-color: var(--showcase-line);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .8);
}

.app-toolbar #tour-progress {
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: normal;
}

.app-immersive.scenario-open .scenario-panel {
  border-radius: 28px 28px 0 0;
  border-color: var(--showcase-line);
  padding: 20px max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: #f4f7f5;
  box-shadow: 0 -12px 48px rgba(16, 33, 46, .18), inset 0 1px 0 #fff;
}

@supports ((-webkit-backdrop-filter: blur(16px)) or (backdrop-filter: blur(16px))) {
  .app-immersive .app-toolbar {
    background: rgba(245, 249, 247, .9);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    backdrop-filter: blur(16px) saturate(130%);
  }
}

@media (max-width: 760px) {
  .showcase-header {
    height: auto;
    min-height: 64px;
    padding: 12px max(var(--showcase-gutter), env(safe-area-inset-right)) 12px max(var(--showcase-gutter), env(safe-area-inset-left));
    gap: 12px;
  }

  .showcase-header > span {
    font-size: 12px;
    line-height: 1.4;
  }

  .showcase-header .back-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
  }

  .showcase-intro {
    padding: 32px max(var(--showcase-gutter), env(safe-area-inset-right)) 28px max(var(--showcase-gutter), env(safe-area-inset-left));
  }

  .showcase-intro h1 {
    margin-block: 12px 16px;
    font-size: clamp(30px, 8.8vw, 38px);
    letter-spacing: -.025em;
    line-height: 1.12;
  }

  .showcase-intro p {
    font-size: 16px;
  }

  .showcase-start {
    display: grid;
    gap: 10px;
    margin-block: 24px 0;
  }

  .showcase-start button {
    min-height: 52px;
    font-size: 16px;
    padding: 14px 16px;
  }

  .showcase-layout {
    padding-inline: 0;
    gap: 32px;
    align-items: stretch;
  }

  .phone-stage {
    width: 100%;
    max-width: none;
  }

  .phone-stage iframe {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
  }

  .phone-stage > small {
    margin: 12px var(--showcase-gutter) 0;
  }

  .scenario-panel {
    width: 100%;
    max-width: none;
    padding: 0 max(var(--showcase-gutter), env(safe-area-inset-right)) 0 max(var(--showcase-gutter), env(safe-area-inset-left));
  }

  .scenario-panel > h2 {
    padding-top: 24px;
    border-top: 1px solid var(--showcase-line);
    font-size: 20px;
  }

  .scenario-group > div,
  #scenario-events {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .showcase-next {
    margin-inline: max(var(--showcase-gutter), env(safe-area-inset-left)) max(var(--showcase-gutter), env(safe-area-inset-right));
  }

  .scope-note {
    padding-inline: max(var(--showcase-gutter), env(safe-area-inset-left)) max(var(--showcase-gutter), env(safe-area-inset-right));
    margin-top: 24px;
    text-align: left;
  }

  .app-immersive .phone-stage iframe {
    width: 100%;
    max-width: none;
  }

  .app-immersive .app-toolbar {
    padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
  }

  .app-toolbar button {
    font-size: 14px;
  }
}

@media (max-width: 350px) {
  :root {
    --showcase-gutter: 18px;
  }

  .showcase-header {
    gap: 8px;
  }

  .showcase-header > span {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .showcase-start button,
  .app-toolbar button,
  .close-scenarios,
  .scenario-choice {
    transition: none;
  }
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .app-immersive .app-toolbar {
    background: #f2f6f5;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

html[data-material="opaque"] .app-immersive .app-toolbar,
body[data-material="opaque"].app-immersive .app-toolbar,
.crystal-opaque.app-immersive .app-toolbar,
.crystal-opaque .app-immersive .app-toolbar {
  background: #f2f6f5;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
