@font-face {
  font-family: "DB Serif"; src: url("/site/db-serif.woff2") format("woff2");
  font-display: swap; font-weight: 400; font-style: normal;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+0300-0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215;
}
@font-face {
  font-family: "DB Serif"; src: url("/site/db-serif-bold.woff2") format("woff2");
  font-display: swap; font-weight: 700; font-style: normal;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+0300-0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215;
}
@font-face {
  font-family: "DB Serif"; src: url("/site/db-serif-cyrillic.woff2") format("woff2");
  font-display: swap; font-weight: 100 900; font-style: normal;
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

:root {
  color-scheme: dark;
  --black: #080809;
  --field: #101013;
  --slate: #17171a;
  --iron: #252427;
  --line: #39363a;
  --metal: #7a6654;
  --gold: #e3c89c;
  --bright: #fae5c4;
  --white: #eee8df;
  --muted: #b7b2b1;
  --green: #aed2a7;
  --red: #eba99b;
  --serif: "DB Serif", Georgia, serif;
  --gutter: clamp(1rem, 4vw, 4rem);
  --page-width: 78rem;
  --gutter-start: max(var(--gutter), env(safe-area-inset-left));
  --gutter-end: max(var(--gutter), env(safe-area-inset-right));
  --gap: clamp(3.1rem, 6vw, 5.4rem);
  font: 16px/1.6 system-ui, sans-serif;
  color: var(--white);
  background: var(--black);
  scrollbar-color: #6a594a var(--black);
  scrollbar-width: thin;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
h1, h2, h3, h4, p, dl { margin: 0; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; }
h2 { font-size: clamp(2.15rem, 4.15vw, 3.6rem); letter-spacing: -.042em; text-wrap: balance; }
h3 { font-size: clamp(1.37rem, 2.6vw, 2.2rem); letter-spacing: -.026em; }
h4 { font-size: 1.3rem; }
p { max-width: 66ch; }
a { color: var(--gold); text-underline-offset: .21em; }
a:hover { color: var(--bright); }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--bright); outline-offset: 4px; }
::selection { color: var(--black); background: var(--gold); }
button, input { font: inherit; }
.frame {
  max-width: var(--page-width);
  width: calc(100% - var(--gutter-start) - var(--gutter-end));
  margin-inline: max(var(--gutter-start), calc((100% - var(--page-width)) / 2))
    max(var(--gutter-end), calc((100% - var(--page-width)) / 2));
}
.section { padding-block-start: var(--gap); }
.section-heading { margin-bottom: 1.6rem; }
.section-heading > p { margin-top: .55rem; color: var(--muted); }
[id] { scroll-margin-block-start: 1.25rem; }
.muted { color: var(--muted); }
.result { margin-top: .7rem; }
.result:empty { margin-top: 0; }

.skip-link {
  position: absolute;
  z-index: 4;
  top: .6rem;
  left: var(--gutter);
  padding: .5rem .85rem;
  color: var(--black);
  background: var(--bright);
  transform: translateY(-180%);
}
.skip-link:focus { color: var(--black); transform: none; }
.site-header {
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid #44362b;
  background: #070708;
}
.header-inner {
  min-height: 4.65rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem clamp(.8rem, 3vw, 2.7rem);
}
.site-brand, .site-nav a, .header-account { text-decoration: none; }
.site-brand {
  display: inline-flex; gap: .7rem; align-items: center; width: fit-content;
  color: var(--gold); font: 700 1.05rem/1.2 var(--serif);
  font-variant-caps: small-caps; white-space: nowrap;
}
.site-brand img { width: 2rem; height: 2rem; object-fit: contain; }
.site-nav {
  display: flex; align-items: stretch; gap: clamp(.55rem, 1.55vw, 1.55rem);
}
.site-nav a, .header-account {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  font: 400 1.07rem/1.15 var(--serif);
  white-space: nowrap;
  padding-inline: .12rem;
}
.site-nav a { color: #ded3c5; }
.site-nav a:hover { color: var(--bright); text-decoration: underline; }
.header-account { justify-self: end; border: 1px solid var(--metal); padding-inline: .85rem; color: var(--gold); }
.header-account:hover { border-color: var(--gold); }

@media (min-width: 64rem) and (min-height: 42rem) {
  .site-header { position: sticky; z-index: 4; top: 0; }
  [id] { scroll-margin-block-start: 5.45rem; }
}

button, .button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border: 1px solid #967b5f;
  border-radius: 0;
  background: #35251e;
  padding: .58rem 1rem;
  color: #fff0d9;
  font: 700 .88rem/1.15 var(--serif);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { color: #fff4e1; background: #4a3326; border-color: var(--gold); }
button.secondary, .button.secondary { color: var(--gold); background: #131215; border-color: #655448; }
button.secondary:hover, .button.secondary:hover { color: var(--bright); background: #2a2425; border-color: #ac9174; }
button:disabled, button:disabled:hover { opacity: .48; cursor: default; }
.button.primary {
  min-width: 12.6rem;
  border-color: #a58962;
  background: linear-gradient(168deg, #65483b 0%, #3b2720 46%, #241918 100%);
  box-shadow: inset 0 0 0 3px #241811;
}
.button.primary:hover { background: linear-gradient(168deg, #75523f, #4a3025 52%, #2c201a); }
.text-link { display: inline-flex; align-items: center; min-height: 2.75rem; }

.feature {
  min-height: clamp(36rem, 89svh, 55rem);
  display: grid;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  position: relative;
  background: #100d0e;
  border-bottom: 1px solid #614b37;
}
.feature-poster, .feature-film, .feature::before, .feature::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.feature-poster, .feature-film { object-fit: cover; object-position: center; }
.feature-poster { z-index: -4; }
.feature-film { opacity: 0; z-index: -3; }
.feature-film.has-frame { opacity: 1; }
.feature::before {
  z-index: -2;
  content: "";
  background: linear-gradient(180deg, #08080b40, transparent 26%, #09080930 52%, #080809 100%),
    radial-gradient(ellipse at 50% 62%, #0c090abf 0%, #0c090a69 35%, transparent 76%);
}
.feature::after {
  z-index: -1;
  content: "";
  opacity: .14;
  background: radial-gradient(circle, #000a 0 1px, transparent 1px) 0 0 / 4px 4px;
  pointer-events: none;
}
.feature-content { text-align: center; padding-block: 4rem 5.5rem; }
.feature h1 { margin-inline: auto; width: clamp(17rem, 58vw, 48.8125rem); max-width: 100%; }
.feature h1 img { display: block; width: 100%; height: auto; filter: drop-shadow(0 .35rem 1.2rem #100602c7); }
.feature-content > p {
  margin: 1.05rem auto 0;
  color: #f0dfc7;
  font: 400 clamp(1.05rem, 2vw, 1.55rem)/1.4 var(--serif);
  text-wrap: balance;
  text-shadow: 0 .11rem .6rem #080809;
}
.feature-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem 1.4rem; margin-top: 1.5rem; align-items: center; }
.feature-actions .play-entry {
  min-height: 3.25rem;
  font-size: 1rem;
  letter-spacing: .015em;
  border-color: #b0956f;
  box-shadow: inset 0 0 0 3px #241811;
}
.film-link {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  color: var(--bright);
  font-family: var(--serif);
}
.film-link:hover { text-decoration: underline; }
.play-icon {
  display: grid; place-items: center;
  width: 2rem; height: 2rem;
  border: 1px solid #9a7f61; border-radius: 50%;
  background: #161216bd;
}
.play-icon::before {
  content: ""; width: .56rem; height: .66rem; margin-left: .1rem;
  background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.play-server {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: .4rem .8rem;
  max-width: 100%;
  margin-top: 1.15rem;
  padding: .5rem .85rem;
  border: 1px solid #79634b8a;
  background: #0c0b0ce8;
  text-align: left;
}
.server-identity { display: flex; flex-wrap: wrap; gap: .2rem .55rem; min-width: 0; align-items: baseline; }
.server-identity > span { color: var(--muted); font-size: .79rem; }
#server-name { min-width: 0; color: var(--gold); font: 700 .88rem/1.35 var(--serif); overflow-wrap: anywhere; }
.server-live { display: flex; gap: .4rem .65rem; align-items: center; flex-wrap: wrap; font-size: .86rem; padding-left: .8rem; border-left: 1px solid var(--line); }
.server-status { display: inline-flex; gap: .45rem; align-items: center; color: var(--muted); }
.server-status::before { content: ""; width: .43rem; height: .43rem; flex: none; background: currentColor; transform: rotate(45deg); }
.server-status[data-state="ok"] { color: var(--green); }
.server-status[data-state="maintenance"] { color: var(--gold); }
.server-status[data-state="down"] { color: var(--red); }
.online-count { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.online-count strong { margin-right: .18rem; color: var(--white); }
.server-message { grid-column: 1 / -1; max-width: 55ch; border-top: 1px solid var(--line); padding-block-start: .45rem; color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.film-toggle {
  position: absolute; bottom: .7rem; right: var(--gutter-end);
  min-height: 2.55rem; padding: .35rem .65rem; border: 1px solid #79634b8a;
  background: #0c0b0ce8; color: var(--muted); font: 400 .8rem/1.2 system-ui, sans-serif;
}
.film-toggle:hover { background: #191417; color: var(--bright); }

.news-section { padding-block-end: var(--gap); }
.project-update {
  display: grid; grid-template-columns: minmax(8.5rem, .34fr) minmax(0, 1.66fr); gap: .6rem 1.3rem;
  border-block: 1px solid var(--line);
  padding-block: 1.35rem;
}
.project-update time { color: var(--gold); padding-block-start: .35rem; font-size: .95rem; }
.project-update h3 { font-size: clamp(1.25rem, 2.5vw, 2.1rem); }
.project-update p { margin-top: .65rem; color: var(--muted); }
.update-actions { display: flex; flex-wrap: wrap; gap: .25rem 1.2rem; margin-top: .55rem; }
.update-actions a { display: inline-flex; align-items: center; min-height: 2.75rem; }

.roster-section { position: relative; border-block: 1px solid #524335; background: #111014 url("/site/class-hall.webp") center / cover no-repeat; }
.roster-section::before { position: absolute; inset: 0; content: ""; background: linear-gradient(180deg,#0b0a0cd8,#10101657 42%,#0b0a0cec); pointer-events: none; }
.roster, .class-panel { position: relative; padding-block-end: var(--gap); }
.roster-head { display: flex; justify-content: space-between; align-items: end; gap: .75rem; }
.roster-switch { display: flex; align-items: center; gap: .55rem; white-space: nowrap; color: var(--gold); }
.step-control { padding: .2rem .55rem; min-width: 2.75rem; font: 400 1.48rem/1 var(--serif); }
.class-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.55rem, 2vw, 1.55rem); }
.class-card {
  position: relative; display: grid; align-items: end; isolation: isolate; overflow: hidden;
  min-height: 0; aspect-ratio: .59; padding: 0;
  border: 1px solid #655244; background: #15151bd6;
}
.class-card img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.class-card::after {
  z-index: -1; position: absolute; inset: 0; content: "";
  background: linear-gradient(0deg,#090709f2 0%,#0a080ac1 15%,transparent 34%);
}
.class-card span {
  width: 100%; min-height: 3rem; align-content: center; padding: .62rem .25rem;
  color: #e7d2b1; font: 700 clamp(.85rem, 1.7vw, 1.31rem)/1.14 var(--serif);
  text-shadow: 0 .09rem .5rem #000; overflow-wrap: anywhere;
}
.class-card:hover { background: #23212a; }
.class-detail-nav, .class-neighbors { display: flex; align-items: center; gap: .6rem; }
.class-detail-nav { justify-content: space-between; margin-bottom: 1.25rem; }
.class-neighbors a { min-width: 2.75rem; font-size: 1.2rem; }
.class-detail-layout {
  display: grid;
  grid-template-columns: minmax(0,.82fr) minmax(0,1.65fr);
  grid-template-areas: "intro scene" "facts scene";
  grid-template-rows: auto 1fr;
  gap: .95rem 1.45rem;
  align-items: start;
}
.class-copy { grid-area: intro; }
.class-copy h2 { overflow-wrap: anywhere; }
.class-copy > :last-child, .class-facts > p { color: var(--muted); }
.class-role { margin-block: .48rem .6rem; color: var(--gold); font-size: .93rem; }
.class-visual { grid-area: scene; margin: 0; min-width: 0; background: var(--field); border: 1px solid var(--line); }
.class-visual img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
.class-facts { grid-area: facts; border-top: 1px solid var(--metal); padding-block-start: .8rem; }
.class-facts h3 { font-size: 1.22rem; }
.class-facts h3:not(:first-child) { margin-top: .9rem; }
.class-facts > p { margin-top: .35rem; }
.class-skills { display: grid; gap: .6rem; margin-top: .5rem; }
.class-skills dt { color: var(--gold); font: 700 1rem/1.3 var(--serif); }
.class-skills dd { margin: .2rem 0 0; color: var(--muted); }
.class-facts .text-link { margin-top: .25rem; }

.media-tile { position: relative; display: grid; overflow: hidden; border: 1px solid var(--line); background: var(--field); color: var(--white); text-decoration: none; }
.media-tile:hover { border-color: var(--metal); color: var(--bright); }
.media-tile > img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-tile::after {
  content: ""; z-index: -1; position: absolute; inset: 0;
  background: linear-gradient(0deg, #0b090af4, #0b090a77 28%, transparent 62%);
}
.media-grid { display: grid; grid-template-columns: minmax(0, 1.43fr) minmax(0, 1fr); grid-template-rows: 1fr 1fr; gap: .65rem; }
.media-tile { min-height: clamp(6.6rem, 15vw, 11rem); isolation: isolate; align-items: end; }
.media-main { min-height: 15rem; grid-row: span 2; }
.media-tile > span { display: flex; justify-content: space-between; align-items: center; gap: .65rem; padding: .6rem .85rem; font-size: .82rem; }
.media-dialog { width: min(70rem, calc(100% - 2rem)); max-height: 90dvh; border: 1px solid var(--metal); background: var(--field); color: var(--white); padding: .6rem; }
.media-dialog::backdrop { background: #080709d9; }
.media-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: .55rem; margin-bottom: .6rem; font-size: .84rem; }
.media-dialog img { display: block; max-height: 74dvh; width: 100%; object-fit: contain; }

.entry-grid, .scoreboard { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); border-block: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td { padding: .53rem .35rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: .78rem; font-weight: 600; }
th:first-child { width: 3.75rem; }
th:last-child { width: 7rem; }
th:last-child, td:last-child { text-align: end; }
td, .stats dd, .account-stats dd { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ranking .result { margin-inline: .35rem; }
.player-search h3 { font-size: 1.52rem; }
.player-search form { margin-top: .85rem; }
label { display: block; color: var(--muted); font-size: .86rem; }
input {
  display: block; width: 100%; min-width: 0; min-height: 2.8rem; margin-top: .3rem;
  border: 1px solid #655448; border-radius: 0; background: #101013; padding: .53rem .68rem;
  color: var(--white); caret-color: var(--gold);
}
input::placeholder { color: #a7a09d; }
.search-controls { display: flex; align-items: stretch; gap: .5rem; margin-top: .35rem; }
.search-controls input { margin-top: 0; }
.player-card { margin-top: 1.1rem; border-top: 1px solid var(--line); padding-top: .85rem; overflow-wrap: anywhere; }
.player-card > p { margin-top: .3rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 6.4rem), 1fr)); gap: .55rem .85rem; margin-top: .8rem; }
.stats > div { border-top: 1px solid var(--line); padding-top: .35rem; }
.stats dt { color: var(--muted); font-size: .77rem; }
.stats dd { margin: 0; font-size: 1.12rem; }

.account-settings summary { cursor: pointer; list-style: none; }
.account-settings summary::-webkit-details-marker { display: none; }

.support-section { margin-top: var(--gap); border-block: 1px solid var(--line); background: linear-gradient(112deg, #241916, #181419 57%, #0e0e12); }
.support-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4rem; align-items: center; padding-block-end: var(--gap); }
.support-layout .section-heading { margin-bottom: 0; }
.support-card { border: 1px solid var(--metal); background: #141216c9; padding: clamp(.95rem, 3vw, 1.8rem); }
.support-card h3 { font-size: 1.32rem; margin-bottom: .48rem; }
.support-card progress { display: block; width: 100%; height: .65rem; margin-block: .6rem .45rem; accent-color: #d6ad70; }
.support-card .support-links { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .9rem; }
.support-card .support-links:empty { margin: 0; }
.noscript { margin-block: 1rem; }

.site-footer { padding-bottom: env(safe-area-inset-bottom); background: #070708; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.25rem; padding-block: 1.25rem; font-size: .84rem; color: var(--muted); }
.footer-inner nav { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; }
.footer-inner nav a { display: inline-flex; align-items: center; min-height: 2.5rem; }

.auth-page {
  background: linear-gradient(90deg,#09090ba1,#0a090cb8 44%,#0a090ce8),
    var(--black) url("/site/feature-poster.webp") 48% 0 / cover fixed no-repeat;
}
.auth-shell { width: min(78rem, calc(100% - var(--gutter) * 2)); margin: clamp(2.4rem, 6vw, 5.4rem) auto; }
.auth-card {
  width: min(100%, 31rem);
  margin-left: auto;
  border: 1px solid var(--metal);
  border-top-color: var(--gold);
  background: #101014f5;
  padding: clamp(1.15rem, 4vw, 2.75rem);
  overflow-wrap: anywhere;
}
.auth-card h1 { font-size: clamp(2rem, 4vw, 3.3rem); letter-spacing: -.04em; }
.auth-card h2 { font-size: clamp(1.52rem, 3vw, 2.15rem); }
.auth-card h3 { font-size: 1.2rem; }
.auth-card > p { margin-top: .85rem; color: var(--muted); }
.auth-card form { margin-top: 1rem; }
.form-fields { display: grid; gap: .85rem; }
.form-fields button { justify-self: start; }
.auth-switch { padding-top: .85rem; border-top: 1px solid var(--line); }
.auth-card code { display: inline-block; margin-left: .3rem; padding: .09em .47em; border: 1px solid var(--metal); color: var(--gold); background: var(--black); font: 600 1.04rem/1.5 ui-monospace, monospace; }
.auth-card form .helper { color: var(--muted); font-size: .84rem; }
.account-section { margin-top: 1.55rem; }
.account-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-top: 1.25rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.account-actions form { margin: 0; }

@media (min-width: 105rem) {
  :root { --page-width: 90rem; }
}

@media (min-width: 105rem) and (min-aspect-ratio: 21 / 10) {
  .feature-poster, .feature-film {
    width: min(100%, 145rem);
    margin-inline: auto;
    mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  }
}

@media (max-width: 65rem) {
  .header-inner { column-gap: .85rem; }
  .site-nav { justify-content: center; }
  .site-nav a, .header-account { font-size: .91rem; }
}
@media (max-width: 57rem) and (min-width: 46.01rem) {
  .site-brand span { display: none; }
  .class-detail-layout { grid-template-columns: minmax(0,1fr) minmax(0,1.4fr); }
}
@media (max-width: 46rem) {
  .header-inner { grid-template-columns: minmax(0,1fr) auto; gap: .2rem .55rem; min-height: auto; padding-block-start: .4rem; }
  .site-nav {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr)) minmax(0,1.4fr);
    grid-row: 2; grid-column: 1 / -1;
    gap: 0 .14rem; border-top: 1px solid #342a28;
  }
  .site-nav a { justify-content: center; padding-inline: .12rem; font-size: .9rem; }
  .feature { min-height: clamp(26rem, 67svh, 36rem); }
  .feature-poster { object-position: 34% center; }
  .feature-film { object-position: 53% center; }
  .feature-content { padding-block: 2.7rem 3.75rem; }
  .feature h1 { width: min(94%, 31rem); }
  .feature-actions { margin-top: 1.15rem; gap: .38rem .9rem; }
  .feature-actions .play-entry { min-width: 0; padding-inline: .68rem; font-size: .88rem; }
  .film-link { font-size: .89rem; gap: .4rem; }
  .play-icon { width: 1.62rem; height: 1.62rem; }
  .play-server { grid-template-columns: 1fr; gap: .25rem; }
  .server-live { border-left: 0; padding-left: 0; }
  .server-message { grid-column: 1; }
  .project-update, .scoreboard, .support-layout { grid-template-columns: 1fr; }
  .project-update time { padding-top: 0; }
  .class-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .class-card { aspect-ratio: .74; }
  .class-card span { font-size: 1.02rem; }
  .class-detail-layout {
    grid-template-columns: minmax(0,1fr);
    grid-template-areas: "intro" "scene" "facts";
    grid-template-rows: auto;
  }
  .player-search { border-left: 0; border-top: 1px solid var(--line); }
  .media-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); grid-template-rows: auto auto; }
  .media-main { grid-column: 1 / -1; grid-row: 1; min-height: 12rem; }
  .media-tile > span { padding-inline: .55rem; }
  .auth-card { margin-inline: auto; }
  .auth-shell { margin-block: 1.6rem 2.8rem; }
  .account-actions { align-items: stretch; }
  .account-actions > *, .account-actions form > button { flex: 1 1 100%; width: 100%; }
  .auth-page { background-attachment: scroll; }
}
@media (max-width: 25rem) {
  .site-nav { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .site-nav a { grid-column: span 2; }
  .site-nav a:nth-last-child(-n + 2) { grid-column: span 3; }
  .site-brand { font-size: .91rem; }
  .film-link { font-size: .83rem; }
  th:first-child { width: 3rem; }
  th:last-child { width: 5.9rem; }
}
@media (max-width: 46rem), (pointer: coarse) {
  .site-nav a, .header-account, .film-toggle, .step-control,
  .account-settings summary { min-height: 2.75rem; }
}
@media (orientation: landscape) and (max-height: 40rem) {
  .feature { min-height: clamp(16.5rem, calc(100svh - 4.65rem), 32rem); }
  .feature-content { padding-block: 1rem 2.65rem; }
  .feature h1 { width: min(59%, 29rem); }
  .feature-content > p { margin-top: .4rem; }
  .feature-actions, .play-server { margin-top: .55rem; }
  .film-toggle { bottom: .25rem; min-height: 2.25rem; }
  .auth-shell { margin-block: 1rem 2rem; }
  .auth-card { padding: clamp(1rem, 3vw, 1.5rem); }
}
@media (orientation: landscape) and (max-height: 40rem) and (min-width: 37rem) {
  .auth-card:not(:has(.account-dashboard)) .form-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .auth-card .helper { grid-column: 1 / -1; }
}
@media (orientation: landscape) and (max-height: 40rem) and (37rem <= width <= 46rem) {
  .header-inner { grid-template-columns: auto minmax(0,1fr) auto; min-height: 3.75rem; padding-block-start: 0; }
  .site-brand span { display: none; }
  .site-nav { display: flex; flex-wrap: wrap; grid-area: auto; justify-content: center; gap: 0 .45rem; border: 0; }
  .site-nav a { padding-inline: .2rem; }
  .feature { min-height: clamp(16.5rem, calc(100svh - 3.85rem), 29rem); }
  .play-server { grid-template-columns: auto auto; }
  .server-live { padding-left: .65rem; border-left: 1px solid var(--line); }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .feature-film { transition: opacity .55s ease; }
  a, button { transition: color .16s ease, border-color .16s ease, background-color .16s ease; }
  .class-card img { transition: scale .28s ease; }
  .class-card:focus-visible img { scale: 1.045; }
  @media (hover: hover) {
    .class-card:hover img { scale: 1.045; }
  }
}

/* Portal navigation and first screen */
.site-header { border-color: #3a3028; background: #070707; }
.header-inner { min-height: 4.1rem; gap: .3rem clamp(1rem, 3.2vw, 3.25rem); }
.site-brand img { width: 2.45rem; height: 2.45rem; }
.site-nav { gap: clamp(.55rem, 2vw, 2rem); }
.site-nav a, .header-account { font-size: 1.05rem; }
.site-nav a {
  position: relative;
  min-height: 3.85rem;
  padding-inline: .25rem;
  color: #ddd1bb;
}
.site-nav a:hover, .site-nav a[aria-current] { color: #f5d399; text-decoration: none; }
.site-nav a::after {
  content: "";
  position: absolute;
  inset: auto .2rem .15rem;
  height: 2px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, #eac994 50%, transparent);
}
.site-nav a[aria-current]::after, .site-nav a:hover::after { opacity: 1; }
.header-account { background: linear-gradient(#241b15, #13100e); }

.feature {
  min-height: max(37.5rem, calc(100svh - 4.1rem));
  border-bottom-color: #836344;
}
.feature::before {
  background: linear-gradient(180deg, #08080975, transparent 27%, #120a0930 48%, #080809eb 100%),
    radial-gradient(ellipse at 50% 64%, #1a100d91, #0d0b1045 55%, transparent 76%);
}
.feature-content { padding-block: 1.2rem 5.85rem; }
.feature-sign {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 53rem);
  min-height: clamp(14rem, 36svh, 27.5rem);
  margin-inline: auto;
  isolation: isolate;
}
.feature-ring {
  position: absolute;
  width: auto;
  height: 111%;
  max-height: 29rem;
  max-width: 90%;
  object-fit: contain;
  z-index: -1;
  opacity: .94;
  filter: drop-shadow(0 .75rem 1.2rem #0907089c);
}
.feature h1 { width: min(100%, 45rem); padding-inline: .3rem; }
.feature h1 img { filter: drop-shadow(0 .25rem 1.2rem #0d0908) drop-shadow(0 1px 2px #100905); }
.feature-content > p {
  margin-block-start: .45rem;
  color: #f2d6a5;
  font-size: clamp(1.25rem, 2.5vw, 1.9rem);
  text-shadow: 0 .11rem .6rem #080809;
}
.feature-actions { gap: .5rem 1rem; margin-block-start: 1.15rem; }
.feature-actions .play-entry, .feature-actions .film-link {
  min-height: 3.35rem;
  min-width: 12.25rem;
  padding-inline: .75rem;
  font: 700 1rem/1.2 var(--serif);
}
.feature-actions .play-entry { background: linear-gradient(#694a38, #412b22 54%, #302019); }
.feature-actions .play-entry:hover { background: linear-gradient(#87644b, #5f402b 54%, #3b271f); }
.feature-actions .film-link {
  justify-content: center;
  border: 1px solid #a48a6c;
  box-shadow: inset 0 0 0 3px #201711;
  background: #191412db;
}
.feature-actions .film-link:hover { border-color: var(--bright); background: #35251e; text-decoration: none; }
.feature-actions .play-icon {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0;
  border: 0;
  background: transparent;
}
.feature .play-server { margin-block-start: .9rem; border: 0; background: transparent; padding: 0; }
.feature .server-identity > span { display: none; }
.feature .server-identity > strong { color: #f0d7b1; }
.feature .server-live { border-color: #73604a; }
.feature-next {
  display: inline-flex;
  position: absolute;
  inset: auto auto .85rem 50%;
  translate: -50% 0;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: .38rem;
  color: var(--gold);
  font-family: var(--serif);
  text-decoration: none;
}
.feature-next span { color: #bd9a65; font-size: 1.45rem; }
.feature-next:hover { color: var(--bright); }
.film-toggle { bottom: .85rem; }

.news-section, .media-section, .entry-section, .ranking-section {
  padding-block-end: clamp(2.4rem, 5vw, 4.85rem);
}
.news-section, .media-section, .entry-section, .ranking-section { border-bottom: 1px solid #4a3b30; }
.project-page .roster-section, .project-page .support-section { margin-top: 0; }
.project-page .roster-section { border-block-color: #4a3b30; }
.section-heading h2::after {
  display: block;
  width: 4.75rem;
  height: 2px;
  margin-top: .8rem;
  background: linear-gradient(90deg, #a78858, transparent);
  content: "";
}

.media-dialog video {
  display: block;
  width: min(72rem, 88vw);
  max-width: 100%;
  max-height: 76dvh;
  background: #080808;
}
.guide-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}
.guide-entry { padding: clamp(1rem, 3vw, 1.65rem); background: #141216; }
.guide-entry + .guide-entry { border-inline-start: 1px solid var(--line); }
.guide-entry h3 { font-size: clamp(1.18rem, 2.1vw, 1.65rem); }
.guide-entry h3 a { text-decoration: none; }
.guide-entry h3 a:hover { text-decoration: underline; }
.guide-entry p { margin-block-start: .65rem; }
.guide-entry .result { font-size: .88rem; }
.support-layout { align-items: stretch; }
.support-layout > .section-heading { grid-column: 1 / -1; }
.support-card .button { margin-block-start: .9rem; }
.support-card h4 { margin-block-start: .75rem; }
.account-section h2 { font-size: clamp(1.45rem, 3vw, 2.05rem); }
.bug-form select, .bug-form textarea {
  display: block;
  width: 100%;
  min-height: 2.8rem;
  margin-top: .32rem;
  padding: .6rem .65rem;
  border: 1px solid var(--metal);
  border-radius: 0;
  background: #151115;
  color: var(--white);
  font: inherit;
}
.bug-form textarea { resize: vertical; }
.form-error { color: var(--red); }
.report-list { list-style: none; margin: .85rem 0 0; padding: 0; }
.report-list li {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: .28rem .7rem;
  padding: .55rem;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.report-list li:target { background: #3b2b20; }
.report-list li code { grid-column: 1 / -1; }

@media (max-width: 62rem) {
  .header-inner { gap: .25rem .8rem; }
  .site-nav { gap: .55rem; }
  .site-nav a { font-size: 1rem; }
}
@media (max-width: 46rem) {
  .header-inner { padding-block-start: .35rem; min-height: auto; }
  .site-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 .2rem; }
  .site-nav a { grid-column: auto; min-height: 2.75rem; }
  .site-nav a:nth-last-child(-n + 2) { grid-column: auto; }
  .feature { min-height: max(31rem, calc(100svh - 8.75rem)); }
  .feature-content { padding-block: 1rem 4.45rem; }
  .feature-sign { min-height: clamp(12rem, 31svh, 19rem); }
  .feature h1 { width: min(100%, 31rem); }
  .feature-actions .play-entry, .feature-actions .film-link { min-width: 0; font-size: .9rem; min-height: 2.95rem; }
  .feature .play-server { grid-template-columns: auto auto; }
  .feature .server-live { border-left: 1px solid #73604a; padding-inline-start: .48rem; }
  .feature .server-identity, .feature .server-live { font-size: .82rem; }
  .guide-index { grid-template-columns: 1fr; }
  .guide-entry + .guide-entry { border-inline-start: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 23rem) {
  .feature .play-server { grid-template-columns: 1fr; }
  .feature .server-live { border-left: 0; padding-inline-start: 0; }
  .feature-next { inset-inline-start: var(--gutter-start); translate: none; }
}
@media (orientation: landscape) and (max-height: 36rem) {
  .feature { min-height: 24rem; }
  .feature-content { padding-block: .7rem 3.6rem; }
  .feature-sign { min-height: 10.1rem; }
  .feature h1 { width: min(100%, 34rem); }
  .site-nav { column-gap: .35rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .site-nav a::after { transition: opacity .16s ease; }
  .feature-sign { animation: reveal-sign .48s ease-out both; }
  @keyframes reveal-sign { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}

/* Signed-in account */
.auth-page:has(.account-dashboard) {
  background: linear-gradient(180deg, #1c1716, #100e11 19rem, var(--black) 45rem);
}
.auth-page:has(.account-dashboard) .header-account {
  border-color: #b29772;
  background: linear-gradient(#382820, #1c1513);
  box-shadow: inset 0 -2px #98754c;
}
.auth-page:has(.account-dashboard) .auth-shell {
  width: min(74rem, calc(100% - var(--gutter-start) - var(--gutter-end)));
  margin-block: clamp(1.7rem, 3vw, 2.8rem) clamp(2.4rem, 6vw, 5rem);
}
.auth-card:has(.account-dashboard) {
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0;
}
.auth-card:has(.account-dashboard) > h1 {
  font-size: clamp(1.95rem, 4vw, 3rem);
  letter-spacing: -.025em;
}
.account-dashboard { margin-top: 1.15rem; }
.account-profile {
  border: 1px solid #5b493d;
  border-top-color: #9c805e;
  background: #161317;
}
.account-identity {
  display: grid;
  align-content: end;
  justify-items: start;
  gap: 1.1rem;
  min-height: clamp(15rem, 26vw, 19rem);
  padding: clamp(1.2rem, 3.6vw, 2.6rem);
  background:
    linear-gradient(90deg, #151115 15%, #151115 28%, #151115d9 42%, #15111545 59%, #1511150a 85%),
    linear-gradient(0deg, #151115a1, transparent 62%),
    url("/site/media-spell.webp") right 48% / 78% auto no-repeat,
    #151115;
}
.account-identity > div { max-width: min(100%, 29rem); }
.account-identity h2 {
  color: #fae7cc;
  font-size: clamp(1.75rem, 4.1vw, 3.4rem);
  letter-spacing: -.025em;
}
.account-identity p {
  margin-top: .55rem;
  color: #d7c7b6;
  font-size: .88rem;
}
.account-identity code {
  color: #f0d7b1;
  background: #151115;
  border-color: #76634d;
  font-size: .9rem;
}
.account-identity .button {
  background: linear-gradient(168deg, #54392c, #30201b 62%, #241918);
  border-color: #967b5f;
  box-shadow: inset 0 0 0 2px #291e18;
}
.account-identity .button:hover { background: #503529; border-color: var(--gold); }
.account-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #6f5741;
  background: linear-gradient(180deg, #21181a, #171418);
}
.account-stats > div { padding: .8rem clamp(.42rem, 3.6vw, 2.6rem) .9rem; }
.account-stats > div + div { border-left: 1px solid #4f3d37; }
.account-stats dt { color: #d6c6b5; font-size: .85rem; }
.account-stats dd {
  margin: .1rem 0 0;
  color: #f2d6a5;
  font-size: clamp(1.36rem, 2.6vw, 2.1rem);
  font-weight: 600;
  line-height: 1.18;
}
.account-profile > .muted { padding: .8rem clamp(1.2rem, 3.6vw, 2.6rem); border-top: 1px solid #6f5741; }
.account-dashboard .account-section { margin-top: clamp(1.55rem, 3.2vw, 2.4rem); }
.account-settings {
  margin-top: .8rem;
  border: 1px solid #5b493d;
  background: linear-gradient(125deg,#20191a,#141216 76%);
}
.account-settings > * { min-width: 0; padding: clamp(.85rem, 2.4vw, 1.45rem); }
.account-settings > * + * { border-top: 1px solid #4f3d37; }
.account-settings h3, .account-settings summary { font: 400 1.2rem/1.3 var(--serif); }
.account-settings summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  min-height: 2rem;
  color: var(--gold);
}
.account-settings summary:hover { color: var(--bright); }
.account-settings summary::after {
  flex: 0 0 .45rem;
  width: .45rem;
  height: .45rem;
  margin-inline-end: .1rem;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
  content: "";
}
.account-settings details[open] summary::after { transform: rotate(225deg); }
.account-settings input { border-color: #756050; }
.account-settings input:hover { border-color: #ad9272; }
.account-settings button { font-size: .88rem; }
.account-dashboard .account-actions {
  display: grid;
  grid-template-columns: repeat(2, max-content) minmax(0, 1fr);
  gap: .5rem;
  margin-top: 1.15rem;
  padding-top: 1.05rem;
  border-color: #4f3d37;
}
.account-dashboard .account-actions form { justify-self: end; }

@media (min-width: 46.01rem) {
  .account-settings > section {
    display: grid;
    grid-template-columns: minmax(10rem, .45fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: end;
  }
  .account-settings > section h3 { align-self: center; }
  .account-settings > section .form-fields {
    margin: 0;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: end;
  }
  .account-settings details .form-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr)) max-content;
    align-items: end;
  }
}
@media (max-width: 46rem) {
  .account-identity {
    min-height: 17.5rem;
    padding: 6.75rem 1rem 1.15rem;
    background:
      linear-gradient(0deg, #151115, #151115df 34%, #1511158a 54%, transparent 85%),
      url("/site/media-spell.webp") 56% center / cover no-repeat,
      #151115;
  }
  .account-identity > .button { width: auto; }
  .account-stats > div { padding: .72rem .45rem .8rem; text-align: center; }
  .account-stats dt { font-size: .79rem; }
  .account-settings summary { min-height: 2.75rem; }
  .account-dashboard .account-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
  .account-dashboard .account-actions form {
    grid-column: 1 / -1;
    justify-self: start;
    width: auto;
  }
}

/* Guide pages */
.guide-page { background: #100e11; }
.guide-hero {
  isolation: isolate;
  overflow: clip;
  position: relative;
  background: #171316;
  border-bottom: 1px solid #6f5741;
}
.guide-hero--install { --guide-art: url("/site/class-hall.webp"); --guide-position: center 62%; }
.guide-hero--first-raid { --guide-art: url("/site/media-spell.webp"); --guide-position: center 45%; }
.guide-hero--connection { --guide-art: url("/site/feature-poster.webp"); --guide-position: center 48%; }
.guide-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 34%;
  background:
    linear-gradient(90deg, #171316 0%, #171316e8 22%, #17131626 76%),
    linear-gradient(0deg, #171316c9, transparent 64%),
    var(--guide-art) var(--guide-position) / cover no-repeat;
}
.guide-heading { padding-block: clamp(1.15rem, 2.5vw, 1.95rem) clamp(1.65rem, 3.4vw, 2.65rem); }
.guide-back {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-bottom: .35rem;
  color: var(--gold);
  font-size: .95rem;
  text-decoration: none;
}
.guide-back:hover { text-decoration: underline; }
.guide-heading h1 {
  max-width: 22ch;
  font-size: clamp(2.05rem, 4.25vw, 3.85rem);
  line-height: 1.09;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.guide-heading p {
  margin-top: .75rem;
  max-width: 63ch;
  font-size: clamp(1rem, 1.7vw, 1.15rem);
  line-height: 1.55;
  color: #e0d1c1;
  text-wrap: pretty;
}
.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 46.5rem) minmax(13rem, 17rem);
  align-items: start;
  gap: clamp(2rem, 4.25vw, 4.25rem);
  padding-block: clamp(1.5rem, 3vw, 2.65rem) clamp(2.5rem, 6vw, 5rem);
}
.guide-reader { min-width: 0; font-size: 1.0625rem; line-height: 1.65; }
.guide-reader p, .guide-reader section ol, .guide-reader section ul {
  max-width: 69ch;
  text-wrap: pretty;
}
.guide-contents {
  border-block: 1px solid #514138;
  padding: .8rem 0;
  background: linear-gradient(90deg, #21181a, transparent);
}
.guide-contents h2 {
  margin-inline: .85rem;
  color: #e5cda9;
  font-size: 1rem;
  letter-spacing: 0;
  font-weight: 700;
}
.guide-contents ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(1.35rem, 3vw, 2.55rem);
  margin: .25rem .85rem 0;
  padding-inline-start: 1.33rem;
}
.guide-contents li { padding-inline-start: .1rem; }
.guide-contents li::marker { color: #d3b88f; font-variant-numeric: tabular-nums; }
.guide-contents a, .guide-links a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  font-size: .98rem;
}
.guide-contents a { text-decoration: none; }
.guide-contents a:hover { text-decoration: underline; }
.guide-step { margin-top: 1.55rem; }
.guide-step + .guide-step {
  border-top: 1px solid #494039;
  padding-top: 1.35rem;
}
.guide-step h2 {
  font-size: clamp(1.48rem, 2.6vw, 2rem);
  letter-spacing: -.024em;
  text-wrap: pretty;
  color: #f0dfc7;
}
.guide-step h2:target { color: #ffdda4; }
.guide-step > p, .guide-step > ul, .guide-step > ol { margin-block: .6rem 0; }
.guide-step > ul, .guide-step > ol { padding-inline-start: 1.4rem; }
.guide-step li + li { margin-top: .35rem; }
.guide-step li::marker { color: #d3b88f; }
.guide-step code { color: #f0d7b1; background: #211a1b; padding: .12em .25em; font-size: .94em; overflow-wrap: anywhere; }
.guide-action { margin-top: .8rem; }
.guide-links {
  background: #191518;
  border-top: 1px solid #8e7358;
}
.guide-links h2 {
  margin: .95rem .95rem .6rem;
  font-size: 1.24rem;
  letter-spacing: -.018em;
  color: #f0dfc7;
}
.guide-links ul { margin: 0; padding: 0; list-style: none; }
.guide-links li { border-top: 1px solid #443831; }
.guide-links a {
  display: flex;
  min-height: 2.9rem;
  padding: .6rem .95rem;
  line-height: 1.3;
  text-decoration: none;
}
.guide-links a:hover { background: #241c1c; text-decoration: underline; }
.guide-links a[aria-current] {
  color: #ffdda4;
  background: #34251d;
  box-shadow: inset 2px 0 #b99667;
}

@media (min-width: 64rem) and (min-height: 42rem) {
  .guide-links { position: sticky; top: 5.2rem; }
}
@media (max-width: 57rem) {
  .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}
@media (max-width: 46rem) {
  .guide-hero::before {
    inset-inline-start: 0;
    background:
      linear-gradient(90deg, #171316f7, #171316a8 72%, #17131672),
      linear-gradient(0deg, #171316cf, transparent 76%),
      var(--guide-art) var(--guide-position) / cover no-repeat;
  }
  .guide-heading { padding-block: .7rem 1.35rem; }
  .guide-heading p { max-width: 50ch; }
  .guide-reader { font-size: 1rem; }
  .guide-contents ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.15rem; }
  .guide-contents a { min-height: 2.75rem; }
  .guide-step { margin-top: 1.3rem; }
}

/* Standalone portal pages */
.service-page { background: #100e11; }
.section-heading-link, .service-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .55rem 1rem; }
.section-heading-link a, .service-link { display: inline-flex; min-height: 2.75rem; align-items: center; }
.service-shell { padding-block: clamp(1.35rem, 3.8vw, 3.1rem) clamp(2.5rem, 7vw, 5rem); }
.service-heading { margin-bottom: 1.15rem; padding-bottom: .85rem; border-bottom: 1px solid #6f5741; }
.service-heading h1 { color: #f0dfc7; font-size: clamp(2rem, 4.65vw, 3.65rem); letter-spacing: -.03em; overflow-wrap: anywhere; }
.service-shell h2 { font-size: clamp(1.3rem, 2.8vw, 2rem); letter-spacing: -.022em; text-wrap: pretty; }
.service-shell .muted { color: #c8b7ab; }
.service-intro { margin-block: .6rem 1.15rem; }
.directory { padding-block: clamp(1.35rem, 3vw, 2.6rem) clamp(2.5rem, 7vw, 4.6rem); }
.directory-entry { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: .45rem 1.35rem; align-items: center; padding: clamp(.85rem, 2.4vw, 1.45rem) 0; border-bottom: 1px solid #514138; }
.directory-entry h2 { font-size: clamp(1.26rem, 2.6vw, 1.9rem); }
.directory-entry a { display: inline-flex; min-height: 2.75rem; align-items: center; text-decoration: none; }
.directory-entry a:hover { text-decoration: underline; }
.directory-entry p { color: #d3c4b8; }
.media-feature { max-width: 62rem; }
.media-feature video { display: block; width: 100%; aspect-ratio: 16 / 9; margin-top: .8rem; background: #080809; border: 1px solid #6f5741; }
.media-collection { margin-top: clamp(1.7rem, 4vw, 2.8rem); }
.media-library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: .8rem; }
.media-library-grid .media-tile { min-height: clamp(10rem, 23vw, 20rem); }
@media (max-width: 43rem) {
  .directory-entry, .media-library-grid { grid-template-columns: 1fr; }
}
/* Forum and issue tracker */
.portal-toolbar, .portal-tabs, .portal-pager, .ticket-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem 1rem;
}
.portal-toolbar { margin-bottom: .95rem; }
.portal-tabs { border-bottom: 1px solid #55453b; margin-bottom: .9rem; }
.portal-tabs a { display: inline-flex; min-height: 2.75rem; align-items: center; padding-inline: .65rem; text-decoration: none; }
.portal-tabs a[aria-current] { color: #ffdda4; border-bottom: 2px solid #b99667; }
.portal-filter {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: .7rem;
  padding: clamp(.85rem, 2.4vw, 1.15rem);
  margin: 0 0 1rem;
  border: 1px solid #55453b;
  background: #1b1619;
}
.portal-filter label { flex: 1 1 11rem; min-width: 0; }
.portal-filter label:has(input[type="search"]) { flex: 2 1 15rem; }
.portal-form { max-width: 48rem; margin-block: .9rem 1.15rem; }
.portal-form label, .portal-filter label { color: #e0d1c1; font-size: .94rem; }
.portal-form select, .portal-filter select, .portal-form textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 2.8rem;
  margin-top: .3rem;
  padding: .53rem .68rem;
  border: 1px solid #756050;
  border-radius: 0;
  background: #151115;
  color: var(--white);
  font: inherit;
}
.portal-form textarea { resize: vertical; }
.portal-form input[type="file"] { max-width: 100%; }
.portal-form button { min-width: min(100%, 10rem); }
.portal-form > p, .portal-empty { margin-block: .5rem; }
.portal-empty { padding-block: .85rem; color: #c8b7ab; }
.portal-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid #514138; }
.portal-list li {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) max-content;
  align-items: center;
  gap: .45rem .8rem;
  padding: .75rem .45rem;
  border-bottom: 1px solid #4d3e35;
  overflow-wrap: anywhere;
}
.portal-list li:target { background: #2e221e; }
.portal-list li > a { display: inline-flex; min-height: 2.75rem; align-items: center; font: 400 1.1rem/1.3 var(--serif); }
.portal-list li > span, .portal-list li > small { color: #c9b8a8; font-size: .88rem; }
.ticket-list li { grid-template-columns: minmax(0, 1.6fr) minmax(0, .8fr) max-content minmax(0, 13rem); }
.ticket-list li > small, .ticket-meta code { font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
.ticket-status {
  width: fit-content;
  padding: .2rem .48rem;
  color: #f0d7b1;
  background: #30251d;
  border: 1px solid #796147;
  font-size: .82rem;
}
.ticket-status[data-status="in_progress"] { border-color: #786389; background: #292131; color: #e5caef; }
.ticket-status[data-status="needs_info"] { border-color: #9b7254; background: #3a281d; color: #ffddad; }
.ticket-status[data-status="resolved"] { border-color: #5f765c; background: #222b23; color: #cee3c5; }
.ticket-meta { color: #dfcbb6; margin-bottom: .9rem; overflow-wrap: anywhere; }
.portal-thread { max-width: 56rem; }
.portal-message { border-top: 1px solid #59483c; background: #191519; padding: clamp(.85rem, 2.25vw, 1.25rem); }
.portal-message + .portal-message { margin-top: .5rem; }
.portal-message header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .35rem 1rem; color: #e6cda9; }
.portal-message header small { color: #c8b7ab; }
.portal-copy { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .35rem; max-width: 72ch; }
.ticket-event { background: #221a1b; }
.portal-replies { margin-top: 1.6rem; }
.portal-replies h2 { margin-bottom: .65rem; }
.portal-pager { margin-top: .85rem; }

@media (max-width: 48rem) {
  .ticket-list li { grid-template-columns: minmax(0, 1fr) max-content; }
  .ticket-list li > small { grid-column: 1 / -1; }
  .ticket-list li > span { grid-row: 2; }
}
@media (max-width: 32rem) {
  .portal-list li { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .ticket-list li > span { grid-row: auto; }
}

/* Project support and budget ledger */
.fund-page {
  background: #100e10;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.fund-hero {
  min-height: clamp(24rem, 34vw, 35rem);
  display: grid;
  align-items: end;
  background:
    linear-gradient(90deg, #100e10 3%, #100e10e0 31%, #100e101c 90%),
    linear-gradient(0deg, #100e10, #100e1022 42%, #100e1000 67%),
    url("/site/media-spell.webp") 63% 45% / cover no-repeat;
}
.fund-hero-inner { padding-block: 4.8rem clamp(2.4rem, 6vw, 5rem); }
.fund-hero h1 {
  max-width: 13ch;
  margin: 0 0 .65rem;
  font-size: clamp(2.9rem, 5.5vw, 5.85rem);
  line-height: 1.05;
  text-wrap: balance;
}
.fund-hero p { color: #e4d7c6; max-width: 43ch; font-size: clamp(1rem, 1.5vw, 1.22rem); }
.fund-hero .button { margin-top: 1.35rem; }
.fund-content { padding-bottom: clamp(3rem, 7vw, 6rem); }
.fund-section {
  padding-block: clamp(1.7rem, 4vw, 3.25rem);
  border-top: 1px solid #6d5943;
  scroll-margin-top: 10rem;
}
.fund-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .55rem 2rem;
  margin-bottom: 1.55rem;
}
.fund-section-head h2, .fund-about h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.85rem);
  margin: 0;
  line-height: 1.12;
  text-wrap: balance;
}
.fund-section-head p, .fund-payment { color: #cabbab; margin: 0; }
.fund-periods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border-block: 1px solid #554535;
  background: #554535;
}
.fund-period {
  min-width: 0;
  border: 0;
  padding: clamp(1rem, 3vw, 1.9rem);
  background: #1b1516;
}
.fund-period header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .15rem 1rem;
}
.fund-period h3 { font-size: 1.2rem; margin: 0; }
.fund-period header span, .fund-spent { color: #d3c4b4; font-size: .9rem; }
.fund-total {
  color: #f4dfbb;
  font: 500 clamp(1.85rem, 4vw, 3.2rem)/1.2 var(--serif);
  margin: .65rem 0 .8rem;
}
.fund-total span { color: #c3ae99; font-size: .5em; display: inline-block; }
.fund-period progress, .fund-weight meter { display: block; width: 100%; }
.fund-period progress {
  appearance: none;
  accent-color: #dbb477;
  height: .55rem;
  border: 0;
  background-color: #3a2f2c;
}
.fund-period progress::-webkit-progress-bar { background-color: #3a2f2c; }
.fund-period progress::-webkit-progress-value { background-color: #dbb477; }
.fund-period progress::-moz-progress-bar { background-color: #dbb477; }
.fund-spent { margin-top: .75rem; }
.fund-spent strong { color: #ead9c6; margin-left: .35rem; }
#budget .fund-section-head p::after {
  content: "Полосы показывают долю от суммы до резерва.";
  display: block;
  margin-top: .2rem;
  font-size: .85rem;
}
.fund-budget { margin: 0; }
.fund-budget-head, .fund-budget-row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 1.8fr) minmax(6rem, 1fr) minmax(6rem, 1fr);
  align-items: center;
  gap: .75rem 1.25rem;
  padding: .8rem .85rem;
}
.fund-budget-head {
  color: #c6b7a7;
  font-size: .82rem;
  border-bottom: 1px solid #64523f;
}
.fund-budget-row { border-bottom: 1px solid #3e342d; }
.fund-budget-row dt {
  font: 600 1.02rem/1.36 var(--serif);
  min-width: 0;
}
.fund-budget-row dt small {
  display: block;
  font: .9rem/1.45 system-ui, sans-serif;
  color: #c6b7a7;
  margin-top: .3rem;
}
.fund-budget-row dd { margin: 0; }
.fund-budget-head span:nth-last-child(-n+2), .fund-budget-row dd:nth-last-child(-n+2) { text-align: right; }
.fund-cadence {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.fund-weight meter { height: .45rem; }
.fund-weight meter::-webkit-meter-bar { background: #2e2625; border: 0; border-radius: 0; }
.fund-weight meter::-webkit-meter-optimum-value { background: #ae8959; }
.fund-weight meter::-moz-meter-bar { background: #ae8959; }
.fund-budget-total { background: #231a17; color: #f4dfbb; border-color: #6d5943; }
.fund-budget-total dd { font-weight: 700; }
.fund-empty {
  border-block: 1px solid #3e342d;
  padding: 1.3rem .85rem;
  color: #d3c4b4;
  margin: 0;
}
.fund-ledger {
  list-style: none;
  padding: 0;
  border-top: 1px solid #554535;
}
.fund-ledger li {
  display: grid;
  grid-template-columns: minmax(5.5rem, auto) minmax(0, 1fr) minmax(0, auto);
  align-items: baseline;
  gap: .35rem 1rem;
  padding: .9rem .85rem;
  border-bottom: 1px solid #3e342d;
}
.fund-ledger time, .fund-ledger p { color: #cfbfae; font-size: .92rem; }
.fund-ledger p { margin: .3rem 0 0; overflow-wrap: anywhere; }
.fund-ledger b { color: #f4dfbb; white-space: nowrap; text-align: right; }
.fund-ledger form { grid-column: 2 / -1; justify-self: end; }
.fund-entry-form { margin-bottom: 2rem; }
.fund-about {
  border-top: 1px solid #6d5943;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
  gap: 1rem 2rem;
  padding-top: clamp(1.7rem, 4vw, 3.25rem);
}
.fund-about p { color: #d3c4b4; max-width: 64ch; margin: 0 0 .7rem; }
.fund-about a { display: inline-block; margin-top: .35rem; }
@media (max-width: 720px) {
  .fund-hero {
    background:
      linear-gradient(90deg, #100e10f2, #100e108c 67%, #100e106b),
      linear-gradient(0deg, #100e10, #100e1000 65%),
      url("/site/media-spell.webp") 73% 45% / cover no-repeat;
  }
  .fund-hero p { max-width: 34ch; }
  .fund-budget-head { display: none; }
  .fund-budget-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem .85rem; }
  .fund-budget-row dt, .fund-budget-row .fund-weight { grid-column: 1 / -1; }
  .fund-budget-row dd:nth-last-child(-n+2) { text-align: left; }
  .fund-cadence {
    display: block;
    position: static;
    width: auto;
    height: auto;
    clip-path: none;
    font-size: .75rem;
    font-weight: 400;
    color: #c6b7a7;
  }
  .fund-about { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .fund-periods { grid-template-columns: 1fr; }
  .fund-ledger li { grid-template-columns: minmax(0, 1fr) auto; }
  .fund-ledger li div { grid-column: 1 / -1; grid-row: 2; }
  .fund-ledger form { grid-row: 3; }
}
