/* Keep quota checks silent before generation; show a factual count only on
 * the finished photo, with a small alert when creation cannot continue. */
.experience-body .shell .daily-usage[hidden] { display: none; }
.experience-body .shell .daily-usage {
  color: #52655b;
  flex: 0 0 auto;
  font-size: .72rem;
  font-weight: 400;
  line-height: 1.4;
  margin: 4px auto 6px;
  max-width: 760px;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: center;
  text-wrap: balance;
  width: 100%;
}
.experience-body .shell .daily-usage span + span { margin-left: .3em; }
.experience-body .shell .daily-usage .daily-usage-blocked,
.experience-body .shell .daily-usage .daily-usage-error { color: #795113; }
.experience-body .shell .daily-usage-retry {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  font: inherit;
  min-height: 44px;
  padding: 6px 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.experience-body .shell .daily-usage-retry:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.experience-body .shell .daily-usage-retry:disabled { cursor: wait; opacity: .6; }
.experience-body .capture-shell .daily-usage {
  color: #d3e0d7;
  margin: 6px auto 0;
  max-width: 540px;
}
.experience-body .capture-shell.has-daily-usage .public-content {
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
}
.experience-body .capture-shell .daily-usage .daily-usage-blocked,
.experience-body .capture-shell .daily-usage .daily-usage-error { color: #e8e8b5; }
.experience-body .capture-shell .camera-stage.is-quota-blocked:not(.is-reviewing)::after { display: none; }
.experience-body .capture-shell .camera-stage.is-quota-blocked:not(.is-reviewing) .camera-status {
  bottom: auto;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
}
.experience-body .experience-result-shell .result-heading .daily-usage { margin-bottom: 0; margin-top: 5px; }

@media (orientation: landscape) and (max-height: 520px) and (min-width: 480px) {
  .experience-body .capture-shell.has-daily-usage:not(.kiosk-capture-shell) .public-content {
    grid-template-rows: minmax(0, 1fr) auto auto auto auto minmax(0, 1fr);
  }
  .experience-body .capture-shell:not(.kiosk-capture-shell) .daily-usage {
    font-size: .67rem;
    grid-column: 2;
    grid-row: 4;
    margin-top: 8px;
  }
  .experience-body .capture-shell.has-daily-usage:not(.kiosk-capture-shell) #capture-error { grid-row: 5; }
  .experience-body .experience-landing-shell .scene-form > .daily-usage { font-size: .67rem; margin-bottom: 4px; }
  /* Share the bottom row on a short sideways phone. This recovers enough
   * height for readable scenario squares without hiding their descriptions. */
  .experience-body .experience-landing-shell:not(.kiosk-landing-shell) #scene-step.is-active {
    column-gap: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 44px;
    row-gap: 6px;
  }
  .experience-body .experience-landing-shell:not(.kiosk-landing-shell) #scene-step .scene-grid {
    align-self: stretch;
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .experience-body .experience-landing-shell:not(.kiosk-landing-shell) #scene-step .scene-pagination {
    grid-column: 1;
    grid-row: 2;
    height: 44px;
    justify-content: space-between;
    justify-self: end;
    margin: 0;
    width: min(100%, 180px);
  }
  .experience-body .experience-landing-shell:not(.kiosk-landing-shell) #scene-step .scene-pagination button { height: 44px; }
  .experience-body .experience-landing-shell:not(.kiosk-landing-shell) #scene-step #scene-next {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    margin: 0;
    width: min(100%, 180px);
  }
  .experience-body .experience-landing-shell:not(.kiosk-landing-shell) #scene-step:not(:has(.scene-pagination.has-multiple-pages)) #scene-next {
    grid-column: 1 / -1;
    justify-self: center;
  }
}

@media (orientation: landscape) and (max-height: 340px) and (min-width: 480px) {
  /* Verified owners also have the 44px return-to-library link. On the
   * shortest sideways phones, recover a little header spacing instead of
   * cropping the action panel or shrinking its touch targets. */
  .experience-body.has-photo-library .experience-result-shell:not(.kiosk-result-shell):has(.daily-usage:not([hidden])):has(.result-layout.is-ready) {
    --experience-header-height: 40px;
  }
  .experience-body.has-photo-library .experience-result-shell:not(.kiosk-result-shell):has(.daily-usage:not([hidden])):has(.result-layout.is-ready) .result-heading {
    margin-bottom: 5px;
  }
  .experience-body.has-photo-library .experience-result-shell:not(.kiosk-result-shell):has(.daily-usage:not([hidden])):has(.result-layout.is-ready) .daily-usage {
    margin-top: 3px;
  }
}
