/* Phone layout: reserve the tallest slide's content instead of clipping it. */
@media (max-width:760px), (max-width:1100px) and (max-height:500px) {
  .esp-theme .hero-carousel {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:1fr auto;
    height:auto;
    min-height:min(720px,calc(100svh - var(--header-height)));
  }
  .esp-theme .carousel-slide {
    position:relative;
    inset:auto;
    grid-area:1 / 1;
    min-width:0;
    padding:38px 0 32px;
  }
  .esp-theme .carousel-slide[hidden] {
    display:flex;
    visibility:hidden;
    pointer-events:none;
  }
  .esp-theme .carousel-copy { min-width:0; padding:0; }
  .esp-theme .carousel-title { font-size:clamp(28px,7.7vw,36px); overflow-wrap:anywhere; }
  .esp-theme .carousel-copy > .eyebrow { font-size:14px; overflow-wrap:anywhere; }
  .esp-theme .carousel-controls {
    position:relative;
    inset:auto;
    grid-area:2 / 1;
    margin-inline:auto;
    padding:0 0 32px;
    gap:10px;
    flex-wrap:wrap;
  }
  .esp-theme .carousel-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; gap:7px; }
  .esp-theme .carousel-tab { min-height:48px; padding:9px 5px; overflow-wrap:anywhere; }
  .esp-theme .carousel-toggle { min-height:44px; padding:8px 12px; }
  .esp-theme .menu { min-width:44px; min-height:44px; padding:8px; }
  .esp-theme .language-trigger { min-width:44px; min-height:44px; }
  .esp-theme .language-menu a { min-height:44px; padding-block:11px; }
  .esp-theme .footer-column a { display:flex; align-items:center; min-height:44px; margin:2px 0; }
  .esp-theme .esp-quick { margin-top:0; padding-top:16px; }
  .esp-theme .esp-panel img,.esp-theme .esp-about-image { height:auto; max-height:420px; }
  .esp-theme .floating-tools { bottom:max(16px,env(safe-area-inset-bottom)); }
}
@media (max-width:600px) {
  .esp-theme .language-picker .current-language { display:none; }
  .esp-theme .header-bar { flex-wrap:wrap; column-gap:8px; }
  .esp-theme .header-bar > .brand { min-width:0; }
  .esp-theme .tools { gap:4px; }
  .esp-theme .menu span { display:none; }
  .esp-theme .footer-grid { column-gap:20px; }
}
@media (max-height:500px) and (orientation:landscape) {
  .esp-theme .language-menu ul { max-height:calc(100svh - var(--header-height) - 40px); }
}
