/* ================= MASTER SET TROPHIES =================
   The trophy has to read as a CARD — same 63:88 ratio as every pocket in the
   binder, same corner radius — because it lives among cards and the whole idea
   is that it is one. Everything else about it is deliberately unlike the rest
   of the game: no rarity colour, no price, no market. Gold and black only. */

.troph{
  position:relative;
  aspect-ratio:63/88;
  border-radius:calc(var(--r,12px) * .9);
  overflow:hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, #2b2410 0%, transparent 60%),
    linear-gradient(170deg,#14172e 0%,#0a0c1c 55%,#12142b 100%);
  box-shadow:0 2px 10px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,203,5,.30);
  isolation:isolate;
}
/* the foil sweep: one slow pass, not a loop you notice */
.troph-foil{
  position:absolute;inset:0;pointer-events:none;z-index:2;
  background:linear-gradient(115deg,
    transparent 30%, rgba(255,231,150,.16) 45%,
    rgba(255,255,255,.30) 50%, rgba(255,231,150,.16) 55%, transparent 70%);
  background-size:260% 260%;
  animation:trophsweep 7s ease-in-out infinite;
}
@keyframes trophsweep{
  0%,72%  {background-position:120% 0}
  100%    {background-position:-40% 0}
}
@media (prefers-reduced-motion:reduce){ .troph-foil{animation:none} }

.troph-in{
  position:absolute;inset:0;z-index:1;
  display:flex;flex-direction:column;align-items:center;
  padding:7% 8% 6%;
  text-align:center;
  border-radius:inherit;
  box-shadow:inset 0 0 0 2px rgba(255,203,5,.14);
}
.troph-k{
  font-family:'Bebas Neue',Outfit,sans-serif;
  font-size:clamp(7px,2.1cqw,11px);
  letter-spacing:.22em;
  color:#ffcb05;opacity:.85;line-height:1;
}
.troph-sym{
  flex:0 0 auto;
  height:26%;margin:6% 0 4%;
  display:flex;align-items:center;justify-content:center;
}
.troph-sym img{max-width:100%;max-height:100%;object-fit:contain;
  filter:drop-shadow(0 2px 5px rgba(0,0,0,.6));}
.troph-nosym{font-style:normal;font-size:200%;color:#ffcb05}
.troph-nm{
  font-family:'Bebas Neue',Outfit,sans-serif;
  font-size:clamp(10px,3.4cqw,19px);
  line-height:1.02;color:#fff;
  letter-spacing:.02em;
  /* long set names wrap to two lines and stop — a third would push the serial
     off the bottom of the card */
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;
}
.troph-ct{
  font-size:clamp(6px,1.9cqw,10px);
  color:var(--dim,#8b93d8);margin-top:2%;
}
.troph-rule{
  width:46%;height:1px;margin:6% 0 5%;
  background:linear-gradient(90deg,transparent,rgba(255,203,5,.55),transparent);
}
.troph-ow{
  font-size:clamp(7px,2.2cqw,12px);font-weight:800;color:#e8ebff;
  max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.troph-dt{font-size:clamp(6px,1.7cqw,9px);color:var(--dim2,#6d76ab);margin-top:1%}
.troph-ser{
  margin-top:auto;
  display:flex;align-items:baseline;gap:.15em;
  font-family:'Bebas Neue',Outfit,sans-serif;
  color:#ffcb05;line-height:1;
}
.troph-ser b{font-size:clamp(13px,4.4cqw,26px);font-weight:400}
.troph-ser span{font-size:clamp(9px,3cqw,17px);opacity:.6}
.troph-cert{
  font-size:clamp(5px,1.5cqw,8px);letter-spacing:.14em;
  color:var(--dim2,#6d76ab);margin-top:2%;
}
/* cqw above needs a container to measure against, or every clamp collapses to
   its minimum and the whole card reads as 6px type */
.trophcell,.troph.big{container-type:inline-size}

/* ---- the trophy page ---- */
.trophwrap{padding:4px 2px 10px}
.trophgrid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:12px;
  padding:6px 4px;
}
@media(max-width:420px){ .trophgrid{grid-template-columns:repeat(2,1fr);gap:10px} }
.trophcell{
  all:unset;display:block;cursor:pointer;
  border-radius:12px;
  transition:transform .16s ease;
}
.trophcell:hover,.trophcell:focus-visible{transform:translateY(-3px)}
.trophcell:focus-visible{outline:2px solid #ffcb05;outline-offset:3px}

/* ---- the detail sheet ---- */
.trophmodal{max-width:340px}
.trophsheet{display:flex;flex-direction:column;align-items:center;gap:14px;padding:4px 2px}
.troph.big{width:190px;flex:0 0 auto}
.trophsheet-h{
  font-family:'Bebas Neue',Outfit,sans-serif;font-size:22px;
  letter-spacing:.06em;color:#ffcb05;text-align:center;
}
.trophsheet-p{
  margin:6px 0 0;font-size:13px;line-height:1.5;
  color:var(--dim,#8b93d8);text-align:center;
}

/* ---- card backs ---- */
.cbkbar{padding:8px 8px 2px}
.cbkbar-k{
  display:block;font-size:10px;font-weight:800;letter-spacing:.16em;
  color:var(--dim2,#6d76ab);margin-bottom:7px;
}
.cbkbar-row{display:flex;flex-wrap:wrap;gap:7px}
.cbkchip{
  all:unset;cursor:pointer;
  padding:6px 12px;border-radius:999px;
  font-size:12px;font-weight:700;color:var(--dim,#8b93d8);
  background:#141a33;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);
  transition:color .14s ease, box-shadow .14s ease;
}
.cbkchip:hover{color:#e8ebff}
.cbkchip.on{
  color:#0a0c1c;background:linear-gradient(180deg,#ffd84d,#e0a800);
  box-shadow:0 2px 8px rgba(255,203,5,.28);
}
.cbkchip:focus-visible{outline:2px solid #ffcb05;outline-offset:2px}

.cbk{
  position:absolute;inset:0;border-radius:inherit;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:6px;overflow:hidden;
}
.cbk-classic{
  background:linear-gradient(165deg,#232a55,#11152e);
  box-shadow:inset 0 0 0 3px rgba(255,255,255,.06);
}
.cbk-w{font-family:'Bebas Neue',Outfit,sans-serif;font-size:26px;color:#e8ebff;letter-spacing:.04em}
.cbk-s{font-size:11px;font-weight:800;letter-spacing:.4em;color:#5b6cff}
.cbk-set{
  background:radial-gradient(90% 70% at 50% 30%,#20264d 0%,#0a0c1c 70%);
  box-shadow:inset 0 0 0 3px rgba(255,203,5,.22);
}
.cbk-glow{
  position:absolute;inset:-30%;
  background:conic-gradient(from 0deg,transparent,rgba(255,203,5,.14),transparent 40%);
  animation:cbkspin 14s linear infinite;
}
@keyframes cbkspin{to{transform:rotate(1turn)}}
@media (prefers-reduced-motion:reduce){ .cbk-glow{animation:none} }
.cbk-sym{position:relative;width:46%;max-height:40%;object-fit:contain;
  filter:drop-shadow(0 3px 8px rgba(0,0,0,.7))}
.cbk-nm{position:relative;font-family:'Bebas Neue',Outfit,sans-serif;
  font-size:17px;color:#fff;text-align:center;padding:0 10%;line-height:1.05}
.cbk-k{position:relative;font-size:8px;font-weight:800;letter-spacing:.26em;color:#ffcb05}

/* ---- the pips, on the profile card and the leaderboard ---- */
.mstpips{display:inline-flex;align-items:center;gap:3px;vertical-align:middle;margin-left:6px}
.mstpip{
  width:14px;height:14px;flex:0 0 auto;
  display:inline-flex;align-items:center;justify-content:center;
  font-style:normal;font-size:10px;color:#ffcb05;
}
.mstpip img{width:100%;height:100%;object-fit:contain;
  filter:drop-shadow(0 0 3px rgba(255,203,5,.5))}
.mstpipn{font-size:10px;font-weight:800;color:#ffcb05;opacity:.85}

.pc-mst{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  margin:6px 10px 0;padding:6px 10px;
  border-radius:10px;
  background:linear-gradient(90deg,rgba(255,203,5,.13),rgba(255,203,5,.02));
  box-shadow:inset 0 0 0 1px rgba(255,203,5,.18);
}
.pc-mst .mstpips{margin-left:0}
.pc-mstx{font-size:11px;font-weight:800;color:#ffcb05;letter-spacing:.02em}
.pc-mstx b{font-size:13px}
.pc-mstn{
  flex:1 1 100%;font-size:10px;color:var(--dim,#8b93d8);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}

/* ---- the trophy inside the completion celebration ---- */
.mstwin-tro{display:flex;justify-content:center;margin:12px 0 8px}
.mstwin-tro .troph.big{width:158px}
.mstwin-sub{font-size:12px;color:var(--dim,#8b93d8);text-align:center;margin-bottom:4px}
.trophsheet-b{width:100%}

/* ---- featured cards (js/featured.js) ---- */
.pc-feat{display:grid;grid-template-columns:repeat(6,1fr);gap:4px;margin:8px 0 2px}
.pc-feat.mine{cursor:pointer}
.fcs{position:relative;aspect-ratio:5/7;border-radius:4px;overflow:hidden;
  background:rgba(0,0,0,.3);border:1px solid rgba(255,255,255,.1)}
.fcs img{width:100%;height:100%;object-fit:cover;object-position:top center;display:block}
.fcs b{position:absolute;left:0;right:0;bottom:0;font-size:8px;font-weight:800;
  text-align:center;padding:1px 0;background:rgba(0,0,0,.72);color:#ffd76a;
  white-space:nowrap;overflow:hidden}
.fcs-g{position:absolute;top:0;left:0;right:0;font-style:normal;font-size:7px;
  font-weight:800;text-align:center;padding:1px 0;background:rgba(0,0,0,.7);color:#9fe1cb}
.fcs-g.blk{color:#fff}
/* dashed, and only ever on your own card — see the note in friends.js */
.fcs.empty{border-style:dashed;border-color:rgba(255,255,255,.2);display:flex;
  align-items:center;justify-content:center}
.fcs.empty span{font-size:15px;color:rgba(255,255,255,.3);font-weight:800}

/* ---- the picker ---- */
.fp-ttl{font-size:20px;text-align:center;margin:4px 0 2px}
.fp-sub{text-align:center;font-size:12px;color:var(--dim);margin-bottom:12px}
.fp-find{width:100%;box-sizing:border-box;background:rgba(0,0,0,.28);
  border:1px solid rgba(255,255,255,.12);border-radius:11px;color:#fff;
  font-family:inherit;font-size:13px;font-weight:600;padding:10px 12px;outline:none;
  margin-bottom:10px}
.fp-find:focus{border-color:#4a5290}
.fp-list{max-height:46vh;overflow-y:auto;scrollbar-width:thin}
.fp-count{font-size:10px;letter-spacing:.14em;font-weight:800;color:var(--dim2);
  padding:0 2px 7px}
.fp-row{display:flex;align-items:center;gap:9px;width:100%;text-align:left;
  background:rgba(255,255,255,.03);border:1px solid transparent;border-radius:10px;
  padding:7px 9px;margin-bottom:5px;cursor:pointer;font-family:inherit;color:inherit}
.fp-row.on{border-color:#ffcf33;background:rgba(255,207,51,.1)}
.fp-th{width:26px;height:36px;border-radius:3px;overflow:hidden;flex:0 0 auto;
  background:rgba(255,255,255,.06)}
.fp-th img{width:100%;height:100%;object-fit:cover;object-position:top center;display:block}
.fp-meta{min-width:0;flex:1;display:flex;flex-direction:column}
.fp-meta b{font-size:12.5px;font-weight:700;white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis}
.fp-meta em{font-style:normal;font-size:10.5px;color:var(--dim);white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis}
.fp-p{font-size:12.5px;font-weight:800;color:#ffd76a;white-space:nowrap}
.fp-tick{width:14px;text-align:center;color:#ffcf33;font-weight:800}
.fp-none{text-align:center;color:var(--dim);font-size:12.5px;padding:18px 0}
