/* Small compatibility, media and accessibility fixes. Main layout lives in style.css. */
html { overflow-x: hidden; }
body { min-height: 100vh; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
audio { min-height: 36px; }

/* Embedded media: preserve the paper-card proportions and prevent overflow on mobile. */
.media-grid,
.telegram-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.media-feature { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 1rem; padding: 1rem; background: var(--paper2) url("assets/textures/beige-paper.png") repeat; border: 1px solid var(--line); box-shadow: 3px 4px 0 var(--shadow); }
.media-card { min-width: 0; padding: .85rem 1rem; background: rgba(255,253,249,.72); border: 1px solid var(--line); box-shadow: 2px 2px 0 rgba(35,24,22,.08); }
.media-copy { min-width: 0; }
.media-copy h3,
.media-card h3 { margin: .1rem 0 .45rem; color: var(--accent); }
.media-copy p,
.media-card p { line-height: 1.65; font-size: .88rem; }
.media-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #253d3f; border: 1px solid var(--deep); box-shadow: 2px 2px 0 var(--shadow); }
.media-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.telegram-grid .media-card { overflow: hidden; }
.telegram-grid iframe { max-width: 100% !important; }

/* Compact tactile controls inspired by the Iirai mobile layout. */
nav { overflow-x: visible; }
nav a { flex: 0 1 auto; white-space: nowrap; }
.button-row { align-items: center; }
.button-row .button { width: auto; flex: 0 1 auto; }

@media (max-width: 760px) {
  .media-grid,
  .telegram-grid,
  .media-feature { grid-template-columns: 1fr; }
  .media-feature { padding: .8rem; }
  .media-copy { padding-top: .2rem; }

  nav {
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
    padding-left: .7rem;
    padding-right: .7rem;
  }

  nav a {
    flex: 0 1 auto;
    min-width: 0;
    width: auto;
  }

  .button-row {
    justify-content: flex-start;
  }

  .button-row .button {
    width: auto;
    flex: 0 1 auto;
  }
}

@media (max-width: 480px) {
  nav {
    justify-content: center;
    overflow-x: visible;
    flex-wrap: wrap;
  }

  nav a {
    flex: 0 1 auto;
    width: auto;
  }

  .button-row {
    justify-content: center;
    align-items: center;
  }

  .button-row .button {
    flex: 0 1 auto;
  }
}

/* Pages deployment refresh: responsive navigation and compact action buttons are part of this shared stylesheet. */
