:root {
  --orange: #f97316;
  --orange-deep: #ea580c;
  --black: #141414;
  --white: #ffffff;
  --gray-100: #f7f7f7;
  --gray-200: #ececec;
  --gray-400: #888888;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.3rem;
  background: var(--black);
  border-bottom: 3px solid var(--orange);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.52rem;
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  font-size: 1.55rem;
  line-height: 1;
}

.brand-text {
  font-size: 1.06rem;
}

.brand-beta {
  font-size: 0.74rem;
  font-weight: 600;
  opacity: 0.7;
  margin-left: 0.25rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.nav a {
  color: var(--white);
  text-decoration: none;
}

.nav form {
  margin: 0;
}

.nav .btn {
  width: auto;
  padding: 0.46rem 0.72rem;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 40px;
  padding: 0.45rem;
  border: 1px solid #333;
  border-radius: 10px;
  background: transparent;
  margin: 0;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  margin: 4px 0;
  border-radius: 99px;
}

.shell {
  max-width: 1040px;
  margin: 1.3rem auto;
  padding: 0 1rem 2rem;
}

.site-footer {
  padding: 1.4rem 1rem 2rem;
  color: var(--gray-400);
  font-size: 0.9rem;
  width: 100%;
  text-align: center !important;
}

.footer-text {
  max-width: 900px;
  margin: 0 auto;
  text-align: center !important;
  display: block;
}
.panel,
.player-card,
.request-card {
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  background: var(--white);
  padding: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  border-radius: 10px;
  padding: 0.58rem 0.92rem;
  background: var(--orange);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
}

.btn:hover {
  background: var(--orange-deep);
}

.btn-ghost {
  background: var(--black);
  color: var(--white);
}

.btn-danger {
  background: #b91c1c;
}

.row {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: center;
}

.spread {
  justify-content: space-between;
}

.form,
.grid-form {
  display: grid;
  gap: 0.8rem;
}

.form-inline {
  display: flex;
  gap: 0.6rem;
}

.form-inline .btn {
  width: auto;
}

.grid-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-form fieldset,
.grid-form .toggle,
.grid-form .row {
  grid-column: 1 / -1;
}

input,
textarea,
select,
button {
  width: 100%;
  padding: 0.65rem;
  margin-top: 0.32rem;
  border-radius: 10px;
  border: 1px solid var(--gray-200);
  font: inherit;
}

.kicker {
  color: var(--orange-deep);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.landing-shell {
  display: grid;
  gap: 1.1rem;
}

.landing-hero-pro {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
}

.hero-copy,
.hero-panel,
.trust-grid article {
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  background: var(--white);
}

.hero-copy {
  padding: 1.5rem;
}

.hero-copy h1 {
  margin: 0.2rem 0 0.6rem;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero-sub {
  max-width: 62ch;
  font-size: 1.03rem;
  color: #3b3b3b;
  margin-bottom: 1rem;
}

.hero-panel {
  padding: 1.3rem;
  background: linear-gradient(180deg, #ffffff, #fff7f1);
}

.hero-panel h2 {
  margin-top: 0;
}

.hero-panel ul {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.45rem;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1.15rem;
}

.stat-strip div {
  border: 1px solid #ffd7bd;
  border-radius: 12px;
  padding: 0.6rem;
  background: #fff9f5;
}

.stat-strip strong {
  display: block;
  font-size: 0.92rem;
}

.stat-strip span {
  font-size: 0.82rem;
  color: #666;
}

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

.trust-grid article {
  padding: 1rem;
}

.player-grid,
.stack {
  display: grid;
  gap: 0.8rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.8rem 0 1rem;
}

.filter-grid .row {
  grid-column: 1 / -1;
}

.player-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle input {
  width: auto;
  margin: 0;
}

.badge {
  border: 1px solid var(--orange);
  color: var(--orange-deep);
  background: #fff7ed;
  border-radius: 999px;
  padding: 0.18rem 0.58rem;
  font-size: 0.78rem;
}

.chat-box {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 0.8rem;
  background: var(--gray-100);
  margin-bottom: 0.8rem;
  max-height: 360px;
  overflow-y: auto;
}

#chat-form input {
  flex: 1 1 280px;
}

.bubble {
  background: #ffedd5;
  border-radius: 10px;
  padding: 0.55rem;
  margin-bottom: 0.45rem;
}

.bubble.mine {
  background: #fed7aa;
}

.bubble.system {
  background: #fff7ed;
  border: 1px dashed #f59e0b;
}

.bubble-name {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 0.2rem;
}

.accent {
  color: var(--orange-deep);
  font-weight: 700;
}

.error {
  border: 1px solid #dc2626;
  background: #fef2f2;
  color: #991b1b;
  padding: 0.55rem;
  border-radius: 10px;
}

.notice {
  border: 1px solid #16a34a;
  background: #f0fdf4;
  color: #166534;
  padding: 0.55rem;
  border-radius: 10px;
}

.moderation-warning {
  border: 1px solid #f59e0b;
  background: #fff7ed;
  color: #92400e;
  padding: 0.55rem;
  border-radius: 10px;
  min-height: 2.1rem;
}

.safety-callout {
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  margin: 0.4rem 0 0.6rem;
}

.safety-callout a {
  color: inherit;
  font-weight: 700;
}

.guidelines {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.2rem;
}

.muted,
.back-link {
  color: var(--gray-400);
}

@media (max-width: 860px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 0.9rem 1rem;
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 0.7rem;
    padding-top: 0.6rem;
    border-top: 1px solid #2a2a2a;
  }

  .nav.open {
    display: flex;
  }

  .nav a,
  .nav form {
    width: 100%;
  }

  .nav .btn {
    width: 100%;
  }

  .shell {
    margin-top: 1rem;
    padding: 0 0.75rem 1.4rem;
  }

  .panel,
  .player-card,
  .request-card {
    padding: 0.85rem;
    border-radius: 12px;
  }

  .landing-hero-pro,
  .trust-grid,
  .player-grid,
  .profile-grid,
  .grid-form,
  .filter-grid {
    grid-template-columns: 1fr;
  }

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

  .stat-strip {
    grid-template-columns: 1fr;
  }

  .day-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .row > .btn,
  .row > .btn-ghost,
  .row > a.btn {
    width: 100%;
  }

  .day-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-copy h1 {
    font-size: 1.75rem;
    line-height: 1.1;
  }

  .chat-box {
    max-height: 52vh;
  }
}
