/* Mobile-first quota card. Kept in normal flow so it never covers the page. */
.community-quota {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: calc(16px + var(--safe-top, 0px)) max(var(--page-gutter, 16px), var(--safe-right, 0px)) 0 max(var(--page-gutter, 16px), var(--safe-left, 0px));
}
.quota-card {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border: 1px solid rgba(251, 191, 36, .38);
    border-radius: 22px;
    background: radial-gradient(ellipse at 100% 0%, rgba(251, 191, 36, .10), transparent 65%), #101611;
    box-shadow: 0 12px 44px rgba(0, 0, 0, .24);
}
.quota-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #fbbf24, transparent);
}
.quota-eyebrow, .quota-community, .quota-stats, .quota-remaining, .quota-progress-label, .quota-join {
    display: flex;
    align-items: center;
}
.quota-eyebrow { justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.quota-community { gap: 7px; color: #d5dcce; font-size: 10px; font-weight: 700; letter-spacing: .075em; }
.quota-community i { color: #fbbf24; font-size: 17px; }
.quota-free { padding: 4px 8px; border: 1px solid #25d36640; border-radius: 6px; background: #25d36612; color: #6ee7a0; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.quota-copy h2 { margin: 0; color: #fff; font-size: 21px; font-weight: 700; line-height: 1.25; letter-spacing: -.025em; }
.quota-copy p { margin: 5px 0 0; color: #adb6ae; font-size: 12px; line-height: 1.5; }
.quota-stats { justify-content: space-between; gap: 12px; margin: 13px 0 14px; }
.quota-remaining { gap: 10px; min-width: 0; }
.quota-remaining > strong { position: relative; display: inline-block; overflow: hidden; min-width: 3ch; color: #fbbf24; font-size: 54px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.055em; line-height: 1.08; perspective: 180px; }
.quota-number-current { display: block; }
.quota-number-previous { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.quota-remaining > span { color: #f4ddb0; font-size: 12px; line-height: 1.4; }
.quota-total { flex-shrink: 0; padding-left: 14px; border-left: 1px solid #ffffff1a; text-align: right; }
.quota-total > span { display: block; color: #adb6ae; font-size: 10px; line-height: 1.5; }
.quota-total > strong { display: block; margin-top: 2px; color: #eef5f1; font-size: 20px; font-weight: 700; line-height: 1.2; }
.quota-total small { display: block; color: #adb6ae; font-size: 10px; font-weight: 400; }
.quota-progress-label { justify-content: space-between; gap: 12px; color: #bfc6bc; font-size: 11px; line-height: 1.5; }
.quota-progress-label strong { color: #f4ddb0; font-variant-numeric: tabular-nums; font-weight: 500; }
.quota-progress { height: 7px; margin-top: 6px; overflow: hidden; border-radius: 20px; background: #ffffff12; }
.quota-progress > div { position: relative; overflow: hidden; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e99a24, #fcd56b); transition: width .32s ease-out; }
.quota-progress > div::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, #fff8 50%, transparent 70%); transform: translateX(-110%); }
.quota-note { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 20px; margin: 8px 0 12px; color: #b3baaf; font-size: 10px; line-height: 1.5; }
.quota-delta { flex-shrink: 0; min-width: 62px; padding: 1px 6px; border: 1px solid #fbbf2455; border-radius: 5px; background: #fbbf2418; color: #fcd56b; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; opacity: 0; pointer-events: none; }
.quota-join {
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 50px;
    padding: 12px 10px;
    border: 1px solid #72eda0;
    border-radius: 12px;
    background: #25d366;
    color: #031b0c;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    cursor: pointer;
    box-shadow: 0 5px 20px #25d36620;
    transition: background .2s, box-shadow .2s;
}
.quota-join i:first-child { font-size: 21px; }
.quota-join i:last-child { margin-left: auto; font-size: 16px; }
.quota-join span { margin-right: auto; }
.quota-join:hover { background: #48e080; box-shadow: 0 5px 25px #25d36635; }
.quota-join:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
/* One short, coordinated reaction per decrease; no layout shifts or perpetual flashing. */
.is-quota-changing { animation: quota-card-glow .38s ease-out; }
.is-quota-changing .quota-number-current { animation: quota-number-in .36s cubic-bezier(.2,.7,.3,1); }
.is-quota-changing .quota-number-previous { animation: quota-number-out .30s ease-out; }
.is-quota-changing .quota-delta { animation: quota-delta-float .38s ease-out; }
.is-quota-changing .quota-progress > div::after { animation: quota-progress-sweep .38s ease-out; }
@keyframes quota-card-glow {
    0%, 100% { border-color: rgba(251,191,36,.38); box-shadow: 0 12px 44px rgba(0,0,0,.24); }
    35% { border-color: rgba(251,191,36,.78); box-shadow: 0 0 0 2px #fbbf2412, 0 0 28px #fbbf241a, 0 12px 44px #0004; }
}
@keyframes quota-number-in {
    from { opacity: .2; transform: translateY(85%) rotateX(-35deg); }
    to { opacity: 1; transform: translateY(0) rotateX(0); }
}
@keyframes quota-number-out {
    from { opacity: 1; transform: translateY(0) rotateX(0); }
    to { opacity: 0; transform: translateY(-85%) rotateX(35deg); }
}
@keyframes quota-delta-float {
    0% { opacity: 0; transform: translateY(6px) scale(.94); }
    25%, 65% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-5px) scale(1); }
}
@keyframes quota-progress-sweep { to { transform: translateX(110%); } }
.landing-home > .community-quota + header { padding-top: 28px; }

@media (min-width: 640px) {
    .community-quota { padding-top: calc(24px + var(--safe-top, 0px)); }
    .quota-card { padding: 22px 26px; }
    .quota-eyebrow { margin-bottom: 14px; }
    .quota-community { font-size: 11px; }
    .quota-main { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
    .quota-copy h2 { font-size: clamp(23px, 2.4vw, 30px); }
    .quota-copy p { margin-top: 8px; font-size: 13px; }
    .quota-stats { margin: 0; gap: 22px; }
    .quota-remaining > strong { font-size: 60px; }
    .quota-total { padding-left: 22px; }
    .quota-total small { display: inline; }
    .quota-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; align-items: center; margin-top: 20px; }
    .quota-note { margin-bottom: 0; }
    .quota-join { min-height: 54px; font-size: 14px; }
    .landing-home > .community-quota + header { padding-top: 36px; }
}
@media (max-width: 359px) {
    .quota-card { padding: 14px; border-radius: 18px; }
    .quota-community { font-size: 9px; letter-spacing: .035em; }
    .quota-stats { gap: 8px; }
    .quota-remaining { gap: 7px; }
    .quota-remaining > strong { font-size: 48px; }
    .quota-remaining > span { font-size: 11px; }
    .quota-total { padding-left: 10px; }
    .quota-join { font-size: 12px; gap: 7px; }
}
@media (prefers-reduced-motion: reduce) {
    .is-quota-changing, .is-quota-changing .quota-number-current, .is-quota-changing .quota-number-previous,
    .is-quota-changing .quota-delta, .is-quota-changing .quota-progress > div::after { animation: none; }
    .is-quota-changing .quota-delta { opacity: 1; }
    .quota-progress > div, .quota-join { transition: none; }
}
