/* FreeRealms: Clover - phone layout.
   Loaded only on narrow screens: <link rel="stylesheet" href="/mobile.css?v=N" media="(max-width: 760px)">
   Desktop never applies this file, so the desktop site stays exactly as it is. */

html, body { overflow-x: hidden; }
body { -webkit-text-size-adjust: 100%; }

/* --- Top bar: one row. "Join Free!" left; Menu + Log In right.
   The Menu button (added by /js/mobile-nav.js) opens the page links below the bar. --- */
.topbar {
  position: relative;
  flex-wrap: nowrap;
  padding: 10px 12px 12px;
  border-radius: 0 0 16px 16px;
  z-index: 50;
}
.topbar-left { display: contents; }
.join-free-link { font-size: 20px; white-space: nowrap; }
.topbar-right { gap: 8px; }
.topbar .pill-btn { padding: 8px 14px; font-size: 14px; white-space: nowrap; }
.join-free-link:hover, .side-page-logo-overlay:hover { transform: none; }

.topnav { display: none; }
.topbar.menu-open .topnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  position: absolute;
  top: calc(100% - 6px);
  left: 10px;
  right: 10px;
  padding: 14px;
  background: linear-gradient(180deg, #0f7d74 0%, #0a4f4a 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}
.topbar.menu-open .topnav a {
  text-align: center;
  padding: 11px 6px;
  font-size: 14px;
}
.topbar.menu-open .topnav a.topnav-apply {
  margin: 0 auto;
  width: 70%;
  transform: scale(1.1);
}
.topbar.menu-open .topnav a.topnav-apply:hover { transform: scale(1.15); }

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid #052624;
  background: #0d6a63;
  color: #ffffff;
  font-family: "FreeRealms", Tahoma, sans-serif;
  font-weight: bold;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  cursor: pointer;
}
.topbar.menu-open .menu-btn { background: #5a9c12; border-color: #2d5f10; }
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -5px; }
.menu-icon::after { top: 5px; }

/* --- Home: the FreeRealms: Clover wordmark keeps its shape --- */
.hero { padding: 28px 12px 24px; }
.hero-content { padding: 0 9%; }
.hero-wordmark { height: auto; width: 100%; max-height: 100px; object-fit: contain; margin-bottom: 10px; }

/* --- Decorative banners and the home backdrop scale to the screen --- */
.banner-img { width: 100%; max-width: 640px; }
.home-backdrop { width: 100%; height: auto; aspect-ratio: 880 / 900; }
.side-page-logo-overlay { height: 26vw; max-height: 120px; }

/* --- Content boxes use the full width with a small margin --- */
.panel { width: 100%; }
.panels { padding: 0 14px; margin: 24px auto; }
img, video { max-width: 100%; }
table { display: block; max-width: 100%; overflow-x: auto; }
pre, code { white-space: pre-wrap; word-break: break-word; }
p, li, h1, h2, h3 { overflow-wrap: anywhere; }

/* --- Page boxes: less padding so text gets the room --- */
.content-page, .form-page { padding: 0 12px; }
.content-block { padding: 24px 18px; border-radius: 14px; }
.form-card { padding: 24px 18px; }
.install-step { gap: 12px; }

/* --- Forms: full width fields, 16px text so phones don't zoom in --- */
input, select, textarea { max-width: 100%; font-size: 16px !important; }
button, .pill-btn { min-height: 40px; }

/* --- Downloads are for computers only --- */
.dl-row {
  display: block !important;
  width: auto !important;
  margin-left: 0 !important;
  max-width: none;
}
.dl-row > * { display: none !important; }
.dl-row::before {
  content: "The launcher runs on Windows, Mac and Linux computers. Open freerealmsclover.com/help on your computer to download it.";
  display: block;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(168, 240, 198, 0.35);
  color: #a8f0c6;
  font-size: 13.5px;
  line-height: 1.45;
}
.dl-overlay { display: none !important; }

/* --- Footer: bigger tap targets --- */
footer { padding-left: 14px; padding-right: 14px; }
.footer-links { line-height: 2.1; }
.footer-links a { display: inline-block; padding: 2px 4px; font-size: 14px; }

/* --- Very narrow phones (320-360 px) --- */
@media (max-width: 360px) {
  .join-free-link { font-size: 17px; }
  .topbar .pill-btn, .menu-btn { padding: 7px 10px; font-size: 13px; }
}
