/* BopYear: the shared year picker (see js/bop-year.js).
   Same look in the single-device modal, the Live Together host form and the player app. */
.byp {
    --byp-r: 19px;                       /* thumb radius: rail, ticks and marks are inset by it */
    --byp-span: calc(100% - 2 * var(--byp-r));
    --byp-cyan: #22d3ee;
    --byp-purple: #8b5cf6;
    --byp-pink: #ec4899;
    position: relative;
    width: 100%;
    container-type: inline-size;
    color: #f8faff;
    font-variant-numeric: tabular-nums;
    -webkit-user-select: none;
    user-select: none;
}

/* Readout ------------------------------------------------------------------ */
.byp-readout { display: grid; justify-items: center; gap: .55rem; margin-bottom: 1.1rem; }
.byp-year {
    display: block;
    font-size: clamp(3.6rem, 27cqi, 6.6rem);
    font-weight: 900;
    line-height: .86;
    letter-spacing: -.06em;
    background: linear-gradient(180deg, #ffffff 30%, #c7d2fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 28px rgba(34, 211, 238, .22));
}
.byp.is-bump .byp-year { animation: byp-bump .22s ease-out; }
@keyframes byp-bump { 40% { transform: scale(1.05); } }
.byp-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.6rem;
    padding: .2rem .7rem;
    border-radius: 999px;
    border: 1px solid rgba(103, 232, 249, .26);
    background: rgba(34, 211, 238, .09);
    color: #a5f3fc;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    transition: color .2s, background .2s, border-color .2s;
}
.byp.is-taken .byp-chip { color: #fecdd3; background: rgba(244, 63, 94, .14); border-color: rgba(251, 113, 133, .4); }
.byp.is-taken .byp-year { background: linear-gradient(180deg, #ffe4e6 30%, #fb7185 100%); -webkit-background-clip: text; background-clip: text; }

/* Slider row --------------------------------------------------------------- */
.byp-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) 46px; align-items: center; gap: .6rem; }
.byp-step {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
    color: #fff;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.byp-step svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.byp-step:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); }
.byp-step:active { transform: scale(.93); }
.byp-step:focus-visible { outline: 2px solid #e4b0ff; outline-offset: 2px; }

.byp-track { position: relative; height: 70px; }
.byp-rail {
    position: absolute;
    left: 0; right: 0; top: 17px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4);
}
.byp-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: calc(var(--byp-r) + var(--byp-span) * var(--f));
    border-radius: inherit;
    background: linear-gradient(90deg, var(--byp-cyan), var(--byp-purple) 55%, var(--byp-pink));
    box-shadow: 0 0 16px rgba(139, 92, 246, .45);
}
.byp-marks { position: absolute; inset: 0; }
.byp-marks i {
    position: absolute;
    top: 50%;
    left: calc(var(--byp-r) + var(--byp-span) * var(--f));
    width: 6px; height: 16px;
    border-radius: 3px;
    background: #fb7185;
    box-shadow: 0 0 0 2px rgba(8, 11, 24, .85);
    transform: translate(-50%, -50%);
}

.byp-range {
    position: absolute;
    left: 0; right: 0; top: 3px;
    width: 100%;
    height: 38px;
    margin: 0;
    background: transparent;
    cursor: pointer;
    touch-action: pan-y;
    -webkit-appearance: none;
    appearance: none;
}
.byp-range:focus { outline: none; }
.byp-range::-webkit-slider-runnable-track { height: 38px; background: transparent; border: 0; }
.byp-range::-moz-range-track { height: 38px; background: transparent; border: 0; }
.byp-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: radial-gradient(circle at 35% 30%, #c4b5fd, var(--byp-purple) 70%);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .5), 0 0 0 6px rgba(139, 92, 246, .2);
    transition: transform .18s cubic-bezier(.22, 1.35, .38, 1), box-shadow .18s ease;
}
.byp-range::-moz-range-thumb {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: radial-gradient(circle at 35% 30%, #c4b5fd, var(--byp-purple) 70%);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .5), 0 0 0 6px rgba(139, 92, 246, .2);
}
.byp-range:active::-webkit-slider-thumb { transform: scale(1.12); box-shadow: 0 8px 24px rgba(0, 0, 0, .55), 0 0 0 10px rgba(139, 92, 246, .26); }
.byp-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 8px 22px rgba(0, 0, 0, .5), 0 0 0 4px #e4b0ff; }
.byp-range:focus-visible::-moz-range-thumb { box-shadow: 0 8px 22px rgba(0, 0, 0, .5), 0 0 0 4px #e4b0ff; }
.byp.is-taken .byp-range::-webkit-slider-thumb { background: radial-gradient(circle at 35% 30%, #fecdd3, #f43f5e 70%); }
.byp.is-taken .byp-range::-moz-range-thumb { background: radial-gradient(circle at 35% 30%, #fecdd3, #f43f5e 70%); }

.byp-ticks { position: absolute; left: 0; right: 0; top: 34px; height: 30px; pointer-events: none; }
.byp-tick { position: absolute; top: 0; left: calc(var(--byp-r) + var(--byp-span) * var(--f)); display: grid; justify-items: center; transform: translateX(-50%); }
.byp-tick i { width: 1px; height: 7px; background: rgba(255, 255, 255, .22); }
.byp-tick b { margin-top: 4px; color: rgba(230, 235, 255, .42); font-size: .62rem; font-weight: 800; white-space: nowrap; }
.byp-tick.is-end b { color: rgba(230, 235, 255, .6); }
@container (max-width: 400px) { .byp-tick.is-minor b { display: none; } }

/* Lock-in button: every screen uses this same call to action. */
.byp-lock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    width: 100%;
    min-height: 56px;
    margin-top: 1rem;
    padding: .85rem 1.1rem;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #7c3aed 0%, #9f4fe2 46%, #ec4899 100%);
    box-shadow: 0 14px 34px rgba(124, 58, 237, .32), inset 0 1px 0 rgba(255, 255, 255, .22);
    color: #fff;
    font-size: 1.02rem;
    font-weight: 900;
    letter-spacing: -.01em;
    cursor: pointer;
    transition: transform .13s ease, filter .13s ease, opacity .13s ease;
}
.byp-lock:hover { filter: brightness(1.08); }
.byp-lock:active { transform: scale(.98); }
.byp-lock:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.3); }
.byp-lock:focus-visible { outline: 2px solid #e4b0ff; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
    .byp.is-bump .byp-year { animation: none; }
    .byp-range::-webkit-slider-thumb, .byp-step, .byp-lock { transition: none; }
}

/* Shared heading above the picker (single-device modal + host form). */
.byp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .55rem;
    color: #67e8f9;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.byp-heading { margin: 0 0 1.4rem; color: #fff; font-size: clamp(1.4rem, 5vw, 1.9rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.15; }
.byp-sub { margin: -.9rem 0 1.3rem; color: rgba(230, 235, 255, .6); font-size: .85rem; line-height: 1.45; }
