/* A Set Builder set's own binder on the Childhood Binder page (/tools/childhood-binder/?set=<id>: chase/set-binder.js and
   chase/set-binder-photos.js). Loaded only in a build with CHASES=on. Site tokens only, both stocks, no new font. Every
   press target is at least 48 px; nothing moves under prefers-reduced-motion. */

/* the parts of the page that belong to the person's own binder, put away while a set's binder is open */
.bind--set .bind__name, .bind--set .bind__keep, .bind--set #bind-lists, .bind--set #bind-share, .bind--set #bind-who,
.bind--set #bind-pic, .bind--set .bind__own, .bind--set .bind__sections { display: none !important; }   /* #bind-pic: Share a picture (SHARE_PICTURES), the own cards' picture */
.bind--set .bind__count { white-space: normal; }

/* the line above the binder: the set, how far along, and the two ways to add photos */
.bind__set[hidden] { display: none; }
.bset-bar { display: grid; gap: 6px; margin: 0 0 18px; padding: 16px 18px; border: 1.5px solid var(--line-2); border-left: 4px solid var(--teal); background: var(--stock-2); }
.bset-bar p { margin: 0; }
.bset-bar__k { color: var(--ink-3); }
.bset-bar__name { font: 700 clamp(1.35rem, 2.4vw, 1.8rem)/1.15 var(--display); overflow-wrap: anywhere; }
.bset-bar__line { color: var(--ink-2); max-width: 52em; line-height: 1.45; }
.bset-bar__do { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 8px; }
.bset-bar__do .btn[hidden] { display: none; }
.bset-bar__go { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; }
.bset-bar__go .link { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; color: var(--ink); }
@media (max-width: 520px) { .bset-bar__do .btn { flex: 1 1 100%; } }

/* the pocket of a card still needed: empty, with its number and name, the way a set builder leaves the space */
.bp--need { cursor: default; }
.bp__need { position: absolute; left: 2%; top: 1.4%; width: 96%; height: 97.4%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3em;
  padding: 8% 6%; border: 1.5px dashed rgba(174, 182, 188, .55); color: rgba(174, 182, 188, .9); text-align: center; overflow: hidden;
  font: 700 .6rem/1.15 var(--display); font: 700 clamp(.5rem, 2.3cqw, .8rem)/1.15 var(--display); }
.bp__need b { display: block; font-size: 2.2em; line-height: 1; color: rgba(174, 182, 188, .95); }
.bp__need span { overflow-wrap: anywhere; }
.bp__need i { margin-top: .4em; padding: .35em .55em; background: #16A7B8; color: #080B0D; font: 800 .5rem/1 var(--sans); font: 800 clamp(.42rem, 1.5cqw, .56rem)/1 var(--sans); font-style: normal; letter-spacing: .12em; text-transform: uppercase; }
.bp--coming .bp__need { border-style: solid; border-color: rgba(22, 167, 184, .7); }

/* ---------- Add photos of a stack (set-binder-photos.js) ---------- */
.sbp { width: min(980px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); margin: auto; padding: 0; border: 1px solid var(--line-2); background: var(--stock); color: var(--ink); overflow: hidden; }
.sbp::backdrop { background: rgba(8, 11, 13, .72); }
.sbp[open] { display: flex; flex-direction: column; }
.sbp__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.sbp__top h2 { margin: 2px 0 0; font: 700 clamp(1.3rem, 2.6vw, 1.7rem)/1.15 var(--display); outline: none; }
.sbp__top .label { margin: 0; color: var(--ink-3); }
.sbp__x { flex: none; width: 48px; height: 48px; border: 1px solid var(--line-2); border-radius: 50%; background: none; color: var(--ink); font: 400 1.6rem/1 var(--sans); cursor: pointer; }
.sbp__body { flex: 1 1 auto; overflow: auto; padding: 16px 20px 0; overscroll-behavior: contain; }
.sbp__body > * + * { margin-top: 14px; }
.sbp__p { margin: 0; color: var(--ink-2); line-height: 1.5; max-width: 46em; }
.sbp__say { margin: 0; min-height: 1.4em; font-weight: 700; }
.sbp__say.is-bad { color: var(--ink); border-left: 3px solid var(--ink); padding-left: 10px; }
.sbp__pick { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.sbp__file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip-path: inset(50%); }
.sbp__strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sbp__strip li { position: relative; width: 64px; }
.sbp__strip img { display: block; width: 64px; height: 64px; object-fit: cover; border-radius: 0; }
.sbp__strip li[data-state="reading"] img { opacity: .55; }
.sbp__strip li[data-state="bad"] img { outline: 2px dashed var(--ink); outline-offset: -2px; opacity: .45; }
.sbp__strip small { display: block; font: 700 .7rem/1.2 var(--sans); color: var(--ink-3); text-align: center; margin-top: 2px; }
.sbp__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.sbp__card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 14px; padding: 12px; border: 1.5px solid var(--line-2); background: var(--stock); }
.sbp__card[data-kind="sure"] { border-color: var(--ink-3); }
.sbp__card[data-kind="sure"]:has(input[type="checkbox"]:checked) { border-color: var(--teal); box-shadow: inset 4px 0 0 var(--teal); }
.sbp__card[data-kind="unsure"] { border-style: dashed; border-color: var(--ink); }
.sbp__card[data-kind="stranger"] { border-style: dotted; }
.sbp__card[data-kind="dup"] { background: var(--stock-2); }
.sbp__pic { grid-row: span 2; width: 64px; aspect-ratio: 5 / 7; background: var(--stock-3); overflow: hidden; }
.sbp__pic img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.sbp__what { min-width: 0; }
.sbp__t { margin: 0; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.sbp__s { margin: 3px 0 0; color: var(--ink-2); font-size: .95rem; overflow-wrap: anywhere; }
.sbp__card[data-kind="unsure"] .sbp__s { color: var(--ink); font-weight: 700; }
.sbp__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 16px; min-width: 0; }
.sbp__check { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; font-weight: 700; cursor: pointer; }
.sbp__check input, .sbp__opt input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--teal); }
.sbp__opts { flex: 1 1 100%; display: grid; gap: 2px; margin: 4px 0 0; padding: 6px 0 0; border: 0; border-top: 1px dashed var(--line-2); min-width: 0; }
.sbp__opts legend { padding: 0; font-weight: 800; }
.sbp__opt { display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; overflow-wrap: anywhere; }
.sbp__textlink { min-height: 48px; padding: 0; border: 0; background: none; color: var(--ink); font: 700 .95rem/1.2 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sbp__pickbox { display: grid; gap: 8px; flex: 1 1 100%; }
.sbp__pickbox input { width: 100%; min-height: 48px; }
.sbp__hits { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sbp__hit { width: 100%; min-height: 48px; padding: 8px 12px; border: 1.5px solid var(--line-2); background: var(--stock); color: var(--ink); text-align: left; font: inherit; cursor: pointer; overflow-wrap: anywhere; }
.sbp__hit:hover, .sbp__hit:focus-visible { border-color: var(--ink); }
.sbp__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 20px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); background: var(--stock); }
.sbp__foot .sbp__say { flex: 1 1 14em; }
@media (max-width: 560px) { .sbp__foot .btn { flex: 1 1 100%; } .sbp__card { grid-template-columns: 52px minmax(0, 1fr); } .sbp__pic { width: 52px; } }
.sbp__h3 { margin: 18px 0 6px; font: 700 1.2rem/1.25 var(--display); }

/* "My sets in progress": each tile opens its set's binder; a small link under it opens the set in Set Builder */
.bset { display: grid; grid-template-rows: 1fr auto; }
.bset__go { justify-self: start; margin-top: 2px; font: 800 .72rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); border-bottom: 2px solid var(--teal); }
.bset--here .bset__open { border-top-color: var(--teal); }
.bset__sb { display: inline-flex; align-items: center; justify-self: start; min-height: 44px; color: var(--ink-2); font-weight: 700; font-size: .92rem; }
.bset__sb:hover { color: var(--ink); }
