/* Keep the page at viewport width on touch screens. */
html, body { max-width: 100%; }
.try-studio, .try-shell, .try-form, .live-direction,
.try-form fieldset, .try-objectives, .template-strip,
.try-prompt, .try-prompt textarea { min-width: 0; max-width: 100%; }
.try-shell > *, .try-objectives > *, .template-strip > * { min-width: 0; }
.try-prompt textarea { box-sizing: border-box; }

@media (max-width: 900px) {
  .try-shell { grid-template-columns: minmax(0, 1fr); }
  .try-form { overflow: hidden; }
}

@media (max-width: 620px) {
  html, body { overflow-x: clip; }
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    justify-items: start;
    gap: 9px;
    height: 108px;
    padding: 10px 20px 12px;
  }
  .site-header .brand { min-width: 0; }
  .header-actions { justify-self: start; width: auto; }
  .header-actions .button-small { min-height: 35px; padding: 0 14px; }
  .hero { padding-top: 146px; }
  .try-studio { scroll-margin-top: 114px; }
  .try-shell { width: 100%; }
  .try-progress { min-width: 0; flex-wrap: wrap; }
  .try-progress > b { max-width: 100%; margin-left: 0; }
  .result-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    margin-right: 0;
    padding-bottom: 0;
    overflow: visible;
  }
  .result-card { min-width: 0; }
  .template-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    padding-right: 0;
    overflow: visible;
  }
  .template-strip button { width: 100%; }
  .try-objectives button, .try-upload, .try-upload div { min-width: 0; }
  .try-upload strong, .try-upload small { overflow-wrap: anywhere; }
  .create-direction { min-width: 0; padding: 0 10px; font-size: 14px; line-height: 1.2; text-align: center; }
  .create-direction > span, .create-direction > b { flex: none; }
  .try-safe { font-size: 12px; line-height: 1.4; }
}

@media (max-width: 360px) {
  .create-direction { font-size: 12px; gap: 6px; }
  .try-form { padding: 12px; }
}
