/* Shared archive presentation: navigation, search workspace and record cards. */
:root {
  --bg: #0b0c0f;
  --panel: #14161c;
  --elevated: #1a1d24;
  --line: #2d3038;
  --text: #f2f0f0;
  --muted: #a1a4af;
  --red: #dd4658;
  --accent: #9b2b3e;
}
body {
  position: relative;
  isolation: isolate;
  background: var(--bg);
  background-attachment: scroll;
}
body::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  width: min(1100px, 90vw);
  height: 550px;
  pointer-events: none;
  background: url("./media/fog-archive-backdrop.png") right top / cover no-repeat;
  mask-image: linear-gradient(to bottom, #000 65%, transparent);
}
button { border-radius: 6px; transition: border-color .16s, background .16s, color .16s; }
button:hover:enabled { background: #25202a; border-color: #87404e; }
:focus-visible { outline: 2px solid #f16c7b; outline-offset: 3px; }
button, input, textarea { -webkit-tap-highlight-color: transparent; }
.masthead {
  height: auto;
  min-height: 86px;
  padding: 0 max(2rem, calc((100vw - 1384px) / 2));
  gap: 2.5rem;
  flex-wrap: wrap;
  background: #0b0c0f45;
  border-bottom: 1px solid var(--line);
}
.brand { gap: 1rem; font-family: var(--display-font, var(--font)); font-size: 1.55rem; font-weight: 800; letter-spacing: .08em; flex-shrink: 0; max-width: 100%; min-width: 0; }
.brand > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.brand small { font-family: var(--font); font-size: .65rem; font-weight: 450; letter-spacing: .14em; }
.brand-mark { display: block; width: 50px; height: 41px; flex-shrink: 0; object-fit: contain; }
.sigil { font-size: 2.25rem; letter-spacing: -.16em; text-shadow: none; }
.sigil span { transform: translateY(.18rem); }
.atlas-nav {
  align-self: stretch;
  flex-wrap: nowrap;
  gap: .75rem;
  padding: 0;
  border: 0;
  margin-right: auto;
  min-width: 0;
}
.atlas-nav > button {
  position: relative;
  padding: .6rem .8rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 550;
  white-space: nowrap;
}
.atlas-nav > button:hover:enabled { background: transparent; color: var(--text); }
.atlas-nav > button[aria-pressed=true] { color: var(--text); background: transparent; box-shadow: none; }
.atlas-nav > button[aria-pressed=true]::after {
  content: "";
  position: absolute;
  height: 2px;
  bottom: 15px;
  left: .8rem;
  right: .8rem;
  background: var(--red);
  box-shadow: 0 0 8px #dd465835;
}
.header-right { gap: 1rem; min-width: 0; max-width: 100%; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.header-settings { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.header-account { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; min-width: 0; }
.header-account .current-user { min-width: 0; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font); font-size: .85rem; }
.header-account .text-button { flex-shrink: 0; min-height: 44px; padding: .5rem .25rem; color: #e86b7b; }
.header-account > [hidden], .identity[hidden] { display: none; }
.game-version { color: var(--muted); font: .85rem monospace; white-space: nowrap; }
.language { min-height: 44px; min-width: 48px; padding: .5rem .6rem; background: transparent; border-color: transparent; }
main { max-width: 1480px; padding: 2.4rem 2.5rem 4rem; }
.workspace { padding: 0; }
.title-row { margin: 0 0 1.3rem; }
h1 { font-family: var(--display-font, var(--font)); font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.filter-workspace { padding: 1.35rem 1.4rem; border: 1px solid var(--line); border-radius: 12px; background: #111318a6; }
.search-wrap {
  height: 56px;
  gap: 1rem;
  padding: 0 1rem;
  border: 1px solid #55505a;
  border-radius: 6px;
  background: #0b0c0f;
}
.search-wrap:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px #dd465818; }
.search-symbol { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: #b5b8c3; stroke-width: 1.5; stroke-linecap: round; }
.search-wrap input { font-size: 1rem; }
.search-wrap input:focus-visible { outline: 0; }
.search-wrap input::placeholder { color: #9398a6; }
.shortcut { border-radius: 4px; border-color: #383b44; color: #808592; }
.global-search { position: relative; min-width: 0; }
.global-search-popup { display: flex; flex-direction: column; position: absolute; z-index: 90; top: calc(100% + 7px); left: 0; right: 0; max-height: var(--global-search-available, 70dvh); border: 1px solid #75404d; border-radius: 8px; background: #111318; box-shadow: 0 14px 38px #000b; overflow: hidden; }
.global-search-popup[hidden] { display: none; }
.global-search-toolbar { flex-shrink: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .75rem 1rem .3rem; }
.global-search-toolbar strong { font-size: .95rem; }
.global-search-history { display: inline-flex; align-items: center; gap: .55rem; min-height: 32px; color: #c1c4ce; font-size: .8rem; cursor: pointer; }
.global-search-history input { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; accent-color: var(--red); }
.global-search-scope, .global-search-status, .global-search-keyboard { flex-shrink: 0; margin: 0; padding: .2rem 1rem .55rem; color: #a1a4af; font-size: .75rem; }
.global-search-status { color: #c2c5ce; }
.global-search-keyboard { padding-top: .6rem; border-top: 1px solid #30333c; }
.global-search-groups { flex: 1 1 auto; min-height: 0; max-height: min(52dvh, 480px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.global-search-group { padding: .35rem .6rem .7rem; border-top: 1px solid #30333c; }
.global-search-group h3 { display: flex; align-items: center; gap: .6rem; margin: .35rem .4rem .45rem; color: #df7d8b; font-size: .8rem; font-weight: 650; }
.global-search-group-count { color: #a1a4af; font-size: .75rem; font-weight: 400; }
.global-search-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .75rem; width: 100%; min-height: 56px; padding: .6rem .7rem; border: 1px solid transparent; border-radius: 5px; background: transparent; text-align: left; }
.global-search-result:hover:enabled, .global-search-result:focus-visible { border-color: #87404e; background: #281b24; outline-offset: -2px; }
.global-search-result-name { min-width: 0; overflow-wrap: anywhere; font-size: .9rem; font-weight: 600; }
.global-search-result-name small { display: block; margin-top: .1rem; color: #aeb3c0; font-size: .75rem; font-weight: 400; }
.global-search-result-meta { align-self: start; max-width: 190px; color: #aeb3c0; text-align: right; font-size: .72rem; }
.global-search-result-summary { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #9ba1af; font-size: .75rem; }
.global-search-more { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: .25rem .7rem 0; color: #999eab; font-size: .72rem; }
.global-search-more button { min-height: 36px; padding: .4rem .6rem; color: #df7d8b; }
.control-row { margin: 1.15rem 0; gap: 1.5rem; flex-wrap: nowrap; }
.control-row:has(> .views[hidden]) { display: none; }
.roles { display: inline-flex; flex-wrap: nowrap; gap: 0; padding: 3px; border: 1px solid var(--line); border-radius: 24px; background: #0b0c0f; flex-shrink: 0; }
.roles button { min-width: 90px; min-height: 40px; padding: .4rem 1rem; border: 1px solid transparent; border-radius: 22px; background: transparent; font-size: .9rem; font-weight: 600; color: #b4b6c0; }
.roles button:hover:enabled { color: var(--text); background: #1d2027; border-color: transparent; }
.roles button[aria-pressed=true] { color: #fff; border-color: #e54e62; background: linear-gradient(180deg, #ad3448, #882637); box-shadow: 0 2px 8px #0004; }
.views { flex: 1; min-width: 0; display: flex; flex-wrap: nowrap; justify-content: space-around; gap: .3rem; padding-left: 0; border-left: 0; }
.views button { position: relative; min-height: 44px; padding: .5rem .9rem; border: 0; border-radius: 0; background: transparent; color: #b1b4bf; font-size: .9rem; white-space: nowrap; }
.views button:hover:enabled { color: var(--text); background: transparent; }
.views button[aria-pressed=true] { border: 0; color: var(--text); background: transparent; }
.views button[aria-pressed=true]::after { content: ""; height: 2px; position: absolute; bottom: 0; left: .75rem; right: .75rem; background: var(--red); }
.filter-row { gap: 1.5rem; align-items: center; }
.filter-row .field { display: flex; align-items: center; gap: .85rem; min-width: 0; flex: 0 1 300px; }
.filter-row .field[hidden], .roles[hidden], .views[hidden] { display: none; }
.field label { color: #b8bbc5; font-size: .85rem; white-space: nowrap; }
.filter-row .select-control { flex: 1; min-width: 0; }
#reset { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 44px; padding: .5rem .85rem; border: 1px solid #393d47; border-radius: 6px; color: #b9bdc8; background: #14161c; }
#reset::before { content: ""; width: 15px; height: 15px; border: 1.5px solid currentColor; border-left-color: transparent; border-radius: 50%; transform: rotate(-35deg); }
#reset:hover:enabled { color: var(--text); border-color: #87404e; background: #25202a; }
.community-toolbar { min-height: 64px; margin: 1.35rem 0 0; padding: .6rem 0; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; gap: 1rem; }
.community-toolbar > div:first-child { display: flex; gap: .75rem; align-items: center; min-width: 0; }
.community-toolbar .eyebrow { flex-shrink: 1; min-width: 0; overflow-wrap: anywhere; color: #d4d5dc; font-size: .8rem; letter-spacing: .02em; }
.community-toolbar p { margin: 0; color: #9398a6; font-size: .75rem; line-height: 1.6; }
.identity { gap: .75rem; }
.identity input { max-width: 156px; height: 40px; padding: .5rem .75rem; border: 1px solid #393d47; border-radius: 6px; background: #0b0c0f; font-size: .85rem; }
.identity input:focus-visible { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px #dd465818; }
.identity .text-button { color: #e86b7b; min-height: 44px; padding: .5rem .25rem; }
.community-toolbar > .primary { min-height: 44px; border-radius: 6px; font-size: .85rem; }
.archive-toolbar { align-items: center; gap: 1rem; margin: 0; padding: .65rem 0; border: 0; }
.archive-toolbar p { color: #9095a2; font-size: .72rem; line-height: 1.65; overflow-wrap: anywhere; }
.archive-toolbar .snapshot-note { margin: .15rem 0 0; font-size: .72rem; }
.archive-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; flex-shrink: 0; min-width: 0; margin-left: auto; }
#patch-link { display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; color: #b1b5c0; min-height: 44px; }
#patch-link strong { font: 500 .78rem var(--font); }
.archive-toolbar .text-button { min-height: 44px; padding: .5rem 0; color: #b1b5c0; font-size: .75rem; }
.archive-actions .text-button { white-space: normal; overflow-wrap: anywhere; min-width: 0; text-align: left; }
.results-header { margin: .65rem 0 .85rem; align-items: center; }
.results-header h2 { font-size: 1.1rem; letter-spacing: .015em; }
.results-header > span { font: .8rem var(--font); color: #969ba8; }
.grid { gap: 1rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { padding: 1rem 1.15rem; background: linear-gradient(145deg, #171a20, #101217 80%); border: 1px solid #343843; border-radius: 8px; box-shadow: 0 5px 20px #0002; transition: border-color .16s, box-shadow .16s; }
.card:hover { transform: none; border-color: #7f3944; box-shadow: 0 8px 26px #0005; }
.card-top { color: #8f95a3; letter-spacing: .025em; font-size: .72rem; gap: .65rem; }
.card-top > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-index { color: #777e8c; font-size: .7rem; flex-shrink: 0; }
.card .record-heading { display: flex; flex-direction: column; align-items: stretch; gap: 1.1rem; margin: .65rem 0 .45rem; min-height: 0; }
.card .icon-frame { align-self: center; width: 74px; height: 74px; margin: .35rem .5rem; }
.card .record-icon { width: 67px; height: 67px; }
.card .record-names { flex: auto; }
.card .record-heading h3 { margin: 0; color: #f2f0f0; font-size: 1.06rem; font-weight: 650; line-height: 1.45; }
.card .secondary-name { color: #a5abb9; font-size: .85rem; margin: .2rem 0 0; }
.perk-icon-frame { background: radial-gradient(ellipse at center, #34303c, #16131d 85%); border: 1px solid #a7a1af; box-shadow: inset 0 0 0 3px #17141c, inset 0 0 0 4px #5c5566; }
.card:hover .perk-icon-frame { border-color: #d08894; box-shadow: inset 0 0 0 3px #17141c, inset 0 0 0 4px #5c5566; }
.card-summary { color: #bcc0ca; font-size: .9rem; line-height: 1.75; margin: .35rem 0 .5rem; -webkit-line-clamp: 4; }
.tags { gap: .35rem; margin: .5rem 0; }
.tag { border-color: #3a3f4b; border-radius: 20px; padding: .18rem .6rem; color: #aeb5c3; font-size: .72rem; background: #191d25; line-height: 1.5; }
button.tag { min-height: 30px; }
.card-action { margin-top: auto; padding-top: .65rem; }
.card-action button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: .55rem .8rem; color: #e4e5eb; background: #101217; border: 1px solid #3b414d; border-radius: 6px; font-size: .8rem; letter-spacing: .02em; }
.card-action button::after { content: ""; width: 7px; height: 7px; margin-right: 2px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); }
.card-action button:hover { background: #2c1c24; border-color: #a94354; }
.empty, .load-state { border-radius: 8px; background: #14161c; }
.pagination button { min-height: 44px; border-radius: 6px; background: #14161c; }
.forum-post, #build-leaderboard { border-radius: 10px; background: #14161c; border-color: #343843; }
.forum-post { border-left-color: #983349; }
.forum-post h3 { color: var(--text); font-size: 1.15rem; }
.post-footer > button { min-height: 44px; }
.post-reference { border-radius: 6px; background: #221b25; border-color: #49313c; }
.ranking-card { border-radius: 7px; background: #101217; }
.ranking-notice { border-radius: 0 6px 6px 0; background: #291b25; }
.ranking-title { border-radius: 2px; }
footer { max-width: 1480px; padding: 1.5rem 2.5rem; border-color: var(--line); }
@media (max-width: 1200px) {
  .masthead { gap: 1.25rem; padding: 0 1.5rem; }
  .brand { font-size: 1.05rem; }
  .atlas-nav { gap: .25rem; }
  .atlas-nav > button { font-size: .85rem; padding: .6rem .65rem; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .control-row { flex-wrap: wrap; gap: .9rem; }
  .views { min-width: 0; }
  .filter-row { gap: .85rem; }
}
@media (max-width: 1200px) {
  .masthead { height: auto; min-height: 86px; padding: 1rem 1.5rem 0; flex-wrap: wrap; gap: .5rem 1rem; }
  .header-right { display: contents; }
  .header-account { order: 1; margin-left: auto; max-width: calc(100% - 180px); }
  .header-settings { order: 2; width: 100%; justify-content: flex-end; }
  .atlas-nav { width: 100%; order: 3; min-height: 55px; justify-content: flex-start; gap: 1rem; }
  .atlas-nav { max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
  .atlas-nav > button { flex: 0 1 auto; padding: .5rem .25rem; font-size: .9rem; }
  .atlas-nav > button[aria-pressed=true]::after { bottom: 0; left: .25rem; right: .25rem; }
}
@media (max-width: 900px) {
  main { padding: 1.75rem 1.5rem 3rem; }
  .roles { width: auto; }
  .roles button { flex: auto; }
  .views { min-width: 0; width: 100%; flex-basis: 100%; padding: 0; border: 0; overflow-x: auto; scrollbar-width: thin; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-toolbar { gap: .5rem 1rem; }
  .community-toolbar > div:first-child { flex-basis: 100%; width: auto; }
  .community-toolbar .identity { flex: 1; width: auto; flex-basis: auto; }
  .identity input { max-width: 200px; }
  .community-toolbar > .primary { width: auto; }
  .filter-row .field { flex: 1 1 calc(50% - 1rem); }
  .filter-row .roles { flex-basis: 100%; }
  .archive-toolbar { align-items: flex-start; }
  .archive-actions { gap: .75rem; }
  footer { padding: 1.5rem; }
}
@media (max-width: 600px) {
  .masthead { padding: .9rem 1rem 0; gap: .4rem .6rem; }
  .brand { font-size: .95rem; gap: .6rem; letter-spacing: .08em; }
  .brand-mark { width: 36px; height: 30px; }
  .brand small { font-size: .65rem; }
  .sigil { font-size: 1.9rem; }
  .header-right { gap: .25rem; }
  .header-settings { gap: .25rem; }
  .header-account { gap: .5rem; max-width: calc(100% - 170px); }
  .header-account .current-user, .header-account .text-button { font-size: .75rem; }
  .language { font-size: .8rem; min-width: 40px; padding: .4rem; }
  .atlas-nav { min-height: 50px; gap: 1.2rem; }
  .atlas-nav > button { font-size: .85rem; }
  main { padding: 1.5rem 1rem 2.5rem; }
  body::before { width: 100%; height: 330px; opacity: .85; }
  h1 { font-size: 1.85rem; letter-spacing: -.04em; }
  .title-row { margin-bottom: 1.15rem; }
  .filter-workspace { padding: 1rem; border-radius: 10px; }
  .search-wrap { height: 50px; gap: .65rem; padding: 0 .75rem; }
  .search-wrap input { font-size: 1rem; }
  .search-symbol { width: 19px; height: 19px; }
  .global-search-toolbar { padding: .6rem .7rem .2rem; }
  .global-search-toolbar strong { font-size: .85rem; }
  .global-search-history { font-size: .75rem; min-height: 36px; }
  .global-search-scope, .global-search-status, .global-search-keyboard { padding-left: .7rem; padding-right: .7rem; }
  .global-search-groups { max-height: 45dvh; }
  .global-search-result { gap: .15rem .35rem; padding: .6rem .4rem; }
  .global-search-result-name { font-size: .85rem; }
  .global-search-result-meta { max-width: 105px; font-size: .68rem; }
  .control-row { gap: .9rem; margin: .9rem 0; }
  .roles { width: 100%; gap: 0; }
  .roles button { flex: 1; min-width: 0; min-height: 40px; padding: .4rem .5rem; font-size: .85rem; }
  .views { display: flex; justify-content: flex-start; overflow-x: auto; gap: .4rem; padding-top: 0; scrollbar-width: thin; }
  .views button { flex: 0 0 auto; font-size: .85rem; padding: .4rem .65rem; min-height: 44px; }
  .filter-row { display: flex; gap: .6rem; align-items: flex-end; }
  .filter-row .field, .filter-row .field:last-of-type { display: grid; gap: .35rem; flex: 1 1 calc(50% - 3rem); min-width: 0; }
  .field label { font-size: .75rem; }
  #reset { flex: 0 0 44px; width: 44px; min-height: 44px; padding: .45rem; font-size: 0; gap: 0; }
  #reset::before { width: 17px; height: 17px; }
  .community-toolbar { margin-top: 1rem; padding: .75rem 0; gap: .6rem; }
  .community-toolbar > div:first-child { flex-wrap: wrap; gap: .25rem .65rem; }
  .community-toolbar p { font-size: .72rem; }
  .identity { gap: .5rem; }
  .identity input { min-height: 44px; max-width: none; font-size: 1rem; }
  .identity .text-button { font-size: .75rem; }
  .community-toolbar > .primary { font-size: .75rem; padding: .55rem .65rem; }
  .archive-toolbar { gap: .4rem; padding: .6rem 0; flex-wrap: wrap; }
  .archive-toolbar p, .archive-toolbar .snapshot-note { font-size: .7rem; }
  .archive-actions { width: 100%; gap: 1rem; }
  .archive-toolbar .text-button, #patch-link { min-height: 36px; }
  .patch-label { display: inline; }
  .results-header { margin: .6rem 0 .75rem; }
  .results-header h2 { font-size: 1rem; }
  .results-header > span { font-size: .75rem; }
  .grid { grid-template-columns: 1fr; gap: .85rem; }
  .card { padding: 1.15rem; }
  .card .record-heading { flex-direction: row; align-items: center; gap: 1.5rem; margin: .9rem 0 .75rem; }
  .card .icon-frame { width: 60px; height: 60px; margin: .5rem; }
  .card .record-icon { width: 54px; height: 54px; }
  .card .record-heading h3 { font-size: 1.1rem; }
  .card-summary { font-size: .9rem; }
  button.tag { min-height: 44px; }
  footer { padding: 1.5rem 1rem; }
}
@media (max-width: 380px) {
  .masthead { column-gap: .4rem; }
  .brand { font-size: .85rem; gap: .4rem; }
  .brand-mark { width: 30px; height: 26px; }
  .brand small { font-size: .6rem; }
  .sigil { font-size: 1.65rem; }
  .language { min-width: 36px; }
  .header-account { max-width: calc(100% - 145px); }
  .filter-workspace { padding: .8rem; }
}
@media (prefers-reduced-motion: reduce) { button, .card { transition: none; } }
@media (forced-colors: active) {
  .roles button[aria-pressed=true], .views button[aria-pressed=true], .atlas-nav > button[aria-pressed=true] { outline: 2px solid Highlight; outline-offset: -2px; }
  .search-wrap { border: 1px solid CanvasText; }
}
