/* Group buys: /group/?g=<slug> and /group/?start=1 (public/group/group.js).
   Built on the storefront's tokens and cards (public/css/home.css): the
   cream page, white .co-card panels, navy and accent blue, Inter only. */

.gb-page { --gb-bar-h: 0px; --gb-ink: var(--ink); --gb-green: #1a7a4a; --gb-green-bg: rgba(46,173,107,0.1); --gb-amber: #8a6206; --gb-amber-bg: rgba(232,163,23,0.12); --gb-red: #b42f2f; --gb-red-bg: rgba(217,64,64,0.08); }
.gb-app { max-width: 1120px; margin: 0 auto; padding: 0.5rem 0 3rem; }
.gb-app :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.gb-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.gb-loading-text { color: var(--text-muted); font-size: 0.95rem; margin-top: 1rem; }

/* ---------- loading skeleton ---------- */
.gb-skel { background: linear-gradient(90deg, #e9e4d8 0%, #f6f2ea 50%, #e9e4d8 100%); background-size: 200% 100%; border-radius: 8px; animation: gbShimmer 1.4s ease-in-out infinite; }
.gb-skel-eyebrow { width: 140px; height: 14px; }
.gb-skel-title { width: min(560px, 90%); height: 40px; margin-top: 14px; }
.gb-skel-meta { width: min(320px, 70%); height: 16px; margin-top: 14px; }
.gb-skel-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; margin-top: 28px; }
.gb-skel-card { height: 180px; border-radius: 14px; }
.gb-skel-card-tall { height: 260px; }
@keyframes gbShimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------- hero ---------- */
.gb-hero { margin: 0 0 1.75rem; }
.gb-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.gb-eyebrow-label { font: 600 13px/1.2 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.gb-title { font-family: var(--font-body); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; color: var(--text); font-size: clamp(30px, 5.2vw, 48px); margin: 12px 0 0; overflow-wrap: anywhere; }
.gb-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 14px; color: var(--text-muted); font-size: 0.95rem; }
.gb-hero-meta > span { display: inline-flex; align-items: center; gap: 8px; }
.gb-hero-meta strong { color: var(--text); font-weight: 600; }
.gb-price-chip { padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--navy); font-weight: 600; font-variant-numeric: tabular-nums; }
.gb-style-line { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; max-width: 640px; color: var(--text-muted); font-size: 0.98rem; line-height: 1.5; }
.gb-style-line strong { color: var(--navy); }
.gb-style-icon { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--ice); color: var(--navy); display: grid; place-items: center; margin-top: -2px; }
.gb-style-icon svg { width: 18px; height: 18px; }

/* Status pills (the house .status-pill shape, with group colours) */
.gb-pill-open { background: var(--accent-dim); color: var(--accent); }
.gb-pill-open .dot { background: var(--accent); }
.gb-pill-busy { background: var(--gb-amber-bg); color: var(--gb-amber); }
.gb-pill-busy .dot { background: var(--warning); }
.gb-pill-done { background: var(--gb-green-bg); color: var(--gb-green); }
.gb-pill-done .dot { background: var(--success); }
.gb-pill-ended { background: rgba(84,100,120,0.1); color: var(--text-muted); }
.gb-pill-ended .dot { background: var(--text-dim); }
.gb-pill-open .dot, .gb-pill-busy .dot { animation: gbPulse 2s ease-in-out infinite; }
@keyframes gbPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- layout ---------- */
.gb-top { display: flex; flex-direction: column; gap: 14px; margin: -0.5rem 0 1.5rem; }
.gb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.gb-col-main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.gb-col-side { min-width: 0; position: sticky; top: calc(88px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 16px; }
.gb-col-main > .co-card, .gb-col-side > .co-card { margin-bottom: 0; }
.gb-card-pad { padding: 1.25rem; }
.gb-kicker { font: 600 12px/1.2 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin: 0; }
.gb-h2 { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.01em; color: var(--navy); margin: 0; }
.gb-muted { color: var(--text-muted); }
.gb-small { font-size: 0.88rem; }
.gb-p { margin: 0.5rem 0 0; color: var(--text-muted); line-height: 1.55; }
.gb-p strong { color: var(--text); }

/* ---------- buttons ---------- */
.gb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0.75rem 1.25rem; border-radius: var(--radius); font: 600 1rem/1.2 var(--font-body); cursor: pointer; text-decoration: none; transition: var(--transition); border: 1px solid transparent; width: 100%; text-align: center; }
.gb-btn svg { width: 18px; height: 18px; flex: none; }
.gb-btn[disabled], .gb-btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; filter: none; }
.gb-btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.gb-btn-primary:not([disabled]):hover { filter: brightness(1.08); transform: translateY(-1px); }
.gb-btn-dark { background: var(--navy); color: #fff; border-color: var(--navy); }
.gb-btn-dark:not([disabled]):hover { background: var(--accent); border-color: var(--accent); }
.gb-btn-ghost { background: #fff; color: var(--text); border-color: var(--border); }
.gb-btn-ghost:not([disabled]):hover { border-color: var(--accent); color: var(--accent); }
.gb-btn-danger { background: #fff; color: var(--danger); border-color: rgba(217,64,64,0.4); }
.gb-btn-danger:not([disabled]):hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.gb-btn-sm { min-height: 44px; padding: 0.55rem 0.95rem; font-size: 0.93rem; width: auto; }
.gb-btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1rem; }
.gb-btn-row .gb-btn { flex: 1 1 160px; }
.gb-link { border: 0; background: none; padding: 0.6rem 0.2rem; min-height: 44px; color: var(--accent); font: 600 0.95rem/1.2 var(--font-body); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.gb-link:hover { text-decoration: underline; }
.gb-link-danger { color: var(--danger); }
.gb-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 0.5rem; }
.gb-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: gbSpin 0.8s linear infinite; flex: none; }
@keyframes gbSpin { to { transform: rotate(360deg); } }

/* ---------- action card: what you pay ---------- */
.gb-action { border-color: #c9d6e4; box-shadow: 0 1px 2px rgba(11,61,111,0.05), 0 18px 40px rgba(11,61,111,0.09); }
.gb-action-top { padding: 1.25rem 1.25rem 1rem; }
.gb-pay-label { font: 600 12px/1.2 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.gb-pay-amount { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; color: var(--navy); }
.gb-pay-amount strong { font-size: clamp(2.2rem, 9vw, 2.75rem); font-weight: 750; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.gb-pay-amount span { font-size: 1rem; font-weight: 600; color: var(--text-muted); }
.gb-pay-sub { margin: 10px 0 0; color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }
.gb-free-today { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--gb-green-bg); color: var(--gb-green); font-weight: 600; font-size: 0.95rem; }
.gb-free-today svg { width: 18px; height: 18px; flex: none; }
.gb-action-body { padding: 0 1.25rem 1.25rem; }
.gb-action-foot { padding: 0.85rem 1.25rem; background: #fbfaf7; border-top: 1px solid var(--border); font-size: 0.88rem; color: var(--text-muted); line-height: 1.45; }
.gb-action-foot strong { color: var(--text); }
.gb-note { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--bg-elevated); color: var(--text); font-size: 0.95rem; line-height: 1.5; }
.gb-note-warn { background: var(--gb-amber-bg); color: #6b4d05; }
.gb-note-bad { background: var(--gb-red-bg); color: var(--gb-red); }
.gb-note-good { background: var(--gb-green-bg); color: var(--gb-green); }
.gb-note strong { display: block; margin-bottom: 2px; }
.gb-note .gb-btn { margin-top: 10px; }

/* "You're in" */
.gb-in { display: flex; gap: 12px; align-items: center; }
.gb-check { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 6px var(--gb-green-bg); }
.gb-check svg { width: 22px; height: 22px; }
.gb-check-pop { animation: gbPop 0.55s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes gbPop { 0% { transform: scale(0.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.gb-in h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; color: var(--navy); margin: 0; }
.gb-in p { margin: 2px 0 0; color: var(--text-muted); font-size: 0.93rem; }
.gb-card-line { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: 0.95rem; }
.gb-card-line svg { width: 26px; height: 18px; flex: none; color: var(--navy); }
.gb-card-line span { flex: 1; }

/* ---------- join steps ---------- */
.gb-steps { display: flex; gap: 6px; list-style: none; margin: 0 0 1rem; padding: 0; counter-reset: gbstep; }
.gb-steps li { flex: 1; font-size: 0.78rem; font-weight: 600; color: var(--text-dim); padding-top: 8px; border-top: 3px solid var(--border); }
.gb-steps li.is-on { color: var(--navy); border-top-color: var(--accent); }
.gb-steps li.is-done { color: var(--gb-green); border-top-color: var(--success); }
.gb-field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.gb-field > label, .gb-field-label { font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.gb-field input[type=text], .gb-field input[type=email], .gb-field input[type=password], .gb-field input[inputmode], .gb-input {
  width: 100%; min-height: 48px; padding: 0.7rem 0.9rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font: 400 16px/1.3 var(--font-body); outline: none; transition: var(--transition);
}
.gb-field input:focus, .gb-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.gb-field input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(217,64,64,0.12); }
.gb-hint { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }
.gb-err { font-size: 0.88rem; color: var(--danger); font-weight: 600; line-height: 1.4; }
.gb-err:empty { display: none; }
.gb-check-row { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; padding: 12px; min-height: 48px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; cursor: pointer; font-size: 0.95rem; line-height: 1.45; color: var(--text); }
.gb-check-row:hover { border-color: var(--border-hover); }
.gb-check-row input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.gb-check-row.is-on { border-color: var(--accent); background: var(--accent-dim); }
.gb-money-input { position: relative; }
.gb-money-input::before { content: "$"; position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-weight: 600; pointer-events: none; }
.gb-money-input input { padding-left: 1.7rem !important; font-variant-numeric: tabular-nums; font-weight: 600 !important; }
.gb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gb-chip { min-height: 44px; padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--navy); font: 600 0.92rem/1 var(--font-body); cursor: pointer; font-variant-numeric: tabular-nums; transition: var(--transition); }
.gb-chip:hover { border-color: var(--accent); }
.gb-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.gb-live-pay { margin-top: 12px; font-size: 1rem; color: var(--navy); font-weight: 650; }

/* auth tabs */
.gb-auth-intro { margin: 0 0 10px; color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }
.gb-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-elevated); }
.gb-tab { min-height: 44px; border: 0; border-radius: 9px; background: transparent; font: 600 0.95rem/1 var(--font-body); color: var(--text-muted); cursor: pointer; }
.gb-tab[aria-selected="true"] { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(11,61,111,0.12); }
.gb-password { position: relative; }
.gb-password input { padding-right: 4.4rem !important; }
.gb-password button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 40px; min-width: 56px; border: 0; background: transparent; color: var(--accent); font: 600 0.88rem var(--font-body); cursor: pointer; }

/* terms */
.gb-terms { margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: #fbfaf7; }
.gb-terms summary { cursor: pointer; list-style: none; padding: 12px 14px; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; color: var(--navy); font-size: 0.95rem; }
.gb-terms summary::-webkit-details-marker { display: none; }
.gb-terms summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.2s ease; margin-top: -4px; flex: none; }
.gb-terms[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.gb-terms ol { margin: 0; padding: 0 16px 14px 34px; color: var(--text); font-size: 0.92rem; line-height: 1.55; }
.gb-terms li { margin-top: 8px; }
.gb-terms-draft { margin: 0 14px 12px; font-size: 0.8rem; color: var(--text-dim); }

/* ---------- progress ---------- */
.gb-progress { padding: 1.25rem; }
.gb-progress-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.gb-progress-big { margin: 6px 0 0; color: var(--text-muted); font-size: 1rem; }
.gb-progress-big strong { font-size: 1.9rem; font-weight: 750; letter-spacing: -0.03em; color: var(--navy); font-variant-numeric: tabular-nums; margin-right: 4px; }
.gb-pct { font: 700 1rem/1 var(--font-body); color: var(--accent); font-variant-numeric: tabular-nums; padding-bottom: 6px; }
.gb-bar { position: relative; height: 14px; margin-top: 14px; border-radius: 999px; overflow: hidden;
  background: repeating-linear-gradient(-45deg, #dfe6ee 0 6px, #e9eef4 6px 12px); }
.gb-bar-fill { position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); border-radius: 999px; background: linear-gradient(90deg, var(--navy), var(--accent)); transition: width 1.1s cubic-bezier(.22,1,.36,1); }
.gb-bar-fill.is-full { background: linear-gradient(90deg, #1e8a54, var(--success)); }
.gb-bar-fill::after { content: ""; position: absolute; right: 3px; top: 3px; bottom: 3px; width: 8px; border-radius: 999px; background: rgba(255,255,255,0.55); }
.gb-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 0.85rem; color: var(--text-muted); }
.gb-legend li { display: inline-flex; align-items: center; gap: 6px; }
.gb-sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.gb-sw-fill { background: var(--accent); }
.gb-sw-rest { background: repeating-linear-gradient(-45deg, #cbd5e1 0 3px, #e9eef4 3px 6px); }
.gb-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0 0; }
.gb-stats div { padding: 12px; border-radius: 10px; background: #fbfaf7; border: 1px solid var(--bg-elevated); min-width: 0; }
.gb-stats dt { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0.02em; }
.gb-stats dd { margin: 4px 0 0; font-size: 1.35rem; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.1; }
.gb-stats dd small { font-size: 0.8rem; font-weight: 600; color: var(--text-dim); letter-spacing: 0; }
.gb-pips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding: 0; list-style: none; }
.gb-pip { width: 18px; height: 18px; border-radius: 5px; border: 2px dashed #b9c6d4; background: #fff; }
.gb-pip.is-taken { border: 0; background: var(--accent); box-shadow: inset 0 -3px 0 rgba(11,61,111,0.25); }
.gb-pip.is-owner { border: 0; background: var(--navy); }
.gb-progress-note { margin: 12px 0 0; font-size: 0.88rem; color: var(--text-muted); }

/* ---------- what is tested ---------- */
.gb-tests .co-line { padding: 1rem 0; }
.gb-tests .co-line-name span { white-space: nowrap; }
.gb-total-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.9rem 1.25rem; border-top: 1px solid var(--border); background: #fbfaf7; }
.gb-total-row dt { margin: 0; font-weight: 650; color: var(--ink); }
.gb-total-row dd { margin: 0; font-size: 1.35rem; font-weight: 750; color: var(--navy); font-variant-numeric: tabular-nums; }
.gb-rush { display: flex; justify-content: space-between; gap: 1rem; padding: 0.75rem 1.25rem; border-top: 1px solid var(--bg-elevated); font-size: 0.93rem; color: var(--text-muted); }
.gb-rush strong { color: var(--ink); }

/* ---------- members ---------- */
.gb-members-list { list-style: none; margin: 0; padding: 0.5rem 1.25rem 0.75rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.gb-member { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--bg-elevated); min-width: 0; }
.gb-member-name { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gb-member-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.gb-member-sub { font-size: 0.8rem; color: var(--text-dim); }
.gb-member.is-you { background: linear-gradient(90deg, var(--accent-dim), transparent 85%); border-radius: 10px; padding-left: 8px; margin-left: -8px; }
.gb-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 700 0.8rem/1 var(--font-body); color: #fff; background: var(--av, var(--navy)); letter-spacing: 0.02em; }
.gb-avatar svg { width: 18px; height: 18px; }
.gb-avatar-anon { background: #dfe6ee; color: var(--text-muted); }
.gb-avatar-sm { width: 26px; height: 26px; font-size: 0.7rem; }
.gb-tag { flex: none; font: 700 0.7rem/1 var(--font-body); letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 7px; border-radius: 6px; background: var(--ice); color: var(--navy); }
.gb-tag-you { background: var(--accent); color: #fff; }
.gb-members-more { padding: 0 1.25rem 1rem; }
.gb-members-empty { padding: 1rem 1.25rem 1.25rem; color: var(--text-muted); font-size: 0.95rem; }

/* ---------- how it works and trust ---------- */
.gb-how { list-style: none; margin: 0; padding: 0.5rem 1.25rem 1.25rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: gbhow; }
.gb-how li { counter-increment: gbhow; font-size: 0.92rem; color: var(--text-muted); line-height: 1.45; }
.gb-how li::before { content: counter(gbhow); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 0.85rem; margin-bottom: 8px; }
.gb-how strong { display: block; color: var(--text); margin-bottom: 2px; }
.gb-trust { list-style: none; margin: 0; padding: 0.25rem 1.25rem 0.5rem; }
.gb-trust li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--bg-elevated); font-size: 0.95rem; line-height: 1.5; color: var(--text-muted); }
.gb-trust li:last-child { border-bottom: 0; }
.gb-trust strong { color: var(--text); }
.gb-trust svg { flex: none; width: 22px; height: 22px; color: var(--accent); margin-top: 1px; }
.gb-trust-foot { padding: 0.25rem 1.25rem 1.25rem; font-size: 0.92rem; color: var(--text-muted); }
.gb-trust-foot a { color: var(--accent); font-weight: 600; }

/* ---------- share ---------- */
.gb-share-row { display: flex; gap: 8px; margin-top: 10px; }
.gb-share-row input { flex: 1; min-width: 0; min-height: 48px; padding: 0 0.85rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); color: var(--text); font: 500 16px/1 var(--font-body); }
.gb-share-row .gb-btn { width: auto; flex: none; }
.gb-share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.gb-share-actions .gb-btn { flex: 1 1 130px; }
.gb-qr { margin-top: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; border-radius: 12px; background: #fff; border: 1px solid var(--border); }
.gb-qr svg { width: 200px; height: 200px; max-width: 100%; }
.gb-qr p { margin: 0; font-size: 0.85rem; color: var(--text-muted); text-align: center; }
.gb-copied { color: var(--gb-green) !important; border-color: var(--success) !important; }

/* ---------- celebration ---------- */
.gb-celebrate { position: relative; overflow: hidden; padding: 1.5rem 1.25rem; border-radius: 16px; background: linear-gradient(135deg, var(--navy) 0%, #0e4a82 55%, var(--accent) 100%); color: #fff; box-shadow: 0 18px 40px rgba(11,61,111,0.25); }
.gb-celebrate h2 { position: relative; font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 750; letter-spacing: -0.03em; margin: 10px 0 0; }
.gb-celebrate p { position: relative; margin: 6px 0 0; color: rgba(255,255,255,0.85); max-width: 560px; line-height: 1.5; }
.gb-celebrate .gb-check { background: #fff; color: var(--success); box-shadow: 0 0 0 6px rgba(255,255,255,0.18); position: relative; }
.gb-confetti { position: absolute; inset: 0; pointer-events: none; }
.gb-confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; opacity: 0; animation: gbConfetti 2.4s cubic-bezier(.2,.6,.4,1) forwards; }
@keyframes gbConfetti { 0% { opacity: 0; transform: translateY(0) rotate(0); } 10% { opacity: 1; } 100% { opacity: 0; transform: translateY(220px) rotate(540deg); } }
.gb-celebrate .gb-btn-row { position: relative; }
.gb-celebrate .gb-btn-ghost { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.35); }
.gb-celebrate .gb-btn-ghost:not([disabled]):hover { background: #fff; color: var(--navy); }
.gb-celebrate .gb-btn-primary { background: #fff; color: var(--navy); border-color: #fff; }

/* ---------- banners in the main column ---------- */
.gb-banner { display: flex; gap: 14px; align-items: flex-start; padding: 1rem 1.25rem; border-radius: 14px; border: 1px solid var(--border); background: #fff; }
.gb-banner svg { flex: none; width: 26px; height: 26px; margin-top: 1px; }
.gb-banner h2 { font-size: 1.08rem; font-weight: 700; color: var(--navy); margin: 0; letter-spacing: -0.01em; }
.gb-banner p { margin: 4px 0 0; color: var(--text-muted); line-height: 1.5; font-size: 0.95rem; }
.gb-banner-good { border-color: rgba(46,173,107,0.35); background: #f3faf6; }
.gb-banner-good svg { color: var(--success); }
.gb-banner-warn { border-color: rgba(232,163,23,0.4); background: #fdf8ec; }
.gb-banner-warn svg { color: var(--warning); }
.gb-banner-bad { border-color: rgba(217,64,64,0.3); background: #fdf4f4; }
.gb-banner-bad svg { color: var(--danger); }
.gb-banner-info svg { color: var(--accent); }

/* ---------- owner close review ---------- */
.gb-close-list { list-style: none; margin: 0; padding: 0.25rem 1.25rem; }
.gb-close-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--bg-elevated); min-height: 52px; }
.gb-close-list .gb-member-text { flex: 1; }
.gb-close-amt { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.gb-out-held { color: var(--gb-green); }
.gb-out-declined { color: var(--danger); }
.gb-out-pending { color: var(--gb-amber); }
.gb-out-planned { color: var(--text-dim); }
.gb-close-declined .gb-close-amt { color: var(--text-dim); font-weight: 600; font-size: 0.88rem; }
.gb-owner-pays { margin: 0; padding: 1rem 1.25rem; background: var(--ice); border-top: 1px solid #d2e2f1; }
.gb-owner-pays-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.gb-owner-pays-top dt { font-weight: 700; color: var(--navy); }
.gb-owner-pays-top dd { margin: 0; font-size: 1.6rem; font-weight: 750; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.gb-owner-pays p { margin: 6px 0 0; color: var(--navy); font-size: 0.93rem; line-height: 1.5; }
.gb-close-total { display: flex; justify-content: space-between; padding: 0.75rem 1.25rem; font-size: 0.93rem; color: var(--text-muted); border-top: 1px solid var(--border); }
.gb-close-total strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.gb-countdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); }

/* ---------- COA switch ---------- */
.gb-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-elevated); margin-top: 10px; }
.gb-switch button { min-height: 44px; border: 0; border-radius: 9px; background: transparent; font: 600 0.95rem/1 var(--font-body); color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.gb-switch button[aria-pressed="true"] { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(11,61,111,0.12); }
.gb-switch button svg { width: 16px; height: 16px; }
.gb-section-sep { border-top: 1px solid var(--border); margin: 1.1rem -1.25rem 0; padding: 1.1rem 1.25rem 0; }

/* ---------- certificates ---------- */
.gb-certs { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gb-cert { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(46,173,107,0.35); background: #f3faf6; }
.gb-cert-text { flex: 1 1 160px; min-width: 0; }
.gb-cert-text strong { display: block; color: var(--text); }
.gb-cert-text span { font-size: 0.85rem; color: var(--text-muted); }
.gb-cert .gb-btn { width: auto; }
.gb-public-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--gb-green-bg); color: var(--gb-green); font: 700 0.78rem/1 var(--font-body); letter-spacing: 0.03em; text-transform: uppercase; }
.gb-public-badge svg { width: 14px; height: 14px; }

/* ---------- sticky phone bar ---------- */
.gb-bar-wrap { position: fixed; left: 0; right: 0; bottom: 0; z-index: 120; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,0.97); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgba(11,61,111,0.1); display: none; transform: translateY(0); transition: transform 0.25s ease; }
.gb-bar-wrap.is-away { transform: translateY(110%); }
.gb-bar-inner { display: flex; align-items: center; gap: 12px; max-width: 640px; margin: 0 auto; }
.gb-bar-price { flex: 1; min-width: 0; line-height: 1.2; }
.gb-bar-price small { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0.03em; text-transform: uppercase; }
.gb-bar-price strong { font-size: 1.25rem; font-weight: 750; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.gb-bar-inner .gb-btn { width: auto; flex: none; min-width: 140px; }

/* ---------- dialogs (the house .modal look) ---------- */
.gb-dialog .modal { max-width: 460px; width: calc(100% - 32px); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto; background: #fff; }
.gb-dialog .modal h2 { font-size: 1.35rem; letter-spacing: -0.02em; color: var(--navy); }
.gb-dialog .modal p { color: var(--text-muted); line-height: 1.55; margin: 0.5rem 0 0; }
.gb-dialog .gb-btn-row { margin-top: 1.25rem; }
.gb-dialog-list { list-style: none; margin: 12px 0 0; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.gb-dialog-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--bg-elevated); font-size: 0.93rem; }
.gb-dialog-list li:last-child { border-bottom: 0; }
.gb-dialog-list li strong { font-variant-numeric: tabular-nums; }
.gb-dialog-list li.is-you { background: var(--ice); color: var(--navy); font-weight: 600; }

/* ---------- create flow ---------- */
.gb-create { max-width: 1040px; margin: 0 auto; }
.gb-create-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.gb-create-main { min-width: 0; }
.gb-create-aside { position: sticky; top: calc(88px + env(safe-area-inset-top)); }
.gb-stepper { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.gb-stepper-dots { display: flex; gap: 6px; flex: 1; max-width: 220px; }
.gb-stepper-dots span { flex: 1; height: 4px; border-radius: 999px; background: var(--border); transition: background 0.3s ease; }
.gb-stepper-dots span.is-on { background: var(--accent); }
.gb-stepper-text { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.gb-create-h { font-size: clamp(1.75rem, 5vw, 2.4rem); font-weight: 750; letter-spacing: -0.03em; line-height: 1.12; color: var(--text); margin: 0; }
.gb-create-sub { margin: 10px 0 0; color: var(--text-muted); font-size: 1rem; line-height: 1.55; max-width: 560px; }
.gb-create-card { margin-top: 20px; }
.gb-style-cards { display: grid; gap: 12px; margin-top: 20px; }
.gb-style-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) 26px; gap: 14px; align-items: start; width: 100%; text-align: left; padding: 16px; min-height: 88px; border-radius: 14px; border: 2px solid var(--border); background: #fff; cursor: pointer; font: inherit; color: inherit; transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; }
.gb-style-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.gb-style-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim), 0 10px 26px rgba(11,61,111,0.08); }
.gb-style-card .gb-style-icon { width: 48px; height: 48px; border-radius: 12px; margin: 0; }
.gb-style-card .gb-style-icon svg { width: 24px; height: 24px; }
.gb-style-card[aria-pressed="true"] .gb-style-icon { background: var(--accent); color: #fff; }
.gb-style-name { display: block; font-size: 1.08rem; font-weight: 700; color: var(--navy); }
.gb-style-desc { display: block; margin-top: 3px; color: var(--text-muted); font-size: 0.95rem; line-height: 1.45; }
.gb-style-eg { display: table; margin-top: 8px; padding: 4px 9px; border-radius: 6px; background: var(--bg-elevated); color: var(--navy); font-size: 0.85rem; font-weight: 600; }
.gb-radio { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-hover); margin-top: 2px; display: grid; place-items: center; }
.gb-style-card[aria-pressed="true"] .gb-radio { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px #fff; }
.gb-config { margin-top: 12px; padding: 16px; border-radius: 14px; background: #fff; border: 1px solid var(--border); }
.gb-steppers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gb-stepper-ctl { display: flex; align-items: stretch; margin-top: 6px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.gb-stepper-ctl button { flex: none; width: 48px; min-height: 48px; border: 0; background: var(--bg-elevated); color: var(--navy); font: 600 1.35rem/1 var(--font-body); cursor: pointer; }
.gb-stepper-ctl button:disabled { opacity: 0.4; cursor: not-allowed; }
.gb-stepper-ctl input { flex: 1; min-width: 0; border: 0 !important; text-align: center; font: 700 16px/1 var(--font-body); color: var(--navy); background: #fff; font-variant-numeric: tabular-nums; outline: none; }
.gb-stepper-ctl:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.gb-math { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--ice); color: var(--navy); font-size: 0.95rem; line-height: 1.5; }
.gb-math strong { font-variant-numeric: tabular-nums; }
.gb-math.is-bad { background: var(--gb-red-bg); color: var(--gb-red); }
.gb-review { margin: 0; }
.gb-review div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--bg-elevated); font-size: 0.95rem; }
.gb-review dt { color: var(--text-muted); }
.gb-review dd { margin: 0; font-weight: 600; color: var(--text); text-align: right; overflow-wrap: anywhere; }
.gb-create-nav { display: flex; gap: 10px; margin-top: 22px; }
.gb-create-nav .gb-btn-ghost { flex: 0 0 auto; width: auto; min-width: 110px; }
.gb-create-nav .gb-btn-primary { flex: 1; }
.gb-summary-lines { list-style: none; margin: 0; padding: 0 1.25rem; }
.gb-summary-lines li { padding: 12px 0; border-bottom: 1px solid var(--bg-elevated); font-size: 0.93rem; }
.gb-summary-lines li:last-child { border-bottom: 0; }
.gb-summary-lines strong { display: block; color: var(--ink); }
.gb-summary-lines span { color: var(--text-muted); }
.gb-locked { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; color: var(--gb-green); letter-spacing: 0.02em; }
.gb-locked svg { width: 14px; height: 14px; }
.gb-counter { font-size: 0.8rem; color: var(--text-dim); font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- empty and unavailable ---------- */
.gb-empty { max-width: 620px; margin: 2rem auto 0; text-align: center; }
.gb-empty-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; background: var(--ice); color: var(--navy); display: grid; place-items: center; }
.gb-empty-icon svg { width: 30px; height: 30px; }
.gb-empty h1 { font-size: clamp(1.75rem, 5vw, 2.25rem); font-weight: 750; letter-spacing: -0.03em; color: var(--text); margin: 0; }
.gb-empty p { margin: 10px auto 0; color: var(--text-muted); line-height: 1.55; max-width: 480px; }
.gb-empty .gb-btn-row { justify-content: center; max-width: 440px; margin: 1.5rem auto 0; }
.gb-error-box { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* ---------- phones and tablets ---------- */
@media (max-width: 959px) {
  .gb-layout, .gb-create-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .gb-col-side { position: static; order: -1; }
  .gb-create-aside { display: none; }
  .gb-skel-grid { grid-template-columns: 1fr; }
  .gb-bar-wrap { display: block; }
  .app.gb-has-bar footer { padding-bottom: var(--gb-bar-h); }
  .gb-how { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .gb-app { padding-top: 0; }
  .gb-hero { margin-bottom: 1.25rem; }
  .gb-members-list { grid-template-columns: minmax(0, 1fr); }
  .gb-stats { gap: 8px; }
  .gb-stats div { padding: 10px; }
  .gb-stats dd { font-size: 1.15rem; }
  .gb-how { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .gb-how li { display: grid; grid-template-columns: 30px 1fr; gap: 0 12px; }
  .gb-how li::before { margin: 0; grid-row: span 2; }
  .gb-steppers { grid-template-columns: minmax(0, 1fr); }
  .gb-style-card { grid-template-columns: 40px minmax(0, 1fr) 24px; padding: 14px; gap: 12px; }
  .gb-style-card .gb-style-icon { width: 40px; height: 40px; }
  .gb-create-nav { position: sticky; bottom: 0; margin: 22px -1rem 0; padding: 12px 1rem calc(12px + env(safe-area-inset-bottom)); background: rgba(243,239,230,0.96); border-top: 1px solid var(--border); z-index: 5; }
}

@media (prefers-reduced-motion: reduce) {
  .gb-skel, .gb-pill-open .dot, .gb-pill-busy .dot, .gb-spinner, .gb-check-pop, .gb-confetti i { animation: none !important; }
  .gb-bar-fill, .gb-bar-wrap, .gb-style-card, .gb-btn { transition: none !important; }
  .gb-confetti { display: none; }
  .gb-spinner { border-right-color: currentColor; opacity: 0.6; }
}
.gb-phone-only { display: none !important; }
@media (max-width: 959px) { .gb-phone-only { display: flex !important; } }
.gb-stepper-pre { display: grid; place-items: center; padding-left: 12px; color: var(--text-muted); font-weight: 700; background: #fff; }
.gb-style-cards .gb-config { margin-top: -4px; }
.gb-stepper-ctl input:focus-visible { outline: none; }
.gb-review dt { white-space: nowrap; }

/* ---------- round 2 ---------- */
.gb-about-eca { margin: 10px 0 0; font-size: 0.9rem; color: var(--text-muted); line-height: 1.45; }
.gb-about-eca a { color: var(--accent); font-weight: 600; }
.gb-sca { margin-top: 8px; font-size: 0.8rem; color: var(--text-dim); }
.gb-verify { padding: 4px 0 0; }
.gb-verify-title { margin: 0; font-size: 1.08rem; font-weight: 700; color: var(--navy); }
.gb-verify .gb-p { margin-top: 6px; }
.gb-verify-wait { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--ice); color: var(--navy); font-size: 0.92rem; font-weight: 600; }
.gb-verify-wait .gb-spinner { width: 16px; height: 16px; color: var(--accent); }
.gb-bar-wrap.is-typing { display: none !important; }
@media (max-width: 959px) { .gb-desk-only { display: none !important; } }

/* ---------- choose the test (/group/?start=1, public/group/group.js pickHtml) ---------- */
.gb-select { appearance: none; -webkit-appearance: none; padding-right: 2.4rem !important; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23546478' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 0.9rem center; }
.gb-style-card.gb-pick-suite { grid-template-columns: minmax(0, 1fr) 26px; min-height: 0; }
.gb-pick-suites { margin-top: 4px; gap: 10px; }
.gb-pick-amount { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; }
.gb-pick-qty { max-width: 220px; }
.gb-pick-cart .gb-p { font-size: 0.93rem; }
.gb-check-row > span { min-width: 0; }
@media (max-width: 600px) {
  .gb-style-card.gb-pick-suite { grid-template-columns: minmax(0, 1fr) 24px; }
}
