/* Collection Road (collection.js). Pixel skin tokens from skin.css; .pf-bar and .pf-box come from profile.css. */

/* ---------- title screen strip ---------- */
.cl-strip { all: unset; cursor: pointer; box-sizing: border-box; display: grid; grid-template-columns: auto 1fr 40px; gap: 10px; align-items: center;
  width: 100%; max-width: 360px; margin: 8px auto 0; padding: 4px 6px 4px 10px;
  border: 6px solid transparent; border-image: var(--btn-dark) 2 fill / 6px / 0 stretch; }
.cl-strip:active { border-image-source: var(--btn-dark-down); }
.cl-strip:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.cl-lv { font-size: 16px; color: var(--gold); white-space: nowrap; }
.cl-mid { display: grid; gap: 4px; min-width: 0; text-align: left; }
.cl-mid small { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-next { width: 40px; height: 40px; background: center 30% / cover; box-shadow: var(--frame); }
.cl-bar { height: 8px; }

/* ---------- lock tags (codex, deck builder) ---------- */
.cl-lock { position: absolute; left: 50%; transform: translateX(-50%); top: -6px; z-index: 3; pointer-events: none; font-size: 12px; line-height: 1; padding: 3px 4px;
  background: var(--ink); color: var(--gold); box-shadow: 0 0 0 2px var(--rim); white-space: nowrap; }
.cl-lock.part { color: var(--teal); }
.px-lock { display: inline-block; vertical-align: -1px; margin-right: 2px; }
.cl-lock.far .px-lock { margin-right: 0; }
.codex button { position: relative; }
.codex .cl-lock { top: 82px; }   /* bottom of the picture; the top-left corner holds the card number */
@media (min-width: 640px) { .codex .cl-lock { top: 116px; } }
.codex button:has(.cl-lock:not(.part)) div { filter: grayscale(1) brightness(.45); }
.codex .cl-far { display: block; margin-top: 2px; padding: 0 4px; font-size: 12px; line-height: 1.2; color: var(--dim); }
/* Seen, not owned: the card stays in colour; the tag just says so (codex-discovery spec). */
.codex .cl-lock.cl-unowned { color: var(--cream); }
.codex button:has(.cl-unowned) div { filter: none; }

/* ---------- codex: halls, counts, cards not met yet ---------- */
.cx-count { margin: 4px 0 10px; font-size: 13px; color: var(--gold); text-align: center; }
.cx-hall { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 18px 0 8px; font-weight: 400; }
.cx-hall b { font-weight: 400; font-size: 16px; color: var(--cream); }
.cx-hall small { font-size: 12px; color: var(--dim); }
/* A silhouette: no picture (nothing to peek at), the hall it sits in and its rarity colour on the frame. */
.codex button.unseen { color: var(--dim); --rc: var(--rimlo); border-color: var(--rc); box-shadow: inset 0 0 0 2px var(--rc); }
.codex button.unseen.r-r { --rc: #4f8fd6; }
.codex button.unseen.r-e { --rc: #a86ad8; }
.codex button.unseen.r-l { --rc: var(--gold); }
.codex button.unseen div { display: grid; place-content: center; background: var(--deep); }
.codex button.unseen div i { font-style: normal; font-size: 32px; color: var(--rc); opacity: .7; }
.codex button.unseen.r-c div i { color: var(--dim); }
.cx-new { box-shadow: 0 0 0 2px var(--ink); z-index: 3; }
/* The road's next card, not met yet: a black shape until it unlocks. */
.cl-next.unseen, .cl-card.unseen { filter: brightness(0) !important; box-shadow: var(--frame), inset 0 0 0 2px var(--rimlo); }.db-cell.locked .card { filter: grayscale(1) brightness(.4); }
.db-line.locked { box-shadow: inset 0 0 0 2px var(--red); }
.db-line.locked .nm { color: var(--red); }

/* ---------- road screen ---------- */
#collroad { padding-inline: max(12px, calc((100% - 720px) / 2)); padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
.cl-head { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; padding: 6px;
  border: 9px solid transparent; border-image: var(--win-dark) 3 fill / 9px / 0 stretch; }
.cl-badge { width: 72px; height: 72px; display: grid; place-content: center; text-align: center; line-height: 1; background: var(--gold); color: var(--ink); box-shadow: var(--frame); }
.cl-badge small { font-size: 14px; }
.cl-badge b { font-weight: 400; font-size: 36px; }
.cl-id { display: grid; gap: 6px; min-width: 0; }
.cl-id b { font-weight: 400; font-size: 20px; color: var(--cream); text-shadow: 3px 3px 0 var(--ink); }
.cl-id small { font-size: 12px; color: var(--dim); }
.cl-how b { font-weight: 400; color: var(--gold); }
.cl-road { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 0; position: relative; }
.cl-road::before { content: ''; position: absolute; left: 32px; top: 0; bottom: 0; width: 4px; background: var(--rimlo); }
.cl-node { position: relative; display: grid; grid-template-columns: 56px 64px 1fr; gap: 10px; align-items: center; padding: 6px 0; }
.cl-step { position: relative; z-index: 1; justify-self: center; font-size: 13px; padding: 2px 4px; background: var(--deep); color: var(--dim); box-shadow: 0 0 0 2px var(--rimlo); }
.cl-node.have .cl-step { background: var(--teal); color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.cl-node.next .cl-step { background: var(--gold); color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.cl-card { all: unset; cursor: pointer; position: relative; width: 64px; height: 64px; background: var(--ink) center 30% / cover; box-shadow: var(--frame); }
.cl-card i { position: absolute; right: -6px; bottom: -6px; font-style: normal; font-size: 13px; padding: 1px 4px; background: var(--ink); color: var(--cream); box-shadow: 0 0 0 2px var(--rim); }
.cl-node.have .cl-card i { background: var(--teal); color: var(--ink); }
.cl-node.later .cl-card { filter: grayscale(1) brightness(.45); }
.cl-node.next .cl-card { box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--gold); animation: cl-pulse 1.6s ease-in-out infinite; }
@keyframes cl-pulse { 50% { transform: scale(1.06); } }
.cl-txt { display: grid; gap: 3px; min-width: 0; }
.cl-txt b { font-weight: 400; font-size: 16px; line-height: 1.25; color: var(--cream); overflow-wrap: anywhere; }
.cl-node.later .cl-txt b { color: var(--dim); }
.cl-node.next .cl-txt b { color: var(--gold); }
.cl-txt small { font-size: 12px; color: var(--dim); }
.cl-here { color: var(--gold) !important; }
.cl-node.next { background: rgba(242, 193, 78, .08); }

/* ---------- result screen + reveal ---------- */
.cl-gain { display: grid; gap: 6px; text-align: left; padding: 8px 10px; background: var(--ink); box-shadow: inset 0 0 0 2px var(--rimlo); }
.cl-gain-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cl-gain-row b { font-weight: 400; color: var(--teal); font-size: 16px; }
.cl-gain-row span { color: var(--gold); font-size: 14px; }
.cl-gain small { font-size: 12px; color: var(--dim); }
.cl-gain .cl-xp { white-space: nowrap; }   /* "35 / 50 经验" never splits between 经 and 验 */
.cl-new { all: unset; cursor: pointer; display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  margin-top: 4px; padding: 6px; background: var(--deep); box-shadow: inset 0 0 0 2px var(--gold); animation: cl-in .5s ease-out both; }
.cl-new span { grid-row: span 2; width: 52px; height: 52px; background: center 30% / cover; box-shadow: var(--frame); }
.cl-new b { font-weight: 400; color: var(--gold); font-size: 16px; }
.cl-new small { color: var(--cream) !important; }
@keyframes cl-in { from { opacity: 0; transform: scale(.85); } }
.cl-reveal { display: grid; gap: 8px; justify-items: center; }
.cl-unl { color: var(--teal) !important; font-size: 16px !important; }
.cl-big { animation: cl-in .6s cubic-bezier(.2, 1.4, .4, 1) both; }
.cl-big .c2.big { --u: min(2.4px, calc((100vw - 80px) / 96), calc((100vh - 330px) / 132)); }

@media (orientation: landscape) and (max-height: 560px) {
  .cl-strip { margin-top: 4px; padding-block: 2px; }
  .cl-next { width: 30px; height: 30px; }
  .cl-strip { grid-template-columns: auto 1fr 30px; }
}

/* New-player guide (newbie.js): the Lv5 "pick a card, swap it in" moment. */
.nb-guide { display: grid; gap: 8px; text-align: center; }
.nb-step { margin: 0; font-size: 13px; color: var(--teal); letter-spacing: .04em; }
.nb-opts { display: grid; gap: 8px; }
.nb-opt { all: unset; cursor: pointer; display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: center; text-align: left;
  padding: 6px; border: 3px solid var(--rim, #4a5bb5); background: rgba(0, 0, 0, .25); }
.nb-opt:hover, .nb-opt:focus-visible { border-color: var(--gold); }
.nb-opt .card { width: 74px; pointer-events: none; }
.nb-opt b { display: block; color: var(--gold); font-weight: 400; font-size: 17px; }
.nb-opt small { display: block; font-size: 13px; line-height: 1.4; color: var(--cream, #f4ead2); }
/* Choose 1 of 3 (collection.js showPick): the same option rows, with the full card shrunk to 74px. */
.cl-mini { width: 74px; pointer-events: none; }
.cl-mini .c2.big { --u: .77px; }
.cl-mini .c2.big .text { visibility: hidden; }
.cl-opt small b { display: inline; font-size: inherit; color: var(--gold); }
.cl-back { width: 74px; aspect-ratio: 3 / 4; background: center / cover, repeating-linear-gradient(135deg, #2b3a8c 0 6px, #22307a 6px 12px); box-shadow: var(--frame); }
.cl-picks { margin: 8px 0; }
.nb-rows .nb-tag { margin-left: 8px; font-style: normal; font-size: 12px; padding: 0 5px; background: var(--gold); color: var(--ink); text-shadow: none; }
.nb-new { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; text-align: left; }
.nb-new p { margin: 0; font-size: 14px; }
.nb-rows { display: grid; gap: 4px; max-height: 42vh; overflow-y: auto; }
/* the hall for a brand-new player: one big button, nothing else to choose */
#title.nb-simple .hm-play { gap: 10px; }
