/* Phone-specific composition shared by the integrated prototype. */
html { overflow-x: clip; }
body { overflow-x: clip; }
a, button { touch-action: manipulation; }

@media (max-width: 600px) {
  html[data-universe="home"] .page { min-height: 100svh; overflow: visible; }
  html[data-universe="home"] .intro {
    padding: max(70px, env(safe-area-inset-top)) 22px 0;
  }
  html[data-universe="home"] .intro h1 {
    max-width: 420px;
    margin-inline: auto;
    font-size: clamp(28px, 8vw, 43px);
    line-height: 1.07;
  }
  html[data-universe="home"] .intro p { font-size: 14px; }
  html[data-universe="home"] .stage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: calc(100% - 22px);
    height: clamp(390px, calc(100svh - 205px), 650px);
    padding: 0;
    margin: 18px auto max(18px, env(safe-area-inset-bottom));
  }
  html[data-universe="home"] .branch:nth-child(n) { border-radius: 30px; }
  html[data-universe="home"] .branch__label { left: 14px; right: 10px; bottom: 17px; }
  html[data-universe="home"] .branch__name { font-size: clamp(20px, 5.8vw, 30px); line-height: 1; }
  html[data-universe="home"] .branch__eyebrow { font-size: 8px; letter-spacing: .1em; }
  html[data-universe="home"] .branch__arrow { right: 12px; top: 12px; bottom: auto; width: 32px; height: 32px; }
  html[data-universe="home"] .center {
    position: absolute;
    z-index: 4;
    grid-row: auto;
    grid-column: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 132px;
    height: 76px;
    margin: 0;
    border-radius: 60px;
    box-shadow: 0 0 0 8px #fffdf9, 0 12px 28px #192f4e22;
  }
  html[data-universe="home"] .center img { width: 81%; }
  html[data-universe="home"] .center small { display: none; }
  html[data-universe="home"] .language { right: 14px; top: max(13px, env(safe-area-inset-top)); }

  html[data-universe="home"] dialog {
    width: 100%;
    max-width: 100%;
    max-height: 100dvh;
    margin: auto 0 0;
  }
  html[data-universe="home"] .detail {
    width: 100%;
    height: min(92dvh, 760px);
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: min(30%, 215px) minmax(0, 1fr);
    border-radius: 28px 28px 0 0;
  }
  html[data-universe="home"] .detail__body {
    min-height: 0;
    justify-content: flex-start;
    gap: 11px;
    overflow-y: auto;
    padding: 22px 24px max(22px, env(safe-area-inset-bottom));
  }
  html[data-universe="home"] .detail h2 { font-size: clamp(32px, 9vw, 43px); }
  html[data-universe="home"] .detail__lead { font-size: 15px; line-height: 1.48; }
  html[data-universe="home"] .detail__meta span { font-size: 13px; }
  html[data-universe="home"] .detail__offer { font-size: 12px; }
  html[data-universe="home"] .detail__actions {
    position: sticky;
    bottom: calc(-1 * max(22px, env(safe-area-inset-bottom)));
    z-index: 2;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 2px;
    margin-top: auto;
    padding: 10px 0 max(12px, env(safe-area-inset-bottom));
    background: #fffdf9;
  }
  html[data-universe="home"] .detail__enter,
  html[data-universe="home"] .detail__back { min-height: 48px; justify-content: center; text-align: center; }
  html[data-universe="home"] .detail__enter { font-size: 12px; }
  html[data-universe="home"] .detail__close { width: 46px; height: 46px; }

  html:not([data-universe="home"]) img,
  html:not([data-universe="home"]) video,
  html:not([data-universe="home"]) svg { max-width: 100%; }
  html:not([data-universe="home"]) .menu-toggle,
  html:not([data-universe="home"]) .lang,
  html:not([data-universe="home"]) .lang-toggle { min-width: 44px; min-height: 44px; }
  html:not([data-universe="home"]) .main-nav a,
  html:not([data-universe="home"]) .nav a { min-height: 44px; display: inline-flex; align-items: center; }
}

@media (max-width: 360px) {
  html[data-universe="home"] .stage { height: max(380px, calc(100svh - 190px)); }
  html[data-universe="home"] .branch__label { left: 11px; }
  html[data-universe="home"] .branch__name { font-size: 20px; }
  html[data-universe="home"] .branch__eyebrow { font-size: 7px; }
  html[data-universe="home"] .center { width: 112px; height: 67px; }
}

@media (max-width: 600px) and (max-height: 650px) {
  html[data-universe="home"] .detail { height: 96dvh; grid-template-rows: min(25%, 155px) minmax(0, 1fr); }
  html[data-universe="home"] .detail__photo { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-universe="home"] .center { animation: none; }
}
