/* ==== CHALLENGE LINKS FOR EVERY MODE (18 Nov 2026, challenge_links.js) =======
   The way in at /c/CODE — the site's .modal, one box — and on every mode's end
   card a slot (.cl-slot) with the link's board and Challenge a friend. The
   board and the button are Atless's pieces (.alp-board, .cap-btn), in the
   green the owner picked for a link's board in the light theme (17 Nov 2026:
   "A · Green"), so a challenge looks the same in every mode.
   Each line in the box is scoped under .cl-modal: base.css's .modal p
   (margins, muted colour) outranks a bare class. */
.cl-modal{max-width:420px;text-align:center}
.cl-modal .cl-door-cap{margin:2px 30px 8px;font:800 10.5px/1.35 var(--mono);letter-spacing:.14em;
  text-transform:uppercase;color:var(--text-muted)}
.cl-modal .cl-door-h{margin:0 0 10px;font:900 24px/1.15 var(--display);color:var(--text)}
.cl-modal .cl-door-p{margin:0 auto 10px;max-width:34ch;font-size:14.5px;line-height:1.45;color:var(--text-soft)}
.cl-modal .cl-door-who{margin:0 0 12px;font-size:13px;font-weight:700;color:var(--text-muted)}
.cl-modal .cl-door-name{display:block;width:100%;margin:6px 0 0;text-align:center}
.cl-modal .cl-door-msg{margin:12px 0 0;color:var(--rust-text);font-size:13.5px;font-weight:700;line-height:1.4}
.cl-modal .cl-door-msg:empty{display:none}
.cl-modal .cl-door-signin{margin:12px 0 0;font-size:13px;line-height:1.4;color:var(--text-muted)}
.cl-modal .cl-door-signin a{color:var(--text);font-weight:800;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.cl-modal .cl-door-go{display:block;width:100%;min-height:48px;margin-top:18px}
.cl-modal .cl-door-board{text-align:left}
.cl-modal .cl-door-board .cl-door-cap{text-align:center}
/* the end card's slot */
.cl-slot{text-align:left}
.cl-slot:empty{display:none}
.cl-board-wrap{margin:18px 0 0}
.cl-board-wrap .cl-boardh{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;margin:0 0 10px}
.cl-make{display:flex;align-items:center;justify-content:center;width:100%;min-height:46px;margin-top:14px}
.cl-make[hidden]{display:none}
/* THE BUTTONS AT THE END OF A ROUND (23 Nov 2026). The owner: "Bring this down
   to 2 buttons 'share result' and 'challenge a friend', both in green". The
   site's standard button, the same lime in both themes: the light theme's
   standard is navy, so its colours are set back here, as Atless's card has
   them. Unlimited's and Higher or Lower's Play again, and a played day's Play
   this one again, stand with them.
   .end-ways HOLDS THEM, with the panels they open. On a phone, one under the
   other. ON A COMPUTER (the owner, 23 Nov 2026: "shorten the 'share result' and
   'challenge a friend' buttons and put them next to each other ... If there are
   modes with one other button, leave that one on its own row underneath. If
   there are modes with two other buttons, put the two of them underneath next
   to each other on one row"): those two share the first row; what they open
   comes under them; and the others share the row after, one alone taking it
   whole. The slot draws its children as the row's (display:contents), because
   Challenge a friend is the slot's button and its link and board are not. */
button.cap-btn.end-btn{display:flex;width:100%;min-height:46px}
button.cap-btn.end-btn[hidden]{display:none}
.end-ways{display:flex;flex-direction:column;gap:10px}
.end-ways > :empty,.end-ways > .cl-slot > .cl-made-slot:empty{display:none}
.end-ways > .cl-slot{display:contents}
.end-ways > .cl-slot > .cl-make,.end-ways > .fav-next{margin-top:0}
@media (min-width:701px){
  .end-ways{flex-direction:row;flex-wrap:wrap}
  .end-ways > *,.end-ways > .cl-slot > *{order:2;flex:1 1 100%;min-width:0}
  .end-ways > .end-share,.end-ways > .cl-slot > .cl-make{order:1;flex:1 1 calc(50% - 5px);width:auto}
  .end-ways > .end-btn:not(.end-share),.end-ways > .fav-next{order:3;flex:1 1 calc(50% - 5px);width:auto}
  /* No Share result (Higher or Lower): Challenge a friend has the first row to
     itself, and Play again is the row under it, as on every other card. */
  .end-ways:not(:has(> .end-share)) > .cl-slot > .cl-make{flex-basis:100%}
}
.cl-made{margin-top:10px;text-align:center}
.cl-made .cl-linkbox{margin:10px 0 2px}
.cl-made .cl-linkbox .alp-input{width:100%;font-size:14px;padding:11px 12px}
.cl-made .share-actions > *{flex:1 1 0;width:100%}
.cl-ask{margin-top:12px;text-align:left}
.cl-ask .cl-join{display:flex;align-items:stretch;gap:10px}
.cl-ask .cl-join .alp-input{flex:1 1 auto;width:auto;min-width:0;height:46px;margin:0;font-size:16px;padding:0 14px}
/* Make link ends where the box ends, as in the pop-up (the owner, 23 Nov 2026):
   the row gives it the box's height, less the 4px its lip hangs under it. */
.cl-ask .cl-join .gg-go{flex:none;width:auto;min-height:0;margin:0 0 4px;padding:0 19px;white-space:nowrap}
/* the board's names whole (atless.css: padded clear of their clip) */
.cl-board .alp-row .n .nm{padding:4px;margin:-4px}

/* ==== DRAFTS TO PICK FROM (18 Nov 2026, challenge_links.js clDraft) ==========
   TEMPORARY: the live board after a Gauntlet's round (?live=a|b|c), the Round
   complete popup with Challenge a friend on it (?rc=a|b|c), and the end card
   with the score and Challenge a friend on it (?end=a|b|c). Once the owner
   picks, the others go. */

/* ---- the live board after a round ---- */
.cl-live-top:empty,.cl-live-mid:empty,.cl-live-foot:empty{display:none}
.cl-live{text-align:left}
.cl-live-rank{flex:none;margin-left:auto;font:900 13px/1 var(--display);color:var(--text);white-space:nowrap}
/* A: the link's board, under the round's own */
.cl-live-foot{margin:18px 0 16px}
.cl-live-card .cl-boardh{display:flex;align-items:baseline;gap:8px;margin:0 0 10px}
.cl-live-card .cl-live-d{font:800 12.5px/1 var(--display);opacity:.72;text-align:right;white-space:nowrap}
/* B: one line over the round */
.cl-live-top{margin:0 0 12px}
.cl-live-strip{padding:10px 12px 12px;border-radius:14px;background:var(--quiet-face);box-shadow:0 4px 0 var(--quiet-lip)}
.cl-strip-h{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;margin:0 0 9px;font-size:12.5px;font-weight:700;color:var(--text-muted)}
.cl-strip-h .cl-live-rank{margin-left:0;order:-1;font-size:15px}
.cl-strip-row{display:flex;gap:7px;overflow-x:auto;padding:0 0 5px;scrollbar-width:none}
.cl-strip-row::-webkit-scrollbar{display:none}
.cl-chip{flex:none;display:inline-flex;align-items:baseline;gap:6px;padding:8px 11px;border-radius:11px;
  background:var(--sheet-2,rgba(255,255,255,.7));box-shadow:0 3px 0 var(--quiet-lip);font:800 13px/1 var(--display);color:var(--text)}
html[data-theme="light"] .cl-chip{background:#fff}
.cl-chip .r{opacity:.55;font-size:11.5px}
.cl-chip .s{opacity:.8;font-weight:700}
.cl-chip.is-me{background:#B8E62B;color:#253A8F;box-shadow:0 3px 0 #4E7A16}
.cl-chip.is-me .s{opacity:1}
.cl-chip.is-behind{opacity:.62}
/* C: the race, under the round's score */
.cl-live-mid{margin:14px 0 16px}
.cl-live-race{padding:12px 14px 10px;border-radius:14px;background:#B8E62B;color:#253A8F;box-shadow:0 4px 0 #4E7A16}
.cl-race-h{display:flex;align-items:baseline;gap:8px;margin:0 0 8px;font:800 12px/1.3 var(--mono);letter-spacing:.06em;text-transform:uppercase}
.cl-race-h .cl-live-rank{color:inherit;font-size:14px;letter-spacing:0;text-transform:none}
.cl-race-row{display:grid;grid-template-columns:18px 74px 1fr 98px;align-items:center;gap:10px;
  padding:6px 0;border-top:1px solid rgba(37,58,143,.16);font:800 14px/1.2 var(--display)}
.cl-race-row .r{opacity:.6;font-size:12px}
.cl-race-row .n{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cl-race-row .bar{height:10px;border-radius:6px;background:rgba(37,58,143,.14);overflow:hidden}
.cl-race-row .bar i{display:block;height:100%;border-radius:6px;background:rgba(37,58,143,.45)}
.cl-race-row.is-me .bar i{background:#253A8F}
.cl-race-row .s{text-align:right;white-space:nowrap}
.cl-race-row .s small{font-size:11.5px;opacity:.7;margin-left:3px}
.cl-race-row.is-behind{opacity:.6}
.cl-race-row .alp-badge{font-size:9.5px}


/* ---- the end card: the score's squares on it, and Challenge a friend ---- */
.cl-end-grid{margin:12px 0 2px;font-size:22px;line-height:1.2;letter-spacing:3px;text-align:center}
.cl-end .cl-end-make{margin:10px 0 0}
.cl-end .cl-end-make > .cl-make{margin-top:0;width:100%}
.cl-end .cl-end-make > .gg-stand.cl-make{min-height:48px}
/* B: the score card, its two buttons the popup's */
.cl-end-b .cl-scorecard{margin:6px 0 20px;padding:20px 16px 18px;border-radius:18px;background:var(--quiet-face);
  box-shadow:0 4px 0 var(--quiet-lip);text-align:center}
.cl-end-b .cl-score-actions{display:flex;gap:10px;margin-top:16px}
.cl-end-b .cl-score-actions > button{flex:1 1 0;width:auto;min-width:0;min-height:50px;margin:0;padding:10px 8px;
  font-size:14.5px;line-height:1.15;white-space:normal}
.cl-end-b .cl-score-actions > .cl-make[hidden]{display:none}
.cl-end-b .cl-made{margin-top:12px;text-align:center}
/* C: the score on one side, the challenge on the other (stacked on a phone) */
.cl-end-c .cl-end-cols{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;margin-bottom:18px}
.cl-end-c .cl-end-cols > *{min-width:0}
@media (min-width:760px){
  /* the two side by side need the room the site's wide card has (gauntlet.css .gg-wrap.wide) */
  .gg-wrap:has(> .cl-end-c){max-width:1010px}
  .cl-end-c .cl-end-cols{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:28px}
  .cl-end-c > .gg-go,.cl-end-c > .gg-stand,.cl-end-c > #ggShareSlot{max-width:608px;margin-left:auto;margin-right:auto}
}
.cl-end-c .cl-end-chal{padding:16px 16px 18px;border-radius:18px;background:var(--quiet-face);box-shadow:0 4px 0 var(--quiet-lip)}
.cl-end-c .cl-end-chal .cl-end-make{margin:0}
.cl-end-c .cl-end-chal .cl-make{min-height:52px;font-size:16px}
.cl-end-c .cl-end-chal .cl-board-wrap{margin-top:16px}

/* THE NEW! POP-UP WITH THE PLAYER'S LINK IN IT (20 Nov 2026,
   challenge_links.js clPopHtml): Atless's pop-up (atless.css .alch-pop), the
   card's link box between its steps and Got it!. Outside #alScreen like the
   pop-up itself, so scoped to its box. */
.al-modal-chlpop .alch-pop-link-t{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.al-modal-chlpop .cl-pop-area{margin-top:18px;text-align:left}
.al-modal-chlpop .cl-pop-box{margin:0;padding:12px}
.al-modal-chlpop .cl-pop-url{width:100%;font-size:13px}
.al-modal-chlpop .cl-pop-actions{display:flex;gap:8px;margin-top:10px}
.al-modal-chlpop .cl-pop-actions > button{flex:1}
.al-modal-chlpop .cl-pop-copy:disabled,.al-modal-chlpop .cl-pop-sheet:disabled{opacity:.6;cursor:default}
/* A GUEST'S NAME FOR THE LINK, first. MAKE LINK ENDS WHERE THE BOX ENDS (the
   owner, 23 Nov 2026: "the 'make link' button should not extend down past the
   'your name' box"): the row gives it the box's height, less the 4px its lip
   hangs under it. The box loses the margin every .modal input has, which
   made the row, and so the button, 10px taller than the box. */
.al-modal-chlpop .cl-pop-name{display:flex;align-items:stretch;gap:8px}
.al-modal-chlpop .cl-pop-name .alp-input{flex:1;min-width:0;margin:0}
.al-modal-chlpop .cl-pop-name-go{flex:none;min-height:0;margin:0 0 4px;padding-top:0;padding-bottom:0;white-space:nowrap}
.al-modal-chlpop .cl-pop-msg{margin-top:6px;font-size:12.5px;color:var(--red, #b42318)}
.al-modal-chlpop .cl-pop-msg:empty{display:none}
/* after its Got it!, the card's Challenge a friend glows twice: Atless's
   alch-lit (atless.css) */
.cl-slot .cl-make.alch-lit{animation:alch-lit 1.2s ease-out 2}
@media (prefers-reduced-motion:reduce){
  .cl-slot .cl-make.alch-lit{animation:none;outline:3px solid #B8E62B;outline-offset:3px}
}
