:root{
  --hr-pink:#e340cf;
  --hr-pink-dark:#b52ea5;
  --hr-pink-tint:#fdeafc;
  --hr-cream:#fdf3fb;
  --hr-navy:#2b2b2b;
  --hr-muted:#6b6b6b;
}

.thr-wrap{max-width:1100px;margin:0 auto;padding:24px;font-family:"Open Sans",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}

/* ---- Hero ---- */
.thr-hero{background:var(--hr-cream);color:var(--hr-navy);border-radius:22px;padding:38px;text-align:center}
.thr-kicker{letter-spacing:.18em;font-weight:800;font-size:.8rem;opacity:.9;color:var(--hr-pink-dark)}
.thr-kicker-dark{color:var(--hr-pink-dark);text-align:left;margin-bottom:6px}
.thr-hero-photos{display:flex;justify-content:center;align-items:center;gap:14px;margin-bottom:18px;flex-wrap:wrap}
.thr-hero-photo{width:190px;height:190px;object-fit:cover;border-radius:18px;border:4px solid #fff;box-shadow:0 12px 28px rgba(43,10,38,.18);display:block}
.thr-hero h1{font-family:"Montserrat",sans-serif;font-size:clamp(1.5rem,4.2vw,3.6rem);margin:.3em 0 .2em;color:var(--hr-navy);white-space:nowrap}
.thr-subtitle{font-size:1.05rem;color:var(--hr-muted);max-width:640px;margin:0 auto}
.thr-badges{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:22px}
.thr-badges span{padding:10px 16px;border:1px solid #f0c7ea;background:#fff;color:var(--hr-pink-dark);border-radius:999px;font-weight:800;font-size:.85rem;box-shadow:0 3px 10px rgba(43,43,43,.05)}

/* ---- Progress card ---- */
.thr-progress-card{background:#fff;border-radius:22px;box-shadow:0 14px 40px rgba(43,43,43,.1);padding:28px;margin-top:26px}
.thr-progress-topline{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;flex-wrap:wrap}
.thr-progress-topline h2{margin:0;color:var(--hr-navy);font-family:"Montserrat",sans-serif;font-size:clamp(1.3rem,2.6vw,1.8rem);text-align:left;max-width:760px}
.thr-progress-stat{white-space:nowrap;color:var(--hr-navy);font-size:1.05rem}
.thr-progress-stat strong{color:var(--hr-pink);font-size:1.8rem}
.thr-progress{height:14px;background:var(--hr-pink-tint);border-radius:999px;overflow:hidden;margin:22px 0 12px}
.thr-progress span{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--hr-pink),var(--hr-pink-dark));transition:width .3s}
.thr-money-row{display:flex;justify-content:space-between;color:var(--hr-muted);font-size:.95rem}
.thr-money-row strong{color:var(--hr-navy)}

/* ---- Board section ---- */
.thr-board{margin-top:36px}
.thr-board h2{margin:2px 0 20px;color:var(--hr-navy);font-family:"Montserrat",sans-serif;text-align:left}
.thr-legend,.thr-actions{display:flex;gap:14px;flex-wrap:wrap;justify-content:center;margin:20px 0}
.thr-legend span{display:flex;align-items:center;gap:6px;color:var(--hr-navy)}
.thr-legend i{width:16px;height:16px;border-radius:50%;display:inline-block}
.thr-legend .available{background:#d2e83a;border:1px solid #a8b82a}
.thr-legend .selected{background:var(--hr-pink);border:1px solid var(--hr-pink-dark)}
.thr-legend .reserved{background:#fff3cd;border:1px solid #f0ad4e}
.thr-legend .sold{background:#d8d8d8;border:1px solid #aaa}

/* ---- Tennis ball number grid ---- */
.thr-grid{display:grid;grid-template-columns:repeat(10,minmax(42px,1fr));gap:10px}
.thr-ball{
  aspect-ratio:1;
  display:grid;
  place-items:center;
  position:relative;
  border:none;
  border-radius:50%;
  font-family:"Montserrat",sans-serif;
  font-weight:800;
  color:#2e3a00;
  cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease;
  padding:0;

  background-color:#d2e83a;
  background-image:
    radial-gradient(circle at 32% 26%, rgba(255,255,255,.65) 0%, rgba(255,255,255,0) 45%),
    radial-gradient(circle at 68% 74%, rgba(0,0,0,.12) 0%, rgba(0,0,0,0) 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M14,14 C34,30 34,70 14,86' stroke='white' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3Cpath d='M86,14 C66,30 66,70 86,86' stroke='white' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size:cover;
  box-shadow:inset 0 -5px 8px rgba(0,0,0,.2), inset 0 3px 5px rgba(255,255,255,.4), 0 3px 6px rgba(0,0,0,.2);
}
.thr-ball:hover:not(:disabled){transform:translateY(-3px) scale(1.06);box-shadow:inset 0 -5px 8px rgba(0,0,0,.2), inset 0 3px 5px rgba(255,255,255,.4), 0 8px 14px rgba(0,0,0,.3)}

.thr-ball.selected{
  background-color:var(--hr-pink);
  background-image:
    radial-gradient(circle at 32% 26%, rgba(255,255,255,.5) 0%, rgba(255,255,255,0) 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M14,14 C34,30 34,70 14,86' stroke='white' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3Cpath d='M86,14 C66,30 66,70 86,86' stroke='white' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size:cover;
  outline:3px solid #7a1670;
  outline-offset:2px;
  color:#fff;
}

.thr-ball.reserved{
  background-color:#ffe9a8;
  background-image:
    radial-gradient(circle at 32% 26%, rgba(255,255,255,.4) 0%, rgba(255,255,255,0) 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M14,14 C34,30 34,70 14,86' stroke='%23ffffff' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3Cpath d='M86,14 C66,30 66,70 86,86' stroke='%23ffffff' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size:cover;
  color:#7a5b00;
  cursor:not-allowed;
}

.thr-ball.sold{
  background-color:#d8d8d8;
  background-image:
    radial-gradient(circle at 32% 26%, rgba(255,255,255,.4) 0%, rgba(255,255,255,0) 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M14,14 C34,30 34,70 14,86' stroke='%23ffffff' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3Cpath d='M86,14 C66,30 66,70 86,86' stroke='%23ffffff' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size:cover;
  color:transparent;
  cursor:not-allowed;
  box-shadow:none;
}
.thr-ball.sold::after{content:"✕";position:absolute;color:#fff;font-weight:900;font-size:1.15rem;text-shadow:0 0 3px rgba(0,0,0,.5)}

/* ---- Buttons / checkout ---- */
.thr-actions button,.thr-checkout button{border:0;border-radius:999px;padding:12px 22px;font-weight:800;cursor:pointer;background:var(--hr-pink);color:#fff;text-transform:uppercase;letter-spacing:.03em;font-size:.85rem;transition:background-color .15s ease, transform .15s ease}
.thr-actions button:hover,.thr-checkout button:hover:not(:disabled){background:var(--hr-pink-dark);transform:translateY(-1px)}
.thr-actions .secondary{background:var(--hr-pink-tint);color:var(--hr-pink-dark)}
.thr-actions .secondary:hover{background:#f6d3f3}
.thr-checkout{position:sticky;bottom:12px;margin-top:26px;background:#fff;border:1px solid #f0dbee;border-radius:18px;padding:20px;box-shadow:0 10px 30px rgba(43,10,38,.15);display:grid;gap:10px}
.thr-checkout button:disabled{opacity:.45;cursor:not-allowed}
.thr-note{font-size:.9rem;color:var(--hr-muted);margin:0}
#thr-message{font-weight:700}
.thr-error{color:#b42318}
.thr-success{color:#067647}

/* ---- Closed / not-selling state ---- */
.thr-hero-closed{background:linear-gradient(135deg,#4a1044 0%,#a12b93 55%,#e340cf 100%);color:#fff}
.thr-hero-closed .thr-kicker{color:#ffe3fa}
.thr-closed-actions{display:flex;justify-content:center;gap:14px;flex-wrap:wrap;margin-top:24px}
.thr-closed-btn{display:inline-block;border-radius:999px;padding:12px 22px;font-weight:800;text-transform:uppercase;letter-spacing:.03em;font-size:.85rem;text-decoration:none;background:var(--hr-pink);color:#fff;transition:background-color .15s ease, transform .15s ease}
.thr-closed-btn:hover{background:var(--hr-pink-dark);transform:translateY(-1px)}
.thr-closed-btn-secondary{background:var(--hr-pink-tint);color:var(--hr-pink-dark)}
.thr-closed-btn-secondary:hover{background:#f6d3f3}

@media(max-width:760px){
  .thr-grid{grid-template-columns:repeat(5,1fr)}
  .thr-hero{padding:26px 18px}
  .thr-wrap{padding:14px}
  .thr-hero-photo{width:130px;height:130px;border-radius:14px}
  .thr-hero-photos{gap:10px}
  .thr-progress-topline{flex-direction:column}
  .thr-progress-topline h2{text-align:center;max-width:none}
  .thr-progress-stat{align-self:center}
}
@media(max-width:420px){.thr-grid{grid-template-columns:repeat(4,1fr)}}
