/* Modboxd — dark slate-cyan theme.
   Cyan is the interactive accent; gold is reserved for 100% completions. */

:root {
  --bg-0: #0a1114;      /* header, footer, wells */
  --bg: #0f191d;        /* page */
  --bg-1: #15232a;      /* panels */
  --bg-2: #1d3039;      /* raised: buttons, inputs */
  --bg-3: #274350;      /* hover */
  --line: #1f333c;
  --line-2: #2c4753;
  --text: #94acb6;
  --text-dim: #7f9aa5;
  --text-hi: #e2f1f5;
  --cyan: #22d3ee;
  --cyan-hi: #8aeaf9;
  --teal: #2dd4bf;
  --green: #4ade80;
  --gold: #f6c453;
  --orange: #ff9a4d;
  --red: #f87171;
  --blue: #8aa4ff;
  --sans: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --radius: 4px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; outline: none; padding-bottom: 64px; }
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img, svg { display: block; max-width: 100%; }
a { color: var(--text-hi); text-decoration: none; }
a:hover { color: var(--cyan); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
::selection { background: rgba(34, 211, 238, .3); }

.wrap { width: min(1000px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(720px, 100% - 32px); }
.columns { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; align-items: start; }
.icon { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }
.gold { color: var(--gold); }
.strong { color: var(--text-hi); font-weight: 600; }
.center { text-align: center; }
small { color: var(--text-dim); font-size: .85em; font-weight: 400; }

/* --- status tones --------------------------------------------------------- */
.status-backlog { --tone: var(--blue); }
.status-playing { --tone: var(--cyan); }
.status-played { --tone: #a9c0c9; }
.status-finished { --tone: var(--green); }
.status-mastered { --tone: var(--gold); }
.status-dropped { --tone: var(--red); }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; white-space: nowrap;
  color: var(--tone, var(--text));
  background: color-mix(in srgb, var(--tone, var(--text)) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--tone, var(--text)) 32%, transparent);
}
h1 .chip { vertical-align: middle; margin-left: 10px; font-family: var(--sans); }
.stars { color: var(--cyan); letter-spacing: .02em; white-space: nowrap; }
.stars.dim { color: var(--text-dim); }
.liked .icon, .like.on .icon { color: var(--orange); }
.fact { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--text-dim); }
.hardcore-heart { width: 13px; height: 11px; fill: #ef4444; }

/* Completion: a plain bar */
.xp { display: block; width: 100%; height: 8px; overflow: hidden; background: rgba(255, 255, 255, .08); border-radius: 2px; }
.xp-fill { display: block; height: 100%; background: #7dd3fc; }

/* --- buttons, forms -------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border: 1px solid transparent; border-radius: var(--radius);
  background: var(--bg-2); color: var(--text-hi);
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; white-space: nowrap;
}
.btn:hover { background: var(--bg-3); color: #fff; }
.btn-primary { background: var(--cyan); color: #04252d; }
.btn-primary:hover { background: var(--cyan-hi); color: #04252d; }
.btn-lg { padding: 12px 22px; font-size: 14px; }
.btn.on { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-quiet { background: transparent; color: var(--text-dim); }
.btn-danger { background: transparent; border-color: color-mix(in srgb, var(--red) 55%, transparent); color: var(--red); }
.btn-danger:hover:not(:disabled) { background: var(--red); border-color: var(--red); color: #2a0606; }
.btn-quiet:hover { background: var(--bg-2); }
.danger:hover, [data-armed] { color: var(--red) !important; }
.btn:disabled { opacity: .5; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--cyan); }
.link:hover { text-decoration: underline; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: var(--radius); background: transparent; color: var(--text-dim); }
.icon-btn:hover:not(:disabled) { background: var(--bg-2); color: var(--text-hi); }
.icon-btn:disabled { opacity: .3; cursor: default; }

.input, select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--bg-0); color: var(--text-hi);
}
.input::placeholder { color: var(--text-dim); }
.input:focus, select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .18); }
textarea.input { resize: vertical; min-height: 84px; font-family: var(--serif); font-size: 16px; line-height: 1.5; }
select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%); background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
input[type="range"] { width: 100%; accent-color: var(--cyan); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--cyan); }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > span, .field > legend, .filter > span {
  display: flex; gap: 8px; align-items: baseline; justify-content: space-between;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text);
}
.field small, .check small { text-transform: none; letter-spacing: 0; }
.field output { color: var(--cyan); font-variant-numeric: tabular-nums; }
.check { display: inline-flex; align-items: center; gap: 7px; color: var(--text); cursor: pointer; }
.form-actions, .toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar { margin: 18px 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.span-2 { grid-column: 1 / -1; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.more-fields summary { cursor: pointer; width: fit-content; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.more-fields summary:hover { color: #fff; }
.more-fields summary small { margin-left: 6px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-dim); }

.hint { color: var(--text-dim); font-size: 13px; }
.hint a, .notice a { color: var(--cyan); }
.notice { margin: 16px 0 0; padding: 10px 14px; border-left: 3px solid var(--gold); background: var(--bg-1); border-radius: var(--radius); font-size: 14px; }
.empty { padding: 26px 20px; border: 1px dashed var(--line-2); border-radius: 6px; text-align: center; color: var(--text-dim); }
.empty .btn { margin-top: 12px; }
.empty.big { margin-top: 64px; padding: 48px 24px; }
.empty.big h1 { font: 400 28px/1.2 var(--serif); color: var(--text-hi); margin-bottom: 8px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }

.panel { background: var(--bg-1); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 12px; color: var(--text-dim); }
.panel-head h3 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text); }

/* --- header / footer ------------------------------------------------------- */
#progress { position: fixed; top: 0; left: 0; z-index: 60; height: 2px; width: 0; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); pointer-events: none; }
#progress.loading { width: 75%; transition: width 6s cubic-bezier(.1, .8, .2, 1); }
#progress.done { width: 100%; opacity: 0; transition: width .15s, opacity .3s .15s; }

#site-header { background: var(--bg-0); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
body.flush #site-header { position: absolute; inset: 0 0 auto; background: linear-gradient(rgba(5, 10, 12, .88), rgba(5, 10, 12, 0)) no-repeat; border-bottom: 0; }
.header-inner { display: flex; align-items: center; gap: 22px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark { display: inline-flex; gap: 2px; }
.brand-mark i { width: 11px; height: 18px; border-radius: 1px; background: var(--cyan); }
.brand-mark i:nth-child(2) { background: var(--teal); }
.brand-mark i:nth-child(3) { background: var(--gold); }
.brand-name { font-size: 23px; font-weight: 800; letter-spacing: -.02em; }
.main-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.main-nav > a, .menu summary {
  font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text);
}
.main-nav > a:hover, .main-nav > a.on, .menu summary:hover { color: #fff; }
.menu { position: relative; }
.menu summary { display: inline-flex; align-items: center; gap: 7px; list-style: none; cursor: pointer; padding: 6px 4px; }
.menu summary::-webkit-details-marker { display: none; }
.menu-items { position: absolute; top: calc(100% + 4px); right: 0; z-index: 30; min-width: 170px; padding: 6px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); display: grid; }
.menu-items > * { padding: 7px 10px; border: 0; border-radius: 3px; background: none; text-align: left; font-size: 14px; color: var(--text-hi); }
.menu-items > *:hover { background: var(--bg-3); color: #fff; }
.nav-search { position: relative; }
.nav-search input { width: 150px; padding: 6px 30px 6px 12px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .1); color: var(--text-hi); transition: width .15s, background .15s; }
.nav-search input:focus { width: 210px; outline: none; background: rgba(255, 255, 255, .92); color: #10191d; }
.nav-search .icon { position: absolute; right: 9px; top: 50%; translate: 0 -50%; color: var(--text); pointer-events: none; }
.nav-search input:focus + .icon { color: #10191d; }
.btn-log { padding: 7px 12px; }
.auth-entry { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.auth-entry a { padding: 7px 13px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; white-space: nowrap; color: var(--text-hi); }
.auth-entry a:hover { background: var(--bg-2); color: #fff; }
.auth-entry a.primary { background: var(--cyan); color: #04252d; }
.auth-entry a.primary:hover { background: var(--cyan-hi); color: #04252d; }

#site-footer { background: var(--bg-0); border-top: 1px solid var(--line); padding: 26px 0 34px; font-size: 13px; color: var(--text-dim); }
#site-footer .wrap { display: grid; gap: 10px; }
#site-footer strong { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { padding: 4px 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.footer-links a:hover { color: var(--cyan); }
/* Mojang asks for this notice to be prominent, so it is not dimmed like the credits around it. */
.footer-notice { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--text-hi); }
.footer-credits { max-width: 80ch; font-size: 12px; }

/* --- legal pages (static HTML: privacy.html, terms.html) ---------------------------- */
.legal { padding-bottom: 20px; font-size: 16px; line-height: 1.65; color: #b8ccd3; }
.legal h2 { margin: 34px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); font: 400 22px/1.25 var(--serif); color: #fff; scroll-margin-top: 20px; }
.legal h3 { margin: 22px 0 6px; font-size: 15px; font-weight: 700; color: var(--text-hi); }
.legal p, .legal ul, .legal table { margin-top: 12px; }
.legal ul { padding-left: 1.3em; list-style: disc; }
.legal li + li { margin-top: 6px; }
.legal a { color: var(--cyan); }
.legal a:hover { text-decoration: underline; }
.legal strong { color: var(--text-hi); }
.legal code { padding: 1px 5px; border-radius: 3px; background: var(--bg-0); font: 13px ui-monospace, Consolas, monospace; color: var(--text-hi); }
.legal table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.legal th, .legal td { padding: 8px 10px; border: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.legal th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
/* Details the operator still has to supply. */
.legal mark { padding: 0 4px; border-radius: 3px; background: rgba(246, 196, 83, .18); color: var(--gold); }
.legal-notice { margin-top: 28px; font-size: 14.5px; }
.legal-links { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 14px; }
.auth-terms { text-align: center; font-size: 12px; }

/* --- section furniture ------------------------------------------------------ */
section { margin-top: 34px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 34px 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); font-size: 12px; color: var(--text-dim); }
section > .section-head:first-child { margin-top: 0; }
.section-head h2 { font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--text); display: flex; align-items: center; gap: 6px; }
.section-head a { display: inline-block; padding: 4px 0; margin: -4px 0; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.section-head a:hover { color: var(--cyan); }
.switch { display: flex; flex-wrap: wrap; gap: 2px; margin: -5px 0; }
.switch a { padding: 5px 11px; margin: 0; border-radius: 999px; }
.switch a:hover { background: var(--bg-1); }
.switch a.on { background: rgba(34, 211, 238, .14); color: var(--cyan-hi); }
.page-head { margin: 38px 0 22px; }
.page-head h1 { font: 400 32px/1.15 var(--serif); color: #fff; }
.page-head h1 a { color: inherit; }
/* The search heading doubles as the box for the next search: a rule draws out under it on focus. */
.search-title { position: relative; }
.search-title input { width: 100%; padding: 0 0 6px; border: 0; background: none; font: 400 32px/1.15 var(--serif); color: #fff; cursor: text; }
.search-title input:focus { outline: none; }
.search-title input::placeholder { color: var(--text-dim); }
.search-title::before, .search-title::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); opacity: 0; transition: opacity .15s; }
.search-title::after { background: var(--cyan); opacity: 1; transform: scaleX(0); transform-origin: left; transition: transform .3s ease-out; }
.search-title:hover::before { opacity: 1; }
.search-title:focus-within::after { transform: scaleX(1); }
.people { display: grid; }
.people a { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text-hi); }
.people a:hover b { color: #fff; }
.people span { display: grid; min-width: 0; line-height: 1.3; }
.people b, .people small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people small { font-size: 12px; color: var(--text-dim); }
.page-head p:not(.eyebrow):not(.byline) { margin-top: 6px; max-width: 62ch; }
.page-head.split { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.page-head.with-art { display: flex; align-items: center; gap: 16px; }
.page-head.with-art .poster { width: 64px; flex: none; }
.head-actions { display: flex; align-items: center; gap: 12px; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--text-dim); }

.tabs { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 18px 0 22px; border-bottom: 1px solid var(--line-2); }
.tabs a { padding: 8px 0; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text); }
.tabs a:hover { color: #fff; }
.tabs a.on { color: #fff; border-bottom-color: var(--cyan); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills a { padding: 4px 11px; border-radius: 999px; background: var(--bg-1); border: 1px solid var(--line); font-size: 13px; color: var(--text); }
.pills a:hover { border-color: var(--line-2); color: #fff; }
.pills a.on { background: rgba(34, 211, 238, .14); border-color: rgba(34, 211, 238, .5); color: var(--cyan-hi); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; }
.pager-page { font-size: 13px; color: var(--text-dim); }

.filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; margin: 30px 0 4px; padding: 14px 16px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 6px; }
.filter { display: grid; gap: 5px; min-width: 130px; }
.filter.grow { flex: 1; min-width: 180px; }
.filter.inline { display: flex; align-items: center; gap: 10px; }
.filter > span { font-size: 11px; color: var(--text-dim); }
.filters select, .filters .input, .filter.inline select { padding: 7px 10px; }
.filters select, .filter.inline select { padding-right: 30px; }

/* --- people ------------------------------------------------------------------ */
.avatar { border-radius: 18%; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.user { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--text-hi); min-width: 0; }
.user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank { min-width: 22px; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text-dim); text-align: right; }

/* --- posters ----------------------------------------------------------------- */
.grid { display: grid; gap: 18px 14px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.poster { position: relative; display: block; aspect-ratio: 1; border-radius: 5px; overflow: hidden; background: var(--bg-1); }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.poster-frame { position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(226, 241, 245, .14); transition: box-shadow .12s; pointer-events: none; }
a.poster:hover .poster-frame, a.stack:hover .poster-frame { box-shadow: inset 0 0 0 2px var(--cyan); }
.poster-fallback {
  display: grid; place-items: center; width: 100%; height: 100%; container-type: inline-size;
  background: linear-gradient(135deg, hsl(var(--hue) 42% 26%), hsl(calc(var(--hue) + 40) 46% 14%));
  color: hsl(var(--hue) 60% 82%); font: 700 clamp(14px, 3.4vw, 34px) var(--serif); letter-spacing: .04em;
}
.poster-badge {
  position: absolute; left: 5px; bottom: 5px; display: grid; place-items: center; width: 20px; height: 20px;
  border-radius: 50%; background: rgba(6, 13, 16, .9); color: var(--tone); font-size: 11px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--tone) 50%, transparent);
}
.tile { position: relative; min-width: 0; }
.tile-name { display: block; margin-top: 7px; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--text-hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-detail { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-height: 18px; font-size: 12px; color: var(--text-dim); }
.tile-detail .icon { font-size: 11px; }
.friend-line time { margin-left: auto; }
.rank-badge { position: absolute; top: -7px; left: -7px; z-index: 1; display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--bg-0); border: 1px solid var(--line-2); font-size: 12px; font-weight: 700; color: var(--text-hi); }
.item-note { margin-top: 4px; font: 14px/1.45 var(--serif); color: var(--text); }

/* --- reviews ----------------------------------------------------------------- */
.review { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.review-art .avatar { margin: 2px auto 0; }
.review-pack { font: 400 20px/1.2 var(--serif); margin-bottom: 4px; }
.review-pack a { color: #fff; }
.review-pack a:hover { color: var(--cyan); }
.review-text { margin: 9px 0 10px; font: 16px/1.6 var(--serif); color: #b8ccd3; overflow-wrap: anywhere; }
.review-text p + p { margin-top: .8em; }
.review-text.clamp { display: -webkit-box; -webkit-line-clamp: 5; line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.spoiler-warning { font: italic 14px var(--sans); color: var(--text-dim); }
.review-foot { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-dim); }
.like { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 0; color: var(--text-dim); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.like:hover { color: var(--text-hi); }
.like.on { color: var(--text-hi); }
.btn.like { padding: 8px 14px; background: var(--bg-2); color: var(--text-hi); }
.like-count { display: inline-flex; align-items: center; gap: 4px; }
.when { margin-left: auto; color: var(--text-dim); }

/* --- lists ------------------------------------------------------------------- */
.list-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.list-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.list-card h3 { margin: 10px 0 3px; font-size: 16px; line-height: 1.3; }
.list-card h3 a { color: #fff; }
.list-card h3 a:hover { color: var(--cyan); }
.col-side .list-card + .list-card { margin-top: 20px; }
.stack { display: flex; border-radius: 5px; background: var(--bg-1); aspect-ratio: 100 / 34; overflow: hidden; }
.stack .poster { flex: 0 0 34%; margin-left: -17.5%; box-shadow: 3px 0 8px rgba(0, 0, 0, .65); }
.stack .poster:first-child { margin-left: 0; z-index: 5; }
.stack .poster:nth-child(2) { z-index: 4; }
.stack .poster:nth-child(3) { z-index: 3; }
.stack .poster:nth-child(4) { z-index: 2; }
.stack .poster:nth-child(5) { z-index: 1; }
.stack-empty { margin: auto; font-size: 12px; color: var(--text-dim); }
.list-description { margin-top: 10px; max-width: 66ch; font: 17px/1.55 var(--serif); color: #b8ccd3; white-space: pre-line; }
ol.grid.ranked { counter-reset: none; }
.edit-items { display: grid; gap: 8px; margin-top: 16px; }
.edit-items li { display: grid; grid-template-columns: 26px 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 6px; }
.edit-item-main { display: grid; gap: 5px; }
.edit-item-main strong { color: var(--text-hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edit-item-main .input { padding: 5px 9px; font-size: 13px; }
.edit-item-tools { display: flex; }
.col-side > .btn-quiet { margin-top: 12px; }

/* --- members ------------------------------------------------------------------ */
.member-list { display: grid; }
.member { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.member-id { flex: 1; min-width: 0; display: grid; }
.member-id span { font-size: 13px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-counts { display: flex; gap: 14px; font-size: 13px; }
.member-counts li { display: inline-flex; align-items: center; gap: 4px; min-width: 42px; }
.leaderboard li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.leaderboard .rank { min-width: 14px; }
.lead-score { margin-left: auto; font-size: 12px; color: var(--text-dim); white-space: nowrap; }

/* --- home -------------------------------------------------------------------- */
.quiet-note { margin-top: 30px; }
/* A quiet band of pack art behind the header, holding only the search box. */
.hero { position: relative; height: 380px; margin-bottom: -70px; }
.hero-art {
  position: absolute; inset: 0; overflow: hidden;
  --fade:
    linear-gradient(rgba(0, 0, 0, .7) 0, rgba(0, 0, 0, .5) 45%, transparent 94%),
    linear-gradient(90deg, transparent 0, #000 20%, #000 80%, transparent 100%);
  -webkit-mask-image: var(--fade); -webkit-mask-composite: source-in;
  mask-image: var(--fade); mask-composite: intersect;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero-inner { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 118px; }
.hero-search { position: relative; width: min(520px, 100%); }
.hero-search input {
  width: 100%; padding: 13px 46px 13px 20px; border: 1px solid rgba(226, 241, 245, .2); border-radius: 999px;
  background: rgba(10, 17, 20, .72); backdrop-filter: blur(6px); color: var(--text-hi); font-size: 16px;
}
.hero-search input::placeholder { color: var(--text); }
.hero-search input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .2); }
.hero-search .icon { position: absolute; right: 17px; top: 50%; translate: 0 -50%; font-size: 18px; color: var(--text); pointer-events: none; }
.hero-credit { position: absolute; right: 0; bottom: 84px; font-size: 11px; color: rgba(226, 241, 245, .55); }
.hero-credit:hover { color: var(--cyan); }
.progress-line { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 3px; padding: 4px 0; border: 0; background: none; font-size: 12px; color: var(--text-dim); }
.progress-line .xp { flex: 1; }
.progress-line:hover { color: var(--cyan); }
.col-side .section-head ~ .section-head { margin-top: 34px; }
.section-foot { margin-top: 14px; text-align: right; }
.section-foot a { display: inline-block; padding: 4px 0; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.section-foot a:hover { color: var(--cyan); }

/* --- pack page ---------------------------------------------------------------- */
/* Backdrop art fades into the page through a mask on the image itself, not
   an overlay, so no seam can show at the edge on fractionally-scaled displays. */
.backdrop {
  position: relative; height: 470px; margin-bottom: -210px; overflow: hidden;
  --fade:
    linear-gradient(rgba(0, 0, 0, .68) 0, rgba(0, 0, 0, .5) 45%, transparent 94%),
    linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%);
  -webkit-mask-image: var(--fade); -webkit-mask-composite: source-in;
  mask-image: var(--fade); mask-composite: intersect;
}
.backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.pack { position: relative; display: grid; grid-template-columns: 210px minmax(0, 1fr) 250px; gap: 38px; align-items: start; margin-top: 40px; }
.pack.has-backdrop { margin-top: 0; }
.pack-art { position: sticky; top: 16px; }
.pack-art .poster { box-shadow: 0 10px 34px rgba(0, 0, 0, .55); }
.pack-counts { display: flex; justify-content: center; gap: 14px; margin-top: 12px; font-size: 13px; }
.pack-counts li { display: inline-flex; align-items: center; gap: 4px; }
.pack-title { font: 700 38px/1.1 var(--serif); color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .6); overflow-wrap: anywhere; }
.pack-credits { margin-top: 8px; min-height: 1.5em; color: var(--text-hi); }
.pack-credits a { border-bottom: 1px solid var(--line-2); }
.pack-summary { margin-top: 16px; font: 18px/1.5 var(--serif); color: #c6d8de; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tags a, .tags .plain { display: block; padding: 2px 9px; border-radius: 3px; background: var(--bg-2); font-size: 12.5px; color: var(--text); }
.tags a:hover { background: var(--bg-3); color: #fff; }
.tags .plain { background: none; color: var(--text-dim); }

.actions { padding: 0; overflow: hidden; }
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.status-btn { display: grid; justify-items: center; gap: 3px; padding: 11px 4px 9px; border: 0; background: var(--bg-1); color: var(--text); font-size: 11.5px; }
.status-btn .icon { font-size: 21px; color: var(--text-dim); }
.status-btn:hover { background: var(--bg-2); color: #fff; }
.status-btn:hover .icon, .status-btn.on .icon { color: var(--tone); }
.status-btn.on { color: var(--tone); background: color-mix(in srgb, var(--tone) 9%, var(--bg-1)); }
.action-row { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px 14px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); font-size: 14px; text-align: center; }
a.action-row:hover, button.action-row:hover { background: var(--bg-2); color: #fff; }
.action-row.rate { flex-direction: column; gap: 2px; padding: 9px 14px 11px; font-size: 12px; color: var(--text-dim); }
.action-row.progress { flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-dim); }
.action-row.quiet { font-size: 12px; color: var(--text-dim); }
.action-row.like { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 14px; }
.action-row .icon-external { font-size: 12px; }

.star-input { display: inline-block; border-radius: 3px; touch-action: none; }
.star-track { position: relative; display: inline-flex; font-size: 28px; line-height: 1; color: #29424e; cursor: pointer; user-select: none; }
.star-track > span, .star-fill > span { flex: none; width: 1.08em; text-align: center; }
.star-fill { position: absolute; inset: 0 auto 0 0; display: flex; overflow: hidden; color: var(--cyan); font-style: normal; pointer-events: none; }

.ratings { display: flex; align-items: flex-end; gap: 5px; }
.ratings .stars { font-size: 10px; line-height: 1; }
.histogram { flex: 1; display: flex; align-items: flex-end; gap: 2px; height: 46px; }
.bar { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.bar i { display: block; width: 100%; border-radius: 2px 2px 0 0; background: #3a5a67; }
.bar:hover i { background: var(--cyan); }
.average { margin-left: 6px; font: 400 24px/1 var(--serif); color: var(--text-hi); }
.stat-rows > div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13.5px; }
.stat-rows dt { display: inline-flex; align-items: center; gap: 7px; }
.stat-rows dt .icon { color: var(--tone); }
.stat-rows dt a { color: var(--text); }
.stat-rows dt a:hover { color: var(--cyan); }
.stat-rows dd { color: var(--text-hi); font-variant-numeric: tabular-nums; }
.completion-rate { display: grid; gap: 6px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; }
.completion-rate b { color: var(--text-hi); }

.friends { display: flex; flex-wrap: wrap; gap: 14px; }
.friends li { display: grid; justify-items: center; gap: 3px; font-size: 11px; }
.friends a { position: relative; display: block; }
.friends .poster-badge { left: auto; right: -5px; bottom: -4px; width: 17px; height: 17px; font-size: 9px; }
.shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.shots button { padding: 0; border: 0; border-radius: 4px; overflow: hidden; background: var(--bg-1); aspect-ratio: 16 / 9; }
.shots img { width: 100%; height: 100%; object-fit: cover; transition: opacity .12s; }
.shots button:hover img { opacity: .8; }

/* CurseForge description: third-party content, rebuilt by the sanitizer */
.prose { font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.prose.collapsed { max-height: 320px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.prose > * + * { margin-top: .8em; }
.prose h1, .prose h2, .prose h3, .prose h4 { font: 700 18px/1.3 var(--sans); color: var(--text-hi); margin-top: 1.2em; }
.prose a { color: var(--cyan); }
.prose img { display: inline-block; height: auto; border-radius: 4px; }
.prose ul, .prose ol { padding-left: 1.4em; list-style: disc; }
.prose ol { list-style: decimal; }
.prose code, .prose pre { font: 13px ui-monospace, Consolas, monospace; background: var(--bg-0); border-radius: 3px; padding: 1px 5px; }
.prose pre { padding: 10px; overflow-x: auto; }
.prose table { border-collapse: collapse; }
.prose td, .prose th { padding: 4px 8px; border: 1px solid var(--line-2); }
.prose blockquote { margin: 0; padding-left: 14px; border-left: 3px solid var(--line-2); }

/* --- profile ------------------------------------------------------------------ */
.profile-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; margin-top: 38px; }
.profile-id h1 { font: 700 28px/1.2 var(--serif); color: #fff; }
.handle { font-size: 13px; color: var(--text-dim); }
.bio { margin: 8px 0 0; max-width: 56ch; }
.profile-id .btn { margin-top: 12px; }
.profile-stats { display: flex; }
.profile-stats a { display: grid; justify-items: center; padding: 2px 16px; border-left: 1px solid var(--line-2); }
.profile-stats a:first-child { border-left: 0; }
.profile-stats b { font: 400 24px/1.15 var(--serif); color: var(--text-hi); }
.profile-stats span { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.profile-stats a:hover b, .profile-stats a:hover span { color: var(--cyan); }
.profile-stats a.gold b { color: var(--gold); }
.trophy .poster { box-shadow: 0 0 0 2px var(--gold), 0 0 22px rgba(246, 196, 83, .28); }
.trophy .poster-frame { box-shadow: none; }
.trophy a.poster:hover .poster-frame { box-shadow: inset 0 0 0 2px #fff3c4; }
.trophy .tile-detail a { color: var(--text-dim); }
.trophy .tile-detail a:hover { color: var(--cyan); }
.shelf-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.fav-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 4px; }
.fav-slot { display: grid; gap: 4px; font-size: 13px; color: var(--text-hi); text-transform: none; letter-spacing: 0; font-weight: 400; }
.fav-slot > span:not(.poster) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-slot .link { justify-self: start; font-size: 12px; }
.fav-slot.blank { color: var(--text-dim); }
.fav-slot.blank .poster { background: none; border: 1px dashed var(--line-2); }
.fav-slot.blank .poster-frame { display: none; }
.danger-zone { margin-top: 56px; display: grid; gap: 12px; justify-items: start; }
.danger-zone .section-head { width: 100%; margin: 0; }
.bullets { padding-left: 1.3em; list-style: disc; display: grid; gap: 4px; }
.bullets strong { color: var(--text-hi); }
.auth { width: min(420px, 100% - 32px); margin-top: 64px; }
.auth .panel { padding: 26px; }
.auth h1 { font: 400 26px/1.2 var(--serif); color: #fff; }
.auth-box { display: grid; gap: 14px; }
/* Google's dark-theme button: neutral fill, its own mark, no site accent colour. */
.btn-google { gap: 10px; background: #131314; border-color: #8e918f; color: #e3e3e3; text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 600; }
.btn-google:hover { background: #1f2021; color: #fff; }
.google-mark { width: 18px; height: 18px; flex: none; }
.form-error { padding: 9px 12px; border-left: 3px solid var(--red); border-radius: var(--radius); background: rgba(248, 113, 113, .1); color: #fecaca; font-size: 14px; }
.modal-auth { gap: 4px; }

/* --- modals, pickers, toasts ---------------------------------------------------- */
body.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 24px; overflow-y: auto; background: rgba(4, 9, 11, .8); backdrop-filter: blur(3px); }
.modal { width: min(620px, 100%); padding: 22px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); display: grid; gap: 16px; }
.modal > form { display: grid; gap: 16px; }
.modal-narrow { width: min(480px, 100%); }
.modal-head { display: flex; align-items: center; gap: 14px; }
.modal-head .poster { width: 54px; flex: none; }
.modal-head > div { flex: 1; min-width: 0; }
.modal-head h2 { font: 400 23px/1.2 var(--serif); color: #fff; overflow: hidden; text-overflow: ellipsis; }
.modal-head .icon-btn { align-self: flex-start; }
.modal-foot { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.spacer { flex: 1; }
.status-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.status-picker legend { margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.status-option { position: relative; cursor: pointer; }
.status-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.status-option span { display: grid; justify-items: center; gap: 4px; padding: 9px 2px 7px; border: 1px solid var(--line-2); border-radius: 5px; font-size: 11.5px; color: var(--text); }
.status-option span .icon { font-size: 19px; color: var(--text-dim); }
.status-option:hover span { border-color: var(--text-dim); }
.status-option input:checked + span { border-color: var(--tone); color: var(--tone); background: color-mix(in srgb, var(--tone) 10%, transparent); }
.status-option input:checked + span .icon { color: var(--tone); }
.status-option input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.rate-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.rate-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pick-results { display: grid; gap: 2px; }
.pick-results:empty { display: none; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 8px; border: 0; border-radius: 5px; background: none; text-align: left; }
.pick:hover, .pick:focus-visible { background: var(--bg-2); }
.pick .poster { width: 40px; flex: none; }
.pick span { display: grid; min-width: 0; }
.pick strong { color: var(--text-hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-lists { display: grid; max-height: 46vh; overflow-y: auto; }
.picker-row { display: flex; padding: 9px 6px; border-bottom: 1px solid var(--line); color: var(--text-hi); }
.picker-row span { flex: 1; }
.picker-new { display: flex; gap: 8px; }
.modal-lightbox { width: min(1100px, 100%); padding: 12px; background: var(--bg-0); position: relative; }
.lightbox-img { width: 100%; max-height: 76vh; object-fit: contain; border-radius: 4px; background: #000; }
.lightbox-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.lightbox-close { position: absolute; top: 18px; right: 18px; z-index: 1; background: rgba(0, 0, 0, .6); color: #fff; }

#toasts { position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 70; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { padding: 10px 16px; border-radius: 6px; background: #e2f1f5; color: #0a1114; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: toast-in .18s ease-out; }
.toast.error { background: #fecaca; color: #450a0a; }
@keyframes toast-in { from { opacity: 0; translate: 0 8px; } }

/* --- responsive ----------------------------------------------------------------- */
@media (max-width: 920px) {
  .columns { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pack { grid-template-columns: 160px minmax(0, 1fr); gap: 24px; }
  .pack-side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; align-items: start; }
  .pack-side .panel + .panel { margin-top: 0; }
  .pack-art { position: static; }
  .profile-head { grid-template-columns: auto minmax(0, 1fr); }
  .profile-stats { grid-column: 1 / -1; justify-content: space-between; }
  .header-inner { flex-wrap: wrap; gap: 8px 16px; padding: 10px 0; }
  .main-nav { order: 3; width: 100%; margin-left: 0; flex-wrap: wrap; gap: 4px 18px; }
  .nav-search { margin-left: auto; }
}
@media (max-width: 640px) {
  .grid-6, .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list-grid, .list-row { grid-template-columns: minmax(0, 1fr); }
  .section-head { flex-wrap: wrap; }
  .pack { grid-template-columns: minmax(0, 1fr); }
  .pack-art { width: 150px; }
  .pack-title { font-size: 30px; }
  .backdrop { height: 320px; margin-bottom: -150px; }
  .status-picker { grid-template-columns: repeat(3, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .search-title input { font-size: 26px; }
  .review { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
  .member-counts li:nth-child(n + 3) { display: none; }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-stats a { padding: 2px 8px; }
  .brand-name { font-size: 20px; }
  .main-nav > a, .menu summary { font-size: 11.5px; letter-spacing: .06em; }
  /* Phones: logo and the account box share the top row; search gets its own. */
  .auth-entry, .header-inner > .menu { margin-left: auto; }
  .nav-search { order: 2; flex: 1 1 100%; margin-left: 0; }
  .nav-search input, .nav-search input:focus { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
