/* standalone.css */
/* Rubber-band overscroll paints the html canvas, not .ice. Keep it on Ice. */
html {
  background-color: #d9edf5;
  transition: background-color .7s ease;
}
html[data-theme="dark"] { background-color: #172e3d; }
html:has(.ice[data-active-story="tv"]) { background-color: #f4ded0; }
html[data-theme="dark"]:has(.ice[data-active-story="tv"]) { background-color: #36231f; }
html:has(.ice[data-active-story="collector"]) { background-color: #e2eccb; }
html[data-theme="dark"]:has(.ice[data-active-story="collector"]) { background-color: #1c3025; }
html,
body,
#app { min-height: 100%; }
body,
#app { background-color: inherit; }

/* The comparison toolbar is absent, so the page owns the full viewport. */
.site.ice {
  min-height: 100svh;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
}
.ice :is(.ice-editorial, .ice-demo, .ice-waitlist, .ice-footer-contact, .ice-corner) { min-width: 0; }
.ice .story-reply-area { height: auto; min-height: 84px; padding-bottom: 0; }
.ice .story-reply { overflow-wrap: anywhere; }
.ice .signup-meta > span { min-width: 0; }
.about-trust { display: grid; gap: var(--space-4); margin-top: var(--space-5); }
.about-trust dt { font-size: var(--text-sm); font-weight: 600; }
.about-trust dd { margin: var(--space-1) 0 0; font-size: var(--text-sm); line-height: 1.5; }
.ice .ice-demo { scroll-margin-top: 24px; }
.ice .ice-audience,
.ice .ice-zoom-cue,
.ice .signup-meta,
.ice .ice-demo-heading > span,
.ice .ice-footer-contact small,
.ice .ice-footer p > span,
.ice .ice-photo-disclaimer { font-size: 12px; }
.ice .ice-demo-heading > span { letter-spacing: .05em; }
.ice .ice-waitlist .signup-fields { border-radius: 12px; }
.ice .ice-waitlist .signup-submit { height: auto; min-height: 44px; border-radius: 7px; }
.ice .ice-waitlist .signup input { font-size: 16px; height: auto; min-height: 44px; }
.ice :is(.story-reply-prompt, .story-status) { color: var(--concept-muted); }
.ice .story-tools > button { color: var(--concept-ink); }
.ice .story-tools > button:disabled { display: none; }

@media (hover: hover) and (pointer: fine) {
  .ice .story-tools > button:hover {
    background: color-mix(in srgb, var(--concept-ink) 6%, transparent);
  }
}

/* Touch keyboards should not trigger an input-focus zoom, including tablets. */
@media (pointer: coarse), (max-width: 1023px) {
  .ice .signup input, .ice .story-draft { font-size: 16px; }
  .ice .signup input { height: auto; min-height: 44px; }
}
/* Phones reply by chip. The field stays disabled but should not look greyed out on your turn. */
@media (pointer: coarse) {
  .ice .story-phone[data-playback="ready"] .story-draft:disabled { opacity: 1; }
}

/* Keep portrait tablets in the same centered flow as phones. The chat itself
   retains its familiar left/right message alignment. */
@media (max-width: 1023px) {
  .ice {
    --ice-gutter: max(clamp(18px, 4.5vw, 40px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    --new-chat-height: clamp(340px, 68svh, 580px);
  }
  .ice .shell { padding-inline: var(--ice-gutter); }
  .ice .site-header { height: 76px; gap: 16px; }
  .ice .nav-note { display: none; }
  .ice .nav-right { gap: 14px; flex-shrink: 1; min-width: 0; }
  .ice .brand, .ice .theme-button { flex-shrink: 0; }
  .ice-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    padding-top: 24px;
    padding-bottom: 36px;
  }
  .ice .ice-editorial, .ice .ice-demo {
    width: 100%;
    max-width: 560px;
    margin-inline: auto;
    align-self: center;
  }
  .ice-editorial { padding-top: 0; text-align: center; }
  .ice .ice-audience { margin-bottom: 16px; min-height: 0; text-wrap: balance; }
  .ice #ice-title { font-size: clamp(38px, 10.5vw, 52px); line-height: .96; }
  .ice #ice-title .ice-italic { margin-left: 0; }
  .ice .ice-description { max-width: 34ch; margin: 20px auto 0; text-wrap: balance; }
  .ice .ice-story-picker { justify-content: center; flex-wrap: nowrap; gap: 6px; margin-top: 22px; }
  .ice .ice-story-picker [data-story] { flex: 0 1 auto; min-width: 0; padding: 10px 18px; font-size: 13px; }
  .ice .ice-product { margin-top: 20px !important; }
  .ice .ice-product-stage,
  .ice .ice-product-open {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(26px, auto) minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    height: clamp(246px, 62vw, 310px);
    margin: 0;
    padding: 0 8px;
    place-items: center;
  }
  .ice .ice-product .ice-zoom-cue { display: none; }
  .ice .ice-product .ice-product-note {
    position: static;
    grid-area: 1 / 1;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    font-size: 24px;
    line-height: 1;
    transform: none;
  }
  .ice .ice-product .ice-product-image {
    --product-angle: -3deg;
    grid-area: 2 / 1;
    justify-self: center;
    align-self: center;
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: calc(100% - 16px);
  }
  .ice .ice-product .ice-product-image[data-product="collector"] { height: 100%; }
  .ice .ice-product figcaption { margin-top: 12px; text-align: center; }
  .ice .ice-product-name { text-wrap: balance; }
  .ice .ice-waitlist { margin-top: 22px; }
  .ice .signup-fields, .ice .signup input { text-align: left; }
  .ice .signup-meta { justify-content: center; flex-wrap: wrap; gap: 4px 14px; }
  .ice .ice-footer,
  .ice .ice-corner {
    width: 100%;
    max-width: calc(560px + var(--ice-gutter) + var(--ice-gutter));
    margin-inline: auto;
  }
  .ice .ice-footer {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding-block: 12px 24px;
  }
  .ice .ice-footer-copy {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 8px;
    padding: 0;
  }
  .ice .ice-footer p { text-align: center; padding: 0; }
  .ice .ice-footer-legal { justify-content: center; }
  .ice .ice-footer-cta { margin: 0; }
  .ice .ice-footer-contact {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }
  .ice .ice-ambient-toggle { margin: 0; }
  .ice .story-tools { justify-content: flex-end; gap: 0 4px; }
  .ice .story-status { flex-basis: auto; text-align: left; margin-right: auto; }
}

@media (max-width: 480px) {
  .ice .site-header { height: auto; min-height: 72px; }
  .ice-layout { padding-top: 20px; gap: 32px; }
  .ice .ice-audience { font-size: 12px; letter-spacing: .05em; }
  .ice #ice-title { font-size: clamp(34px, 9.5vw, 44px); }
  .ice .ice-description { font-size: 15px; line-height: 1.55; margin-top: 18px; }
  .ice .ice-story-picker { gap: 5px; margin-top: 20px; flex-wrap: wrap; }
  .ice .ice-story-picker [data-story] { flex: 1 0 calc((100% - 10px) / 3); min-width: max-content; padding-inline: 7px; font-size: 12px; }
  .ice .ice-product .ice-product-note { font-size: 22px; }
  .ice .ice-demo-heading { gap: 8px; }
  .ice .ice-demo-heading > span > span { margin-left: 4px; }
  .ice .ice-footer-contact { gap: 10px; }
  #about-dialog { padding: 24px; }
}
@media (max-width: 360px) {
  .ice-description > span { display: inline; }
  #app .ice .signup-fields { grid-template-columns: minmax(0, 1fr); }
  .ice .signup input { width: 100%; }
  .ice .signup-submit { width: 100%; }
}

/* Short landscape windows still have a scrollable dialog body and reachable
   close/back controls. Browser zoom remains enabled. */
@media (max-height: 500px) {
  .ice .story-review-dialog { max-height: calc(100dvh - 16px); }
  .ice .review-header { padding-top: 8px; }
  .ice .review-header #review-disclosure { margin-bottom: 8px; }
  .ice .review-tabs { margin-bottom: 8px; }
  .ice .review-footer { padding-block: 6px; }
  .ice .ice-product-dialog { padding-top: 48px; max-height: calc(100dvh - 16px); }
  #about-dialog { max-height: calc(100dvh - 16px); }
}

