body {
  margin: 0;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f4f4;
}

.marquee-page {
  height: 100vh;
  padding: 8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.marquee-row {
  height: calc((100vh - 48px) / 6);
  border-radius: 0.5rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation-name: marquee;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.marquee-track span {
  display: inline-block;
  font-size: clamp(72px, 9vw, 170px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
  padding-right: 8vw;
}

.green  { background: #00c600; color: #061f08; }
.brown  { background: #3c1000; color: #f1e8e8; }
.yellow { background: #dee972; color: #33321b; }
.coral  { background: #fe4c52; color: #ffd9d8; }
.blue   { background: #0067e2; color: #07152b; }
.forest { background: #0a5d3b; color: #d7f2df; }

.speed-1 { animation-duration: 18s; }
.speed-2 { animation-duration: 22s; }
.speed-3 { animation-duration: 20s; }
.speed-4 { animation-duration: 26s; }
.speed-5 { animation-duration: 24s; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.click-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: transparent;
  border: none;
  cursor: pointer;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.hidden { display: none; }

.auth-card {
  position: relative;
  width: min(420px, 100%);
  background: #f4f4f4;
  color: #111;
  border-radius: 18px;
  padding: 28px;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

.auth-card h1 {
  margin: 0 0 22px;
  font-size: 42px;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 18px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.auth-error {
  color: #c00;
  font-size: 13px;
  margin-bottom: 10px;
  min-height: 18px;
  font-family: Arial, Helvetica, sans-serif;
}

.auth-card input,
.member-select {
  width: 100%;
  margin-bottom: 10px;
  padding: 13px 14px;
  border: 1px solid #111;
  border-radius: 999px;
  background: transparent;
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  box-sizing: border-box;
}

.signup-field { margin-bottom: 0; }

.auth-submit {
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid #111;
  border-radius: 999px;
  background: #111;
  color: #f4f4f4;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  cursor: pointer;
}

.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-toggle {
  margin: 18px 0 0;
  font-size: 13px;
}

.auth-toggle button {
  border: 0;
  background: transparent;
  text-decoration: underline;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  padding: 0;
}

/* ── MOBILE ── */
@media (max-width: 700px) {
  .marquee-page {
    height: 100svh;
    padding: 6px;
    gap: 5px;
  }

  .marquee-row {
    height: auto;
    flex: 1;
    min-height: 0;
    border-radius: 9px;
  }

  .marquee-track span {
    font-size: clamp(54px, 19vw, 92px);
    padding-right: 12vw;
  }

  .auth-modal {
    align-items: flex-end;
    padding: 10px;
  }

  .auth-card {
    width: 100%;
    max-height: calc(100svh - 20px);
    overflow-y: auto;
    border-radius: 20px;
    padding: 24px 18px 20px;
  }

  .auth-card h1 {
    margin-bottom: 20px;
  }
}

@media (max-width: 420px) {
  .marquee-track span {
    font-size: clamp(48px, 21vw, 78px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation-duration: 60s;
  }
}
