/* 通常体験のスマホ幅だけ。PC・compareにはクラスを付けず、一切適用しない。 */
@media (max-width: 1023px) {
  html.mobile-fixed {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }
  body.mobile-fixed {
    --demo-result-pink: #ff0051;
    --demo-result-surface: var(--demo-result-pink);
    --demo-result-text: #fff;
    --demo-result-button-text: #a80036;
    position: fixed;
    top: var(--demo-visible-top, 0px);
    left: var(--demo-visible-left, 0px);
    width: var(--demo-visible-width, 100%);
    height: var(--demo-visible-height, 100%);
    min-height: 0;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none;
    display: grid;
    grid-template-rows: 34px 28px minmax(0, 1fr) auto;
  }
  body.mobile-fixed > .site-header {
    position: static;
    height: 34px;
    min-height: 0;
    padding: 0 8px;
  }
  body.mobile-fixed > .site-header .mobile-explain {
    min-width: 36px;
    height: 26px;
    padding: 2px 6px;
    font-size: 10px;
    line-height: 20px;
    flex-shrink: 0;
    white-space: nowrap;
  }
  body.mobile-fixed > .journey {
    position: relative;
    top: auto;
    height: 28px;
    min-height: 0;
    padding: 2px 10px;
  }
  body.mobile-fixed .journey::before {
    top: 14px;
  }
  body.mobile-fixed .journey .step-number {
    width: 23px;
    height: 23px;
    min-width: 23px;
    font-size: 11px;
  }
  body.mobile-fixed > #app,
  body.mobile-fixed .workspace {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  body.mobile-fixed .workspace > .experience {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: 32px 30px minmax(0, 1fr);
    gap: 4px;
    padding: 2px 8px 0;
    overflow: hidden;
  }
  body.mobile-fixed .stage-toolbar {
    position: static;
    height: 32px;
    padding: 0;
  }
  body.mobile-fixed .view-switch {
    width: 100%;
    padding: 1px;
  }
  body.mobile-fixed .view-switch button {
    flex: 1;
    padding: 3px 9px;
  }
  body.mobile-fixed .operation-guide {
    position: static;
    height: 30px;
    min-height: 0;
    max-height: 30px;
    margin: 0;
    padding: 1px 7px;
  }
  body.mobile-fixed .operation-guide p {
    line-height: 24px;
  }
  body.mobile-fixed .stage {
    display: block;
    height: 100%;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }
  body.mobile-fixed .stage-stack {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  body.mobile-fixed .stage-stack > .reminder-tools {
    flex-shrink: 0;
  }
  body.mobile-fixed .phone-viewport {
    display: block;
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow: hidden;
  }
  body.mobile-fixed .phone-viewport > .phone {
    position: absolute;
    left: 50%;
    top: 0;
    margin-left: -177px;
    width: 354px;
    height: 664px;
    transform: scale(var(--demo-phone-scale, 1));
    transform-origin: top center;
  }
  body.mobile-fixed .phone-screen {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
  }
  body.mobile-fixed .salon-phone-screen {
    position: relative;
    background: #fff;
  }
  body.mobile-fixed .salon-phone-screen:has(> .demo-modal-layer) > .salon {
    display: none;
  }
  /* 結果があるときだけ下段を使う。端末の高さから差し引き、重ねない。 */
  body.mobile-fixed > #toast {
    display: none;
    grid-row: 4;
    position: static;
    top: auto;
    bottom: auto;
    left: auto;
    width: auto;
    max-width: none;
    height: auto;
    margin: 8px 10px calc(8px + env(safe-area-inset-bottom));
    padding: 14px 16px;
    gap: 12px;
    align-items: center;
    background: var(--demo-result-surface);
    border: 1px solid var(--demo-result-pink);
    border-radius: 16px;
    color: var(--demo-result-text);
    box-shadow: 0 3px 8px #ff005126;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    white-space: normal;
    overflow-wrap: anywhere;
    transform: none !important;
    transition: none;
    pointer-events: auto;
    z-index: 94;
  }
  body.mobile-fixed > #toast.toast-show {
    display: flex;
    animation: mobile-result-appear 220ms ease-out 1;
  }
  body.mobile-fixed > #toast p {
    flex: 1;
    min-width: 0;
    margin: 0;
  }
  body.mobile-fixed > #toast .mobile-result-next {
    flex: 0 0 auto;
    padding: 5px 8px;
    background: white;
    border: 1px solid white;
    border-radius: 8px;
    color: var(--demo-result-button-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 22px;
    white-space: nowrap;
  }
  @keyframes mobile-result-appear {
    from {
      filter: opacity(0.4);
    }
    to {
      filter: opacity(1);
    }
  }
  @media (prefers-reduced-motion: reduce) {
    body.mobile-fixed > #toast.toast-show {
      animation: none;
    }
  }
  /* 説明は端末を覆わない。表示中だけ、その実寸をfitPhoneで差し引く。 */
  body.mobile-fixed .mobile-intro {
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 4px;
    padding: 8px 32px 8px 10px;
  }
  body.mobile-fixed .mobile-intro > strong {
    font-size: 12px;
  }
  body.mobile-fixed .mobile-intro > p {
    font-size: 11px;
  }
  body.mobile-fixed .phone > .karte-photo-dialog[open] {
    position: absolute;
    inset: 31px 0 14px;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    margin: 0;
    z-index: 110;
    overflow: auto;
  }
}
