/* =========================
   Ashe Foundry / Torabun World
   Root styles.css
   Main color: #36BD94
   ========================= */

:root {
  /* Ashe Foundry main theme */
  --bg: #06110e;
  --bg-2: #0a1915;
  --bg-3: #040b09;

  --panel: rgba(11, 29, 24, 0.86);
  --panel-strong: rgba(14, 45, 36, 0.96);
  --panel-soft: rgba(255, 255, 255, 0.055);

  --text: #f2fff9;
  --muted: #a7cfc2;
  --muted-strong: #c7eadf;

  --primary: #36BD94;
  --primary-dark: #1f8c6d;
  --primary-deep: #0f5d49;
  --primary-soft: #74e3c0;
  --primary-glow: rgba(54, 189, 148, 0.42);

  --accent: var(--primary);
  --accent-dark: var(--primary-dark);
  --accent-deep: var(--primary-deep);
  --accent-soft: var(--primary-soft);
  --accent-glow: var(--primary-glow);

  --cyan: #4ed8cb;
  --gold: #f4c86a;
  --green: #78f3b6;
  --red: #ff7d7d;

  --border: rgba(185, 255, 232, 0.14);
  --border-strong: rgba(116, 227, 192, 0.42);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);

  /* Compatibility aliases so older HTML/JS still works if it uses these names */
  --purple: var(--primary);
  --purple-dark: var(--primary-deep);
  --pink: var(--cyan);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;

  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  background:
    radial-gradient(circle at top left, rgba(54, 189, 148, 0.24), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(78, 216, 203, 0.14), transparent 34rem),
    linear-gradient(180deg, var(--bg), var(--bg-2) 55%, var(--bg-3));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
  opacity: 0.2;

  background-image:
    linear-gradient(rgba(185, 255, 232, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(185, 255, 232, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  opacity: 0.18;

  background:
    radial-gradient(circle at 20% 20%, rgba(54, 189, 148, 0.18), transparent 26rem),
    radial-gradient(circle at 78% 15%, rgba(244, 200, 106, 0.08), transparent 22rem),
    radial-gradient(circle at 65% 80%, rgba(78, 216, 203, 0.11), transparent 26rem);
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

.page-glow {
  position: fixed;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
  z-index: -1;
}

.page-glow-one {
  top: 8rem;
  left: -6rem;
  background: rgba(54, 189, 148, 0.42);
}

.page-glow-two {
  right: -8rem;
  bottom: 4rem;
  background: rgba(78, 216, 203, 0.28);
}

/* =========================
   Premium Header / Logo
   ========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  max-width: 1160px;
  margin: 0 auto;
  padding: 1rem 1.2rem;

  backdrop-filter: blur(18px);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0.5rem 0.6rem;
  z-index: -1;

  border: 1px solid rgba(185, 255, 232, 0.13);
  border-radius: 1.35rem;

  background:
    linear-gradient(180deg, rgba(10, 24, 20, 0.8), rgba(5, 10, 9, 0.58)),
    radial-gradient(circle at 12% 20%, rgba(54, 189, 148, 0.21), transparent 18rem);

  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand,
.top-nav a,
.button,
.game-card {
  color: inherit;
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.78rem;
  min-width: 0;

  font-weight: 950;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;

  width: 3.15rem;
  height: 3.15rem;
  border-radius: 1rem;

  color: #04110d;
  font-size: 0.86rem;
  font-weight: 950;

  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(180deg, rgba(16, 45, 37, 0.98), rgba(7, 18, 15, 0.96));

  border: 1px solid rgba(255, 255, 255, 0.17);

  box-shadow:
    0 0 0 1px rgba(54, 189, 148, 0.18),
    0 12px 28px rgba(0, 0, 0, 0.34),
    0 0 26px rgba(54, 189, 148, 0.25);

  overflow: hidden;
}

.logo-mark {
  padding: 0.3rem;
}

.logo-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;

  filter:
    drop-shadow(0 2px 7px rgba(0, 0, 0, 0.45))
    drop-shadow(0 0 8px rgba(54, 189, 148, 0.18));
}

/* Normal text logo support */
.brand-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  min-width: 0;
}

.brand-title {
  color: var(--text);
  font-size: 1rem;
  text-shadow: 0 0 18px rgba(54, 189, 148, 0.22);
}

.brand-subtitle {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/*
  Wordmark support:
  1. Best HTML:
     <img class="brand-wordmark" src="/assets/brand/torabun-world-wordmark.png" alt="Torabun World" />

  2. Backup support:
     If your HTML is still <span>Ashe Foundry</span>, this CSS hides that text
     visually and shows /assets/brand/torabun-world-wordmark.png instead.
*/
.brand-wordmark {
  display: block;
  width: clamp(9rem, 18vw, 13.5rem);
  max-height: 2.8rem;
  object-fit: contain;
  object-position: left center;

  filter:
    drop-shadow(0 2px 7px rgba(0, 0, 0, 0.38))
    drop-shadow(0 0 12px rgba(54, 189, 148, 0.2));
}

.brand > span:not(.brand-mark):not(.brand-text):not(.brand-title):not(.brand-subtitle) {
  display: block;
  width: clamp(9rem, 18vw, 13.5rem);
  height: 2.5rem;
  overflow: hidden;
  font-size: 0;
  line-height: 0;

  background-image: url("/assets/brand/torabun-world-wordmark.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: left center;

  filter:
    drop-shadow(0 2px 7px rgba(0, 0, 0, 0.38))
    drop-shadow(0 0 12px rgba(54, 189, 148, 0.2));
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;

  padding: 0.35rem;
  border: 1px solid rgba(185, 255, 232, 0.13);
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.055);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 26px rgba(0, 0, 0, 0.18);

  backdrop-filter: blur(14px);
}

.top-nav a {
  position: relative;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;

  color: var(--muted);
  font-weight: 850;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.top-nav a:hover {
  color: var(--text);
  background: rgba(54, 189, 148, 0.12);
  box-shadow: inset 0 0 0 1px rgba(54, 189, 148, 0.18);
  transform: translateY(-1px);
}

.top-nav a:focus-visible,
.brand:focus-visible,
.button:focus-visible,
.nav-button:focus-visible,
.account-nav a:focus-visible {
  outline: 2px solid rgba(54, 189, 148, 0.85);
  outline-offset: 4px;
}

/* =========================
   Layout / Hero
   ========================= */

main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 2rem 1.2rem 4rem;
}

.hero {
  min-height: 68vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 0;
}

.hero > * {
  max-width: 850px;
}

.hero-wordmark {
  display: block;
  width: min(86vw, 34rem);
  max-height: 9rem;
  object-fit: contain;
  margin: 0 auto 1.2rem;

  filter:
    drop-shadow(0 8px 22px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 24px rgba(54, 189, 148, 0.22));
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 800;
  font-size: 0.78rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(3rem, 10vw, 8.5rem);
  line-height: 0.86;
  letter-spacing: -0.08em;

  text-shadow:
    0 0 44px rgba(54, 189, 148, 0.45),
    0 10px 38px rgba(0, 0, 0, 0.45);
}

h2 {
  margin-bottom: 0.6rem;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 0.5rem;
}

.hero-copy,
.section-heading p,
.game-card p,
.site-footer,
.soon-list {
  color: var(--muted);
}

.hero-copy {
  margin-bottom: 1.5rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.7;
}

.floating-text-card {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 4.25rem;
  margin: 0 auto 1.4rem;
  padding: 1rem 1.25rem;

  border: 1px solid rgba(185, 255, 232, 0.2);
  border-radius: 1.2rem;

  background:
    linear-gradient(135deg, rgba(54, 189, 148, 0.2), rgba(78, 216, 203, 0.1)),
    rgba(255, 255, 255, 0.035);

  box-shadow:
    var(--shadow),
    0 0 46px rgba(54, 189, 148, 0.12);

  animation: floatCard 3.6s ease-in-out infinite;
  overflow: hidden;
}

.floating-text-card::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 90deg, transparent, rgba(185, 255, 232, 0.18), transparent 22%);
  animation: shimmer 5s linear infinite;
}

#floatingText {
  position: relative;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.text-swap {
  animation: textSwap 420ms ease both;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes shimmer {
  to { transform: rotate(1turn); }
}

@keyframes textSwap {
  0% { opacity: 0; transform: translateY(12px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* =========================
   Buttons / Panels / Cards
   ========================= */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 3rem;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);

  color: var(--text);
  font-weight: 900;
  text-decoration: none;

  transition: 170ms ease;
  cursor: pointer;
}

.button.primary {
  color: #04110d;
  background: linear-gradient(135deg, var(--primary-soft), var(--primary) 55%, var(--primary-dark));
  border-color: rgba(185, 255, 232, 0.24);

  box-shadow:
    0 14px 40px rgba(54, 189, 148, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.06);
}

.button.ghost:hover,
.nav-button:hover,
.account-nav a:hover {
  background: rgba(54, 189, 148, 0.12);
}

.button:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

button:disabled,
.button.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.section-panel {
  margin-top: 1.2rem;
  padding: clamp(1rem, 3vw, 2rem);

  border: 1px solid var(--border);
  border-radius: 1.6rem;

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    var(--panel);

  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.muted-panel {
  background:
    linear-gradient(180deg, rgba(54, 189, 148, 0.075), rgba(255, 255, 255, 0.032)),
    rgba(255, 255, 255, 0.04);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 1.5rem;
}

code {
  color: #d7fff1;
  background: rgba(54, 189, 148, 0.1);
  border: 1px solid var(--border);
  padding: 0.1rem 0.35rem;
  border-radius: 0.4rem;
}

/* =========================
   Games
   ========================= */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.game-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 1.1rem;

  border: 1px solid var(--border);
  border-radius: 1.2rem;

  background:
    linear-gradient(180deg, rgba(54, 189, 148, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);

  transition: 180ms ease;
}

.game-card:not(.disabled):hover {
  transform: translateY(-5px);
  border-color: rgba(54, 189, 148, 0.74);

  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.24),
    0 0 36px rgba(54, 189, 148, 0.16);
}

.game-card.disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.game-icon {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  margin-bottom: 1rem;

  border-radius: 1rem;
  border: 1px solid rgba(185, 255, 232, 0.12);

  background: linear-gradient(135deg, rgba(54, 189, 148, 0.18), rgba(78, 216, 203, 0.08));
  font-size: 1.5rem;
}

.game-icon.has-art {
  padding: 0.25rem;
}

.game-icon.has-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.status-pill {
  align-self: flex-start;
  margin-top: auto;
  padding: 0.4rem 0.7rem;

  border-radius: 999px;
  background: rgba(120, 243, 182, 0.12);

  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-pill.soon {
  color: var(--gold);
  background: rgba(244, 200, 106, 0.11);
}

.soon-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;

  padding: 0;
  list-style: none;
}

.soon-list li {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(54, 189, 148, 0.06), rgba(255, 255, 255, 0.035));
}

/* =========================
   Footer
   ========================= */

.site-footer {
  max-width: 1160px;
  margin: 0 auto;
  padding: 1.5rem 1.2rem 2.5rem;

  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;

  color: var(--muted);
  font-size: 0.92rem;
}

/* =========================
   Account/Auth UI
   ========================= */

.account-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.account-nav a,
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 2.25rem;
  padding: 0.45rem 0.75rem;

  border-radius: 999px;
  border: 1px solid var(--border);

  background: rgba(255, 255, 255, 0.07);
  color: var(--text);

  text-decoration: none;
  font-weight: 900;
  cursor: pointer;

  transition: 160ms ease;
}

.page-title {
  margin-bottom: 1rem;

  font-size: clamp(2.5rem, 7vw, 5.4rem);
  line-height: 0.92;

  text-shadow: 0 0 34px rgba(54, 189, 148, 0.32);
}

.auth-shell {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.auth-card {
  display: grid;
  gap: 0.9rem;

  padding: 1rem;

  border: 1px solid var(--border);
  border-radius: 1.2rem;

  background:
    linear-gradient(180deg, rgba(54, 189, 148, 0.065), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
}

.wide-card {
  max-width: 720px;
}

.auth-card label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-weight: 800;
}

.auth-card input {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.85rem;

  border-radius: 0.9rem;
  border: 1px solid var(--border);

  color: var(--text);
  background: rgba(0, 0, 0, 0.24);
}

.auth-card input:focus,
.forum-form input:focus,
.forum-form textarea:focus,
.forum-form select:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 4px rgba(54, 189, 148, 0.12);
}

.auth-message {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;

  border: 1px solid var(--border);
  border-radius: 1rem;

  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);

  font-weight: 800;
}

.auth-message.error {
  color: #ffd2d2;
  border-color: rgba(255, 125, 125, 0.45);
  background: rgba(255, 125, 125, 0.11);
}

.auth-message.success {
  color: var(--green);
  border-color: rgba(120, 243, 182, 0.45);
  background: rgba(120, 243, 182, 0.09);
}

.muted-text {
  color: var(--muted);
}

.saves-panel {
  display: grid;
  gap: 0.75rem;
}

.save-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;

  padding: 0.9rem 1rem;

  border: 1px solid var(--border);
  border-radius: 1rem;

  background: linear-gradient(180deg, rgba(54, 189, 148, 0.06), rgba(255, 255, 255, 0.035));
  color: var(--muted);
}

.save-row strong {
  color: var(--text);
}

/* =========================
   Forum UI
   ========================= */

.forum-hero {
  margin-bottom: 1rem;
}

.forum-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 1rem;
  align-items: start;
}

.compact-heading {
  margin-bottom: 1rem;
}

.forum-form {
  display: grid;
  gap: 0.9rem;
}

.forum-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-weight: 800;
}

.forum-form input,
.forum-form textarea,
.forum-form select {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.85rem;

  border-radius: 0.9rem;
  border: 1px solid var(--border);

  color: var(--text);
  background: rgba(0, 0, 0, 0.24);
}

.forum-form textarea {
  min-height: 11rem;
  resize: vertical;
  line-height: 1.5;
}

.forum-feed-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;

  margin-bottom: 1rem;
}

.thread-list {
  display: grid;
  gap: 0.85rem;
}

.thread-card {
  padding: 1rem;

  border: 1px solid var(--border);
  border-radius: 1.2rem;

  background:
    linear-gradient(180deg, rgba(54, 189, 148, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.03);
}

.thread-card h3 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  overflow-wrap: anywhere;
}

.thread-topline,
.thread-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;

  margin-bottom: 0.75rem;
}

.thread-category,
.thread-status {
  display: inline-flex;
  align-items: center;

  min-height: 2rem;
  padding: 0.35rem 0.65rem;

  border-radius: 999px;
  border: 1px solid var(--border);

  background: rgba(255, 255, 255, 0.07);
  color: var(--gold);

  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.thread-category.bug {
  color: #ffd2d2;
  background: rgba(255, 125, 125, 0.1);
  border-color: rgba(255, 125, 125, 0.28);
}

.thread-category.suggestion {
  color: var(--green);
  background: rgba(120, 243, 182, 0.09);
  border-color: rgba(120, 243, 182, 0.28);
}

.thread-category.balance {
  color: #d7fff1;
  background: rgba(54, 189, 148, 0.13);
  border-color: rgba(54, 189, 148, 0.34);
}

.thread-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.thread-description {
  margin-bottom: 0;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.thread-actions {
  justify-content: flex-end;
  margin-top: 1rem;
  margin-bottom: 0;
}

.danger-soft {
  color: #ffd2d2;
  background: rgba(255, 125, 125, 0.1);
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 900px) {
  .forum-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .account-nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .save-row {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
    padding: 0.85rem;
  }

  .site-header::before {
    inset: 0.4rem;
    border-radius: 1.15rem;
  }

  .brand {
    justify-content: center;
  }

  .brand-mark {
    width: 3rem;
    height: 3rem;
  }

  .brand-wordmark,
  .brand > span:not(.brand-mark):not(.brand-text):not(.brand-title):not(.brand-subtitle) {
    width: min(70vw, 14rem);
    max-height: 2.6rem;
  }

  .top-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    border-radius: 1rem;
  }

  .top-nav a,
  .top-nav span a {
    flex: 1 1 auto;
    min-width: 6rem;
    text-align: center;
  }

  main {
    padding: 1rem 0.9rem 3rem;
  }

  .hero {
    min-height: auto;
    padding: 3rem 0;
  }

  .hero-actions .button {
    width: 100%;
  }

  h1 {
    letter-spacing: -0.06em;
  }
}

@media (max-width: 520px) {
  .forum-feed-heading {
    flex-direction: column;
  }

  .forum-feed-heading .button,
  .forum-form .button,
  .thread-actions .button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .brand-title {
    font-size: 0.95rem;
  }

  .brand-subtitle {
    font-size: 0.66rem;
  }

  .brand-wordmark,
  .brand > span:not(.brand-mark):not(.brand-text):not(.brand-title):not(.brand-subtitle) {
    width: min(74vw, 12rem);
  }

  .top-nav a {
    padding: 0.62rem 0.7rem;
    font-size: 0.92rem;
  }
}

/* =========================
   Forum admin replies / moderation
   ========================= */

.thread-closed {
  border-color: rgba(120, 243, 182, 0.28);
  background:
    linear-gradient(180deg, rgba(120, 243, 182, 0.08), rgba(255, 255, 255, 0.032)),
    rgba(255, 255, 255, 0.03);
}

.thread-status.status-fixed,
.thread-status.status-solved {
  color: var(--green);
  border-color: rgba(120, 243, 182, 0.34);
  background: rgba(120, 243, 182, 0.1);
}

.thread-status.status-in_review,
.thread-status.status-planned {
  color: var(--cyan);
  border-color: rgba(78, 216, 203, 0.32);
  background: rgba(78, 216, 203, 0.1);
}

.thread-status.status-closed {
  color: #ffd2d2;
  border-color: rgba(255, 125, 125, 0.32);
  background: rgba(255, 125, 125, 0.1);
}

.thread-replies {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.thread-replies h4 {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.empty-replies {
  color: var(--muted);
  font-size: 0.92rem;
}

.thread-reply {
  padding: 0.9rem;
  border: 1px solid rgba(185, 255, 232, 0.13);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(54, 189, 148, 0.07), rgba(255,255,255,0.035)),
    rgba(255,255,255,0.035);
}

.thread-reply p {
  margin-bottom: 0;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.reply-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.reply-meta strong {
  color: var(--text);
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  color: #04110d;
  background: linear-gradient(135deg, var(--primary-soft), var(--primary));
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.thread-admin-panel {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
  padding: 0.9rem;
  border: 1px solid rgba(54, 189, 148, 0.28);
  border-radius: 1rem;
  background: rgba(54, 189, 148, 0.075);
}

.admin-control-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-control-row label,
.reply-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-weight: 850;
}

.status-select,
.reply-form textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.24);
  font: inherit;
}

.reply-form {
  display: grid;
  gap: 0.75rem;
}

.reply-form textarea {
  min-height: 8rem;
  resize: vertical;
  line-height: 1.5;
}

.tiny-button {
  min-height: 2.2rem;
  width: fit-content;
  margin-top: 0.7rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.86rem;
}

/* =========================
   Leaderboards
   ========================= */

.leaderboard-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 1rem;
}

.leaderboard-list {
  display: grid;
  gap: 1rem;
}

.leaderboard-card {
  margin-top: 0;
}

.leaderboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.leaderboard-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(244, 200, 106, 0.28);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(244, 200, 106, 0.11);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.leaderboard-rows {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(54, 189, 148, 0.065), rgba(255,255,255,0.035));
}

.leaderboard-row.rank-1 {
  border-color: rgba(244, 200, 106, 0.42);
  box-shadow: 0 0 28px rgba(244, 200, 106, 0.1);
}

.leaderboard-rank {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.85rem;
  color: #04110d;
  background: linear-gradient(135deg, var(--primary-soft), var(--primary));
  font-weight: 950;
}

.leaderboard-player {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.leaderboard-player strong,
.leaderboard-player span {
  overflow-wrap: anywhere;
}

.leaderboard-player span {
  color: var(--muted);
  font-size: 0.9rem;
}

.leaderboard-score {
  color: var(--gold);
  font-size: clamp(1rem, 3vw, 1.35rem);
  text-align: right;
}

@media (max-width: 620px) {
  .admin-control-row,
  .leaderboard-heading,
  .leaderboard-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .thread-admin-panel .button,
  .reply-form .button,
  .leaderboard-toolbar .button {
    width: 100%;
  }

  .leaderboard-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .leaderboard-score {
    grid-column: 1 / -1;
    text-align: left;
  }
}

/* Forum admin toggle button/panel fix */
.admin-tools-actions {
  justify-content: flex-end;
  margin-top: 1rem;
  margin-bottom: 0;
}

.admin-toggle-button {
  min-width: 9rem;
}

.thread-admin-panel[hidden] {
  display: none !important;
}

.thread-admin-panel {
  animation: adminPanelOpen 180ms ease both;
}

@keyframes adminPanelOpen {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .admin-tools-actions .button {
    width: 100%;
  }
}

/* =========================
   Roadmap / Coming Soon UI
   ========================= */

.roadmap-panel {
  position: relative;
  overflow: hidden;
}

.roadmap-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 20%, rgba(54, 189, 148, 0.16), transparent 22rem),
    radial-gradient(circle at 88% 12%, rgba(244, 200, 106, 0.08), transparent 18rem);
}

.roadmap-panel > * {
  position: relative;
}

.roadmap-message {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(54, 189, 148, 0.08);
  color: var(--muted-strong, var(--muted));
  font-weight: 850;
}

.roadmap-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.roadmap-card {
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background:
    linear-gradient(180deg, rgba(54, 189, 148, 0.09), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.035);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.16);
  transition: 180ms ease;
}

.roadmap-card:hover {
  transform: translateY(-3px);
  border-color: rgba(54, 189, 148, 0.46);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.22),
    0 0 34px rgba(54, 189, 148, 0.12);
}

.roadmap-card-top,
.roadmap-card-footer,
.roadmap-admin-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.roadmap-card-top {
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.roadmap-card h3 {
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  margin-bottom: 0.65rem;
  overflow-wrap: anywhere;
}

.roadmap-card-description {
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.roadmap-card-footer {
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1rem;
}

.roadmap-category,
.roadmap-status,
.roadmap-target {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roadmap-category {
  color: var(--muted-strong, var(--muted));
  background: rgba(255, 255, 255, 0.06);
}

.roadmap-target {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
}

.roadmap-status {
  color: var(--gold);
  background: rgba(244, 200, 106, 0.11);
  border-color: rgba(244, 200, 106, 0.24);
}

.status-live {
  color: #04110d;
  background: linear-gradient(135deg, var(--accent-soft, #74e3c0), var(--accent, #36BD94));
  border-color: rgba(185, 255, 232, 0.32);
}

.status-completed {
  color: var(--green, #78f3b6);
  background: rgba(120, 243, 182, 0.1);
  border-color: rgba(120, 243, 182, 0.28);
}

.status-in_progress {
  color: var(--cyan, #4ed8cb);
  background: rgba(78, 216, 203, 0.1);
  border-color: rgba(78, 216, 203, 0.28);
}

.status-testing {
  color: #d7fff1;
  background: rgba(54, 189, 148, 0.13);
  border-color: rgba(54, 189, 148, 0.34);
}

.status-paused {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.roadmap-admin-panel {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(54, 189, 148, 0.28);
  border-radius: 1.2rem;
  background:
    linear-gradient(180deg, rgba(54, 189, 148, 0.11), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
}

.roadmap-admin-panel h3 {
  margin-bottom: 0.35rem;
}

.roadmap-admin-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.roadmap-admin-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-weight: 850;
}

.roadmap-admin-form label.full {
  grid-column: 1 / -1;
}

.roadmap-admin-form input,
.roadmap-admin-form textarea,
.roadmap-admin-form select,
.roadmap-status-select {
  width: 100%;
  min-height: 2.8rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.24);
  font: inherit;
}

.roadmap-admin-form textarea {
  min-height: 8rem;
  resize: vertical;
  line-height: 1.5;
}

.roadmap-admin-form input:focus,
.roadmap-admin-form textarea:focus,
.roadmap-admin-form select:focus,
.roadmap-status-select:focus {
  outline: none;
  border-color: var(--border-strong, rgba(54, 189, 148, 0.48));
  box-shadow: 0 0 0 4px rgba(54, 189, 148, 0.12);
}

.roadmap-admin-form .button {
  grid-column: 1 / -1;
}

.roadmap-status-select {
  min-width: 9rem;
  max-width: 12rem;
  font-weight: 850;
}

.roadmap-delete-button {
  min-height: 2.8rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(255, 125, 125, 0.28);
  border-radius: 999px;
  color: #ffd2d2;
  background: rgba(255, 125, 125, 0.1);
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

@media (max-width: 860px) {
  .roadmap-admin-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .roadmap-list {
    grid-template-columns: 1fr;
  }

  .roadmap-admin-form {
    grid-template-columns: 1fr;
  }

  .roadmap-card-footer,
  .roadmap-admin-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .roadmap-admin-actions,
  .roadmap-status-select,
  .roadmap-delete-button {
    width: 100%;
    max-width: none;
  }
}

/* =========================================================
   ROADMAP FIX + PERFORMANCE PATCH
   Additive override for Ashe Foundry root styles.css
   ========================================================= */

/* Keep the visual style, but make the homepage lighter to render. */
body::before {
  opacity: 0.12;
}

body::after {
  opacity: 0.1;
}

.page-glow {
  filter: blur(44px);
  opacity: 0.75;
}

.site-header,
.top-nav,
.section-panel {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Stop expensive paint work on devices that usually struggle more. */
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  .page-glow {
    display: none;
  }

  .site-header,
  .top-nav,
  .section-panel {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .floating-text-card,
  .floating-text-card::before {
    animation: none !important;
  }

  .game-card:hover,
  .roadmap-card:hover,
  .button:hover,
  .top-nav a:hover {
    transform: none;
  }
}

/* Roadmap section should never look empty while JS is loading. */
.roadmap-list:empty::before {
  content: "Loading roadmap...";
  display: block;
  grid-column: 1 / -1;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 850;
}

/* Cleaner roadmap cards */
.roadmap-panel {
  position: relative;
  overflow: hidden;
}

.roadmap-panel::before {
  opacity: 0.65;
}

.roadmap-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.roadmap-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background:
    linear-gradient(180deg, rgba(54, 189, 148, 0.08), rgba(255, 255, 255, 0.028)),
    rgba(255, 255, 255, 0.032);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
}

.roadmap-card-top,
.roadmap-card-footer,
.roadmap-admin-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.roadmap-card-top {
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.roadmap-card h3 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  overflow-wrap: anywhere;
}

.roadmap-card-description {
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.roadmap-card-footer {
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1rem;
}

.roadmap-category,
.roadmap-status,
.roadmap-target {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roadmap-category {
  color: var(--muted-strong, var(--muted));
  background: rgba(255, 255, 255, 0.06);
}

.roadmap-target {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
}

.roadmap-status {
  color: var(--gold);
  background: rgba(244, 200, 106, 0.11);
  border-color: rgba(244, 200, 106, 0.24);
}

.status-live {
  color: #04110d;
  background: linear-gradient(135deg, var(--primary-soft, #74e3c0), var(--primary, #36BD94));
  border-color: rgba(185, 255, 232, 0.32);
}

.status-completed {
  color: var(--green, #78f3b6);
  background: rgba(120, 243, 182, 0.1);
  border-color: rgba(120, 243, 182, 0.28);
}

.status-in_progress {
  color: var(--cyan, #4ed8cb);
  background: rgba(78, 216, 203, 0.1);
  border-color: rgba(78, 216, 203, 0.28);
}

.status-testing {
  color: #d7fff1;
  background: rgba(54, 189, 148, 0.13);
  border-color: rgba(54, 189, 148, 0.34);
}

.status-paused {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.roadmap-message {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  color: var(--muted-strong, var(--muted));
  background: rgba(54, 189, 148, 0.08);
  font-weight: 850;
}

.roadmap-admin-panel {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(54, 189, 148, 0.28);
  border-radius: 1.2rem;
  background:
    linear-gradient(180deg, rgba(54, 189, 148, 0.11), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
}

.roadmap-admin-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.roadmap-admin-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-weight: 850;
}

.roadmap-admin-form label.full {
  grid-column: 1 / -1;
}

.roadmap-admin-form input,
.roadmap-admin-form textarea,
.roadmap-admin-form select,
.roadmap-status-select {
  width: 100%;
  min-height: 2.8rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.24);
  font: inherit;
}

.roadmap-admin-form textarea {
  min-height: 8rem;
  resize: vertical;
  line-height: 1.5;
}

.roadmap-admin-form input:focus,
.roadmap-admin-form textarea:focus,
.roadmap-admin-form select:focus,
.roadmap-status-select:focus {
  outline: none;
  border-color: var(--border-strong, rgba(54, 189, 148, 0.48));
  box-shadow: 0 0 0 4px rgba(54, 189, 148, 0.12);
}

.roadmap-admin-form .button {
  grid-column: 1 / -1;
}

.roadmap-status-select {
  min-width: 9rem;
  max-width: 12rem;
  font-weight: 850;
}

.roadmap-delete-button {
  min-height: 2.8rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(255, 125, 125, 0.28);
  border-radius: 999px;
  color: #ffd2d2;
  background: rgba(255, 125, 125, 0.1);
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.roadmap-seed-button {
  margin-left: 0.5rem;
}

@media (max-width: 860px) {
  .roadmap-admin-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .roadmap-list {
    grid-template-columns: 1fr;
  }

  .roadmap-admin-form {
    grid-template-columns: 1fr;
  }

  .roadmap-card-footer,
  .roadmap-admin-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .roadmap-admin-actions,
  .roadmap-status-select,
  .roadmap-delete-button {
    width: 100%;
    max-width: none;
  }
}

/* =========================
   Mobile Hamburger Navigation
   ========================= */

.nav-toggle {
  display: none;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0.95rem;
  background:
    linear-gradient(180deg, rgba(54, 189, 148, 0.15), rgba(255, 255, 255, 0.04)),
    rgba(0, 0, 0, 0.18);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 1.25rem;
  height: 0.14rem;
  margin: 0.13rem 0;
  border-radius: 999px;
  background: var(--text);
  transition: 180ms ease;
}

.site-header.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(0.4rem) rotate(45deg);
}

.site-header.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-0.4rem) rotate(-45deg);
}

@media (max-width: 720px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
  }

  .site-header::before {
    inset: 0.35rem;
  }

  .brand {
    justify-content: flex-start;
    min-width: 0;
  }

  .brand-mark {
    width: 2.75rem;
    height: 2.75rem;
  }

  .brand-wordmark,
  .brand > span:not(.brand-mark):not(.brand-text):not(.brand-title):not(.brand-subtitle) {
    width: min(54vw, 12.5rem);
    max-height: 2.35rem;
  }

  .nav-toggle {
    display: grid;
  }

  .top-nav {
    position: absolute;
    top: calc(100% - 0.25rem);
    left: 0.85rem;
    right: 0.85rem;

    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;

    width: auto;
    max-height: 0;
    padding: 0;
    overflow: hidden;

    border-radius: 1rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.5rem);

    transition:
      max-height 220ms ease,
      opacity 160ms ease,
      transform 160ms ease,
      padding 160ms ease;
  }

  .site-header.nav-open .top-nav {
    max-height: 34rem;
    padding: 0.55rem;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .top-nav a,
  .top-nav span a,
  .account-nav a,
  .account-nav button {
    width: 100%;
    min-width: 0;
    justify-content: center;
    text-align: center;
  }

  .account-nav {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .brand-wordmark,
  .brand > span:not(.brand-mark):not(.brand-text):not(.brand-title):not(.brand-subtitle) {
    width: min(50vw, 10rem);
  }
}

/* =========================
   Achievements Page
   ========================= */

.achievement-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.achievement-summary {
  margin-bottom: 0;
}

.achievement-game-card {
  margin-top: 0;
}

.achievement-game-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.achievement-count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(244, 200, 106, 0.28);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(244, 200, 106, 0.11);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.achievement-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  padding: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(54, 189, 148, 0.07), rgba(255, 255, 255, 0.032)),
    rgba(255, 255, 255, 0.03);
}

.achievement-card.locked {
  opacity: 0.68;
}

.achievement-card.unlocked {
  border-color: rgba(120, 243, 182, 0.42);
  box-shadow: 0 0 28px rgba(54, 189, 148, 0.1);
}

.achievement-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(185, 255, 232, 0.13);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.055);
  font-size: 1.35rem;
}

.achievement-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.achievement-topline h3 {
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.achievement-card p {
  margin-bottom: 0.65rem;
  color: var(--muted);
  line-height: 1.5;
}

.achievement-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  color: var(--gold);
  background: rgba(244, 200, 106, 0.11);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.achievement-card.unlocked .achievement-status {
  color: #04110d;
  background: linear-gradient(135deg, var(--primary-soft), var(--primary));
}

.achievement-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
}

@media (max-width: 620px) {
  .achievement-game-heading {
    flex-direction: column;
  }

  .achievement-grid {
    grid-template-columns: 1fr;
  }

  .achievement-card {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   MOBILE NAV FIX
   Paste at the bottom of root styles.css.
   ========================================================= */

.nav-toggle {
  display: none;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0.95rem;
  background:
    linear-gradient(180deg, rgba(54, 189, 148, 0.18), rgba(255, 255, 255, 0.04)),
    #071b15;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.nav-toggle span {
  display: block;
  width: 1.25rem;
  height: 0.14rem;
  margin: 0.13rem 0;
  border-radius: 999px;
  background: var(--text);
  transition: transform 180ms ease, opacity 180ms ease;
}

.site-header.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(0.4rem) rotate(45deg);
}

.site-header.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-0.4rem) rotate(-45deg);
}

@media (max-width: 720px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
  }

  .site-header::before {
    inset: 0.35rem;
    border-radius: 1.15rem;
    background:
      linear-gradient(180deg, rgba(7, 27, 21, 0.98), rgba(4, 17, 13, 0.96)),
      radial-gradient(circle at 12% 20%, rgba(54, 189, 148, 0.22), transparent 16rem);
  }

  .brand {
    justify-content: flex-start;
    min-width: 0;
  }

  .brand-mark {
    width: 2.75rem;
    height: 2.75rem;
  }

  .brand-wordmark,
  .brand > span:not(.brand-mark):not(.brand-text):not(.brand-title):not(.brand-subtitle) {
    width: min(54vw, 12.5rem);
    max-height: 2.35rem;
  }

  .nav-toggle {
    display: grid;
  }

  .top-nav {
    position: absolute;
    top: calc(100% - 0.25rem);
    left: 0.85rem;
    right: 0.85rem;
    z-index: 120;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
    width: auto;
    max-height: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(185, 255, 232, 0.18);
    border-radius: 1rem;
    background:
      linear-gradient(180deg, rgba(9, 34, 27, 0.99), rgba(4, 17, 13, 0.99)),
      #04110d;
    box-shadow:
      0 22px 55px rgba(0, 0, 0, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.45rem);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transition:
      max-height 220ms ease,
      opacity 160ms ease,
      transform 160ms ease,
      padding 160ms ease;
  }

  .site-header.nav-open .top-nav {
    max-height: 38rem;
    padding: 0.55rem;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .top-nav a,
  .top-nav span a,
  .account-nav a,
  .account-nav button {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 2.85rem;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.055);
  }

  .top-nav a:hover,
  .account-nav a:hover,
  .account-nav button:hover {
    background: rgba(54, 189, 148, 0.16);
  }

  .account-nav {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }
}

@media (max-width: 420px) {
  .brand-wordmark,
  .brand > span:not(.brand-mark):not(.brand-text):not(.brand-title):not(.brand-subtitle) {
    width: min(50vw, 10rem);
  }
}

.status-pill.testing {
  background: rgba(54, 189, 148, 0.16);
  border: 1px solid rgba(54, 189, 148, 0.45);
  color: #36bd94;
}

/* =========================================================
   Squid Run visibility CSS fix
   Paste at the bottom of games/squid-run/style.css.
   ========================================================= */

.canvas-wrap {
  background: #0e8a8e;
  border-color: rgba(216, 255, 241, 0.36);
}

#gameCanvas {
  filter: saturate(1.2) brightness(1.14) contrast(1.04);
}

.runner-panel {
  background:
    linear-gradient(180deg, rgba(54, 189, 148, 0.08), rgba(255, 255, 255, 0.028)),
    rgba(7, 24, 19, 0.94);
}

.pill {
  background: rgba(255, 209, 102, 0.18);
  border-color: rgba(255, 209, 102, 0.35);
}
