/* TheCardFox. A dark, card-first table like a draft site, with CardVault's modern type and holo accents.
   Colours are tokens; fox orange is the accent. */
:root {
  --bg: #0b0e17;
  --bg-2: #0f1320;
  --panel: #141927;
  --panel-2: #1a2032;
  --text: #eef0f7;
  --muted: #959bb0;
  --line: #262d42;
  --accent: #ff7a2f;
  --accent-2: #ffb15c;
  --accent-text: #1a0b02;
  --accent-soft: #3a2416;
  --edge-1: #ff8a4c;
  --edge-2: #3dd6f5;
  --edge-3: #a78bfa;
  --frame: linear-gradient(135deg, var(--edge-1), var(--edge-3) 50%, var(--edge-2));
  --ok: #4fe0a4;
  --error: #ff8a80;
  --warn: #ffc266;
  --w: #f6eecb; --u: #4aa3e8; --b: #9a8f92; --r: #ef5a3c; --g: #3fb26f; --c: #bfc3cf;
  --shadow: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 30px rgba(0, 0, 0, .35);
  --radius: 14px;
  --title-font: "Outfit", "Inter", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--text);
  font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(255, 122, 47, .14), transparent 70%),
    radial-gradient(800px 480px at 100% 0%, rgba(61, 214, 245, .08), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--accent-2); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--title-font); letter-spacing: -.01em; }
h1 { font-size: clamp(24px, 3.6vw, 34px); margin: 0 0 6px; font-weight: 800; }
h2 { font-size: 20px; margin: 0 0 12px; font-weight: 700; }
h3 { font-size: 14px; margin: 14px 0 8px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.muted { color: var(--muted); }
.small-text { font-size: 13px; }
code { font-family: ui-monospace, Consolas, monospace; }

/* ----- Buttons and inputs ----- */
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text); text-decoration: none; font-weight: 500; line-height: 1.3;
}
button:hover:not(:disabled), .button:hover { border-color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
button.primary, .button.primary {
  border: 0; color: #fff; font-weight: 700; font-family: var(--title-font); letter-spacing: .01em;
  background: linear-gradient(135deg, var(--accent-2), var(--accent) 55%, #e2501f); box-shadow: 0 6px 18px rgba(255, 122, 47, .3);
}
button.primary:hover:not(:disabled), .button.primary:hover { filter: brightness(1.08); }
button.danger { border: 0; background: #c4291c; color: #fff; font-weight: 600; }
.big { padding: 12px 22px; font-size: 16px; }
button.link { border: 0; background: none; padding: 0; color: var(--accent-2); text-decoration: underline; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.row.end { justify-content: flex-end; }
input:not([type=checkbox]), select { padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); min-width: 0; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 999px; background: var(--line); position: relative; margin: 0; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }
.switch.small { font-size: 13px; color: var(--muted); }

/* ----- Header ----- */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px 20px;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: rgba(11, 14, 23, .82); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); font-family: var(--title-font); font-weight: 800; font-size: 21px; letter-spacing: -.02em; flex: none; }
.brand b { color: var(--accent); }
.nav { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav a { padding: 7px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; white-space: nowrap; font-weight: 600; font-size: 14px; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.on { color: var(--accent-2); background: var(--accent-soft); }
.who { flex: none; }
.chip { display: inline-block; padding: 7px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; }
@media (max-width: 760px) { .top { flex-wrap: wrap; } .nav { order: 3; flex-basis: 100%; } .who { margin-left: auto; } }

main { flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; padding: 22px 16px 40px; }
main:focus { outline: none; }
body.drafting main { max-width: 1600px; }
section { margin: 0 0 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.section-head h1, .section-head h2 { margin: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); margin: 0 0 18px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 0 20px; }
.note { color: var(--muted); padding: 14px 16px; background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); margin: 0 0 14px; }
.note.error { color: var(--error); border-style: solid; }
.center-card { text-align: center; max-width: 520px; margin: 40px auto; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 30px 24px; }
.with-icon { display: inline-flex; align-items: center; gap: .45em; }
.set-icon {
  display: inline-block; width: 1.3em; height: 1.3em; flex: none; vertical-align: middle;
  -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat;
  background: linear-gradient(160deg, #fff3c4, #f2b33d 45%, #b8651a);   /* tone-0: gold */
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .7));
}
/* Each set gets one of these colours (always the same one). */
.set-icon.tone-1 { background: linear-gradient(160deg, #ffd0a8, #ff7a2f 50%, #b5310f); }   /* ember */
.set-icon.tone-2 { background: linear-gradient(160deg, #c9f7ff, #3dd6f5 50%, #1178a8); }   /* sky */
.set-icon.tone-3 { background: linear-gradient(160deg, #e3d9ff, #a78bfa 50%, #5b3fc4); }   /* violet */
.set-icon.tone-4 { background: linear-gradient(160deg, #c8ffe0, #4fe0a4 50%, #138a5c); }   /* emerald */
.set-icon.tone-5 { background: linear-gradient(160deg, #ffd6ea, #ff6fb5 50%, #b02a6e); }   /* rose */
.set-icon.tone-6 { background: linear-gradient(160deg, #efffc2, #a3e635 50%, #4d7c0f); }   /* lime */
.set-icon.tone-7 { background: linear-gradient(160deg, #ffe7a3, #ffcb05 50%, #c76d00); }   /* sun */

/* ----- Stat tiles ----- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 12px; margin: 0 0 22px; }
.tiles.compact .stat { padding: 10px 14px; }
.tiles.compact .stat .value { font-size: 19px; }
.stat { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 2px; }
.stat::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--frame); }
.stat .label { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.stat .value { font-family: var(--title-font); font-size: 24px; font-weight: 700; }
.stat .sub { color: var(--muted); font-size: 12.5px; }

/* ----- Home ----- */
.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 12px 0 18px; }
.hero h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.04; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--edge-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 16px; max-width: 560px; }
.hero-fan { position: relative; height: 260px; }
.fan-card {
  position: absolute; left: 50%; bottom: 0; width: 140px; aspect-ratio: 63 / 88; border-radius: 9px; transform-origin: 50% 120%;
  background: radial-gradient(ellipse at 50% 45%, #c9873a 0 18%, transparent 19%), radial-gradient(ellipse at 50% 45%, #3b2416 0 32%, transparent 33%),
    linear-gradient(160deg, #3a2a1c, #1b120b); border: 5px solid #120c08; box-shadow: var(--shadow);
}
.fan-card.f0 { transform: translateX(-50%) rotate(-24deg); }
.fan-card.f1 { transform: translateX(-50%) rotate(-12deg); }
.fan-card.f2 { transform: translateX(-50%) rotate(0deg); }
.fan-card.f3 { transform: translateX(-50%) rotate(12deg); }
.fan-card.f4 { transform: translateX(-50%) rotate(24deg); }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .hero-art { display: none; } }

/* ----- Sets ----- */
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.set-tile {
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left;
  padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; font-weight: 400;
}
.set-tile .set-icon { grid-row: 1 / 3; width: 30px; height: 30px; }
.set-tile .st-name { font-weight: 600; font-size: 14px; line-height: 1.25; }
.set-tile .st-sub { font-size: 12.5px; }
.set-tile:hover { border-color: var(--accent); }
.set-tile.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }

/* ----- New draft ----- */
.new-draft .nd-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.new-draft #set-filter { flex: 1 1 260px; max-width: 420px; }
.pack-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 14px 0 4px; }
.pack-slot { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 12px 14px; border-radius: 14px; border: 2px dashed var(--line); background: var(--bg-2); font-weight: 400; }
.pack-slot.on { border-style: solid; border-color: var(--accent); }
.ps-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.ps-set { display: flex; align-items: center; gap: 8px; }
.ps-set .muted { font-size: 13px; }

/* ----- Draft lists ----- */
.draft-list { display: grid; gap: 8px; }
.draft-row, .rank li > a, .li-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--text);
}
.draft-row:hover, .rank li > a:hover { border-color: var(--accent); }
.draft-row .set-icon, .rank .set-icon { width: 26px; height: 26px; }
.grow { flex: 1; min-width: 0; display: grid; }
.grow > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow .muted { font-size: 13px; }
.dr-colors { font-size: 13px; width: 70px; }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.live { background: var(--accent-soft); color: var(--accent-2); }
.badge.ok { background: rgba(79, 224, 164, .15); color: var(--ok); }
.badge.bad { background: rgba(255, 138, 128, .15); color: var(--error); }

/* ----- Mana and grades ----- */
.cost { display: inline-flex; gap: 2px; vertical-align: middle; margin-left: 4px; }
.pip {
  display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; font-size: 10px; font-weight: 800; color: #1b1b1b;
  background: var(--c); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25), 0 1px 1px rgba(0, 0, 0, .4); font-family: "Inter", sans-serif; line-height: 1;
}
.pip.w { background: var(--w); } .pip.u { background: var(--u); } .pip.b { background: var(--b); } .pip.r { background: var(--r); } .pip.g { background: var(--g); }
.pip.c, .pip.generic { background: var(--c); }
.pip.hybrid { background: linear-gradient(135deg, var(--w), var(--b)); font-size: 8px; }
.pips { display: inline-flex; gap: 3px; }
.pips .pip { width: 15px; height: 15px; }
.grade {
  display: inline-grid; place-items: center; min-width: 40px; height: 34px; padding: 0 8px; border-radius: 10px; font-family: var(--title-font);
  font-weight: 800; font-size: 17px; color: #0b0e17; background: var(--c);
}
.grade.big { min-width: 76px; height: 64px; font-size: 34px; border-radius: 16px; }
.grade.g-a { background: linear-gradient(135deg, #7ff0bd, #2fc488); }
.grade.g-b { background: linear-gradient(135deg, #8fd3ff, #4aa3e8); }
.grade.g-c { background: linear-gradient(135deg, #ffe08f, #f2b705); }
.grade.g-d { background: linear-gradient(135deg, #ffb38a, #ef7a3c); }
.grade.g-f { background: linear-gradient(135deg, #ff9a9a, #e0453b); }

/* ----- Cards ----- */
.card {
  position: relative; display: block; padding: 0; border: 0; border-radius: 4.6% / 3.4%; overflow: hidden; background: #111; aspect-ratio: 488 / 680;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .5); transition: transform .12s ease, box-shadow .12s ease; width: 100%;
}
.card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card .noimg { display: grid; place-items: center; height: 100%; padding: 8px; color: var(--muted); font-size: 13px; text-align: center; }
.card.foil::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: .35;
  background: linear-gradient(115deg, transparent 20%, #ff9bd2 35%, #8fd3ff 50%, #ffe58f 62%, transparent 78%); background-size: 300% 100%; animation: holo 5s linear infinite;
}
@keyframes holo { from { background-position: 0% 0; } to { background-position: 300% 0; } }
.card .rating {
  position: absolute; right: 6px; top: 6px; padding: 2px 7px; border-radius: 8px; font-weight: 800; font-size: 12px; background: rgba(0, 0, 0, .78); color: #fff;
}
.card .rating.top { background: var(--accent); color: #1a0b02; }

/* ----- The draft screen ----- */
.draft-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 10px 14px; margin: 0 0 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
}
.db-set { display: flex; align-items: center; gap: 10px; }
.db-set .set-icon { width: 30px; height: 30px; }
.db-set > div { display: grid; }
.db-set b { font-family: var(--title-font); font-size: 17px; }
.db-progress { display: flex; align-items: center; gap: 8px; flex: 1 1 160px; }
.db-progress .bar { flex: 1; height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.db-progress .fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 999px; }
.db-pass b { color: var(--accent-2); }
.db-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-left: auto; }
.draft-main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .draft-main { grid-template-columns: 1fr; } .draft-side { order: -1; } .preview { display: none; } }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
@media (max-width: 520px) { .pack-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; } }
.pickable { cursor: pointer; }
.pickable:hover { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--accent-2), 0 12px 24px rgba(0, 0, 0, .5); }
.pickable.chosen { transform: translateY(-6px); box-shadow: 0 0 0 3px var(--accent), 0 0 24px rgba(255, 122, 47, .55); }
.pickable:disabled { opacity: .55; }
.pack-help { margin: 10px 0 0; }

/* "Need help?": suggested picks with reasons, and 1-2-3 marks on the same cards in the pack. */
.help-btn { border-color: rgba(255, 170, 60, .55); }
.hint-rank {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-weight: 800; font-size: 13px;
  background: var(--accent); color: #1a0b02; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); vertical-align: middle;
}
.hint-rank.r2 { background: #8fd3ff; }
.hint-rank.r3 { background: #cfd6e4; }
.card .hint-rank { position: absolute; left: 6px; top: 6px; width: 28px; height: 28px; font-size: 15px; }
.help-panel { margin: 0 0 14px; padding: 12px 14px; background: var(--panel); border: 1px solid rgba(255, 170, 60, .45); border-radius: 16px; }
.hp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.hp-head b { font-family: var(--title-font); font-size: 17px; }
.hp-summary { margin: 0 0 10px; padding-left: 18px; color: var(--muted); font-size: 14px; }
.hp-picks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hp-picks > li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: start; }
.hp-picks .card.mini { width: 92px; }
.hp-why b { display: flex; align-items: center; gap: 8px; }
.hp-why ul { margin: 6px 0 8px; padding-left: 18px; font-size: 14px; }
.hp-why li { margin: 2px 0; }
@media (max-width: 520px) { .hp-picks > li { grid-template-columns: 64px minmax(0, 1fr); } .hp-picks .card.mini { width: 64px; } }
.draft-side { position: sticky; top: 76px; display: grid; gap: 12px; }
.preview { aspect-ratio: 488 / 680; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; text-align: center; }
.preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview .muted { padding: 16px; }
.take { width: 100%; }
.pod { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.pod-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; }
.pod-seats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pod-seats li { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 10px; background: var(--bg-2); font-size: 13.5px; }
.pod-seats li.you { outline: 2px solid var(--accent); }
.avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 12px; flex: none; }
.pool { margin-top: 22px; }
.pool .section-head h2 .muted { font-size: 16px; }
#pool-colors { display: flex; gap: 10px; }
.pc { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; }

/* Stacked columns by mana value */
.stacks { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .stacks { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stack-head { font-family: var(--title-font); font-weight: 700; font-size: 14px; margin: 0 0 6px; text-align: center; }
.stack { display: grid; }
.stack .card + .card { margin-top: -118%; }
.stack .card:hover { transform: translateY(-6px); z-index: 2; }

/* ----- Results ----- */
.results-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 14px; }
.results-head > div { display: flex; align-items: center; gap: 12px; }
.results-head .set-icon { width: 44px; height: 44px; }
.results-head h1 { margin: 0; }
.results-head p { margin: 0; }
.rh-grade > div { display: grid; gap: 2px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); max-width: 100%; overflow-x: auto; }
.seg a { padding: 8px 14px; color: var(--muted); text-decoration: none; white-space: nowrap; font-size: 14px; font-weight: 600; }
.seg a.on { background: var(--accent); color: var(--accent-text); }
.tabs { margin: 0 0 18px; }
.table-seats { display: grid; gap: 10px; }
.seat-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.seat-card.you { border-color: var(--accent); }
.seat-card summary { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; }
.seat-card summary::-webkit-details-marker { display: none; }
.seat-card summary .avatar { width: 32px; height: 32px; font-size: 15px; }
.seat-card[open] summary { border-bottom: 1px solid var(--line); }
.seat-card > :not(summary) { margin-left: 16px; margin-right: 16px; }
.seat-card > .stacks { margin-bottom: 8px; }
.seat-top { display: grid; grid-template-columns: repeat(5, minmax(0, 110px)); gap: 8px; margin-top: 12px; }
.pick-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin-bottom: 16px; }
.ps-item { display: grid; gap: 2px; font-size: 11px; text-align: center; }
.pick-review { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pick-review li { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.pr-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 8px; }
.pr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 6px; }
.card.mini { border-radius: 5px; }
.card.picked { box-shadow: 0 0 0 3px var(--accent), 0 0 16px rgba(255, 122, 47, .6); }
.card.toprated:not(.picked)::before { content: "Top"; position: absolute; left: 4px; top: 4px; z-index: 1; padding: 1px 6px; border-radius: 6px; background: #2fc488; color: #04140c; font-size: 10px; font-weight: 800; }
.card.picked::before { content: "Picked"; position: absolute; left: 4px; top: 4px; z-index: 1; padding: 1px 6px; border-radius: 6px; background: var(--accent); color: #1a0b02; font-size: 10px; font-weight: 800; }

/* ----- Stats ----- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 16px; }
.filters label { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.card-link { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; text-align: left; font-weight: 400; }
.card-link img { width: 40px; border-radius: 3px; flex: none; }
.card-link > span { display: grid; }
.card-link:hover b { color: var(--accent-2); }

/* ----- Dialogs ----- */
dialog { width: min(920px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
dialog.small { width: min(460px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(4, 6, 12, .72); }
.pad { padding: 22px; }
.close { position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 0; background: var(--bg-2); font-size: 22px; z-index: 1; }
.detail { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px; padding: 24px; }
@media (max-width: 720px) { .detail { grid-template-columns: 1fr; padding: 16px; } }
.detail .big { display: grid; gap: 10px; }
.detail .big img { width: 100%; border-radius: 14px; display: block; }
.detail h2 { margin: 0 40px 4px 0; }
.detail .sub { color: var(--muted); margin: 0 0 14px; }
.detail .text { white-space: pre-line; background: var(--bg-2); border-radius: 10px; padding: 12px 14px; }
.detail dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; }
.signin { text-align: center; display: grid; justify-items: center; gap: 6px; }
.providers { display: grid; gap: 10px; margin: 12px 0 6px; width: 100%; }
.provider { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid #dadce0; background: #fff; color: #1f1f1f; }
.provider svg { width: 20px; height: 20px; }
.provider.facebook { background: #1877f2; border-color: #1877f2; color: #fff; }
.provider.microsoft { background: #2f2f2f; border-color: #444; color: #fff; }
.provider.off { opacity: .45; cursor: not-allowed; }
.guest-btn { width: 100%; padding: 12px 16px; font-weight: 600; }
.dev-box { text-align: left; width: 100%; margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.dev-box summary { cursor: pointer; color: var(--muted); font-size: 13.5px; }
.dev-login { display: grid; gap: 10px; padding-top: 8px; }
.dev-login label { display: grid; gap: 4px; font-size: 14px; }
#cf-input-label { display: grid; gap: 4px; margin: 0 0 8px; }
.form-row { display: grid; gap: 6px; margin: 0 0 14px; }
.form-row .row { margin: 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.danger-zone { border-color: rgba(255, 138, 128, .4); }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 50; max-width: calc(100vw - 32px); background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-weight: 600; box-shadow: var(--shadow); }
.toast.error { background: #c4291c; color: #fff; }
.foot { padding: 16px; text-align: center; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); }
.foot p { margin: 4px auto; max-width: 900px; }

@media (prefers-reduced-motion: reduce) {
  .card.foil::after { animation: none; }
  .card, .pickable { transition: none; }
}
.stack { display: grid; gap: 4px; margin: 12px 0 4px; }
.error-text { color: var(--error); margin: 6px 0 0; font-size: 14px; }

/* Drafting without an account: the prompt to sign up and keep drafts */
.save-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 0 0 18px; padding: 14px 18px;
  border-radius: 16px; border: 1px solid rgba(255, 122, 47, .45); background: linear-gradient(135deg, rgba(255, 122, 47, .16), rgba(167, 139, 250, .1)); }
.save-banner > div { display: grid; gap: 2px; max-width: 760px; }
.save-banner b { font-family: var(--title-font); font-size: 17px; }

/* Set names in the set lists: white letters with a black outline. */
.set-tile .st-name {
  color: #fff; font-family: var(--title-font); font-weight: 800; font-size: 15px; letter-spacing: .01em;
  -webkit-text-stroke: 3px #000; paint-order: stroke fill;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.set-tile .set-icon { width: 32px; height: 32px; }
.set-year { grid-column: 1 / -1; margin: 14px 0 2px; font-family: var(--title-font); font-weight: 800; font-size: 18px; color: var(--muted); }
.set-year:first-child { margin-top: 0; }
.nd-sort { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }

/* Admin: drafts-per-day chart */
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .mark { fill: var(--accent); }
.chart .hit { fill: transparent; }
.chart .bar:hover .mark { fill: var(--accent-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Mana symbols: coloured discs with a dark glyph, like the game's own */
.mana-sym { --sym-bg: var(--c); display: inline-grid; place-items: center; border-radius: 50%; background: var(--sym-bg); color: #15110d;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25), 0 1px 2px rgba(0, 0, 0, .55); padding: 2px; line-height: 0; flex: none; }
.mana-sym svg { fill: currentColor; }
.mana-sym.ms-w { --sym-bg: #f8f1d4; }
.mana-sym.ms-u { --sym-bg: #a9d6f5; }
.mana-sym.ms-b { --sym-bg: #c9bfba; }
.mana-sym.ms-r { --sym-bg: #f6a98a; }
.mana-sym.ms-g { --sym-bg: #9fd3a8; }
.mana-sym.ms-c { --sym-bg: #d5d5dc; }
.pips { display: inline-flex; gap: 4px; align-items: center; }

/* The deck summary on the results page */
.deck-summary .stat { gap: 8px; align-content: start; }
.ds-row { display: flex; align-items: center; gap: 12px; }
.ds-note { color: var(--muted); font-size: 13px; line-height: 1.35; }
.ds-note b { color: var(--text); font-size: 15px; }
.ds-name { font-family: var(--title-font); font-weight: 700; font-size: 20px; }
.ds-lands { display: flex; flex-wrap: wrap; gap: 14px; }
.ds-land { display: inline-flex; align-items: center; gap: 7px; }
.ds-land b { font-family: var(--title-font); font-size: 22px; }
.ds-land .muted { font-size: 13px; }

/* ----- Home: two sealed booster packs (from CardVault) ----- */
.hero-art { display: flex; justify-content: center; }
   A pack is: a ribbed, heat-sealed crimp at the top and bottom, and a glossy pillowed body between them with the
   game logo, the set's art, the set name and the card count. Three wrapper eras for Magic, like the real ones:
   vintage (to 1998: colour body, cream oval), classic (1999-2014: dark body, art in a bevelled diamond),
   modern (2015 on: full-bleed art). The wrapper colour (tone) is picked per set. */
.hero-art { gap: 30px; perspective: 1000px; align-items: center; }
.booster {
  --body: #1d2a4a; --body-2: #0c1428; --crimp: #141a2c; --ink: #fff;
  position: relative; display: grid; grid-template-rows: 10% 1fr 10%; width: 186px; aspect-ratio: 10 / 17;
  text-decoration: none; color: var(--ink); transform: rotate(-5deg); transition: transform .25s ease, filter .25s ease;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .4)) drop-shadow(0 2px 2px rgba(0, 0, 0, .3));
}
.booster + .booster { transform: rotate(5deg) translateY(14px); }
.booster:hover { transform: rotate(0) translateY(-8px) scale(1.04); z-index: 1; }
.booster.loading { background: linear-gradient(160deg, var(--line), var(--panel)); border-radius: 6px; filter: none; }

/* Wrapper colours */
.booster.tone-0 { --body: #1d3f7a; --body-2: #0b1a3a; --crimp: #0f1730; }   /* blue */
.booster.tone-1 { --body: #7a1c16; --body-2: #3a0807; --crimp: #1a0c0b; }   /* red */
.booster.tone-2 { --body: #26262a; --body-2: #0b0b0d; --crimp: #0d0d0f; }   /* black */
.booster.tone-3 { --body: #1f5a34; --body-2: #0b2614; --crimp: #0e1a12; }   /* green */
.booster.tone-4 { --body: #4b2a6e; --body-2: #1e0f33; --crimp: #150c22; }   /* purple */
.booster.tone-5 { --body: #eceae4; --body-2: #c9c5bb; --crimp: #d9d6cf; --ink: #1b1b1b; }   /* white */
.booster.pokemon { --body: #2b49c4; --body-2: #0f1f6e; --crimp: #b9bec9; }
.booster.pokemon.tone-1, .booster.pokemon.tone-4 { --body: #c4302b; --body-2: #5e0c0b; }
.booster.pokemon.tone-2, .booster.pokemon.tone-5 { --body: #1b1d24; --body-2: #050507; }

/* The crimped seals: fine vertical ribs, a ragged cut edge, a little crumple. */
.b-crimp {
  position: relative; z-index: 2;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 35%, rgba(0, 0, 0, .25) 70%, rgba(255, 255, 255, .1)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .2) 0 1.5px, rgba(0, 0, 0, .28) 1.5px 3px),
    linear-gradient(90deg, rgba(0, 0, 0, .35), rgba(255, 255, 255, .15) 30%, rgba(0, 0, 0, .1) 55%, rgba(255, 255, 255, .12) 80%, rgba(0, 0, 0, .35)),
    var(--crimp);
}
.b-crimp.top {
  border-radius: 2px 2px 0 0;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) top / 5px 3px repeat-x, linear-gradient(#000 0 0) bottom / 100% calc(100% - 3px) no-repeat;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) top / 5px 3px repeat-x, linear-gradient(#000 0 0) bottom / 100% calc(100% - 3px) no-repeat;
}
.b-crimp.bottom {
  border-radius: 0 0 2px 2px;
  -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) bottom / 5px 3px repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - 3px) no-repeat;
  mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) bottom / 5px 3px repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - 3px) no-repeat;
}
.b-crimp::after { /* the seal line where the crimp meets the body */
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: rgba(0, 0, 0, .35);
}
.b-crimp.top::after { bottom: 0; }
.b-crimp.bottom::after { top: 0; }

/* The body: wrapper colour, the art printed on it, and the text. */
.b-body { position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, var(--body), var(--body-2) 85%); }
.b-art-wrap { position: absolute; inset: 0; }
.b-art { width: 100%; height: 100%; object-fit: cover; display: block; }
.b-art.zoom-mtg { transform: scale(2.05); transform-origin: 50% 30%; }
.b-art.zoom-pokemon { transform: scale(1.9); transform-origin: 50% 27%; }

/* Modern (2015 on) and Pokemon: full-bleed art that fades into the wrapper colour behind the logo and set name. */
.era-modern .b-art-wrap, .booster.pokemon .b-art-wrap {
  -webkit-mask: linear-gradient(180deg, transparent 0, #000 24%, #000 66%, transparent 92%);
  mask: linear-gradient(180deg, transparent 0, #000 24%, #000 66%, transparent 92%);
}
.era-modern .b-art { object-position: 50% 30%; }
/* Classic (1999 to 2014): the art in a bevelled diamond window. */
.era-classic .b-art-wrap {
  inset: 25% 8% 27%; clip-path: polygon(50% 0, 100% 22%, 100% 78%, 50% 100%, 0 78%, 0 22%);
  background: linear-gradient(135deg, #e9d9a8, #8a6a2a);
}
.era-classic .b-art { clip-path: polygon(50% 3%, 96% 23.5%, 96% 76.5%, 50% 97%, 4% 76.5%, 4% 23.5%); }
/* Vintage (to 1998): no art, a cream oval with the logo and the set name. */
.era-vintage .b-art-wrap { display: none; }
.era-vintage .b-oval {
  position: absolute; inset: 16% 10% 18%; border-radius: 50%; display: grid; place-content: center; gap: 6px; text-align: center;
  background: radial-gradient(ellipse at 45% 35%, #fbf3dc, #eadcb5 70%, #d9c48f); color: #3b2414;
  box-shadow: inset 0 0 0 2px rgba(120, 80, 30, .45), 0 0 0 3px rgba(0, 0, 0, .15);
}
.booster.era-vintage { --crimp: #f1efe9; }
.era-vintage .b-oval .b-brand { font-size: 23px; }
.era-vintage .b-oval .b-setname { position: static; color: #3b2414; text-shadow: none; font-size: 15px; font-style: italic; text-transform: none; letter-spacing: 0; }
.era-vintage .b-oval .b-kind { font-family: Georgia, serif; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.b-oval { display: none; }
.era-vintage .b-oval { display: grid; }
.era-vintage .b-top, .era-vintage .b-bottom .b-setname { display: none; }

/* Logo and text */
.b-top { position: absolute; top: 5%; left: 0; right: 0; display: grid; justify-items: center; z-index: 1; }
.b-brand {
  font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 27px; line-height: .95; letter-spacing: .02em;
  background: linear-gradient(180deg, #ffe0a3 0, #f39a3d 45%, #c4471a 75%, #8e2b0c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: .6px rgba(40, 10, 0, .85); filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .75));
}
.b-sub { font-family: Georgia, serif; font-style: italic; font-size: 10.5px; color: #fff; margin-top: 1px; text-shadow: 0 1px 2px rgba(0, 0, 0, .9); }
.tone-5 .b-sub { color: #1b1b1b; text-shadow: none; }
.booster.pokemon .b-brand {
  font-family: var(--title-font); font-weight: 800; font-size: 29px; letter-spacing: -.01em;
  background: linear-gradient(180deg, #fff26b, #ffcb05 55%, #e8a400); -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 1.6px #2a3fbf; filter: drop-shadow(0 2px 0 #1b2a8a) drop-shadow(0 3px 4px rgba(0, 0, 0, .5));
}
.b-age { position: absolute; top: 2.5%; right: 5%; font-size: 6.5px; font-weight: 700; letter-spacing: .06em; opacity: .85; z-index: 1; }
.b-bottom { position: absolute; left: 6%; right: 6%; bottom: 4.5%; display: grid; justify-items: center; gap: 3px; text-align: center; z-index: 1; }
.b-setname {
  font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 16px; line-height: 1.05; text-transform: uppercase; letter-spacing: .03em;
  color: #f4f1ea; text-shadow: 0 1px 0 rgba(0, 0, 0, .9), 0 2px 6px rgba(0, 0, 0, .8);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.tone-5 .b-setname { color: #1b1b1b; text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
.booster.pokemon .b-setname { font-family: var(--title-font); text-transform: none; font-size: 17px; }
.b-kind { font-size: 7.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .95; }

/* Gloss: vertical light streaks, darker bulging edges, a few diagonal crumples, and a slow sheen. */
.b-gloss {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 12%, rgba(255, 255, 255, .16) 22%, rgba(255, 255, 255, 0) 32%,
      rgba(255, 255, 255, 0) 66%, rgba(255, 255, 255, .1) 76%, rgba(0, 0, 0, 0) 88%, rgba(0, 0, 0, .55)),
    linear-gradient(172deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, .12) 41%, rgba(255, 255, 255, 0) 44%),
    linear-gradient(8deg, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .1) 71%, rgba(255, 255, 255, 0) 74%),
    linear-gradient(180deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, 0) 8%, rgba(0, 0, 0, 0) 92%, rgba(0, 0, 0, .3));
}
.b-gloss::after {
  content: ""; position: absolute; inset: 0; mix-blend-mode: overlay;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .5) 45%, transparent 60%);
  background-size: 320% 100%; animation: holo 7s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .b-gloss::after { animation: none; } .booster { transition: none; } }
.era-vintage .b-oval .b-sub { color: #3b2414; text-shadow: none; }

/* Three packs on the home page, fanned like a hand: the middle one upright and raised, the outer ones tilted. */
.hero-art .booster { width: 150px; margin: 0 4px; }
.hero-art .b-setname { font-size: 13px; -webkit-line-clamp: 3; }
.hero-art .b-brand { font-size: 23px; }
.hero-art .booster:nth-child(1) { transform: rotate(-9deg) translateY(18px); }
.hero-art .booster:nth-child(2) { transform: translateY(-6px); z-index: 1; }
.hero-art .booster:nth-child(3) { transform: rotate(9deg) translateY(18px); }
.hero-art .booster:hover { transform: translateY(-14px) scale(1.05); z-index: 2; }

/* Packs with depth: layered shadows (a tight contact shadow, a soft mid shadow, a wide ambient one), a shadow on the
   "table" under the fan, the outer packs turned toward you in 3D, and a lift on hover. */
.hero-art { position: relative; perspective: 900px; transform-style: preserve-3d; padding-bottom: 26px; }
.hero-art::after {
  content: ""; position: absolute; left: 8%; right: 8%; bottom: 0; height: 46px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .65), rgba(0, 0, 0, .25) 45%, transparent 72%);
  filter: blur(6px);
}
.hero-art .booster {
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .55)) drop-shadow(0 12px 12px rgba(0, 0, 0, .45)) drop-shadow(0 28px 36px rgba(0, 0, 0, .4));
  transition: transform .3s ease, filter .3s ease;
}
.hero-art .booster:nth-child(1) { transform: rotate(-9deg) rotateY(16deg) translateY(18px); }
.hero-art .booster:nth-child(2) { transform: translateY(-6px) translateZ(20px); }
.hero-art .booster:nth-child(3) { transform: rotate(9deg) rotateY(-16deg) translateY(18px); }
.hero-art .booster:hover {
  transform: translateY(-18px) translateZ(40px) scale(1.05);
  filter: drop-shadow(0 4px 2px rgba(0, 0, 0, .5)) drop-shadow(0 22px 18px rgba(0, 0, 0, .45)) drop-shadow(0 44px 50px rgba(0, 0, 0, .45));
}
/* A light from the upper left: a soft highlight on the left of each wrapper, shade on the right. */
.hero-art .b-body::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(100deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 30%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, .3));
}
@media (prefers-reduced-motion: reduce) { .hero-art .booster { transition: none; } }
/* Phones: the home page's three packs, smaller so the fan fits the screen. (The `.hero-art { display: flex }` above
   comes after the 760px rule that once hid them, so they show; this keeps them from widening the page.) */
@media (max-width: 760px) {
  .hero > .hero-art:not(.mini-packs) { display: flex; gap: 4px; zoom: .72; overflow-x: clip; overflow-clip-margin: 40px; }
}
@media (max-width: 400px) { .hero > .hero-art:not(.mini-packs) { zoom: .62; } }
/* Phones: filter strips (colours, rarity) wrap onto a second line instead of hiding buttons off the edge. */
@media (max-width: 520px) { .seg { flex-wrap: wrap; } }

/* Top decks this week (home page): rank, grade, who and which set, colours, the deck's best cards. */
.top-decks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.top-deck {
  display: grid; grid-template-columns: 28px auto minmax(150px, 1fr) auto auto; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px;
}
.top-deck:first-child { border-color: rgba(255, 170, 60, .55); box-shadow: 0 0 0 1px rgba(255, 170, 60, .18), 0 10px 30px rgba(0, 0, 0, .3); }
.td-rank { font-family: Outfit, sans-serif; font-weight: 800; font-size: 20px; color: var(--muted); text-align: center; }
.top-deck:first-child .td-rank { color: #ffb347; }
.td-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.td-who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.td-who b, .td-who .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-who .muted { font-size: 13px; }
.td-cards { display: flex; gap: 6px; }
.td-card { padding: 0; border: 0; background: none; border-radius: 6px; overflow: hidden; width: 54px; aspect-ratio: 488 / 680; cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .45); transition: transform .15s ease; }
.td-card:hover { transform: translateY(-3px) scale(1.06); }
.td-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.td-card .noimg { font-size: 9px; padding: 4px; display: block; }
.td-card.foil { position: relative; }
.td-card.foil::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 0, 128, .18), rgba(0, 255, 200, .18), rgba(255, 255, 0, .18)); mix-blend-mode: screen; }
@media (max-width: 760px) {
  .top-deck { grid-template-columns: 22px auto 1fr auto; }
  .td-cards { grid-column: 1 / -1; justify-content: flex-start; }
  .td-card { width: 46px; }
}

/* "Buy this card" buttons in the card window. */
.buy { margin: 14px 0 12px; }
.buy h3 { margin-top: 0; }
.buy-links { display: flex; flex-wrap: wrap; gap: 8px; }
.buy-link { display: inline-flex; align-items: center; gap: 6px; }
.buy-link .muted { font-size: 12px; font-weight: 500; }
.buy-price { background: rgba(60, 200, 120, .16); color: #6fe0a0; border-radius: 999px; padding: 1px 8px; font-size: 12.5px; font-weight: 700; }

/* Ad spaces: marked as ads, kept apart from the site's own content. */
.ad-wrap { margin: 22px 0; padding: 8px 10px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); min-height: 110px; position: relative; }
.ad-label { display: block; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ad-wrap ins.adsbygoogle { display: block; min-height: 90px; }
.ad-wrap.placeholder { border-style: dashed; display: grid; place-items: center; min-height: 100px; }
.ad-wrap.placeholder .ad-label { margin: 0; font-size: 12px; }

/* Footer links, Contact us and Privacy pages. */
.foot-links { display: flex; justify-content: center; gap: 18px; margin-bottom: 8px; }
.foot-links a { color: var(--text); font-weight: 600; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.page-narrow { max-width: 760px; margin: 0 auto; }
.contact-form { display: grid; gap: 14px; }
.contact-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form label.stack { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.contact-form textarea { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit; resize: vertical; }
.contact-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 640px) { .contact-form .two { grid-template-columns: 1fr; } }
.prose { line-height: 1.65; }
.prose h2 { margin: 28px 0 8px; font-size: 20px; }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose a { color: var(--accent, #ff9a3c); }

/* Admin: contact messages. */
.messages { display: grid; gap: 12px; margin-top: 14px; }
.message.unread { border-color: rgba(255, 170, 60, .5); }
.msg-head { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.msg-head a { color: var(--accent, #ff9a3c); }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 10px 0 14px; }

/* Top decks, tighter: smaller grade and thumbnails, less padding, rows closer together. */
.top-decks { gap: 6px; }
.top-deck { padding: 6px 12px; gap: 12px; border-radius: 12px; }
.top-deck .grade.big { min-width: 52px; height: 42px; font-size: 22px; border-radius: 11px; }
.td-rank { font-size: 17px; }
.td-card { width: 44px; border-radius: 4px; }
.td-card:hover { transform: translateY(-2px); }
@media (max-width: 760px) { .td-card { width: 40px; } }

/* The big card that pops up when hovering a small one. */
.card-pop { position: fixed; z-index: 50; width: 250px; pointer-events: none; border-radius: 12px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .08); background: var(--panel);
  animation: pop-in .12s ease-out; }
.card-pop img { display: block; width: 100%; aspect-ratio: 488 / 680; }
.card-pop[hidden] { display: none; }
@keyframes pop-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@media (hover: none) { .card-pop { display: none; } }
@media (prefers-reduced-motion: reduce) { .card-pop { animation: none; } }

/* Card stats: most drafted sets, full width, with each set's best deck and most drafted colours on the right. */
.two-col > .panel.wide { grid-column: 1 / -1; }
.most-drafted { gap: 6px; }
.most-drafted li > a { padding: 7px 12px; gap: 16px; }
.md-item { display: grid; gap: 2px; justify-items: start; min-width: 190px; }
.md-label { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.md-val { display: flex; align-items: center; gap: 8px; }
.md-val .grade { min-width: 34px; height: 26px; font-size: 14px; border-radius: 8px; padding: 0 6px; }
.md-who { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
@media (max-width: 820px) {
  .most-drafted li > a { flex-wrap: wrap; }
  .most-drafted .grow { flex-basis: calc(100% - 50px); }
  .md-item { min-width: 0; padding-left: 38px; }
}

/* Card stats table: tighter rows (the card pops up full size on hover). */
.stats-table th, .stats-table td { padding: 4px 10px; }
.stats-table .card-link { gap: 8px; }
.stats-table .card-link img { width: 30px; }
.stats-table .card-link .small-text { font-size: 12px; line-height: 1.3; }
.stats-table .cl-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stats-table .cl-top .pip { width: 14px; height: 14px; }

/* Top decks: one set icon per pack, side by side. */
.td-icons { display: inline-flex; gap: 3px; flex: none; }
.td-icons .set-icon { width: 22px; height: 22px; }

/* What crawlers (and anyone before the script runs) see: the server's plain-HTML version of the page. */
.seo { max-width: 760px; margin: 24px auto; line-height: 1.6; }
.seo h1 { font-size: 32px; margin: 0 0 12px; }
.seo h2 { font-size: 18px; margin: 22px 0 8px; }
.seo-sets { columns: 2 220px; padding-left: 18px; }
.hero p.eyebrow { margin: 0 0 6px; color: var(--accent-2); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.h1-sub { display: block; font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: .02em; font-family: Inter, system-ui, sans-serif; }
.faq details { border-bottom: 1px solid var(--line, rgba(255,255,255,.08)); padding: 10px 2px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--muted); margin: 8px 0 2px; max-width: 820px; line-height: 1.55; }
.version-chip { font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-variant-numeric: tabular-nums; }

/* Replay: the card most drafters take from that pack */
.card.crowd:not(.picked) { box-shadow: 0 0 0 3px #5aa2ff, 0 0 14px rgba(90, 162, 255, .5); }
.pr-score { margin: 4px 0 12px; }
.pr-score .small-text { display: block; margin-top: 2px; }
.pr-agree { color: var(--ok); font-size: 13px; font-weight: 600; }

/* Set stats: the panels above the card table */
.insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; margin: 14px 0 18px; }
.ins-panel h2 { margin-top: 0; font-size: 17px; }
.ins-panel h3 { margin: 10px 0 6px; }
.ins-panel .rank { margin: 0; }
.ins-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ins-card { display: flex; align-items: center; gap: 8px; width: 100%; padding: 3px 6px; border-radius: 8px; background: none; border: 1px solid transparent; color: inherit; text-align: left; font: inherit; font-size: 13px; cursor: pointer; }
.ins-card:hover { border-color: var(--line); background: var(--panel-2); }
.ins-card img { width: 26px; height: auto; border-radius: 3px; flex: none; }
.ins-move { color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ins-move.up { color: var(--ok); }
.ins-move.down { color: var(--accent-2); }
.ins-win { color: var(--muted); font-size: 12px; white-space: nowrap; margin-right: 6px; }
.ins-week { margin: 0 0 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Results: how the deck played */
.record-box { margin: 14px 0; }
.record-box h2 { margin: 0 0 4px; font-size: 17px; }
.record-form { align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.record-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.record-done { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.record-score { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.record-score b { font-size: 26px; font-variant-numeric: tabular-nums; }

/* My stats */
.stat-link { text-decoration: none; color: inherit; }
.stat-link:hover { border-color: var(--accent); }
.my-colors { display: flex; gap: 14px; flex-wrap: wrap; }
.my-color { display: inline-flex; align-items: center; gap: 6px; }
.ins-panel .rank li > .li-row, .ins-panel .rank li > a.li-row { padding: 5px 10px; gap: 8px; }
.ins-panel .rank .grow { min-width: 0; display: flex; flex-direction: column; }
.ins-panel .rank .grow b, .ins-card .grow b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ins-panel .rank .grow .small-text { white-space: nowrap; }
.ins-card .grow { min-width: 0; }
.chart.trend svg { max-width: 760px; }
.home-faq-link { margin: 28px 0 8px; text-align: center; }
.faq #faq-list { margin: 18px 0 22px; }
.faq details summary { font-size: 16px; padding: 4px 0; }

/* Set stats: three small boosters of the set fanned behind the "Draft this set" button */
.set-cta { position: relative; display: flex; flex-direction: column; align-items: center; flex: none; }
.set-cta .button { position: relative; z-index: 5; margin-top: -12px; }
.set-cta .button + .button { margin-top: 8px; }   /* the second button (Sealed deck) sits below the first, not over it */
.hero-art.mini-packs { gap: 0; padding-bottom: 6px; min-height: 115px; perspective: 600px; }
.hero-art.mini-packs::after { left: 4%; right: 4%; height: 24px; }
.hero-art.mini-packs .booster { width: 68px; margin: 0 -4px; }
.hero-art.mini-packs .b-brand { font-size: 10px; }
.hero-art.mini-packs .b-sub, .hero-art.mini-packs .b-age, .hero-art.mini-packs .b-kind { display: none; }
.hero-art.mini-packs .b-setname { font-size: 6px; -webkit-line-clamp: 2; }
.hero-art.mini-packs .booster:nth-child(1) { transform: rotate(-11deg) rotateY(16deg) translateY(8px); }
.hero-art.mini-packs .booster:nth-child(2) { transform: translateY(-4px) translateZ(14px); }
.hero-art.mini-packs .booster:nth-child(3) { transform: rotate(11deg) rotateY(-16deg) translateY(8px); }
.hero-art.mini-packs .booster:hover { transform: translateY(-8px) translateZ(24px) scale(1.06); }
@media (max-width: 760px) { .set-cta .button { margin-top: 0; } .set-cta .button + .button { margin-top: 8px; } }

/* Set stats: tabs, and the line explaining each tab */
.set-tabs { margin: 6px 0 14px; flex-wrap: wrap; }
.tab-intro { margin: 0 0 14px; max-width: 820px; }
.pair-list .li-row { padding: 8px 12px; }
.pair-grade { display: inline-flex; align-items: center; gap: 6px; }
.lb-rank { width: 24px; text-align: center; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.week-best { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.week-best .li-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* All cards: hover a column name for what it means; or open the list */
.stats-table th.has-tip { position: relative; cursor: help; text-decoration: underline dotted rgba(149, 155, 176, .6); text-underline-offset: 3px; }
.th-tip {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; width: 240px; padding: 9px 11px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
  color: var(--text); font-size: 13px; font-weight: 500; line-height: 1.45; text-align: left; text-transform: none; letter-spacing: 0;
  white-space: normal; text-decoration: none; opacity: 0; visibility: hidden; transition: opacity .12s ease; pointer-events: none;
}
.stats-table th.has-tip:hover .th-tip, .stats-table th.has-tip:focus-visible .th-tip { opacity: 1; visibility: visible; }
.stats-table th.has-tip:first-of-type .th-tip { right: auto; left: 0; }
.col-help { margin: 4px 0 10px; font-size: 13px; }
.col-help summary { cursor: pointer; color: var(--muted); }
.col-help dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0 4px; max-width: 900px; }
.col-help dt { font-weight: 700; }
.col-help dd { margin: 0; color: var(--muted); }

/* Sign-in by email: an "or" divider, then email -> code */
.email-signin { width: 100%; display: grid; gap: 8px; }
.or { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.email-form { display: grid; gap: 8px; width: 100%; }
.email-form input { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit; }
.email-form #ev-code { text-align: center; font-size: 22px; letter-spacing: 6px; font-variant-numeric: tabular-nums; }
.email-form .small-text { margin: 0; }

/* Your deck: Edit deck, Copy for MTG Arena, Share */
.deck-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 10px; }
.deck-count { font-size: 14px; color: var(--muted); }
.deck-count b { color: var(--text); font-variant-numeric: tabular-nums; }
.deck-count.short { color: var(--accent-2); }
.share-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; font-size: 14px; }
.share-box a { word-break: break-all; }
#copy-fallback textarea { width: 100%; font: 13px ui-monospace, monospace; background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.edit-card { padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; transition: transform .12s ease, border-color .12s ease; }
.edit-card:hover, .edit-card:focus-visible { border-color: var(--accent); transform: translateY(-3px); }
.edit-card img { display: block; width: 100%; border-radius: 6px; }
.land-step { display: inline-flex; align-items: center; gap: 4px; margin: 2px 6px 2px 0; }
.land-step button { width: 26px; height: 26px; padding: 0; border-radius: 6px; font-weight: 700; line-height: 1; }
.land-step b { min-width: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.shared-lands { margin-top: 10px; }

/* Avatars and profiles */
.avatar-img { border-radius: 50%; flex: none; vertical-align: middle; background: var(--panel-2); }
.who-chip { display: inline-flex; align-items: center; gap: 8px; padding-left: 5px; }
.td-who .avatar-img { margin-right: 2px; }
.player-link { color: inherit; text-decoration: none; }
.player-link:hover { text-decoration: underline; }
.avatar-row { display: flex; align-items: center; gap: 14px; margin: 6px 0 14px; }
.avatar-row .grow { display: flex; flex-direction: column; }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; max-width: 640px; }
.av-sym { font-size: 22px; height: 44px; padding: 0; border-radius: 10px; border: 2px solid transparent; background: var(--panel-2); cursor: pointer; }
.av-col { height: 36px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; padding: 0; }
.av-sym.on, .av-col.on { border-color: var(--accent); }
#avatar-picker { margin: 0 0 14px; }
.profile-head { display: flex; align-items: center; gap: 18px; margin: 10px 0 16px; }
.profile-head h1 { margin: 0; }
.ach-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ach-chips li { padding: 6px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-size: 14px; }
.streak { margin: 0 0 10px; }
.ach-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.ach-list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); opacity: .55; }
.ach-list li.earned { opacity: 1; border-color: var(--accent-soft); background: var(--panel-2); }
.ach-list .grow { display: flex; flex-direction: column; min-width: 0; }
.ach-icon { font-size: 24px; flex: none; }
.ach-bar { display: block; height: 5px; border-radius: 3px; background: var(--line); margin-top: 4px; overflow: hidden; }
.ach-bar .fill { display: block; height: 100%; background: var(--accent); width: 0; }

/* Home: this week's top drafters; the set of the week */
.top-drafters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.top-drafter { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); text-align: center; }
.top-drafter a { display: flex; flex-direction: column; align-items: center; gap: 4px; color: inherit; text-decoration: none; }
.top-drafter .avatar-img { box-shadow: 0 0 0 3px var(--line); }
.top-drafter.p1 .avatar-img { box-shadow: 0 0 0 3px #f5c542; }
.top-drafter.p2 .avatar-img { box-shadow: 0 0 0 3px #c9ced8; }
.top-drafter.p3 .avatar-img { box-shadow: 0 0 0 3px #d08a4b; }
.featured-set { display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin: 14px 0; border-radius: 14px; text-decoration: none; color: inherit;
  background: linear-gradient(100deg, var(--accent-soft), var(--panel) 60%); border: 1px solid var(--accent-soft); }
.featured-set .grow { display: flex; flex-direction: column; }
.featured-set .fs-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); }
.featured-set .set-icon { width: 34px; height: 34px; }

/* Admin: replying to Contact us messages from the site. */
.msg-reply { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--bg-2); border-radius: 8px; }
.msg-reply .msg-body { margin: 4px 0 0; }
.reply-form { display: grid; gap: 8px; margin: 10px 0; }
.reply-form label { display: grid; gap: 6px; }
.reply-form textarea { width: 100%; box-sizing: border-box; resize: vertical; }

/* Admin → Traffic: who's on the site now. */
.live-panel { border-color: rgba(60, 200, 120, .45); }
.live-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 12px; }
.live-head > div { display: flex; align-items: baseline; gap: 8px; }
.live-big { font-family: var(--title-font); font-size: 40px; font-weight: 800; line-height: 1; }
.live-label { font-size: 17px; font-weight: 600; }
.live-dot { width: 14px; height: 14px; border-radius: 50%; background: #3cd98a; box-shadow: 0 0 0 0 rgba(60, 217, 138, .6); animation: live-pulse 2s ease-out infinite; flex: none; }
@keyframes live-pulse { to { box-shadow: 0 0 0 12px rgba(60, 217, 138, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.live-cols, .traffic-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.traffic-cols { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin: 14px 0; }
.traffic-cols .panel { margin: 0; }
.live-cols h3 { margin: 0 0 6px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.live-list { margin-top: 12px; }
.live-list summary { cursor: pointer; font-weight: 600; }
.table.compact th, .table.compact td { padding: 5px 10px; }

/* Admin → Insights: funnel and other horizontal bars. */
.funnel { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.funnel > li { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(80px, 2fr) minmax(90px, auto); align-items: center; gap: 12px; }
.funnel.compact { gap: 6px; }
.funnel.compact > li { grid-template-columns: minmax(120px, 1fr) minmax(80px, 2fr) minmax(60px, auto); }
.f-label { display: grid; gap: 2px; }
.f-num { display: grid; justify-items: end; text-align: right; }
.hbar { display: block; height: 12px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.hbar-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
@media (max-width: 520px) {
  .funnel > li, .funnel.compact > li { grid-template-columns: 1fr auto; }
  .funnel .hbar { grid-column: 1 / -1; grid-row: 2; }
}

/* Sealed deck: the game-type switch on New draft, and the 6 opened packs dealt out. */
.mode-switch { margin-bottom: 14px; }
.sealed-pack { margin: 18px 0; }
.sealed-pack h2 { margin: 0 0 8px; font-size: 18px; }
.sealed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
@media (max-width: 520px) { .sealed-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; } }
.card.dealt { animation: deal .35s ease-out both; cursor: zoom-in; }
@keyframes deal { from { opacity: 0; transform: translateY(-14px) rotate(-3deg) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .card.dealt { animation: none; } }
.rare-tag { position: absolute; left: 6px; top: 6px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%;
  font-size: 11px; font-weight: 800; color: #1a0b02; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.rare-tag.rare { background: linear-gradient(135deg, #ffe08f, #d4a017); }
.rare-tag.mythic { background: linear-gradient(135deg, #ffb38a, #e2632a); }

/* Traffic: the top lists two to a row (wide, room for long page names), and tighter rows in the "on the site now" lists. */
.traffic-cols.wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }
.top-head { margin-top: 18px; }
.top-head h2 { margin: 0; }
.live-cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.live-cols .rank { gap: 4px; }
.live-cols .rank li .li-row { padding: 7px 12px; }

/* Daily challenge: the page's header, the leaderboards, the home banner and the rank on the results page. */
.challenge-hero { border-color: rgba(255, 170, 60, .5); }
.ch-head { display: flex; gap: 16px; align-items: flex-start; }
.ch-head .set-icon { width: 54px; height: 54px; flex: none; }
.ch-head h1 { margin: 2px 0 6px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.ch-you { margin: 12px 0 0; display: flex; align-items: center; gap: 8px; }
.ch-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ch-board li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; background: var(--bg-2); }
.ch-board li.you { outline: 2px solid var(--accent); }
.ch-board li:nth-child(1) .ch-rank { color: #ffd34d; }
.ch-board li:nth-child(2) .ch-rank { color: #d9dee8; }
.ch-board li:nth-child(3) .ch-rank { color: #e0a36a; }
.ch-rank { width: 26px; text-align: center; font-family: var(--title-font); font-weight: 800; font-size: 18px; color: var(--muted); }
.challenge-banner { margin-top: 10px; }
.challenge-rank { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; border-color: rgba(255, 170, 60, .5); }
.challenge-rank span { display: inline-flex; align-items: center; gap: 8px; }
