/* Keys for the Community 2026 - final results + gallery at /keys-for-the-community/2026.
   A normal page of the community site (Kylen 10/13: the old one-screen dark app looked out of place). It loads after
   /assets/site.css and uses its tokens, sections, hero and cards; body.theme-keys gives the green/gold Keys look.
   The results section stays dark green because the team logos are the on-dark versions (Kylen's 10/12 rules: Vogel,
   Sims, On Target and Lakes Federal on white plates; FOP Lodge 123 with its name). */
.results-page { --rule: rgba(234,243,237,.14); --card-d: rgba(255,255,255,.06); }
.mc { text-transform: none; }

/* ------------------------------------------------------------------ results: winners + leaderboard */
.kr-results .sec-head { margin-bottom: 28px; }
.kr-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: start; }
@media (max-width: 1000px) { .kr-grid { grid-template-columns: minmax(0, 1fr); } }
.kr-fine { margin: 22px 0 0; font-size: 13px; line-height: 1.55; color: #a9c2b2; max-width: 860px; }

.winners { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.win { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 18px; border-radius: var(--r);
       background: var(--card-d); border: 1px solid var(--rule); color: #eaf3ed; }
.win.first { grid-column: 1 / -1; padding: 22px 22px 18px; border-color: rgba(217,179,74,.7);
             background: linear-gradient(135deg, rgba(217,179,74,.2), rgba(255,255,255,.05) 60%); }
.win .place { font-family: var(--cond); font-weight: 800; font-size: 34px; line-height: 1; color: var(--gold); margin-bottom: 6px; }
.win .place sup { font-size: .45em; vertical-align: top; position: relative; top: .25em; margin-left: 1px; }
.win.first .place { font-size: 52px; }
.win .fam { font-family: var(--cond); font-weight: 800; font-size: 21px; line-height: 1.05; text-transform: uppercase; color: #fff; }
.win.first .fam { font-size: clamp(28px, 3vw, 38px); }
.win .team { font-weight: 500; font-size: 14px; line-height: 1.4; color: var(--mint); }
.win .team .sc { font-weight: 700; color: #fff; }
.win .prize { font-weight: 700; font-size: 14px; line-height: 1.45; color: var(--gold); margin-top: 2px; }
.win.first .prize { font-size: 15.5px; max-width: 460px; }
.win .tlogo { position: absolute; top: 16px; right: 16px; height: 30px; width: auto; max-width: 96px; object-fit: contain; }
.win.first .tlogo { top: 22px; right: 22px; height: 44px; max-width: 130px; }
.win:not(.first) .fam, .win:not(.first) .team { padding-right: 0; }
.win .van { width: 100%; max-width: 420px; height: auto; margin: 10px auto -2px; filter: drop-shadow(0 14px 16px rgba(0,0,0,.45)); }
.glow { filter: drop-shadow(0 0 1px rgba(255,255,255,.75)) drop-shadow(0 0 3px rgba(255,255,255,.18)); }
.plate { border-radius: 3px; }

.board { border-radius: var(--r); background: var(--card-d); border: 1px solid var(--rule); overflow: hidden; }
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px 12px; border-bottom: 1px solid var(--rule); }
.board-head h3 { margin: 0; font-size: 22px; font-weight: 800; text-transform: uppercase; color: #fff; }
.board-head .basis { font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--mint); }
.rows { list-style: none; margin: 0; padding: 4px 0; }
.row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 76px 52px; align-items: center; gap: 12px; padding: 8px 20px; min-height: 50px; }
.row + .row { border-top: 1px solid rgba(234,243,237,.07); }
.row .pos { font-family: var(--cond); font-weight: 800; font-size: 19px; color: #a4bbad; text-align: center; }
.row .nm { font-weight: 500; font-size: 15px; line-height: 1.3; color: #eaf3ed; min-width: 0; }
.row .nm small { display: block; font-size: 12.5px; color: var(--mint); margin-top: 1px; }
.row .lg { height: 32px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.row .lg img { max-height: 32px; max-width: 76px; width: auto; height: auto; object-fit: contain; }
.row .lg img + img { max-width: 34px; }
.row .sc { font-family: var(--cond); font-weight: 800; font-size: 22px; color: #fff; text-align: right; }
.row.top { background: rgba(217,179,74,.08); }
.row.r1 { background: rgba(217,179,74,.16); }
.row.top .pos { color: var(--gold); }
.more { display: block; width: calc(100% - 40px); margin: 4px 20px 16px; padding: 12px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35);
        background: transparent; font: 700 14px/1 var(--body); letter-spacing: .04em; text-transform: uppercase; color: #fff; cursor: pointer; }
.more:hover { background: #fff; color: var(--green); }
.rows .note { list-style: none; padding: 10px 20px 12px; font-size: 12.5px; color: #a4bbad; border-top: 1px solid var(--rule); }
@media (max-width: 1000px) { .rows.clip .row:nth-child(n+9), .rows.clip .note { display: none; } }
@media (max-width: 480px) {
  .winners { grid-template-columns: minmax(0, 1fr); }
  .win:not(.first) .fam, .win:not(.first) .team { padding-right: 90px; }
  .win.first .tlogo { height: 36px; max-width: 100px; top: 18px; right: 18px; }
  .row { grid-template-columns: 34px minmax(0, 1fr) 54px 40px; gap: 8px; padding: 8px 14px; }
  .row .nm { font-size: 14px; }
  .row .lg img { max-width: 54px; }
  .row .lg img + img { max-width: 24px; }
  .row .sc { font-size: 20px; }
}

/* ------------------------------------------------------------------ gallery */
.gal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; margin-bottom: 20px; }
.gal-head .count { font-family: var(--body); font-weight: 500; font-size: 15px; color: var(--muted); text-transform: none; letter-spacing: 0; margin-left: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line);
        background: #fff; font: 700 13.5px/1 var(--body); color: var(--ink); cursor: pointer; white-space: nowrap; }
.chip i { font-style: normal; font-weight: 700; font-size: 12px; color: var(--muted); }
.chip:hover { border-color: var(--green-2); }
.chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.chip[aria-pressed="true"] i { color: var(--gold); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gsec { grid-column: 1 / -1; position: sticky; top: var(--head-h); z-index: 2; display: flex; align-items: center; gap: 12px; padding: 16px 0 10px;
        background: linear-gradient(180deg, #fff 78%, rgba(255,255,255,0)); font-family: var(--cond); font-weight: 800; font-size: 14px;
        letter-spacing: .14em; text-transform: uppercase; color: var(--green-2); }
.gsec::after { content: ""; flex: 1; height: 2px; border-radius: 1px; background: rgba(217,179,74,.6); }
.gsec b { color: var(--muted); font-weight: 700; letter-spacing: .04em; }
.tile { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--soft); cursor: zoom-in; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,20,13,.7) 0%, rgba(5,20,13,0) 45%); opacity: 0; transition: opacity .2s ease; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.045); }
.tile:hover::after, .tile:focus-visible::after { opacity: 1; }
.tile:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.tile .play { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; z-index: 1;
              background: rgba(13,43,30,.72); border: 2px solid rgba(255,255,255,.85); display: grid; place-items: center; }
.tile .play svg { width: 20px; height: 20px; margin-left: 3px; fill: #fff; }
.tile .dur { position: absolute; right: 8px; bottom: 8px; z-index: 1; padding: 3px 7px; border-radius: 6px; background: rgba(5,20,13,.78);
             font-weight: 700; font-size: 11.5px; color: #fff; }
.tile .tcap { position: absolute; left: 10px; right: 10px; bottom: 9px; z-index: 1; font-weight: 500; font-size: 13px; line-height: 1.3; color: #fff;
              opacity: 0; transform: translateY(4px); transition: opacity .2s ease, transform .2s ease;
              display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile.v .tcap { right: 60px; }
.tile:hover .tcap, .tile:focus-visible .tcap { opacity: 1; transform: none; }
.grid .note { grid-column: 1 / -1; color: var(--muted); }
@media (max-width: 700px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 2 * var(--gut)); margin: 0 calc(var(--gut) * -1); padding: 0 var(--gut) 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .tile { border-radius: 9px; }
  .tile .tcap { display: none; }
  .tile .play { width: 42px; height: 42px; margin: -21px 0 0 -21px; }
}

/* ------------------------------------------------------------------ lightbox */
.lb { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; grid-template-rows: 60px minmax(0, 1fr) auto;
      background: rgba(4,14,9,.96); color: #eaf3ed; font-family: var(--body); }
.lb[hidden] { display: none; }
.lb img { max-width: none; }
.lb-top { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 22px; }
.lb-count { font-weight: 700; font-size: 13px; letter-spacing: .1em; color: #a4bbad; }
.lb-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
          background: rgba(255,255,255,.06); cursor: pointer; }
.lb-btn:hover { background: rgba(255,255,255,.14); }
.lb-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lb-nav { align-self: center; justify-self: center; }
.lb-stage { grid-column: 2; grid-row: 2; margin: 0; display: grid; place-items: center; min-height: 0; min-width: 0; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: calc(100dvh - 170px); width: auto; height: auto; object-fit: contain; border-radius: 8px;
                                 box-shadow: 0 20px 60px rgba(0,0,0,.5); background: #000; }
.lb-cap { grid-column: 1 / -1; padding: 14px 24px 22px; text-align: center; font-size: 14.5px; line-height: 1.45; }
.lb-cap b { display: block; margin-bottom: 3px; font-family: var(--cond); font-weight: 800; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--mint); }
.lb-cap .cr { display: block; margin-top: 4px; font-size: 12px; color: #a4bbad; }
@media (max-width: 1023px) {
  .lb { grid-template-columns: 0 minmax(0, 1fr) 0; grid-template-rows: 56px minmax(0, 1fr) auto; }
  .lb-nav { position: fixed; bottom: 18px; width: 52px; height: 52px; z-index: 2; }
  .lb-prev { left: 18px; } .lb-next { right: 18px; }
  .lb-stage { padding: 0 8px; }
  .lb-stage img, .lb-stage video { max-height: calc(100dvh - 190px); }
  .lb-cap { padding: 12px 84px 26px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .tile img, .tile::after, .tile .tcap { transition: none; } }
.more[hidden] { display: none; }
