:root {
    --bg: #F4F6FB;
    --ink: #101B3A;
    --muted: #5B6784;
    --blue: #2F4BFF;
    --yellow: #FFC93C;
    --red: #D62839;
    --line: #D9DFEC;
    --card: #FFFFFF;
    --font-head: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
    --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

.btn, .card, .card-top, .roster summary, .pickbar, .help-strip, .brand { -webkit-user-select: none; user-select: none; }
.roster-list, .team-name { -webkit-user-select: text; user-select: text; }

.btn { transition: transform .08s ease, background-color .15s ease; }
.btn:active { transform: scale(.97); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 800; margin: 0; line-height: 1; }

a { color: inherit; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.site-header { background: var(--ink); color: #fff; }
.header-row { display: flex; align-items: center; height: 60px; }
.brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--font-head); font-weight: 800; font-size: 1.5rem;
    text-decoration: none;
}
.brand-mark { width: 14px; height: 14px; background: var(--yellow); transform: rotate(45deg); }

.hero { background: var(--ink); color: #fff; padding: 56px 0 64px; }
.hero h1 { font-size: clamp(2.8rem, 9vw, 5.5rem); }
.hero p { max-width: 46ch; margin: 20px 0 28px; color: #C5CCE0; font-size: 1.1rem; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 20px; }
.hero-stat { color: #C5CCE0; font-size: .95rem; }
.hero-stat strong { color: var(--yellow); font-family: var(--font-head); font-size: 1.6rem; margin-right: 4px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 46px; padding: 0 22px;
    background: var(--yellow); color: var(--ink);
    font-weight: 700; font-size: 1rem; text-decoration: none;
    border: 0; border-radius: 10px; cursor: pointer;
}
.btn:hover { background: #F5B918; }
.btn-block { display: flex; width: 100%; }
.btn-off { background: #E6EAF5; color: var(--muted); cursor: default; }
.btn-off:hover { background: #E6EAF5; }

.btn-ghost { background: transparent; border: 1px solid rgba(255, 255, 255, .4); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }

.section-title { font-size: 2rem; margin: 48px 0 20px; }
.empty { padding: 32px 0 64px; color: var(--muted); }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
    padding-bottom: 40px;
    align-items: start;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    display: flex; flex-direction: column;
}
.card:has(.pick:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

.card-top { padding: 20px 20px 22px; }
.card-top h3 { font-size: 1.9rem; margin: 14px 0 10px; }
.when { margin: 0; font-weight: 500; }
.maps { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }

.card-cut { position: relative; border-top: 2px dashed var(--line); }
.card-cut::before, .card-cut::after {
    content: ""; position: absolute; top: -12px;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--bg); border: 1px solid var(--line);
}
.card-cut::before { left: -12px; }
.card-cut::after  { right: -12px; }

.card-bottom { padding: 22px 20px 20px; display: grid; gap: 18px; flex: 1; align-content: start; }

/* Prize pool + Entry fee */
.money {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}
.money > div {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px;
    padding: 14px 10px 16px;
    text-align: center;
}
.money > div + div { border-left: 1px dashed var(--line); }

/* small colored bar on top of each box */
.money > div::before {
    content: "";
    position: absolute; top: 0; left: 50%;
    width: 36px; height: 3px;
    transform: translateX(-50%);
    border-radius: 0 0 4px 4px;
    background: var(--blue);
}
.money > div + div::before { background: var(--yellow); }

.money .label {
    display: block;
    color: var(--muted);
    font-size: .7rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
}
.money strong {
    font-family: var(--font-head);
    font-size: 1.9rem; font-weight: 800; line-height: 1.1;
    color: var(--ink);
}
.money > div:first-child strong { color: var(--blue); }

@media (max-width: 480px) {
    .money > div { padding: 12px 8px 14px; }
    .money .label { font-size: .64rem; }
    .money strong { font-size: 1.6rem; }
}

.meter { height: 8px; background: #E6EAF5; border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--blue); }
.meter-full i { background: var(--red); }
.slots-text { display: block; margin-top: 6px; color: var(--muted); font-size: .88rem; }

.roster { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); overflow: hidden; }
.roster summary {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; cursor: pointer; font-weight: 700; font-size: .95rem;
    list-style: none;
    transition: background-color .15s ease;
}
.roster summary:active { background: #E6EAF5; }
.roster summary:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.roster summary::-webkit-details-marker { display: none; }
.roster summary::after { content: "+"; margin-left: 10px; color: var(--muted); font-weight: 700; }
.roster[open] summary::after { content: "\2212"; }
.roster summary span { flex: 1; }
.roster summary b {
    min-width: 26px; padding: 1px 8px; text-align: center;
    background: var(--blue); color: #fff; border-radius: 99px; font-size: .82rem;
}
.roster-list {
    margin: 0; padding: 4px 14px 10px; list-style: none; counter-reset: team;
    max-height: 220px; overflow-y: auto; border-top: 1px solid var(--line);
}
.roster-list li {
    counter-increment: team;
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .93rem;
}
.roster-list li:last-child { border-bottom: 0; }
.roster-list li::before {
    content: counter(team); flex: none; width: 24px; height: 24px;
    display: grid; place-items: center;
    background: var(--ink); color: #fff; border-radius: 6px;
    font-family: var(--font-head); font-size: .9rem; font-weight: 800;
}
.team-name { flex: 1; font-weight: 500; word-break: break-word; }
.team-type {
    padding: 1px 8px; border: 1px solid var(--line); border-radius: 99px;
    background: var(--card); color: var(--muted); font-size: .76rem; font-weight: 700;
}
.roster-empty { margin: 0; padding: 10px 14px 12px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }

.help-strip {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px;
    margin: 0 0 64px; padding: 26px 28px;
    background: var(--ink); color: #fff;
    border-radius: 16px; border-left: 6px solid var(--yellow);
}
.help-icon {
    width: 52px; height: 52px; display: grid; place-items: center;
    background: var(--yellow); color: var(--ink); border-radius: 50%;
    font-family: var(--font-head); font-size: 2rem; font-weight: 800;
}
.help-strip h3 { font-size: 1.8rem; margin-bottom: 8px; }
.help-strip p { margin: 0; color: #C5CCE0; max-width: 56ch; }
.help-steps {
    display: flex; flex-wrap: wrap; gap: 8px 18px;
    margin: 14px 0 0; padding: 0; list-style: none; counter-reset: s;
    font-size: .88rem; color: #C5CCE0;
}
.help-steps li { counter-increment: s; display: flex; align-items: center; gap: 8px; }
.help-steps li::before {
    content: counter(s); width: 20px; height: 20px; display: grid; place-items: center;
    border: 1px solid var(--yellow); color: var(--yellow); border-radius: 50%;
    font-size: .75rem; font-weight: 700;
}

.chip {
    display: inline-block; padding: 3px 10px;
    border: 1px solid var(--blue); color: var(--blue);
    border-radius: 99px; font-size: .82rem; font-weight: 700;
}
.chip-live { border-color: var(--red); background: var(--red); color: #fff; }
.chip-full { border-color: var(--red); color: var(--red); }

.btn-select { position: relative; text-align: center; user-select: none; }
.btn-select input { position: absolute; opacity: 0; pointer-events: none; }
.btn-select .on-text { display: none; }
.btn-select:has(input:checked) { background: var(--ink); color: var(--yellow); }
.btn-select:has(input:checked) .on-text { display: inline; }
.btn-select:has(input:checked) .off-text { display: none; }
.btn-select:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }

.pickbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--ink); color: #fff;
    border-top: 1px solid rgba(255, 255, 255, .15);
}
.pickbar[hidden] { display: none; }
.pickbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pickbar-info { display: flex; flex-direction: column; gap: 2px; }
.pickbar-info span { font-size: .85rem; color: #C5CCE0; }
.pickbar-actions { display: flex; gap: 8px; }

body:has(.pickbar:not([hidden])) { padding-bottom: 80px; }

.narrow { max-width: 560px; }
.page-title { font-size: 2.4rem; margin: 40px 0 20px; }

.summary {
    display: grid; gap: 2px;
    padding: 16px 18px; margin-bottom: 24px;
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.summary strong { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; }
.summary span { color: var(--muted); font-size: .95rem; }

.form { display: grid; gap: 8px; padding-bottom: 64px; }
.form label { font-weight: 700; margin-top: 10px; }
.form input[type="text"], .form input[type="tel"] {
    width: 100%; min-height: 48px; padding: 0 14px;
    font: inherit; color: var(--ink);
    background: var(--card); border: 1px solid #B7C0D6; border-radius: 10px;
}
.form input:focus { outline: 3px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.form .btn { margin-top: 18px; }

.phone { display: flex; }
.phone span {
    display: flex; align-items: center; padding: 0 14px;
    background: #E6EAF5; border: 1px solid #B7C0D6; border-right: 0;
    border-radius: 10px 0 0 10px; font-weight: 700;
}
.phone input { border-radius: 0 10px 10px 0 !important; }

.hint { margin: 0; color: var(--muted); font-size: .88rem; }
.alert {
    margin: 0 0 8px; padding: 12px 14px;
    background: #FDECEE; color: var(--red);
    border: 1px solid #F3B8BE; border-radius: 10px; font-weight: 500;
}

.notice {
    margin: 0 0 16px; padding: 10px 14px;
    background: #FFF4D6; border: 1px solid #F0D58A; border-radius: 10px;
    font-weight: 500;
}
.status-text { margin: 0 0 24px; color: var(--muted); font-size: 1.05rem; }

.order {
    margin: 0 0 24px; padding: 6px 18px;
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.order > div {
    display: flex; justify-content: space-between; gap: 16px;
    padding: 12px 0; border-bottom: 1px solid var(--line);
}
.order > div:last-child { border-bottom: 0; }
.order dt { color: var(--muted); }
.order dd { margin: 0; font-weight: 500; text-align: right; word-break: break-word; }
.order-total dd { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; }

.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; padding-bottom: 64px; }
.link { font-weight: 700; }

.site-footer {
    margin-top: 48px;
    padding: 48px 0 24px;
    background: var(--ink);
    color: #C5CCE0;
    font-size: .95rem;
}
.site-footer .brand { color: #fff; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 32px;
}
.footer-about p { max-width: 38ch; margin: 14px 0 0; }

.footer-col { display: grid; gap: 8px; align-content: start; }
.footer-col h4 {
    margin: 0 0 4px;
    font-family: var(--font-head);
    font-size: 1.2rem; font-weight: 800; letter-spacing: .02em;
    color: #fff;
}
.footer-col a { color: #C5CCE0; text-decoration: none; }
.footer-col a:hover { color: var(--yellow); text-decoration: underline; }

.footer-bottom {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    margin-top: 36px; padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .85rem; color: #8E99B8;
}
.footer-bottom a { color: #C5CCE0; text-decoration: none; }
.footer-bottom a:hover { color: var(--yellow); }

.stepper {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin: 0 0 22px; padding: 0; list-style: none; counter-reset: st;
}
.stepper li {
    counter-increment: st;
    display: flex; align-items: center; gap: 8px;
    padding: 5px 12px 5px 5px;
    background: var(--card); border: 1px solid var(--line); border-radius: 99px;
    color: var(--muted); font-size: .85rem; font-weight: 700;
}
.stepper li::before {
    content: counter(st); width: 22px; height: 22px;
    display: grid; place-items: center; border-radius: 50%;
    background: #E6EAF5; color: var(--muted); font-size: .78rem;
}
.stepper .is-on { color: var(--ink); border-color: var(--ink); }
.stepper .is-on::before { background: var(--yellow); color: var(--ink); }

.reg { display: grid; gap: 16px; padding-bottom: 64px; }

.panel {
    padding: 20px;
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
}
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.panel-head h2 { flex: 1; font-size: 1.6rem; }
.num {
    width: 28px; height: 28px; display: grid; place-items: center;
    background: var(--ink); color: var(--yellow); border-radius: 8px;
    font-family: var(--font-head); font-size: 1.1rem; font-weight: 800;
}
.count {
    padding: 2px 10px; background: #E6EAF5; border-radius: 99px;
    font-size: .82rem; font-weight: 700;
}

.field { display: grid; gap: 6px; }
.field + .field { margin-top: 18px; }
.field > label { font-weight: 700; }
.field input[type="text"], .field input[type="tel"] {
    width: 100%; min-height: 48px; padding: 0 14px;
    font: inherit; color: var(--ink);
    background: var(--card); border: 1px solid #B7C0D6; border-radius: 10px;
}
.field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(16, 27, 58, .12); }
.field .phone input { flex: 1; min-width: 0; }

.field-note {
    display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px;
    padding: 8px 12px;
    background: #FFF4D6; border: 1px solid #F0D58A; border-radius: 10px;
    font-size: .86rem;
}
.field-note[hidden] { display: none; }
.field-note span { flex: 1; min-width: 190px; }
.link-btn {
    padding: 4px 0; background: none; border: 0; cursor: pointer;
    font: inherit; font-weight: 700; color: var(--ink); text-decoration: underline;
}

.lobby-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.lobby-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
}
.lobby-mark { flex: none; width: 10px; height: 10px; margin: 0 4px; background: var(--yellow); transform: rotate(45deg); }
.lobby-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.lobby-info strong { font-family: var(--font-head); font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.lobby-info span, .lobby-fee span { color: var(--muted); font-size: .85rem; }
.lobby-fee { display: grid; text-align: right; }
.lobby-fee strong { font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; line-height: 1.1; }
.lobby-total {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 12px; padding: 14px 16px;
    background: var(--ink); color: #fff; border-radius: 12px; font-weight: 500;
}
.lobby-total strong { font-family: var(--font-head); font-size: 1.7rem; font-weight: 800; color: var(--yellow); }
.panel-foot { margin: 14px 0 0; font-size: .9rem; }
.lobby-total[hidden], .panel-foot[hidden] { display: none; }

.team-extra {
    margin-top: 18px; padding: 16px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
}
.team-extra-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.team-extra-head strong { font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; }
.opt { color: var(--muted); font-weight: 500; font-size: .85rem; }

.btn-add {
    display: flex; align-items: center; justify-content: center;
    width: 100%; min-height: 46px; margin-top: 18px; padding: 0 16px;
    background: transparent; color: var(--ink);
    border: 2px dashed #B7C0D6; border-radius: 10px;
    font: inherit; font-weight: 700; cursor: pointer;
    transition: transform .08s ease, background-color .15s ease;
}
.btn-add[hidden] { display: none; }
.btn-add:hover { background: var(--bg); }
.btn-add:active { transform: scale(.98); }
.add-hint { margin-top: 8px; }

.stack { display: grid; gap: 16px; margin-bottom: 24px; }
.progress { margin: 0 0 20px; }

.tag {
    display: inline-block; padding: 1px 9px;
    background: var(--card); color: var(--muted);
    border: 1px solid var(--line); border-radius: 99px;
    font-size: .76rem; font-weight: 700; white-space: nowrap;
}
.tag-paid { background: var(--ink); border-color: var(--ink); color: var(--yellow); }
.tag-next { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }

.lobby-row.is-next { background: var(--card); border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.lobby-row.is-paid { opacity: .75; }

.success-page {
    display: flex;
    justify-content: center;
    padding: 8px 0 24px;
}

.success-card {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px 20px 20px;
    display: grid;
    gap: 18px;
    box-shadow: 0 10px 30px rgba(16, 27, 58, .08);
}

.success-hero {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 10px;
}

.success-check-wrap {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #EAF8EF;
    animation: se-pop .5s cubic-bezier(.2, 1.4, .4, 1) both;
}

.success-check { width: 64px; height: 64px; }

.success-check-circle {
    fill: none;
    stroke: #1FA855;
    stroke-width: 4;
    stroke-dasharray: 227;
    stroke-dashoffset: 227;
    animation: se-draw .6s .1s ease forwards;
}

.success-check-mark {
    fill: none;
    stroke: #1FA855;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: se-draw .4s .6s ease forwards;
}

.success-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #EAF8EF;
    color: #14803F;
    border: 1px solid #BFE8CD;
    border-radius: 99px;
    font-size: .82rem;
    font-weight: 700;
}

.success-title {
    font-size: clamp(1.9rem, 7vw, 2.4rem);
    word-break: break-word;
}

.success-subtext {
    margin: 0;
    color: var(--muted);
    font-size: .95rem;
}

.success-subtext strong { color: var(--ink); }

.success-divider {
    height: 0;
    border-top: 2px dashed var(--line);
}

.success-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    background: #FFF4D6;
    border: 1px solid #F0D58A;
    border-left: 5px solid var(--yellow);
    border-radius: 12px;
    font-size: .92rem;
    line-height: 1.45;
}

.success-notice-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    background: var(--yellow);
    color: var(--ink);
    border-radius: 50%;
}

.success-action-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.share-button,
.copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 18px;
    font: inherit;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: transform .08s ease, background-color .15s ease;
    -webkit-user-select: none;
    user-select: none;
}

.share-button:active,
.copy-button:active { transform: scale(.97); }

.share-button {
    background: var(--yellow);
    color: var(--ink);
    border: 0;
}

.share-button:hover { background: #F5B918; }

.copy-button {
    background: var(--card);
    color: var(--ink);
    border: 2px solid var(--ink);
}

.copy-button:hover { background: var(--bg); }

.success-receipt {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 6px 16px 8px;
}

.receipt-heading {
    padding: 12px 0 8px;
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 800;
    border-bottom: 1px solid var(--line);
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 12px 0;
    background: none;
    border: 0;
    font: inherit;
    color: var(--ink);
    text-align: left;
}

.receipt-row > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: .9rem;
}

.receipt-row > strong {
    font-weight: 700;
    text-align: right;
    word-break: break-word;
}

.receipt-amount {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 800;
}

.receipt-divider { border-top: 1px dashed var(--line); }

.receipt-row-button { cursor: pointer; }
.receipt-row-button:active { opacity: .7; }

.payment-id-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink) !important;
}

.payment-id-value strong {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .95rem;
    letter-spacing: .02em;
}

.success-lobbies-section { display: grid; gap: 12px; }

.lobbies-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 800;
}

.lobbies-count {
    padding: 1px 10px;
    background: var(--blue);
    color: #fff;
    border-radius: 99px;
    font-family: var(--font-body);
    font-size: .82rem;
    font-weight: 700;
}

.success-lobby-list { display: grid; gap: 12px; }

.success-lobby-item {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 5px solid var(--blue);
    border-radius: 12px;
    animation: se-rise .45s ease both;
}

.success-lobby-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.success-lobby-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--ink);
    color: var(--yellow);
    border-radius: 8px;
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.2;
}

.lobby-fee-tag {
    padding: 2px 10px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: var(--bg);
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
}

.success-lobby-meta {
    display: grid;
    gap: 8px;
    font-size: .92rem;
}

.success-lobby-meta span {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--ink);
    word-break: break-word;
}

.success-lobby-meta svg { margin-top: 3px; color: var(--muted); }

.community-join-button,
.back-home-button {
    text-decoration: none;
    box-sizing: border-box;
}

.community-join-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 16px;
    background: #1FA855;
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-weight: 700;
    text-align: center;
    transition: transform .08s ease, background-color .15s ease;
}

.community-join-button:hover { background: #178F47; }
.community-join-button:active { transform: scale(.98); }

.community-join-button.is-disabled {
    background: #E6EAF5;
    color: var(--muted);
    cursor: default;
    opacity: 1;
}

.community-join-button.is-disabled:hover { background: #E6EAF5; }
.community-join-button.is-disabled:active { transform: none; }

.back-home-button {
    display: block;
    padding: 12px;
    text-align: center;
    color: var(--ink);
    font-weight: 700;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.back-home-button:hover { background: var(--bg); }

.success-notice-icon svg,
.receipt-row span svg,
.success-lobby-meta svg,
.success-lobby-badge svg,
.share-button svg,
.copy-button svg {
    flex-shrink: 0;
    display: block;
}

@keyframes se-draw { to { stroke-dashoffset: 0; } }

@keyframes se-pop {
    from { transform: scale(.4); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes se-rise {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 720px) {
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .help-strip { grid-template-columns: 1fr; gap: 16px; padding: 22px 20px; }
    .help-strip .btn { width: 100%; }
}

@media (max-width: 480px) {
    .hero { padding: 40px 0 48px; }
    .section-title { margin-top: 36px; }
    .pickbar-in { flex-wrap: wrap; }
    .pickbar-actions { width: 100%; }
    .pickbar-actions .btn { flex: 1; }
    .success-card { padding: 20px 14px 16px; }
    .success-action-row { grid-template-columns: 1fr; }
    .receipt-row { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
    .success-check-wrap,
    .success-check-circle,
    .success-check-mark,
    .success-lobby-item { animation: none; stroke-dashoffset: 0; }
}

.hist-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 40px 0 20px;
}

.hist-head h1 { font-size: 2.4rem; }

.hist-list { display: grid; gap: 16px; margin-bottom: 8px; }

.hist-item { padding: 18px; }
.hist-item.is-past { border-left-color: #B7C0D6; }
.hist-item.is-past .success-lobby-badge { background: var(--muted); color: #fff; }

.hist-tags {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

.hist-pid {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .02em;
}

.hist-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.hist-actions .share-button,
.hist-actions .copy-button { min-height: 44px; padding: 0 12px; }

.team-info {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 1px;
}

.team-info .team-name { flex: none; }

.team-meta {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 500;
}

.verified {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1FA855;
}

.verified svg { display: block; }

.slot-summary {
    margin: 0;
    padding: 10px 14px 4px;
    color: var(--muted);
    font-size: .85rem;
    border-top: 1px solid var(--line);
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 6px;
    padding: 8px 14px 10px;
}

.slot {
    display: grid;
    place-items: center;
    min-height: 38px;
    padding: 0;
    background: var(--card);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 800;
    cursor: default;
}

button.slot { font-family: var(--font-head); }
button.slot.is-free { cursor: pointer; border-color: #B7C0D6; }
button.slot.is-free:hover { border-color: var(--ink); background: var(--bg); }
button.slot.is-free:active { transform: scale(.94); }

.slot.is-taken { background: var(--ink); border-color: var(--ink); color: #fff; }

.slot.is-locked {
    background: repeating-linear-gradient(45deg, #E6EAF5, #E6EAF5 4px, #F4F6FB 4px, #F4F6FB 8px);
    color: var(--muted);
}

.slot.is-mine { background: var(--yellow); border-color: var(--ink); color: var(--ink); }

.slot-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 0 14px 12px;
    color: var(--muted);
    font-size: .78rem;
}

.slot-legend i {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 5px;
    vertical-align: -2px;
    background: var(--card);
    border: 1px solid #B7C0D6;
    border-radius: 4px;
}

.slot-legend i.is-taken { background: var(--ink); border-color: var(--ink); }
.slot-legend i.is-mine { background: var(--yellow); border-color: var(--ink); }
.slot-legend i.is-locked {
    background: repeating-linear-gradient(45deg, #E6EAF5, #E6EAF5 2px, #F4F6FB 2px, #F4F6FB 4px);
    border-color: var(--line);
}

.slot-box {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.slot-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
}

.slot-badge {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-weight: 700;
}

.slot-badge b {
    padding: 2px 10px;
    background: var(--yellow);
    color: var(--ink);
    border-radius: 8px;
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 800;
}

.slot-who {
    max-width: 160px;
    overflow: hidden;
    color: var(--muted);
    font-size: .88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slot-pop { background: var(--card); border-top: 1px solid var(--line); }
.slot-pop[hidden] { display: none; }
.slot-pop .alert { margin: 0 14px 12px; }
.alert[hidden] { display: none; }

/* ---- favorite slot picker (register page) - append at the end of your CSS ---- */
.pref-box { display: grid; gap: 10px; }

.pref-lobby {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.pref-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
}

.pref-title {
    min-width: 0;
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pref-now { margin-right: 10px; color: var(--muted); font-size: .88rem; }

.pref-pop { border-top: 1px solid var(--line); background: var(--card); }
.pref-pop[hidden] { display: none; }

.pref-note { margin: 4px 0 0; }

/* Add to your main stylesheet */

/* Match schedule */
.sched {
    position: relative;
    margin: 0; padding: 0;
    background: var(--bg);
    border: 1px solid var(--line);
    border-left: 4px solid var(--yellow);
    border-radius: 12px;
    overflow: hidden;
}
.sched::before {
    content: "MATCH SCHEDULE";
    display: block;
    padding: 8px 14px;
    background: #E6EAF5;
    color: var(--muted);
    font-size: .68rem; font-weight: 700; letter-spacing: .1em;
}
.sched > div {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    border-top: 1px dashed var(--line);
}
.sched > div:first-child { border-top: 0; }

.sched dt {
    flex: none;
    min-width: 52px; padding: 2px 10px;
    text-align: center;
    border: 1px solid var(--blue); border-radius: 99px;
    background: rgba(47, 75, 255, .08); color: var(--blue);
    font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.sched > div:nth-of-type(2) dt {
    border-color: #E0A800;
    background: rgba(255, 201, 60, .22);
    color: #7A5B00;
}

.sched dd {
    margin: 0; min-width: 0;
    color: var(--muted);
    font-size: .86rem; font-weight: 400;
    word-break: break-word;
}

@media (max-width: 480px) {
    .sched > div { padding: 8px 12px; gap: 10px; }
    .sched::before { padding: 7px 12px; font-size: .64rem; }
    .sched dt { min-width: 46px; font-size: .64rem; }
    .sched dd { font-size: .78rem; }
}

/* IDP trust line */
.idp-note { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 10px;
            border-radius: 10px; font-size: 13px; background: rgba(34,197,94,.12); color: #22c55e; }
.idp-note svg { flex: none; }
.idp-note strong { font-weight: 700; }

/* Support link in help strip */
.help-support { margin-top: 10px; font-size: 14px; }
.help-support a { font-weight: 700; text-decoration: underline; }

/* Floating WhatsApp button */
.wa-float {
    position: fixed; right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 40;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-radius: 999px;
    background: #25d366; color: #fff;
    font-weight: 700; font-size: 14px; text-decoration: none;
    box-shadow: 0 6px 18px rgba(0,0,0,.35);
    transition: bottom .2s ease;
}

/* When the selection bar is open, lift the button above it */
body:has(.pickbar:not([hidden])) .wa-float { bottom: 88px; }

@media (max-width: 480px) {
    /* the bar wraps to two rows on phones, so it is taller */
    body:has(.pickbar:not([hidden])) .wa-float { bottom: 132px; }
}