/* External Bytecade funnel & Night Depot 3D showcase for Slip Hazard (zero inline scripts). */
.funnel-card[hidden],
.funnel-story-panel[hidden],
.funnel-pause-bar[hidden],
.funnel-floor-link[hidden],
.funnel-run-stat[hidden] {
  display: none !important;
}

header .tools {
  align-items: center;
  gap: 6px;
}

header .tools button,
#sound,
#pause {
  min-width: 44px;
  min-height: 44px;
  height: 44px;
}

.arcade-return {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 0 11px;
  background: #15282de8;
  border: 1px solid #a7b1a78a;
  box-shadow: 0 2px #08191dcc;
  border-radius: 5px;
  color: #f4f2e8;
  font: 700 13px/1 var(--type, system-ui, sans-serif);
  text-decoration: none;
  white-space: nowrap;
}

.arcade-return:hover,
.arcade-return:focus-visible {
  border-color: #bef554;
  color: #bef554;
}

@media (pointer: coarse), (max-width: 660px) {
  .arcade-return {
    min-height: 44px;
    padding: 0 10px;
    font-size: 12.5px;
  }
}

@media (max-width: 380px) {
  header {
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
  }
  header .identity {
    gap: 6px;
    min-width: 0;
  }
  header .hazard-mark {
    width: 24px;
    height: 22px;
    font-size: 24px;
  }
  header .identity h1 {
    font-size: 13px;
    white-space: nowrap;
  }
  header .tools {
    gap: 4px;
    flex-shrink: 0;
  }
  .arcade-return {
    min-height: 44px;
    padding: 0 7px;
    font-size: 11px;
  }
  .lower {
    left: max(6px, env(safe-area-inset-left));
    right: max(6px, env(safe-area-inset-right));
  }
  .touchpad {
    gap: 4px;
  }
  .touchpad > div {
    gap: 3px;
  }
  .touchpad button {
    min-width: 44px;
    min-height: 44px;
    height: 44px;
    padding: 0 5px;
    font-size: 12.5px;
  }
}

dialog#sheet {
  margin: 10px auto;
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

dialog#sheet.is-delivery .docket {
  padding: 16px 18px 18px;
}

dialog#sheet.is-delivery #shortcuts {
  display: none;
}

dialog#sheet.is-delivery .docket h2 {
  font-size: clamp(28px, 7.2vw, 38px);
  margin: 3px 0 5px;
}

dialog#sheet.is-delivery .docket > p {
  font-size: 14.5px;
  line-height: 1.35;
  margin: 4px 0 10px;
}

dialog#sheet .sheet-actions button:focus-visible,
dialog#sheet .sheet-actions a:focus-visible,
.funnel-story-toggle:focus-visible {
  outline: 2.5px solid #173233;
  outline-offset: 2px;
}

.funnel-card {
  position: relative;
  margin: 10px 0 12px;
  padding: 0 14px 13px;
  border-radius: 4px;
  background: linear-gradient(180deg, #13252a 0%, #0f1f23 100%);
  color: #edf6ea;
  border: 1.5px solid #2e5358;
  box-shadow: inset 0 0 0 1px rgba(190, 245, 84, 0.14), 0 4px 14px rgba(12, 24, 27, 0.22);
  overflow: hidden;
}

.funnel-hazard-bar {
  height: 5px;
  margin: 0 -14px 10px;
  background: repeating-linear-gradient(120deg, #bef554 0 9px, #13252a 9px 18px);
}

.funnel-manifest-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.funnel-manifest-id {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.funnel-kicker {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 6px;
  border-radius: 2px;
  background: rgba(190, 245, 84, 0.16);
  border: 1px solid rgba(190, 245, 84, 0.45);
  color: #bef554;
  font: 700 10px/1.25 var(--mono, monospace);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.funnel-platform {
  color: #a9c7c1;
  font: 700 10px/1.2 var(--mono, monospace);
  letter-spacing: 0.08em;
}

.funnel-stamp-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.funnel-stamp {
  display: inline-block;
  padding: 3px 6px;
  border: 1.5px solid #f4bf56;
  border-radius: 2px;
  color: #f4bf56;
  font: 800 9.5px/1.1 var(--mono, monospace);
  letter-spacing: 0.08em;
  transform: rotate(-2.5deg);
}

.funnel-run-stat {
  color: #bef554;
  font: 700 11px/1.1 var(--mono, monospace);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.funnel-card h3 {
  margin: 0 0 8px;
  font: 800 17px/1.2 var(--type, system-ui, sans-serif);
  color: #ffffff;
}

.funnel-taste-list {
  margin: 0 0 11px;
  padding: 8px 10px 8px 24px;
  border-radius: 3px;
  background: rgba(7, 20, 24, 0.55);
  border: 1px solid #284b50;
  font: 400 12.5px/1.38 var(--type, system-ui, sans-serif);
  color: #dce9e1;
}

.funnel-taste-list li + li {
  margin-top: 4px;
}

.funnel-taste-list strong {
  color: #f4f2e8;
}

.funnel-story-toggle {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1.5px solid #bef554;
  border-radius: 3px;
  background: #bef554;
  color: #13252a;
  font: 800 14px/1.2 var(--type, system-ui, sans-serif);
  cursor: pointer;
}

.funnel-story-toggle:hover {
  background: #d2fa7a;
}

.funnel-story-panel {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed #3a6066;
  font: 400 12.5px/1.4 var(--type, system-ui, sans-serif);
  color: #d6e4dc;
}

.funnel-story-panel strong {
  display: block;
  margin-bottom: 4px;
  color: #bef554;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.funnel-story-panel p {
  margin: 0;
}

.funnel-pause-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 0 10px;
  padding-top: 10px;
  border-top: 1px dashed #b9b199;
}

.funnel-pause-toggle {
  min-height: 44px;
  padding: 6px 11px;
  border: 1px solid #173233;
  border-radius: 2px;
  background: #e9e4d2;
  color: #173233;
  font: 700 13px/1.2 var(--type, system-ui, sans-serif);
  cursor: pointer;
}

.funnel-pause-toggle:hover {
  background: #dfd8c0;
}

.funnel-floor-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 2px;
  border: 1.5px solid #173233;
  background: transparent;
  color: #173233;
  font: 700 14px/1.2 var(--type, system-ui, sans-serif);
  text-decoration: none;
  white-space: nowrap;
}

.funnel-floor-link:hover {
  background: #e6e0ce;
}

.sheet-actions {
  flex-wrap: wrap;
}

.funnel-next-flagship {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-column: 1 / -1;
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 2px;
  border: 1.5px solid #173233;
  background: #bef554;
  color: #13252a;
  font: 800 14px/1.2 var(--type, system-ui, sans-serif);
  text-decoration: none;
  text-align: center;
}

.funnel-next-flagship:hover {
  background: #d2fa7a;
}

dialog#sheet.is-delivery .sheet-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

dialog#sheet.is-delivery .sheet-actions #primary {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 800;
}

dialog#sheet.is-delivery .sheet-actions .funnel-floor-link {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 44px;
  margin-top: 0;
}

@media (max-height: 760px), (max-width: 420px) {
  dialog#sheet.is-delivery .docket {
    padding: 12px 14px 14px;
  }
  dialog#sheet.is-delivery .docket h2 {
    font-size: clamp(24px, 6.6vw, 32px);
    margin: 2px 0 3px;
  }
  dialog#sheet.is-delivery .docket > p {
    font-size: 13.5px;
    line-height: 1.3;
    margin: 2px 0 8px;
  }
  .funnel-card {
    margin: 8px 0 10px;
    padding: 0 11px 10px;
  }
  .funnel-hazard-bar {
    height: 4px;
    margin: 0 -11px 8px;
  }
  .funnel-card h3 {
    margin: 0 0 6px;
    font-size: 15.5px;
  }
  .funnel-taste-list {
    margin: 0 0 8px;
    padding: 6px 8px 6px 20px;
    font-size: 12px;
    line-height: 1.32;
  }
  .funnel-taste-list li + li {
    margin-top: 2px;
  }
  .funnel-story-toggle {
    min-height: 44px;
    padding: 7px 10px;
    font-size: 13px;
  }
  .funnel-story-panel {
    margin-top: 7px;
    padding-top: 7px;
    font-size: 12px;
    line-height: 1.34;
  }
}

@media (max-width: 340px) {
  dialog#sheet.is-delivery .sheet-actions {
    grid-template-columns: 1fr;
  }
}
