/* Home page: Fruit Wagers and Community as two slim banners, each with its own look.
   Wagers = a casino table (plum felt, gold trim, falling chips, tier-colored cards).
   Community = an aurora night (teal and sky light, rising chat bubbles, the globe art).
   Layout: title + live line | tabs | open button on the first row, one strip of cards below.
   All motion stops for reduced motion. No inline styles (CSP). */

.home-pair { display: grid; grid-auto-rows: auto; gap: 14px; }
.home-pair > .home-community {
  min-height: 0; padding: 14px 22px 16px; position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto; column-gap: 20px; row-gap: 10px; align-items: center;
}
.home-pair > .home-community .hc-head { display: contents; }
.home-pair > .home-community .hc-head > div { grid-row: 1; grid-column: 1; min-width: 0; }
.home-pair > .home-community .hc-head > .hc-open { grid-row: 1; grid-column: 3; }
.home-pair > .home-community .hc-tabs { grid-row: 1; grid-column: 2; justify-self: start; flex-wrap: nowrap; overflow: hidden; gap: 6px; }
.home-pair > .home-community .hc-panel { grid-column: 1 / -1; flex-direction: row; align-items: stretch; gap: 10px; max-width: none; min-height: 58px; }
.home-pair > .home-community .hc-head h2 { font-size: clamp(1.15rem, 1.7vw, 1.5rem); }
.home-pair > .home-community .hc-live { margin-top: 3px; font-size: .78rem; flex-wrap: nowrap; white-space: nowrap; }
.home-pair > .home-community .hc-tabs a { padding: 7px 11px; font-size: .72rem; white-space: nowrap; gap: 5px; }
.home-pair > .home-community .hc-tabs { min-width: 0; }
.home-pair > .home-community .hc-open { padding: 9px 17px; font-size: .78rem; white-space: nowrap; }

/* the cards in the strip */
.home-pair > .home-community .hc-panel > .hc-item { flex: 1 1 0; min-width: 0; padding: 8px 12px; border: 0; border-radius: 14px; gap: 10px;
  background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09); text-decoration: none; transition: transform .18s, box-shadow .18s; }
.home-pair > .home-community .hc-panel > .hc-item:nth-child(n+3):not(.hc-more) { display: none; }
.home-pair > .home-community .hc-panel > .hc-item:hover { transform: translateY(-2px); }
.home-pair > .home-community .hc-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .86rem; line-height: 1.3; }
.home-pair > .home-community .hc-meta { margin-top: 2px; font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-pair > .home-community .hc-ic { width: 30px; height: 30px; }
.home-pair > .home-community .hc-av { width: 30px; height: 30px; }
.home-pair > .home-community .hc-date { width: 40px; height: 40px; flex: none; }
.home-pair > .home-community .hc-more { flex: none; position: relative; z-index: 2; backdrop-filter: blur(4px); align-self: center; margin: 0 0 0 auto; padding: 8px 14px; border-radius: 99px; white-space: nowrap; font-size: .76rem;
  background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.home-pair > .home-community .hc-empty { align-self: center; margin: 0; flex: 1; }
.home-pair > .home-community .hs-grid { flex: 1; min-width: 0; gap: 8px; }
.home-pair > .home-community .hs-cell { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 2px 10px; padding: 8px 12px; border-radius: 14px; }
.home-pair > .home-community .hs-g3 .hs-cell .hc-ic { margin: 0; flex: none; }
.home-pair > .home-community .hs-g3 .hs-cell b { flex: 1 1 60%; }
.home-pair > .home-community .hs-g3 .hs-cell em { flex: 1 1 100%; padding-left: 40px; margin-top: -10px; }
.home-pair > .home-community .hs-g5 .hs-cell { flex-direction: column; align-items: flex-start; }
.home-pair > .home-community .hs-cell em { font-size: .72rem; line-height: 1.25; }

/* shared light layer: sweep + rising sparks (the spans are in the markup) */
.pn-fx { position: absolute; inset: 2px; z-index: 0; border-radius: 24px; overflow: hidden; pointer-events: none; }
.pn-fx::before { content: ""; position: absolute; top: -40%; bottom: -40%; left: -30%; width: 22%; transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .13), transparent); animation: pn-sweep 7.5s ease-in-out infinite; }
.pn-fx i { position: absolute; bottom: -14px; left: var(--x, 50%); width: var(--s, 6px); height: var(--s, 6px); opacity: 0; animation: pn-rise var(--t, 7s) linear var(--d, 0s) infinite; }
.pn-fx i:nth-child(1) { --x: 8%;  --s: 5px;  --t: 6.5s; --d: -1s; }
.pn-fx i:nth-child(2) { --x: 19%; --s: 8px;  --t: 8.5s; --d: -4s; }
.pn-fx i:nth-child(3) { --x: 31%; --s: 5px;  --t: 7s;   --d: -2.5s; }
.pn-fx i:nth-child(4) { --x: 44%; --s: 9px;  --t: 9s;   --d: -6s; }
.pn-fx i:nth-child(5) { --x: 57%; --s: 6px;  --t: 6.8s; --d: -3s; }
.pn-fx i:nth-child(6) { --x: 68%; --s: 7px;  --t: 8s;   --d: -5s; }
.pn-fx i:nth-child(7) { --x: 79%; --s: 5px;  --t: 7.4s; --d: -.5s; }
.pn-fx i:nth-child(8) { --x: 90%; --s: 8px;  --t: 9.4s; --d: -7s; }
@keyframes pn-sweep { 0%, 55% { left: -30%; } 100% { left: 130%; } }
@keyframes pn-rise { 0% { transform: translateY(0) rotate(0); opacity: 0; } 12% { opacity: .9; } 85% { opacity: .7; } 100% { transform: translateY(-150px) rotate(160deg); opacity: 0; } }
.home-pair > .home-community > :not(.pn-fx):not(.hs-art) { position: relative; z-index: 1; }

/* ============ Community: aurora night ============ */
.home-community:not(.home-stakes).globe-theme { --hc-sky: #7fe0ff; --hc-gold: #ffd477; }
.home-pair > .home-community:not(.home-stakes).globe-theme::before {
  background: linear-gradient(110deg, #7fe0ff, #2f86e0 28%, #3ddcc0 52%, #ffd477 78%, #2f86e0); background-size: 300% 100%;
  animation: pn-border 11s linear infinite; box-shadow: 0 10px 30px rgba(20, 110, 200, .3), 0 0 0 1px rgba(127, 224, 255, .15); }
.home-pair > .home-community:not(.home-stakes).globe-theme::after {
  background:
    linear-gradient(90deg, rgba(4, 16, 32, .97) 0%, rgba(5, 22, 42, .93) 45%, rgba(6, 28, 52, .8) 70%, rgba(6, 28, 52, .6) 100%),
    url("../img/community-bg.webp?v=d83bdc3684") 86% 38% / cover no-repeat,
    linear-gradient(100deg, #04101e, #08243f 60%, #0b3454); box-shadow: inset 0 0 46px rgba(0, 0, 0, .55); }
.home-community:not(.home-stakes) .pn-fx::after { content: ""; position: absolute; inset: -40% -10%; opacity: .55; mix-blend-mode: screen; filter: blur(22px);
  background: radial-gradient(34% 40% at 20% 40%, rgba(61, 220, 192, .35), transparent 70%), radial-gradient(30% 36% at 55% 70%, rgba(47, 134, 224, .4), transparent 70%),
    radial-gradient(26% 34% at 82% 30%, rgba(127, 224, 255, .3), transparent 70%); background-size: 140% 140%; animation: pn-aurora 14s ease-in-out infinite alternate; }
@keyframes pn-aurora { from { background-position: 0% 0%; transform: translateX(-4%); } to { background-position: 100% 60%; transform: translateX(4%); } }
.home-community:not(.home-stakes) .pn-fx i { width: calc(var(--s) * 2.6); height: calc(var(--s) * 1.9); border-radius: 10px 10px 10px 2px;
  border: 1px solid rgba(255, 255, 255, .5); background: linear-gradient(180deg, rgba(127, 224, 255, .65), rgba(47, 134, 224, .4)); box-shadow: 0 0 10px rgba(127, 224, 255, .5); }
.home-community:not(.home-stakes) .pn-fx i:nth-child(3n) { background: linear-gradient(180deg, rgba(255, 212, 119, .7), rgba(244, 185, 66, .35)); box-shadow: 0 0 10px rgba(255, 212, 119, .5); }
.home-community:not(.home-stakes) .pn-fx i:nth-child(4n+1) { border-radius: 10px 10px 2px 10px; }
.home-community:not(.home-stakes) .hc-head h2 { color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .7), 0 0 18px rgba(127, 224, 255, .6); }
.home-community:not(.home-stakes) .hc-head h2 .ic { color: #7fe0ff; filter: drop-shadow(0 0 8px rgba(127, 224, 255, .8)); }
.home-community:not(.home-stakes) .hc-open { background: linear-gradient(180deg, #ffe08f, #f4b942 55%, #d98b17); }
.home-community:not(.home-stakes) .hc-tabs a { background: rgba(127, 224, 255, .08); box-shadow: inset 0 0 0 1px rgba(127, 224, 255, .25); }
.home-community:not(.home-stakes) .hc-tabs a.on { background: linear-gradient(180deg, #a8ecff, #2f9be0); color: #04121f; box-shadow: 0 4px 16px rgba(47, 155, 224, .55); }
.home-pair > .home-community:not(.home-stakes) .hc-panel > .hc-item { background: linear-gradient(100deg, rgba(47, 134, 224, .24), rgba(0, 0, 0, .32) 75%);
  box-shadow: inset 0 0 0 1px rgba(127, 224, 255, .22), 0 6px 18px -10px rgba(47, 155, 224, .8); border-left: 4px solid #7fe0ff; }

/* small screens: stack, but keep it tight */
@media (max-width: 900px) {
  .home-pair > .home-community { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 16px; }
  .home-pair > .home-community .hc-head > div { grid-column: 1; }
  .home-pair > .home-community .hc-head > .hc-open { grid-column: 2; }
  .home-pair > .home-community .hc-tabs { grid-row: 2; grid-column: 1 / -1; overflow-x: auto; }
  .home-pair > .home-community .hc-panel { flex-wrap: wrap; }
  .home-pair > .home-community .hc-panel > .hc-item { flex-basis: 100%; }
  .home-pair > .home-community .hc-live { white-space: normal; }
  .home-pair > .home-community .hs-g3, .home-pair > .home-community .hs-g5 { grid-template-columns: 1fr 1fr; }
  }
@media (prefers-reduced-motion: reduce) {
  .pn-fx::before, .pn-fx::after, .pn-fx i, .home-pair > .home-community::before { animation: none !important; }
  .pn-fx i { opacity: .5; bottom: auto; top: 20%; }
}
