/* Layout: where the big pieces sit on the page, on computers, tablets and phones.
   Computers: make + remix on the left, the game in the middle, the feed on the right.
   Phones: the game first, then make, remix and the feed. */

.wrap {
  max-width: var(--page-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ---------- Header ---------- */
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-sm) var(--gap-lg);
}

.logo {
  font: 400 var(--text-logo)/1 var(--font-logo);
  color: var(--color-accent);
  text-shadow: var(--glow-accent);
  text-decoration: none;
  letter-spacing: .02em;
}

.logo sup { font: 700 .3em var(--font-ui); vertical-align: super; margin-left: 2px; }

.tagline {
  margin: 0;
  color: var(--color-text-muted);
  font-weight: 600;
}

.account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.account-guest,
.account-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.account-guest input { width: 150px; padding: 8px 12px; font-size: 15px; }
.account-guest button { padding: 9px 14px; font-size: 15px; }

/* ---------- Main grid ---------- */
.layout {
  display: grid;
  gap: var(--gap-lg);
  align-items: start;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) minmax(260px, 320px);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "make  stage feed"
    "remix stage feed";
}
.make { grid-area: make; }
.remix { grid-area: remix; }
.stage { grid-area: stage; }
.feedpanel { grid-area: feed; }

/* ---------- Tablets and small laptops ---------- */
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      "stage make"
      "stage remix"
      "stage feed";
  }
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  :root { --page-gutter: 10px; }
  .wrap { gap: 14px; }
  .top { gap: 6px 12px; }
  .tagline { width: 100%; order: 3; font-size: var(--text-sm); }
  .account { margin-left: 0; width: 100%; order: 4; flex-wrap: wrap; }
  .account-guest { flex: 1; min-width: 0; }
  .account-guest input { flex: 1; width: auto; min-width: 0; }

  .layout {
    gap: 14px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: "stage" "make" "remix" "feed";
  }
}

/* ---------- Footer (main site, Party mode and text pages) ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap-sm) var(--gap-lg);
  padding-top: var(--gap-lg);
  border-top: 1px solid var(--color-line);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
}
.site-footer a { color: var(--color-text-muted); }
.site-footer a:hover { color: var(--color-accent-2); }

/* The "Aa" bigger-text button in the footer */
.site-footer .text-size { font-weight: 700; min-width: 44px; min-height: 36px; }
.site-footer .text-size[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--color-accent-2); color: var(--color-text); }
