/* The look follows the game's own backpack screen: warm charcoal panels, cream lettering,
   chunky uppercase headings, rounded item tiles and tan buttons. */

@font-face { font-family: 'TF2 Build'; src: url('/fonts/tf2build.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'TF2 Secondary'; src: url('/fonts/tf2secondary.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'TF2'; src: url('/fonts/tf2.ttf') format('truetype'); font-display: swap; }

:root {
  --bg: #2a2725;
  --bar: #1d1b19;
  --panel: #322e2a;
  --tile: #3b352f;
  --tile-hi: #4a4239;
  --line: #5a5148;
  --cream: #ece3cb;
  --tan: #a59b88;
  --btn: #766b5e;
  --btn-hi: #8b7f70;
  --red: #b8443a;
  --green: #5f7f37;
  --green-hi: #72963f;
  --orange: #e8792d;
  --field: #efe2c2;
  --ink: #2a2725;
  --display: 'TF2 Build', 'Arial Black', Impact, sans-serif;
  --body: 'TF2 Secondary', Verdana, 'Segoe UI', sans-serif;
  --label: 'TF2', 'Arial Narrow', Verdana, sans-serif;
  --unique: #ffd700;
  --strange: #cf6a32;
  --unusual: #a877dd;
  --unusual-edge: #8650ac;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--cream); font: 400 18px/1.5 var(--body); min-height: 100vh; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--field); outline-offset: 2px; }

h1, h2, h3, .display { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .02em; line-height: 1.1; margin: 0; }
h1 { font-size: 36px; }
h2 { font-size: 24px; }
h3 { font-family: var(--label); font-size: 19px; color: var(--tan); letter-spacing: .04em; }
.muted { color: var(--tan); }
.small { font-size: 16px; }

/* ---------- top bar and tabs ---------- */

.top { background: var(--bar); min-height: 64px; border-bottom: 2px solid #4b443d; display: flex; align-items: stretch; gap: 16px; padding: 0 0 0 20px; min-height: 56px; }
.brand { font-family: var(--display); text-transform: uppercase; font-size: 22px; align-self: center; text-decoration: none; white-space: nowrap; }
.top .grow { flex: 1; }
.ticker { flex: 1; min-width: 0; overflow: hidden; align-self: center; height: 44px; display: flex; align-items: center;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.ticker .track { display: flex; gap: 10px; width: max-content; will-change: transform; }
.drop { cursor: pointer; color: inherit; font: inherit; }
.drop:hover { border-color: #ffd700; }
.drop { flex: none; display: inline-flex; align-items: center; gap: 6px; background: #2c2825; border: 2px solid #4b443d; border-radius: 20px; padding: 3px 12px 3px 3px; white-space: nowrap; }
.drop .avatar { width: 26px; height: 26px; border-radius: 50%; }
.drop .nm { font-weight: 700; font-size: 16px; }
.drop .key { width: 24px; height: 24px; object-fit: contain; }
.drop .gain { font-family: var(--display); color: #ffd700; font-size: 16px; }
.drop-sheet .avatar { width: 40px; height: 40px; border-radius: 50%; }
.drop-sheet .key { width: 34px; height: 34px; object-fit: contain; }
.drop-sheet .gain { font-family: var(--display); color: #ffd700; font-size: 20px; }
.drop-question { font-family: var(--display); font-size: 26px; line-height: 1.25; margin: 6px 0; overflow-wrap: anywhere; }
.wallet { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; }
.coin { display: inline-flex; align-items: center; gap: 5px; font-family: var(--display); font-size: 21px; }
.coin img { width: 32px; height: 32px; object-fit: contain; }
.coin.zero { opacity: .35; }
.top .coin.zero { display: none; }
.who { align-self: center; font-weight: 600; white-space: nowrap; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; }
.quit { background: var(--red); border: 0; width: 56px; cursor: pointer; display: grid; place-items: center; }
.quit:hover { background: #cf5246; }
.quit svg { width: 24px; height: 24px; }

.tabs { display: flex; gap: 5px; align-items: flex-end; padding: 18px 20px 0; overflow-x: auto;
  background: repeating-linear-gradient(135deg, #2f2b28 0 10px, #2a2725 10px 20px); border-bottom: 3px solid #6b6258; }
.tab { font-family: var(--display); text-transform: uppercase; font-size: 20px; color: #7c7366; text-decoration: none; white-space: nowrap;
  padding: 7px 12px 5px; border: 3px solid #4a433c; border-bottom: 0; border-radius: 14px 14px 0 0; background: #24211f; position: relative; }
.tab:hover { color: var(--cream); }
.tab.on { color: var(--cream); border-color: #6b6258; background: var(--bg); margin-bottom: -3px; padding-bottom: 8px; }
.tab.gold { background: #e9c537; border-color: #ffd700; color: #2a2208; }
.tab.gold:hover { color: #000; background: #ffd700; }
.tab.gold.on { background: #ffd700; border-color: #fff1a1; color: #1d1700; }
.who .avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-block; vertical-align: middle; margin-right: 8px; }
.btn.discord { background: #5865f2; color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 12px; text-transform: none; font-family: var(--body); font-weight: 700; }
.btn.discord:hover { background: #4752c4; }
.btn.discord svg { width: 28px; height: 28px; }
.reward { background: color-mix(in srgb, #ffd700 18%, #262220); border: 3px solid #ffd700; border-radius: 12px; padding: 16px 20px; display: grid; gap: 4px; }
.reward b { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 22px; color: #ffe066; line-height: 1.2; }
textarea.field { resize: vertical; font: 17px/1.4 var(--body); color: var(--ink); }
.answers-in { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.answers-in legend { margin-bottom: 6px; }
.counter { margin: -6px 0 0; text-align: right; }
.answer-row { display: grid; grid-template-columns: 34px minmax(0, 320px) auto; gap: 10px; align-items: center; }
.answer-row .letter { font-family: var(--display); font-size: 22px; text-align: center; color: #ffe066; }
.check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; white-space: nowrap; }
.check input { width: 18px; height: 18px; accent-color: var(--green); }
ol.answers { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 4px; }
ol.answers b { font-family: var(--display); font-weight: 400; color: var(--tan); margin-right: 8px; }
ol.answers li.right { color: #a6e06a; }
.qtext { font-size: 19px; }
.offer.q-rejected { opacity: .65; }
.tab .dot { display: inline-block; min-width: 20px; padding: 0 5px; margin-left: 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 15px; text-align: center; vertical-align: 3px; }

main { max-width: 1340px; margin: 0 auto; padding: 28px 20px 80px; }
.head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.head h1::before { content: '»'; color: var(--red); margin-right: 14px; font-family: Verdana, sans-serif; font-weight: 700; }
.head .grow { flex: 1; }
.back { font-family: var(--display); text-transform: uppercase; text-decoration: none; color: var(--tan); font-size: 18px; }
.back:hover { color: var(--cream); }

/* ---------- buttons and fields ---------- */

.btn { font-family: var(--display); text-transform: uppercase; letter-spacing: .02em; font-size: 18px; background: var(--btn); color: var(--cream);
  border: 0; border-radius: 6px; padding: 9px 18px; cursor: pointer; text-decoration: none; display: inline-block; line-height: 1.2; }
.btn:hover { background: var(--btn-hi); }
.btn.go { background: var(--green); }
.btn.go:hover { background: var(--green-hi); }
.btn.no { background: #7d3a34; }
.btn.no:hover { background: var(--red); }
.btn.big { font-size: 24px; padding: 13px 28px; }
.btn.slim { font-size: 15px; padding: 7px 13px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.field { background: var(--field); color: var(--ink); border: 0; border-radius: 4px; padding: 8px 10px; min-width: 0; font: 17px/1.4 var(--body); text-transform: none; letter-spacing: normal; }
.field::placeholder { color: #8f8468; }
select.pick { font-family: var(--display); text-transform: uppercase; font-size: 17px; background: transparent; color: var(--cream);
  border: 2px solid var(--cream); border-radius: 2px; padding: 5px 30px 5px 8px; cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--cream) 50%), linear-gradient(135deg, var(--cream) 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 9px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
select.pick option { background: var(--bg); color: var(--cream); }
.lbl { display: grid; gap: 4px; font-family: var(--label); text-transform: uppercase; font-size: 17px; letter-spacing: .04em; color: var(--tan); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-family: var(--label); text-transform: uppercase; font-size: 18px; letter-spacing: .04em; background: #4a433c; color: var(--tan); border: 0; border-radius: 5px; padding: 6px 11px; cursor: pointer; }
.chip:hover { color: var(--cream); }
.chip.on { background: var(--red); color: #fff; }

/* ---------- item tiles ---------- */

.grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 10px; }
.slot { aspect-ratio: 4 / 3; background: var(--tile); border-radius: 9px; position: relative; }
.slot.over { outline: 3px solid var(--cream); }
.tile { --q: #ffd700; position: absolute; inset: 0; border-radius: 12px; cursor: pointer; overflow: hidden;
  border: 3px solid var(--q); background: color-mix(in srgb, var(--q) 24%, #262220); }
.tile.free { position: relative; inset: auto; aspect-ratio: 4 / 3; }
.tile:hover { background: color-mix(in srgb, var(--q) 36%, #262220); }
.tile.sel { outline: 3px solid var(--cream); outline-offset: 3px; background: color-mix(in srgb, var(--q) 40%, #262220); }
.tile .pic { position: absolute; top: -9%; left: 0; width: 100%; height: 118%; object-fit: contain; }
.tile .pic.sq { top: -3%; left: 0; width: 100%; height: 106%; }
.tile .fx { position: absolute; inset: -14%; width: 128%; height: 128%; object-fit: contain; opacity: .95; }
.plain-tiles .tile { border-color: transparent; background: var(--tile); }
.plain-tiles .tile:hover { border-color: #9f9584; background: var(--tile-hi); }
.plain-tiles .tile.sel { background: var(--tile-hi); }
.tile.dim { opacity: .18; }
.tile.off { opacity: .35; cursor: not-allowed; }
.tile .tag { position: absolute; right: 3px; bottom: 3px; background: rgba(20, 18, 16, .9); color: var(--orange); font: 14px/1.45 var(--label); letter-spacing: .03em; padding: 0 6px; border-radius: 4px; cursor: pointer; }
.tile .tag:hover { background: var(--orange); color: #1d1b19; }
.tile .count { position: absolute; left: 5px; top: 2px; font-family: var(--display); font-size: 15px; text-shadow: 0 1px 2px #000; }
.tile .named { position: absolute; left: 5px; top: 5px; width: 15px; height: 15px; background: #111; border-radius: 3px; padding: 2px; color: var(--cream); opacity: .8; }

.pages { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pg { font-family: var(--display); font-size: 20px; min-width: 62px; padding: 3px 0; border: 0; border-radius: 6px; background: var(--btn); color: var(--cream); cursor: pointer; }
.pg:hover { background: var(--btn-hi); }
.pg.on { background: var(--red); }
.pg.bare { opacity: .55; }

/* ---------- tooltip (the game's mouseover panel) ---------- */

#tip { position: fixed; z-index: 60; pointer-events: none; background: linear-gradient(#35302b, #25221f); border: 1px solid #5a5148; border-radius: 6px;
  padding: 14px 22px 15px; max-width: 400px; min-width: 220px; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .55); }
.tip-name { font-family: var(--display); text-transform: uppercase; font-size: 21px; line-height: 1.2; overflow-wrap: anywhere; }
.tip-name.custom { text-transform: none; }
.tip-line { font-size: 16px; color: var(--tan); margin-top: 3px; }
.tip-line.fx-line { color: var(--cream); }
.tip-desc { font-size: 16px; color: var(--cream); margin-top: 8px; overflow-wrap: anywhere; }
.tip-desc.quoted { font-style: italic; }

/* ---------- panels, lists, tables ---------- */

.panel { background: var(--panel); border-radius: 10px; padding: 18px; }
.cols { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; }
.stack { display: grid; gap: 12px; }
.note { border-left: 4px solid var(--btn); padding: 2px 0 2px 12px; color: var(--tan); }
.empty { padding: 44px 20px; text-align: center; color: var(--tan); background: var(--panel); border-radius: 10px; }
.empty .btn { margin-top: 14px; }

.crates { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.crate { background: var(--tile); border: 2px solid transparent; border-radius: 9px; padding: 10px 10px 12px; text-decoration: none; display: grid; gap: 6px; text-align: center; }
.crate:hover { border-color: #9f9584; background: var(--tile-hi); }
.crate img { height: 100px; width: 100%; object-fit: contain; }
.crate .nm { font-size: 16px; font-weight: 600; line-height: 1.25; }
.crate .cost { font-family: var(--label); font-size: 16px; letter-spacing: .04em; color: var(--orange); text-transform: uppercase; }

.crate-hero { text-align: center; display: grid; gap: 12px; justify-items: center; }
.crate-hero p { margin: 0; }
.crate-hero img { height: 170px; object-fit: contain; }
.group + .group { margin-top: 20px; }
.group h3 { margin-bottom: 8px; display: flex; gap: 10px; align-items: baseline; }
.group h3 b { font-weight: 400; color: var(--cream); }
.mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 9px; }
.effects { display: flex; flex-wrap: wrap; gap: 6px; }
.effects img { width: 54px; height: 54px; border-radius: 8px; background: var(--tile); object-fit: contain; }

.recipes { display: grid; gap: 8px; }
.recipe { text-align: left; background: var(--tile); border: 2px solid transparent; border-radius: 9px; padding: 11px 13px; cursor: pointer; display: grid; gap: 2px; }
.recipe:hover { border-color: #9f9584; }
.recipe.on { border-color: var(--cream); background: var(--tile-hi); }
.recipe b { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 19px; }
.recipe span { font-size: 16px; color: var(--tan); }

.shop { display: grid; gap: 10px; }
.shelf { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; align-items: center; background: var(--panel); border-radius: 10px; padding: 12px 16px; }
.shelf img { width: 76px; height: 58px; object-fit: contain; }
.shelf b { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 21px; display: block; }
.price { font-family: var(--display); font-size: 20px; white-space: nowrap; }
.price .k { color: var(--unique); }

.listing { display: grid; grid-template-columns: 116px minmax(0, 1fr) auto; gap: 16px; align-items: center; background: var(--panel); border-radius: 10px; padding: 10px 16px 10px 10px; }
.listing + .listing { margin-top: 8px; }
.listing.hit { box-shadow: inset 0 0 0 3px var(--orange); }
.listing .tile.free { width: 116px; }
.listing .nm { font-family: var(--display); text-transform: uppercase; font-size: 20px; line-height: 1.2; overflow-wrap: anywhere; }
.listing .buy { display: grid; gap: 6px; justify-items: end; text-align: right; }
.quote { font-style: italic; color: var(--cream); overflow-wrap: anywhere; }

.offer { background: var(--panel); border-radius: 10px; padding: 14px 16px; }
.offer + .offer { margin-top: 10px; }
.offer.closed { opacity: .6; }
.sides { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin: 10px 0; }
.side h3 { margin-bottom: 6px; }
.side .mini { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
.status { font-family: var(--label); text-transform: uppercase; font-size: 18px; letter-spacing: .04em; color: var(--tan); }
.status.open { color: var(--orange); }

.trade { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.trade .panel { display: grid; gap: 12px; align-content: start; }
.trade .picker { max-height: 520px; overflow-y: auto; padding-right: 4px; }
.trade .picker .mini { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.money { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

table.list { width: 100%; border-collapse: collapse; }
table.list th { font-family: var(--label); font-weight: 400; text-transform: uppercase; font-size: 18px; letter-spacing: .04em; color: var(--tan); text-align: left; padding: 6px 12px; }
table.list td { padding: 10px 12px; background: var(--panel); border-bottom: 3px solid var(--bg); }
table.list td:first-child { border-radius: 8px 0 0 8px; }
table.list td:last-child { border-radius: 0 8px 8px 0; }
table.list a { font-weight: 700; text-decoration: none; }
table.list a:hover { text-decoration: underline; }
table.list .n { text-align: right; font-variant-numeric: tabular-nums; }

.coll { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 8px 14px 8px 8px; background: var(--panel); border-radius: 10px; text-decoration: none; }
.coll + .coll { margin-top: 6px; }
.coll img { width: 80px; height: 58px; object-fit: contain; }
.bar { height: 8px; background: #1f1c1a; border-radius: 4px; overflow: hidden; margin-top: 5px; }
.bar i { display: block; height: 100%; background: var(--btn-hi); }
.coll.done .bar i { background: var(--green-hi); }
.coll .n { font-family: var(--display); font-size: 19px; }

/* ---------- pop-ups ---------- */

#modal { position: fixed; inset: 0; z-index: 40; background: rgba(15, 13, 12, .82); display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.sheet { background: var(--bg); border: 3px solid #6b6258; border-radius: 14px; padding: 26px; width: min(580px, 100%); display: grid; gap: 14px; }
.sheet.wide { width: min(640px, 100%); }
.sheet .big-tile { width: min(340px, 80%); margin: 0 auto; }
.sheet .center { text-align: center; }
.item-name { font-family: var(--display); text-transform: uppercase; font-size: 28px; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.item-name.custom { text-transform: none; }
.count-down { font-family: var(--display); font-size: 110px; line-height: 1; text-align: center; }
.reveal .big-tile { animation: pop .45s cubic-bezier(.2, 1.5, .4, 1) both; }
.reveal.jackpot .big-tile { animation: pop .45s cubic-bezier(.2, 1.5, .4, 1) both, glow 1.6s ease-in-out .45s 3; }
@keyframes pop { from { transform: scale(.55); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes glow { 50% { box-shadow: 0 0 60px 6px rgba(134, 80, 172, .75); } }
.shout { font-family: var(--display); text-transform: uppercase; font-size: 30px; color: var(--unusual); text-align: center; }

#toasts { position: fixed; z-index: 70; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); }
.toast { background: #171514; border: 2px solid #6b6258; border-radius: 8px; padding: 11px 15px; font-weight: 600; text-align: center; }
.toast.bad { border-color: var(--red); }
.toast.good { border-color: var(--green-hi); }

/* ---------- sign-in ---------- */

.door { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: repeating-linear-gradient(135deg, #2f2b28 0 10px, #2a2725 10px 20px); }
.door .sheet { text-align: center; }
.door h1 { font-size: 44px; }
.door form { display: grid; gap: 10px; }
.door .field { font-size: 18px; padding: 12px; text-align: center; }

.tools { margin-top: 34px; border: 2px dashed #5a5148; border-radius: 10px; padding: 14px 16px; display: grid; gap: 10px; }

@media (max-width: 860px) {
  .cols, .trade { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .top { padding-left: 14px; gap: 10px; }
  .coin.zero { display: none; }
  .brand { display: none; }
  .top { flex-wrap: wrap; }
  .ticker { order: 10; flex-basis: 100%; height: 46px; }
  .tab { font-size: 18px; padding: 6px 12px 4px; }
  main { padding: 20px 14px 70px; }
  h1 { font-size: 28px; }
  .listing { grid-template-columns: 84px minmax(0, 1fr); }
  .listing .tile.free { width: 84px; }
  .listing .buy { grid-column: 1 / -1; justify-items: start; text-align: left; grid-auto-flow: column; justify-content: space-between; align-items: center; }
  .sides { grid-template-columns: 1fr; }
  .shelf { grid-template-columns: 56px minmax(0, 1fr); }
  .shelf img { width: 56px; }
  .shelf .row { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* admin: give items, keys and metal */
.admin-switch { margin: 4px 0 18px; }
.admin-switch .chip { text-decoration: none; }
.give-form { max-width: 760px; }
.give-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.give-item { border: 0; padding: 0; margin: 0; min-width: 0; }
.give-pick { display: flex; gap: 16px; align-items: flex-start; }
.give-pick .grow { flex: 1; min-width: 0; }
.give-preview { width: 128px; flex: none; aspect-ratio: 1; display: grid; place-items: center; background: #2b2724; border-radius: 6px; }
.give-preview .tile { width: 100%; height: 100%; }
@media (max-width: 560px) {
  .give-cols { grid-template-columns: 1fr; }
  .give-pick { flex-direction: column; }
}

/* collections: checkmarks, trophies, achievements */
svg.check { width: 22px; height: 22px; flex: none; }
.tile.got::after { content: ''; position: absolute; right: 5px; top: 5px; width: 22px; height: 22px; border-radius: 50%;
  background: #5b9a3a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.6 3.6 7.4-8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.crate { position: relative; }
.crate.done { border-color: #5b9a3a; }
.crate > svg.check { position: absolute; right: 8px; top: 8px; }
.collect { font-size: 15px; color: var(--tan); }
.collect.done { display: flex; align-items: center; gap: 8px; color: #8fd16a; font-family: var(--label); text-transform: uppercase; letter-spacing: .04em; font-size: 18px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--cream); border-radius: 6px; background: transparent; color: var(--cream); cursor: pointer; }
.icon-btn:hover { background: var(--btn-hi); }
.icon-btn svg { width: 22px; height: 22px; }
.drop.collection { border-color: #4e7a36; }
.drop .crate-ico { width: 30px; height: 24px; object-fit: contain; }
.drop svg.check { width: 18px; height: 18px; margin-left: -10px; margin-top: 10px; }
.drop-sheet .crate-big { width: 96px; height: 76px; object-fit: contain; }
.achievement .shout { color: #8fd16a; }
.achievement .key { width: 34px; height: 34px; object-fit: contain; }
.achievement .gain { font-family: var(--display); color: #ffd700; font-size: 22px; }
.badges { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -6px 0 16px; }
.badges a { position: relative; display: block; background: var(--tile); border-radius: 8px; padding: 4px; }
.badges img { width: 56px; height: 44px; object-fit: contain; display: block; }
.badges svg.check { position: absolute; right: -6px; top: -6px; width: 18px; height: 18px; }
.tip-line.untradable { color: #a8a08f; }

/* where to get missing items */
.cell { display: grid; gap: 5px; align-content: start; }
.leads { display: grid; gap: 3px; }
.lead { font: 13px/1.3 var(--body); background: #3a3430; color: var(--cream); border: 0; border-radius: 4px; padding: 3px 5px; cursor: pointer; text-align: center; }
.lead:hover { background: var(--btn-hi); }
.lead.off { background: transparent; color: #7d7466; cursor: default; }

/* the collection box on a crate page */
.collect-box { display: grid; gap: 8px; text-align: left; background: #2b2724; border-radius: 8px; padding: 12px; }
.collect-box.ready { outline: 2px solid #5b9a3a; }
.collect-box .bar i { background: #5b9a3a; }
.coll.ready { outline: 2px solid #5b9a3a; }
.ready-tag { font-family: var(--label); text-transform: uppercase; letter-spacing: .04em; font-size: 15px; color: #8fd16a; }

/* collection contract: a sheet of paper, like TF2's Trade-Up contracts */
.contract { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.paper { background: #ece2c6; color: #3b2f22; border-radius: 4px; padding: 26px 28px 22px; box-shadow: 0 10px 28px rgba(0, 0, 0, .45); background-image: repeating-linear-gradient(0deg, transparent 0 31px, rgba(59, 47, 34, .07) 31px 32px); }
.paper p { font-size: 16px; line-height: 1.45; margin: 12px 0 18px; }
.paper-head { display: flex; gap: 14px; align-items: center; border-bottom: 3px double #8a7454; padding-bottom: 12px; }
.paper-head img { width: 84px; height: 64px; object-fit: contain; }
.paper .kicker { font-family: var(--label); text-transform: uppercase; letter-spacing: .08em; font-size: 15px; color: #8d3a23; }
.paper h2 { font-family: var(--display); font-size: 24px; line-height: 1.15; margin: 2px 0 0; color: #3b2f22; }
.slots-k { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.slot-k { position: relative; display: grid; gap: 4px; justify-items: center; padding: 6px 6px 8px; border: 2px dashed #a99272; border-radius: 8px; background: rgba(255, 255, 255, .25); cursor: pointer; color: inherit; font: inherit; }
.slot-k > img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; opacity: .35; filter: grayscale(1); }
.slot-k .tile.free { width: 100%; }
.slot-k .nm { font-size: 12px; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.slot-k.filled { border-style: solid; border-color: #5b7f3a; background: rgba(91, 127, 58, .12); }
.slot-k.on { border-color: #8d3a23; border-style: solid; box-shadow: 0 0 0 2px rgba(141, 58, 35, .35); }
.slot-k.none .nm { color: #8d3a23; }
.sign { display: flex; align-items: flex-end; gap: 12px; margin-top: 22px; }
.sign > span:first-child { font-family: var(--label); text-transform: uppercase; letter-spacing: .06em; font-size: 15px; }
.sign .line { flex: 1; border-bottom: 2px solid #3b2f22; min-height: 30px; font-family: var(--display); font-size: 24px; padding-left: 8px; color: #23408e; font-style: italic; }
.sign .muted { color: #7a6a52; }
@media (max-width: 900px) { .contract { grid-template-columns: 1fr; } }
.warn { color: #e8792d; }
.sheet .mini { justify-content: center; }

/* backpack: A / D page keys on either side */
.bp-wrap { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.keycap { display: grid; justify-items: center; gap: 6px; background: none; border: 0; padding: 0; color: var(--tan); cursor: pointer; font-family: var(--display); }
.keycap kbd { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid currentColor; border-bottom-width: 4px; border-radius: 7px; font: 18px var(--display); background: #2c2825; }
.keycap .arrow { font-size: 26px; line-height: .8; }
.keycap:hover:not(:disabled) { color: var(--cream); }
.keycap:disabled { opacity: .25; cursor: default; }
@media (max-width: 700px), (hover: none) { .bp-wrap { grid-template-columns: 1fr; } .keycap { display: none; } }
