/* Single-row footer: connect fields (with labels) + video button on the
   left, disclaimer/copyright/social links on the right. Everything shares
   one fixed row height so it all lines up regardless of individual font
   sizes. Wraps to two lines below 900px instead of squeezing. */
.site-footer {
  --row-h: 28px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 10px 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .68rem;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  color: #6b7294;
}
.footer-connect-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 0 1 auto;
}
.footer-connect-item {
  display: flex;
  align-items: stretch;
  min-width: 0;
  height: 24px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 5px;
  overflow: hidden;
  flex: 0 1 auto;
}
.footer-connect-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0 7px;
}
.footer-connect-divider {
  flex-shrink: 0;
  width: 1px;
  align-self: stretch;
  background: rgba(255,255,255,.08);
}
.footer-connect-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 100%;
  line-height: 1;
  font-family: 'Inter', sans-serif;
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .2px;
  color: #9aa3c9;
  background: rgba(124,141,240,.08);
  padding: 0 8px;
  white-space: nowrap;
}
.footer-connect-item code {
  flex: 0 0 auto;
  font-family: 'Inter', sans-serif;
  font-size: .63rem;
  font-weight: 400;
  line-height: 1.4;
  color: #c7cbd6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.footer-connect-copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  border: none;
  background: rgba(255,255,255,.02);
  color: #6b7294;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.footer-connect-copy:hover { color: #e8eaf2; background: rgba(255,255,255,.06); }
.footer-connect-copy.copied { color: #5ac177; }
.footer-video-btn {
  flex-shrink: 0;
  height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.035);
  color: #c7cbd6;
  font-family: 'Inter', sans-serif;
  font-size: .66rem;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.footer-video-btn svg { width: 14px; height: 14px; flex-shrink: 0; color: #ff0000; }
.footer-video-btn:hover, .footer-video-btn:focus-visible { color: #fff; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.06); }
.footer-video-btn:focus-visible { outline: 2px solid #7c8df0; outline-offset: 2px; }

.footer-right-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}
.footer-disclaimer {
  font-size: .56rem;
  color: #4e5568;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.footer-brand {
  font-family: 'Inter', sans-serif;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .1px;
  color: #7c8499;
  white-space: nowrap;
  padding-right: 10px;
  border-right: 1px solid rgba(255,255,255,.08);
}
.footer-links { display: flex; gap: 8px; flex-shrink: 0; }
.footer-icon-link {
  font-family: 'Inter', sans-serif;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.02);
  color: #c7cbd6;
  text-decoration: none;
  transition: color .15s, border-color .15s, background .15s;
}
.footer-icon-link svg { flex-shrink: 0; }
.footer-icon-link:hover { color: #e8eaf2; border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.05); }
.footer-icon-link.discord:hover { color: #7c8df0; border-color: rgba(124,141,240,.3); background: rgba(124,141,240,.08); }
.footer-icon-link.steam:hover   { color: #6ea8cf; border-color: rgba(20,75,126,.55); background: rgba(20,75,126,.15); }

@media (max-width: 900px) {
  .footer-connect-group { flex: 1 1 100%; order: 1; }
  .footer-right-group { flex: 1 1 100%; order: 2; margin-left: 0; justify-content: space-between; }
  .footer-disclaimer { max-width: none; white-space: normal; }
}

/* Below 700px the footer switches from "single compact row" to a set of
   full-width, readable, thumb-sized blocks. The old layout kept desktop's
   tiny fonts (.68rem / .56rem) and text-overflow:ellipsis truncation on
   the connect fields, which made the IP/console command unreadable and
   the copy buttons (24px) too small to tap reliably. */
@media (max-width: 700px) {
  .site-footer {
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  /* Console command and the tutorial video aren't useful on a phone - no
     one's opening a game console or watching a how-to video from their
     pocket. Dropping both keeps this footer short enough to not collide
     with page content above it on small, no-scroll viewports (see
     body[data-page="home"] in index.html, which locks to 100vh). */
  .footer-connect-item--console,
  .footer-video-btn {
    display: none;
  }

  .footer-connect-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .footer-connect-item {
    flex: 1 1 auto;
    min-width: 140px;
    height: auto;
    min-height: 34px;
  }
  .footer-connect-main { padding: 6px 8px; flex: 1; min-width: 0; }
  .footer-connect-tag {
    font-size: .62rem;
    font-weight: 700;
    padding: 6px 8px;
    height: auto;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
  }
  .footer-connect-item code {
    font-size: .68rem;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
  }
  .footer-connect-copy { width: 32px; }
  .footer-connect-copy svg { width: 13px; height: 13px; }

  .footer-right-group {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
  }
  .footer-brand {
    border-right: none;
    padding-right: 0;
    text-align: left;
    font-size: .66rem;
    order: 1;
  }
  .footer-links { justify-content: flex-end; gap: 8px; order: 2; }
  .footer-icon-link { padding: 6px 12px; font-size: .68rem; }
  .footer-disclaimer {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    text-align: center;
    font-size: .62rem;
    line-height: 1.45;
  }
}

/* Very narrow phones (<380px): the two footer links stop fitting
   side-by-side at a comfortable tap size, so stack them full-width. */
@media (max-width: 380px) {
  .footer-links { flex-direction: column; width: 100%; }
  .footer-icon-link { width: 100%; justify-content: center; }
}

