/* NFL Picks Pool hub — dark apex shell */
:root {
  --bg: #070b10;
  --panel: #10161e;
  --line: #243040;
  --text: #eef1f6;
  --muted: #9aa6b8;
  --dim: #6a7588;
  --cyan: #5ee7ff;
  --gold: #d4a84b;
  --green: #4ade80;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(ellipse 90% 50% at 50% -8%, #1a2838 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100dvh;
  padding-bottom: calc(1.25rem + var(--safe-b));
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.bar {
  display: flex; flex-direction: column; gap: .35rem;
  padding: calc(.45rem + var(--safe-t)) 1rem .5rem;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 14, 20, 0.94);
  font-size: .85rem;
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.bar-top {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
}
.bar-top strong { color: var(--gold); font-weight: 700; }
.bar a.home-link { font-weight: 600; color: var(--cyan); white-space: nowrap; }
nav.topnav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .15rem;
  padding-top: .35rem; border-top: 1px solid rgba(36, 48, 64, 0.65);
}
nav.topnav a {
  font-weight: 600; font-size: .8rem; color: var(--muted);
  padding: .3rem .5rem; border-radius: 8px;
}
nav.topnav a:hover, nav.topnav a.active { color: var(--cyan); text-decoration: none; background: rgba(94, 231, 255, .08); }
nav.topnav button.nav-admin {
  font: inherit; font-weight: 600; font-size: .8rem; color: var(--muted);
  padding: .3rem .5rem; border-radius: 8px; border: none;
  background: transparent; cursor: pointer; touch-action: manipulation;
}
nav.topnav button.nav-admin:hover {
  color: var(--cyan); background: rgba(94, 231, 255, .08);
}

.wrap { width: min(720px, 100%); margin: 0 auto; padding: 1.25rem 1.1rem 2rem; }
.kicker {
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan); font-weight: 700; margin-bottom: .4rem;
}
h1 {
  font-size: clamp(1.55rem, 5vw, 2rem); font-weight: 750;
  letter-spacing: -.02em; line-height: 1.15; margin-bottom: .35rem;
}
.lead { color: var(--muted); font-size: 1.02rem; margin-bottom: 1.1rem; max-width: 38em; }
.meta { display: flex; flex-wrap: wrap; gap: .4rem .55rem; margin-bottom: 1.25rem; }
.pill {
  font-size: .78rem; font-weight: 600; color: var(--muted);
  border: 1px solid var(--line); background: var(--panel);
  border-radius: 999px; padding: .3rem .7rem;
}
.pill em { color: var(--green); font-style: normal; }

h2 {
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); font-weight: 700; margin: 1.45rem 0 .65rem;
}

.grid { display: grid; grid-template-columns: 1fr; gap: .5rem; }
@media (min-width: 520px) {
  .grid.two { grid-template-columns: 1fr 1fr; }
}

.card {
  display: block;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: .9rem 1rem;
  color: var(--text); touch-action: manipulation;
}
.card:hover {
  border-color: #3a5060; text-decoration: none; filter: brightness(1.06);
}
.card strong { display: block; color: var(--cyan); margin-bottom: .2rem; font-size: 1.02rem; }
.card span { display: block; color: var(--muted); font-size: .92rem; line-height: 1.4; }
.card .win { color: var(--gold); font-weight: 700; }

/* FFO logo + Venmo pay side by side */
.cta-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: .65rem .85rem;
  margin: 0 0 1.1rem;
}
.cta-row-pay { align-items: stretch; }
.ffo-logo-link {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  padding: .35rem .4rem;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); touch-action: manipulation;
}
.ffo-logo-link:hover {
  border-color: #3a5060; text-decoration: none; filter: brightness(1.06);
}
.ffo-logo {
  display: block; width: 6.75rem; height: auto; border-radius: 4px;
}
.pay-compact {
  flex: 1 1 12rem;
  min-width: 11rem;
  display: flex; flex-direction: column; justify-content: center; gap: .4rem;
  padding: .55rem .75rem;
  border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel);
}
.pay-compact .btn-pay { max-width: none; width: 100%; }
.pay-compact .panel-meta { margin: 0; }

/* Pay + join panels */
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: .95rem 1rem 1.05rem;
  margin: 0 0 .75rem;
}
.panel h2 {
  margin: 0 0 .45rem;
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); font-weight: 700;
}
.panel-lead {
  color: var(--muted); font-size: .95rem; margin: 0 0 .55rem; line-height: 1.45;
}
.panel-lead.join-pitch { color: var(--text); font-size: 1.02rem; }
.panel-lead strong { color: var(--gold); }
.notes-label { margin-top: .15rem; }
.panel-meta {
  margin: .65rem 0 0; color: var(--dim); font-size: .82rem; line-height: 1.45;
}
.panel code, .join-hint code {
  font-size: .85em; color: var(--cyan);
  background: rgba(94, 231, 255, .08); padding: .05rem .3rem; border-radius: 4px;
}
.btn-pay, .btn-join {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; max-width: 22rem;
  padding: .7rem 1rem; border-radius: 10px;
  font-weight: 700; font-size: .95rem; border: none; cursor: pointer;
  touch-action: manipulation; text-decoration: none;
}
.btn-pay {
  background: linear-gradient(180deg, #3d8bfd 0%, #2a6fd6 100%);
  color: #fff;
}
.btn-pay:hover { filter: brightness(1.08); text-decoration: none; color: #fff; }
.btn-join {
  background: linear-gradient(180deg, #2dd4a0 0%, #1fa87a 100%);
  color: #04140e; margin-top: .15rem;
}
.btn-join:hover { filter: brightness(1.06); }

.join-form { display: flex; flex-direction: column; gap: .55rem; }
.join-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
}
@media (max-width: 420px) {
  .join-row { grid-template-columns: 1fr; }
}
.join-form label {
  display: flex; flex-direction: column; gap: .25rem;
  font-size: .78rem; font-weight: 600; color: var(--dim);
  letter-spacing: .03em; text-transform: uppercase;
}
.join-form input,
.join-form textarea {
  font: inherit; font-size: 1rem; font-weight: 500; letter-spacing: normal;
  text-transform: none; color: var(--text);
  background: #0a0f16; border: 1px solid var(--line);
  border-radius: 8px; padding: .55rem .65rem;
  width: 100%;
}
.join-form textarea {
  min-height: 4.5rem; resize: vertical; line-height: 1.4;
}
.join-form input:focus,
.join-form textarea:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(94, 231, 255, .18);
}
.join-hint {
  margin: .15rem 0 0; color: var(--dim); font-size: .82rem; line-height: 1.4;
}
.join-hint strong { color: var(--muted); font-weight: 650; }
.join-honey {
  position: absolute !important; left: -9999px !important; width: 1px !important;
  height: 1px !important; opacity: 0 !important; pointer-events: none !important;
}
.join-success {
  margin: 0 0 .85rem; padding: .75rem .9rem;
  border-radius: 10px; border: 1px solid rgba(74, 222, 128, .35);
  background: rgba(74, 222, 128, .1); color: var(--green);
  font-weight: 650; font-size: .95rem; line-height: 1.4;
}
.btn-join:disabled { opacity: .65; cursor: wait; }

/* Pool Admin gate */
.admin-open {
  background: none; border: 1px solid var(--line); color: var(--dim);
  font: inherit; font-size: .78rem; font-weight: 650;
  padding: .35rem .7rem; border-radius: 8px; cursor: pointer;
  touch-action: manipulation;
}
.admin-open:hover { color: var(--cyan); border-color: #3a5060; }
.admin-modal[hidden] { display: none !important; }
.admin-modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; background: rgba(4, 8, 12, .72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.admin-dialog {
  width: min(20rem, 100%);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 1.1rem 1.15rem 1.15rem;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
}
.admin-dialog h2 {
  margin: 0 0 .65rem; font-size: .95rem; letter-spacing: .04em;
  text-transform: none; color: var(--text); font-weight: 700;
}
.admin-dialog label {
  display: block; font-size: .72rem; font-weight: 650;
  letter-spacing: .06em; text-transform: uppercase; color: var(--dim);
  margin-bottom: .35rem;
}
.admin-dialog input[type="password"] {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: #0a0f16; border: 1px solid var(--line);
  border-radius: 8px; padding: .55rem .65rem; margin-bottom: .75rem;
}
.admin-dialog input[type="password"]:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(94, 231, 255, .18);
}
.admin-actions { display: flex; gap: .45rem; justify-content: flex-end; }
.admin-actions button {
  font: inherit; font-size: .88rem; font-weight: 650;
  border-radius: 8px; padding: .45rem .75rem; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
}
.admin-actions button.primary {
  background: linear-gradient(180deg, #3d8bfd 0%, #2a6fd6 100%);
  border-color: transparent; color: #fff;
}
.admin-dialog.shake { animation: admin-shake .35s ease; }
@keyframes admin-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.admin-tools { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; }
.admin-tools a.card strong { color: var(--cyan); }

.note {
  margin-top: 1.5rem; padding: .85rem 1rem;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(16, 22, 30, .7); color: var(--dim); font-size: .9rem;
}

.foot {
  margin-top: 1.75rem; text-align: center; color: var(--dim); font-size: .85rem;
}
