@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800&family=Eagle+Lake&family=Merriweather+Sans:wght@400;500;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg: #101411;
  --panel: #1c241f;
  --panel-2: #263029;
  --text: #f4f7f1;
  --muted: #a7b4a8;
  --line: #3a463d;
  --accent: #d7b56d;
  --good: #55c677;
  --bad: #df645d;
  --water: #306f91;
  --grass: #5a8a47;
  --forest: #2f673c;
  --mountain: #777777;
  --swamp: #596a38;
  --desert: #b59656;
  --snow: #d8e2df;
  --ui-panel-frame: url('/assets/ui/ui-panel-frame-fantasy-clean.png');
  --ui-tooltip-frame: url('/assets/ui/ui-tooltip-frame-fantasy.png');
  --ui-button-gold: url('/assets/ui/ui-button-gold-fantasy.png');
  --ui-button-dark: url('/assets/ui/ui-button-dark-fantasy.png');
  --ui-button-red: url('/assets/ui/ui-button-red-fantasy.png');
  --ui-panel-slice: 96 fill;
  --ui-panel-border: 42px;
  --ui-card-border: 34px;
  --ui-tooltip-slice: 32 fill;
  --ui-tooltip-border: 14px;
  --ui-button-slice: 28 fill;
  --ui-button-border: 8px;
  --ui-panel-padding: 2px;
  --ui-button-padding: 2px 5px;
  --font-ui: 'Merriweather Sans', Segoe UI, system-ui, sans-serif;
  --font-display: 'Cinzel', Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-ui);
  background:
    radial-gradient(circle at 50% 0, rgba(85, 67, 37, .22), transparent 34rem),
    linear-gradient(rgba(5, 8, 6, .58), rgba(5, 8, 6, .72)),
    url('/assets/ui/ui-bg-dark.png');
  background-size: auto, auto, 512px 512px;
  color: var(--text);
}

body.menu-bg-page {
  background:
    url('/assets/bg.png') center center / cover no-repeat fixed;
}
body.menu-bg-page.has-app-sidebar {
  background-position: calc(50% + 110px) center;
}

button, input, select {
  font: inherit;
}

button,
.button-link {
  border: var(--ui-button-border) solid transparent;
  border-image: var(--ui-button-dark) var(--ui-button-slice) / var(--ui-button-border) / 0 stretch;
  border-radius: 0;
  background: var(--panel-2);
  color: var(--text);
  padding: var(--ui-button-padding);
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .01em;
  text-shadow: 0 1px 1px rgba(0,0,0,.75);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button-link:hover,
button:hover:not(:disabled) { filter: brightness(1.08); }
button:active:not(:disabled) {
  transform: translateY(1px);
  filter: brightness(.96);
}
button.primary {
  border-image: var(--ui-button-gold) var(--ui-button-slice) / var(--ui-button-border) / 0 stretch;
  background: var(--accent);
  color: var(--text);
  font-weight: 600;
  text-shadow: 0 1px 1px rgba(0,0,0,.75);
}
button.primary,
.button-link.primary-link {
  border-image: var(--ui-button-gold) var(--ui-button-slice) / var(--ui-button-border) / 0 stretch;
  background: var(--accent);
}
button.danger {
  border-image: var(--ui-button-red) var(--ui-button-slice) / var(--ui-button-border) / 0 stretch;
  background: #4d2422;
}
#logoutButton,
.logout-button {
  border-image: var(--ui-button-red) var(--ui-button-slice) / var(--ui-button-border) / 0 stretch;
  background: #4d2422;
}
button:disabled { opacity: .48; cursor: not-allowed; filter: grayscale(.35); }

input, select {
  width: 100%;
  border: 1px solid rgba(174, 137, 72, .48);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.38), rgba(255,255,255,.025)),
    #0d120f;
  color: var(--text);
  padding: 10px 12px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.48), 0 1px 0 rgba(255,255,255,.04);
}

input:focus, select:focus {
  outline: none;
  border-color: #d7b56d;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.55), 0 0 0 2px rgba(215,181,109,.22);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}
.has-app-sidebar .app-shell {
  display: block;
}
.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  width: 220px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  padding: 14px 12px;
  border-right: 1px solid rgba(215, 181, 109, .42);
  background:
    linear-gradient(180deg, rgba(26, 18, 11, .88), rgba(8, 11, 8, .94)),
    rgba(12, 15, 12, .96);
  box-shadow: 16px 0 34px rgba(0, 0, 0, .38);
}
.app-sidebar-logo {
  display: grid;
  place-items: center;
  min-height: 114px;
}
.app-sidebar-logo img {
  display: block;
  width: 100%;
  max-height: 112px;
  object-fit: contain;
}
.app-sidebar-player {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 8px;
  border: 1px solid rgba(174, 137, 72, .28);
  background: rgba(6, 10, 7, .62);
  text-align: center;
}
.app-sidebar-player strong {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.app-sidebar-player-name {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.player-level-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  vertical-align: middle;
}
.level-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  object-fit: contain;
}
.level-label {
  flex: 0 0 auto;
  color: #f0cf78;
  font-size: .78em;
  font-weight: 900;
  white-space: nowrap;
}
.app-sidebar-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(215, 181, 109, .42);
  background: rgba(10, 14, 10, .82);
  color: #f7e4ad;
  padding: 4px 8px;
  font-weight: 800;
  font-size: 13px;
}
.gold-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #f7e4ad;
  font-weight: 800;
}
.app-sidebar-nav {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}
.app-sidebar-nav .button-link,
.app-sidebar-nav button {
  width: 100%;
  min-height: 36px;
  font-size: 13px;
  line-height: 1.1;
}
.app-sidebar-nav .button-link.active {
  border-image: var(--ui-button-gold) var(--ui-button-slice) / var(--ui-button-border) / 0 stretch;
  background: var(--accent);
}
.app-sidebar-nav .app-sidebar-play-link,
.app-sidebar-nav .app-sidebar-play-link.active {
  min-height: 48px;
  border: 0;
  border-image: none;
  background: url('/assets/ui/ui-button-play-gold-fantasy.png') center / 100% 100% no-repeat;
  padding: 8px 18px;
  font-size: 15px;
}
.app-sidebar-nav .app-sidebar-support-link {
  border-image: var(--ui-button-dark) var(--ui-button-slice) / var(--ui-button-border) / 0 stretch;
}
.has-app-sidebar .main {
  width: calc(100% - 220px);
  margin-left: 220px;
  margin-right: 0;
}
.has-app-sidebar .topbar {
  margin-left: 220px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.home-topbar {
  position: relative;
  justify-content: flex-end;
  min-height: 160px;
}
.brand-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.login-page .brand-logo {
  top: 18px;
}
.brand-logo img {
  display: block;
  height: 190px;
  width: auto;
  max-width: min(760px, 74vw);
  object-fit: contain;
}
.topbar-action {
  justify-self: end;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.15;
}
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.muted { color: var(--muted); }
.page-status {
  min-height: 24px;
  text-align: right;
}
.main { width: min(1200px, 100%); margin: 0 auto; padding: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-content: center;}
.home-main {
  width: 100%;
  min-height: 100vh;
  padding: 18px clamp(18px, 2.5vw, 44px);
}
.home-page .home-main {
  min-height: 100vh;
}
.home-dashboard {
  width: min(100%, 1460px);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}
.home-dashboard-header {
  min-height: 72px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 10px;
}
.home-dashboard-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 2.25vw, 40px);
  line-height: 1;
  letter-spacing: .035em;
  color: #f2dfb0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .9);
}
.home-dashboard-intro {
  margin: 6px 0 0;
  color: #c4c9c2;
  font-size: 13px;
  text-shadow: 0 1px 4px #000;
}
.home-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 10px;
}
.home-dashboard-stat {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border: 1px solid rgba(174, 137, 72, .5);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .3)),
    rgba(12, 17, 13, .9);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .28), inset 0 0 14px rgba(0, 0, 0, .32);
  color: #c8cec7;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.home-dashboard-stat img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.home-dashboard-stat strong {
  display: block;
  color: #f5dfaa;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1;
}
.home-primary-grid {
  display: grid;
  grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}
.home-secondary-grid {
  display: grid;
  grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}
.auth-main {
  width: min(520px, 100%);
}
.auth-panel {
  min-height: 0;
}
.login-page .app-shell {
  position: relative;
  display: grid;
  grid-template-rows: 1fr;
}
.login-page .topbar {
  position: absolute;
  inset: 0 0 auto;
  pointer-events: none;
}
.login-page .auth-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.login-page .auth-panel {
  width: min(520px, 100%);
  justify-items: center;
  text-align: center;
}
.login-page .auth-panel form {
  width: 100%;
  justify-items: center;
}
.login-page .auth-panel label,
.login-page .auth-panel .error {
  width: 100%;
  text-align: center;
}
.login-page .auth-panel input {
  text-align: center;
}
.login-page .auth-panel .auth-consent {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  text-align: left;
}
.login-page .auth-panel .auth-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
  box-shadow: none;
  accent-color: var(--accent);
}
.auth-consent a {
  color: #f2d084;
}
.login-page .auth-panel button,
.login-page .auth-panel .button-link {
  min-width: min(240px, 100%);
}
.auth-landing-main {
  width: min(560px, 100%);
  padding-top: 230px;
  padding-bottom: 36px;
}
.auth-portal {
  width: 100%;
  display: grid;
  gap: 10px;
}
.auth-portal .auth-panel {
  width: 100%;
}
.auth-portal .auth-panel form {
  max-width: 380px;
}
.auth-portal .auth-panel input {
  min-height: 46px;
  font-size: 15px;
}
.auth-portal .auth-panel button,
.auth-portal .auth-forgot-link {
  min-width: min(260px, 100%);
}
.button-link.danger-link {
  border-image: var(--ui-button-red) var(--ui-button-slice) / var(--ui-button-border) / 0 stretch;
  background: #4d2422;
}
.auth-register-cta {
  width: 100%;
  min-height: 50px;
  font-size: 17px;
  font-weight: 800;
  border-image: var(--ui-button-gold) var(--ui-button-slice) / var(--ui-button-border) / 0 stretch;
  background: var(--accent);
}
.auth-public-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
.auth-public-links .button-link {
  min-height: 44px;
  color: var(--text);
  font-weight: 800;
}
.public-back-link {
  position: fixed;
  z-index: 110;
  top: 14px;
  left: 14px;
  min-width: 170px;
}
.screenshots-main {
  width: min(1500px, 100%);
  padding: 34px 24px 70px;
}
.screenshots-shell {
  display: grid;
  gap: 26px;
}
.screenshots-heading {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}
.screenshots-heading img {
  display: block;
  width: min(440px, 78vw);
  height: auto;
}
.screenshots-heading h1 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 36px);
}
.screenshots-heading p {
  margin: 0;
  color: var(--muted);
}
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 20px;
}
.screenshot-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(174, 137, 72, .52);
  border-image: none;
  background: rgba(8, 12, 9, .88);
  display: grid;
  gap: 10px;
  color: var(--text);
}
.screenshot-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #050706;
  border: 1px solid rgba(215, 181, 109, .24);
}
.screenshot-card span {
  padding: 2px 6px 6px;
  font-family: var(--font-display);
  font-size: 15px;
}
.screenshots-empty {
  grid-column: 1 / -1;
  padding: 60px 20px;
  border: 1px solid rgba(174, 137, 72, .34);
  background: rgba(8, 12, 9, .78);
  color: var(--muted);
  text-align: center;
}
.privacy-main {
  width: min(980px, 100%);
  padding: 34px 24px 70px;
}
.privacy-logo {
  display: grid;
  justify-items: center;
  margin: 0 0 20px;
}
.privacy-logo img {
  display: block;
  width: min(380px, 78vw);
  height: auto;
}
.privacy-shell {
  display: grid;
  gap: 22px;
  min-width: 0;
  padding: clamp(22px, 4vw, 44px);
  border: 1px solid rgba(174, 137, 72, .3);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(0, 0, 0, .18)),
    rgba(7, 10, 8, .94);
  box-shadow: 0 22px 44px rgba(0, 0, 0, .42);
  line-height: 1.65;
}
.privacy-heading {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  text-align: center;
}
.privacy-heading img {
  display: block;
  width: min(360px, 74vw);
  height: auto;
}
.privacy-heading h1 {
  max-width: 100%;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 7vw, 48px);
  letter-spacing: .02em;
  color: var(--text);
  overflow-wrap: anywhere;
}
.privacy-heading p {
  margin: 0;
  color: var(--muted);
}
.privacy-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow-wrap: anywhere;
}
.privacy-note {
  padding: 14px 16px;
  border: 1px solid rgba(215, 181, 109, .34);
  background: rgba(38, 30, 14, .54);
}
.privacy-section h2,
.privacy-section h3,
.privacy-section p,
.privacy-section ul,
.privacy-section address {
  margin: 0;
}
.privacy-section h2,
.privacy-section h3 {
  font-family: var(--font-display);
}
.privacy-section h2 {
  color: var(--accent);
  font-size: 22px;
}
.privacy-section h3 {
  font-size: 17px;
}
.privacy-section ul {
  padding-left: 20px;
}
.privacy-section li + li {
  margin-top: 6px;
}
.privacy-section a {
  color: #f2d084;
}
.privacy-section code {
  padding: 1px 5px;
  border: 1px solid rgba(174, 137, 72, .34);
  background: rgba(0, 0, 0, .28);
  color: #f7e4ad;
}
.privacy-section address {
  font-style: normal;
  color: var(--text);
}
.screenshot-lightbox {
  position: relative;
  width: min(94vw, 1500px);
  max-width: none;
  padding: 42px 18px 18px;
  border: 1px solid rgba(215, 181, 109, .6);
  background: #0b0f0c;
  color: var(--text);
  text-align: center;
}
.screenshot-lightbox::backdrop {
  background: rgba(0, 0, 0, .86);
}
.screenshot-lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(90vh - 92px);
  margin: 0 auto 12px;
  object-fit: contain;
}
.screenshot-lightbox strong {
  font-family: var(--font-display);
  color: var(--text);
  font-size: 16px;
}
.screenshot-lightbox .modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 38px;
  min-height: 38px;
}
.account-layout {
  width: min(1280px, 100%);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: start;
}
.account-nav {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.account-nav .button-link.active {
  border-image: var(--ui-button-gold) var(--ui-button-slice) / var(--ui-button-border) / 0 stretch;
  background: var(--accent);
}
.account-heading {
  display: grid;
  justify-items: center;
  grid-column: 1 / -1;
}

.account-heading img {
  display: block;
  max-height: 80px;
  object-fit: contain;
}

.history-heading {
  display: grid;
  justify-items: center;
}

.history-heading img {
  display: block;
  max-height: 80px;
  object-fit: contain;
}
.account-wide-panel {
  grid-column: 1 / -1;
}
.account-page-layout {
  grid-template-columns: minmax(280px, 1120px);
  justify-content: center;
  align-content: start;
}
.account-page-content {
  grid-column: 1 / -1;
  width: min(1120px, 100%);
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  align-content: start;
}
.account-page-content form {
  width: 100%;
}
.account-settings-section {
  min-height: 360px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  padding: 14px 18px 18px;
  border-top: 0;
}
.account-settings-section h2 {
  margin: 0 0 2px;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text);
}
.account-settings-section form {
  align-content: start;
}
.account-danger-section {
  border-top-color: rgba(192, 72, 72, .42);
}
.account-quests-panel {
  grid-column: 1 / -1;
}
.account-history-panel {
  grid-column: 1 / -1;
}
.history-page .history-panel {
  border: 0;
  border-image-source: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.statistics-page .main,
.leaderboard-page .main {
  width: 100%;
  min-height: 100vh;
}
.statistics-page.has-app-sidebar .main,
.leaderboard-page.has-app-sidebar .main {
  width: calc(100% - 220px);
}
.statistics-page .account-layout,
.leaderboard-page .account-layout {
  width: 100%;
  min-height: calc(100vh - 40px);
  grid-template-columns: minmax(0, 1fr);
  align-content: stretch;
}
.statistics-page-content {
  grid-column: 1 / -1;
  min-height: 100%;
}
.account-stat {
  border: 1px solid rgba(174, 137, 72, .34);
  background: rgba(6, 10, 7, .72);
  padding: 10px;
}
.account-stat,
.quest-summary {
  display: grid;
  gap: 4px;
}
.account-stat strong,
.quest-summary strong {
  font-size: 20px;
}
.statistics-section {
  display: grid;
  gap: 10px;
}
.statistics-heading {
  display: grid;
  justify-items: center;
}
.statistics-heading img {
  display: block;
  max-height: 80px;
  object-fit: contain;
}
.statistics-section h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
}
.statistics-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(174, 137, 72, .34);
  background: rgba(6, 10, 7, .82);
}
.statistics-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: .94rem;
}
.overall-statistics-table {
  min-width: 1360px;
}
.race-statistics-table {
  min-width: 1080px;
}
.statistics-table th,
.statistics-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(174, 137, 72, .22);
  text-align: left;
  vertical-align: middle;
}
.statistics-table th {
  color: var(--muted);
  font-weight: 700;
}
.statistics-table td {
  font-weight: 700;
}
.overall-statistics-table th,
.overall-statistics-table td {
  text-align: center;
}
.overall-statistics-table thead th,
.race-statistics-table thead th {
  background: rgba(10, 14, 10, .72);
}
.statistics-table tbody tr:last-child th,
.statistics-table tbody tr:last-child td {
  border-bottom: 0;
}
.race-statistics-table th,
.race-statistics-table td {
  text-align: center;
}
.race-statistics-list {
  display: grid;
  gap: 18px;
}
.race-statistics-card {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(174, 137, 72, .26);
  background: rgba(6, 10, 7, .48);
  align-items: start;
}
.race-statistics-card > .statistics-table-wrap {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  align-self: start;
}
.race-statistics-head {
  display: contents;
}
.race-statistics-head img {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  max-height: 150px;
  object-fit: contain;
  border: 1px solid rgba(215, 181, 109, .55);
  background: rgba(10, 14, 10, .52);
}
.race-statistics-head h4 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
}
.wiki-page .main {
  width: 100%;
  min-height: 100vh;
}
.wiki-page.has-app-sidebar .main {
  width: calc(100% - 220px);
}
.wiki-layout {
  width: 100%;
  min-height: calc(100vh - 40px);
  grid-template-columns: minmax(0, 1fr);
  align-content: stretch;
}
.wiki-shell {
  display: grid;
  gap: 18px;
  min-height: 100%;
}
.wiki-heading {
  display: grid;
  justify-items: center;
}
.wiki-heading img {
  display: block;
  max-height: 80px;
  object-fit: contain;
}
.wiki-heading h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 42px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.wiki-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wiki-tabs a {
  border: 1px solid rgba(174, 137, 72, .36);
  background: rgba(6, 10, 7, .68);
  color: var(--text);
  padding: 8px 12px;
  text-decoration: none;
  font-weight: 700;
}
.wiki-content,
.wiki-section,
.wiki-race-list,
.wiki-subsection {
  display: grid;
  gap: 16px;
}
.wiki-section h2,
.wiki-subsection h4 {
  margin: 0;
  font-family: var(--font-display);
}
.wiki-race,
.wiki-card,
.wiki-unit,
.wiki-ability {
  border: 1px solid rgba(174, 137, 72, .3);
  background: rgba(6, 10, 7, .66);
}
.wiki-race {
  display: grid;
  gap: 16px;
  padding: 14px;
}
.wiki-race-head {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.wiki-race-head img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
}
.wiki-race-head h3,
.wiki-card h3,
.wiki-unit h5 {
  margin: 0;
  font-family: var(--font-display);
}
.wiki-race-head p,
.wiki-card p,
.wiki-unit p,
.wiki-ability p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}
.wiki-unit-grid,
.wiki-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.wiki-unit,
.wiki-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
}
.wiki-unit img,
.wiki-card img,
.wiki-hero-fallback {
  width: 100%;
  height: 150px;
  object-fit: contain;
}
.wiki-hero-fallback {
  display: grid;
  place-items: center;
  border: 1px solid rgba(174, 137, 72, .34);
  background: rgba(10, 14, 10, .7);
  font-family: var(--font-display);
  font-size: 54px;
}
.wiki-stat-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}
.wiki-stat-list > span {
  display: grid;
  gap: 2px;
  padding: 7px;
  border: 1px solid rgba(174, 137, 72, .22);
  background: rgba(10, 14, 10, .5);
}
.wiki-ability-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wiki-ability-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.wiki-ability {
  display: grid;
  gap: 6px;
  padding: 10px;
  align-content: start;
}
.wiki-rule-card p + p {
  margin-top: 0;
}
.wiki-scroll-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}
.account-gold-line,
.current-account-line,
.avatar-selection {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quest-list,
.quest-tier-list,
.history-list,
.quest-overview,
.leaderboard-list,
.avatar-shop,
.shop-section {
  display: grid;
  gap: 10px;
}
.history-list {
  gap: 15px;
}
.history-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 6px 0;
}
.history-pager button {
  min-width: 94px;
}
.leaderboard-page-shell {
  display: grid;
  gap: 18px;
  min-height: 100%;
  align-content: start;
}
.leaderboard-heading {
  display: grid;
  justify-items: center;
}
.leaderboard-heading img {
  display: block;
  max-height: 80px;
  object-fit: contain;
}
.leaderboard-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.leaderboard-tabs,
.leaderboard-period-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.leaderboard-period-tabs {
  justify-content: flex-end;
}
.leaderboard-tabs button,
.leaderboard-period-tabs button {
  min-height: 38px;
  white-space: nowrap;
  font-size: 13px;
}
.leaderboard-board-view {
  display: grid;
  gap: 16px;
}
.leaderboard-current {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(215, 181, 109, .32);
  padding-bottom: 10px;
}
.leaderboard-current h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 32px;
}
.leaderboard-podium {
  display: grid;
  width: 1428px;
  height: 360px;
  grid-template-columns: 420px 540px 420px;
  grid-template-rows: 360px;
  grid-template-areas: "second first third";
  gap: 24px;
  align-items: end;
  justify-self: center;
}
.leaderboard-podium-card {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  justify-items: center;
  width: 420px;
  height: 280px;
  gap: 4px;
  min-width: 0;
  min-height: 0;
  padding: 18px 34px 30px;
  border: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  text-align: center;
}
.leaderboard-podium-card.leaderboard-rank-1 {
  grid-area: first;
  z-index: 2;
  width: 540px;
  height: 360px;
  padding: 26px 42px 40px;
  background-image: url('/assets/leaderboards/leaderboard-frame-gold.png');
  filter: drop-shadow(0 0 15px rgba(218, 170, 72, .18));
}
.leaderboard-podium-card.leaderboard-rank-2 {
  grid-area: second;
  background-image: url('/assets/leaderboards/leaderboard-frame-silver.png');
  filter: drop-shadow(0 0 12px rgba(174, 205, 223, .12));
}
.leaderboard-podium-card.leaderboard-rank-3 {
  grid-area: third;
  background-image: url('/assets/leaderboards/leaderboard-frame-bronze.png');
  filter: drop-shadow(0 0 12px rgba(185, 105, 45, .12));
}
.leaderboard-place,
.leaderboard-table-place {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 30px;
  border: 1px solid rgba(174, 137, 72, .42);
  background: rgba(10,14,10,.82);
  font-weight: 800;
}
.leaderboard-podium-card .leaderboard-place {
  min-width: 0;
  min-height: 0;
  border: 0;
  background: transparent;
  color: #e6edf0;
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
  letter-spacing: .03em;
  text-shadow: 0 3px 8px #000, 0 0 12px rgba(205, 221, 229, .18);
}
.leaderboard-podium-card.leaderboard-rank-1 .leaderboard-place {
  color: #ffe7a2;
  font-size: 40px;
  text-shadow: 0 3px 8px #000, 0 0 16px rgba(240, 193, 90, .32);
}
.leaderboard-podium-card.leaderboard-rank-3 .leaderboard-place {
  color: #e8b486;
}
.leaderboard-podium-card .avatar-lg {
  width: 96px;
  height: 96px;
}
.leaderboard-podium-card .avatar-xl {
  width: 140px;
  height: 140px;
}
.leaderboard-podium-card .level-icon {
  width: 32px;
  height: 32px;
}
.leaderboard-player {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #f2eee4;
  font-size: 18px;
  font-weight: 800;
  text-shadow: 0 2px 6px #000;
}
.leaderboard-player .player-level-name {
  justify-content: center;
}
.leaderboard-metric-label {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-shadow: 0 2px 5px #000;
}
.leaderboard-value {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  text-align: center;
  color: #f7e4ad;
  text-shadow: 0 3px 8px #000, 0 0 12px rgba(224, 183, 91, .18);
}
.leaderboard-rank-1 .leaderboard-value {
  font-size: 42px;
}

@media (max-width: 1699px) {
  .leaderboard-podium-card {
    gap: 3px;
  }
  .leaderboard-podium-card .leaderboard-place {
    font-size: 24px;
  }
  .leaderboard-podium-card.leaderboard-rank-1 .leaderboard-place {
    font-size: 32px;
  }
  .leaderboard-podium-card .avatar-lg {
    width: 64px;
    height: 64px;
  }
  .leaderboard-podium-card .avatar-xl {
    width: 100px;
    height: 100px;
  }
  .leaderboard-podium-card .level-icon {
    width: 24px;
    height: 24px;
  }
  .leaderboard-player {
    font-size: 14px;
  }
  .leaderboard-metric-label {
    font-size: 11px;
  }
  .leaderboard-value {
    font-size: 24px;
  }
  .leaderboard-rank-1 .leaderboard-value {
    font-size: 32px;
  }
}

@media (min-width: 1181px) and (max-width: 1699px) {
  .leaderboard-podium {
    width: 1014px;
    height: 260px;
    grid-template-columns: 300px 390px 300px;
    grid-template-rows: 260px;
    gap: 12px;
  }
  .leaderboard-podium-card {
    width: 300px;
    height: 200px;
    padding: 9px 22px 15px;
  }
  .leaderboard-podium-card.leaderboard-rank-1 {
    width: 390px;
    height: 260px;
    padding: 12px 30px 25px;
  }
}

@media (max-width: 1180px) {
  .leaderboard-podium {
    width: 450px;
    height: 844px;
    grid-template-columns: 450px;
    grid-template-rows: 300px 260px 260px;
    grid-template-areas:
      "first"
      "second"
      "third";
    gap: 12px;
    align-items: center;
    justify-items: center;
  }
  .leaderboard-podium-card {
    width: 390px;
    height: 260px;
    padding: 18px 30px 30px;
  }
  .leaderboard-podium-card.leaderboard-rank-1 {
    width: 450px;
    height: 300px;
    padding: 20px 34px 34px;
  }
}

@media (max-width: 520px) {
  .leaderboard-podium {
    width: 420px;
    height: 784px;
    grid-template-columns: 420px;
    grid-template-rows: 280px 240px 240px;
  }
  .leaderboard-podium-card {
    width: 360px;
    height: 240px;
  }
  .leaderboard-podium-card.leaderboard-rank-1 {
    width: 420px;
    height: 280px;
  }
}

@media (max-width: 400px) {
  .leaderboard-podium {
    width: 330px;
    height: 640px;
    grid-template-columns: 330px;
    grid-template-rows: 220px 200px 200px;
    gap: 10px;
  }
  .leaderboard-podium-card,
  .leaderboard-podium-card.leaderboard-rank-1 {
    width: 300px;
    height: 200px;
    padding: 8px 20px 18px;
  }
  .leaderboard-podium-card.leaderboard-rank-1 {
    width: 330px;
    height: 220px;
  }
  .leaderboard-podium-card .avatar-xl {
    width: 80px;
    height: 80px;
  }
}
.leaderboard-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(174, 137, 72, .34);
  background: rgba(6, 10, 7, .82);
}
.leaderboard-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  table-layout: fixed;
}
.leaderboard-rank-col {
  width: 92px;
}
.leaderboard-player-col {
  width: auto;
}
.leaderboard-value-col {
  width: 190px;
}
.leaderboard-table th,
.leaderboard-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(174, 137, 72, .22);
  text-align: left;
}
.leaderboard-table th {
  color: var(--muted);
  font-weight: 700;
}
.leaderboard-table th:last-child,
.leaderboard-table td:last-child {
  text-align: right;
}
.leaderboard-table tbody tr:last-child td {
  border-bottom: 0;
}
.leaderboard-table-player {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}
.leaderboard-table-player strong,
.leaderboard-table-player .profile-link {
  overflow-wrap: anywhere;
}
.profile-link {
  border: 0;
  border-image: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  color: inherit;
  font: inherit;
  text-shadow: none;
  min-width: 0;
}
.profile-link:hover:not(:disabled) {
  color: var(--accent);
  filter: none;
}
.profile-link:active:not(:disabled) {
  transform: none;
  filter: none;
}
.profile-avatar-link {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}
.leaderboard-empty,
.leaderboard-empty-row {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}
.quest-overview {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.quest-panel h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 16px;
}
.quest-tier.quest-unlocked {
  border-color: rgba(85, 198, 119, .55);
}
.quest-chain-tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.quest-pill-claimed {
  border-color: rgba(85, 198, 119, .45);
  color: #c9f7d5;
}
.quest-book-modal {
  background: rgba(0, 0, 0, .76);
}
.quest-book-content {
  position: relative;
  width: min(1040px, 96vw);
  min-height: min(700px, 90vh);
  max-height: 94vh;
  padding: 86px 140px 82px;
  background: url('/assets/ui/ui-quest-book.webp') center / 100% 100% no-repeat;
  color: #2b1b10;
  font-family: "Eagle Lake", "Lucida Calligraphy", "Monotype Corsiva", cursive;
  letter-spacing: 0;
  filter: drop-shadow(0 26px 42px rgba(0, 0, 0, .62));
}
.quest-book-content h2 {
  margin: 0 0 12px;
  color: #2b1b10;
  font-family: inherit;
  font-size: 30px;
  text-align: center;
}
.quest-book-close {
  position: absolute;
  top: 46px;
  right: 72px;
  width: 70px;
  height: 70px;
  padding: 0;
  border: 0;
  border-image: none;
  background: url('/assets/ui/ui-button-close.png') center / contain no-repeat;
  box-shadow: none;
}
.quest-book-list {
  height: min(470px, calc(90vh - 210px));
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 10px 30px;
  padding: 0 10px;
}
.quest-book-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  min-height: 0;
}
.quest-book-column-cards {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
}
.quest-book-page-heading {
  min-height: 34px;
  margin: 0 0 8px;
  color: #2b1b10;
  font-family: inherit;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}
.quest-book-heading-spacer {
  visibility: hidden;
}
.quest-book-card {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 106px;
  padding: 7px 9px;
  border: 1px solid rgba(84, 48, 21, .32);
  background: rgba(255, 244, 205, .18);
  color: #2b1b10;
  overflow: hidden;
}
.quest-book-card h3,
.quest-book-card h4 {
  margin: 0;
  color: #2b1b10;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.12;
  font-weight: 900;
  overflow-wrap: break-word;
  word-break: normal;
}
.quest-book-current {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 8px;
}
.quest-book-current > strong {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.18;
  overflow-wrap: break-word;
  word-break: normal;
}
.quest-book-progress {
  grid-column: 1;
  color: #2b1b10;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}
.quest-book-current .muted {
  grid-column: 1;
  color: #5c3a1f;
  font-size: 14px;
  font-weight: 800;
}
.quest-book-current .quest-reward-button,
.quest-book-current .quest-book-reward {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
}
.quest-reward-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  color: #6b3f12;
  border: 1px solid rgba(84, 48, 21, .48);
  border-image: none;
  background: transparent;
  box-shadow: none;
  padding: 4px 7px;
  font-family: inherit;
  line-height: 1.05;
  text-shadow: none;
}
.quest-reward-button .gold-price,
.quest-book-reward .gold-price {
  color: inherit;
}
.quest-book-reward {
  color: #6b4a22;
}
.quest-book-card-claimable {
  background: rgba(255, 228, 138, .25);
  border-color: rgba(122, 80, 28, .58);
}
.quest-book-completed {
  grid-column: 1 / -1;
  display: grid;
  gap: 2px;
  color: #6d513a;
  font-size: 10px;
  line-height: 1.15;
}
.quest-book-completed span,
.quest-book-completed s {
  display: block;
}
.quest-book-hero-card .item,
.quest-book-hero-card .pill {
  background: rgba(255, 244, 205, .14);
  color: #2b1b10;
  font-size: 10px;
  line-height: 1.15;
}
.quest-book-hero-card {
  min-height: 78px;
  padding-block: 6px;
}
.quest-book-nav {
  position: absolute;
  bottom: 42px;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 0;
  border-image: none;
  box-shadow: none;
}
.quest-book-prev {
  left: 72px;
  background: url('/assets/ui/ui-button-left.png') center / contain no-repeat;
}
.quest-book-next {
  right: 72px;
  background: url('/assets/ui/ui-button-right.png') center / contain no-repeat;
}
.quest-book-page {
  position: absolute;
  left: 50%;
  bottom: 58px;
  transform: translateX(-50%);
  color: #3f2918;
  font-weight: 800;
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.shop-page-shell {
  width: min(1280px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-content: start;
  gap: 32px;
  padding: 28px;
}
.shop-player-section,
.shop-catalog-section {
  display: grid;
  gap: 14px;
}
.shop-player-heading,
.shop-catalog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 18px;
  flex-wrap: wrap;
}
.shop-player-heading h1,
.shop-catalog-heading h2 {
  margin: 2px 0 0;
  font-family: var(--font-display);
}
.shop-gold-balance {
  display: grid;
  justify-items: start;
  gap: 4px;
  font-size: 18px;
}
.shop-gold-balance .gold-price {
  font-size: 24px;
  font-weight: 800;
}
.shop-player-card {
  position: relative;
  isolation: isolate;
  width: min(670px, 100%);
  height: 200px;
  min-height: 200px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(215, 181, 109, .65);
  background:
    linear-gradient(135deg, rgba(18, 28, 19, .96), rgba(6, 10, 7, .96)),
    rgba(6, 10, 7, .9);
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 46px rgba(0,0,0,.62), 0 16px 34px rgba(0,0,0,.28);
}
.shop-player-card-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 18px;
  width: 100%;
  padding: 15px 24px;
  text-align: left;
  pointer-events: none;
}
.shop-player-card-content > strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: 24px;
  text-shadow: 0 2px 6px #000;
}
.shop-player-card-content .player-level-name {
  flex-wrap: nowrap;
}
.shop-player-card-content .level-icon {
  width: 40px;
  height: 40px;
}
.shop-edit-button {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  z-index: 5;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 5px;
  border: 0 !important;
  border-image: none !important;
  border-radius: 50%;
  background: rgba(7, 10, 8, .82) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.55) !important;
  text-shadow: none;
}
.shop-edit-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.shop-background-edit {
  top: 10px;
  right: 10px;
}
.shop-player-avatar-controls {
  position: relative;
  width: 150px;
  height: 150px;
  pointer-events: auto;
}
.avatar-wrap.shop-player-avatar-stack {
  position: absolute;
  inset: 0;
  width: 150px;
  height: 150px;
}
.shop-avatar-edit {
  top: 2px;
  right: 2px;
  pointer-events: auto;
}
.shop-player-hint {
  width: min(760px, 100%);
  margin: 0;
  color: var(--muted);
}
.shop-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.shop-catalog {
  min-height: 230px;
  margin-top: 14px;
}
.shop-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(174, 137, 72, .34);
  background: rgba(6, 10, 7, .55);
}
.shop-price-button .gold-price {
  justify-content: center;
  font-weight: 800;
}
.shop-selection-modal-content {
  width: min(980px, 96vw);
  height: min(720px, 86vh);
  display: grid;
  gap: 16px;
  overflow: hidden;
}
#avatarFrameSelectionModal .shop-selection-modal-content {
  grid-template-rows: auto auto minmax(0, 1fr);
}
#backgroundSelectionModal .shop-selection-modal-content {
  grid-template-rows: auto minmax(0, 1fr);
}
.shop-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
}
.shop-selection-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.shop-selection-background {
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
}
.shop-selection-avatar,
.shop-selection-frame {
  grid-template-columns: repeat(auto-fill, 180px);
  justify-content: start;
}
.shop-selection-avatar .shop-selection-item,
.shop-selection-frame .shop-selection-item {
  width: 180px;
}
.shop-selection-item {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(174, 137, 72, .34);
  border-image: none;
  background: rgba(6, 10, 7, .78);
}
.shop-selection-background .shop-selection-item {
  width: 100%;
  height: 200px;
  padding: 0;
  border: 0;
  background: transparent;
}
.shop-selection-background .shop-player-card {
  width: 100%;
  max-width: none;
  height: 200px;
  min-height: 200px;
}
.shop-selection-item.selected {
  border-color: rgba(85, 198, 119, .8);
  box-shadow: inset 0 0 0 1px rgba(85, 198, 119, .35);
}
.shop-selection-background .shop-selection-item.selected {
  outline: 2px solid rgba(85, 198, 119, .8);
  outline-offset: 2px;
  box-shadow: none;
}
#backgroundSelectionGrid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}
#backgroundSelectionGrid .shop-selection-item {
  display: block;
  width: 100% !important;
  max-width: none !important;
  flex: 0 0 auto;
}
#backgroundSelectionGrid .shop-player-card {
  width: 100% !important;
  max-width: none !important;
  min-width: 100% !important;
  box-sizing: border-box;
}
.shop-section h3 {
  margin: 0;
  font-family: var(--font-display);
}
.avatar-shop-panel h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
}
.avatar-shop-panel {
  position: relative;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  height: min(620px, 68vh);
  min-height: 460px;
  overflow: hidden;
}
.avatar-shop-status {
  position: absolute;
  top: 2px;
  right: 8px;
  max-width: 55%;
  text-align: right;
  pointer-events: none;
}
.avatar-shop-status > :empty {
  display: none;
}
.avatar-page .account-layout {
  width: min(1600px, 100%);
  align-items: stretch;
  min-height: 100vh;
  grid-template-columns: minmax(220px, .9fr) minmax(220px, .9fr) minmax(390px, 1.6fr);
}
.avatar-page .avatar-shop-panel {
  height: calc(100vh - 40px);
  min-height: 0;
}
.avatar-shop-scroll {
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  align-content: start;
}
.avatar-page .avatar-shop-scroll {
  max-height: none;
}
.shop-item {
  border: 1px solid rgba(174, 137, 72, .34);
  background: rgba(6, 10, 7, .72);
  padding: 10px;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
}
.shop-grid:not(.profile-background-shop-grid) {
  grid-template-columns: repeat(auto-fill, 180px);
  justify-content: start;
}
.shop-grid:not(.profile-background-shop-grid) .shop-item {
  width: 180px;
  padding-right: 10px;
  padding-left: 10px;
}
.shop-grid:not(.profile-background-shop-grid) .shop-item > .avatar-wrap {
  width: 150px;
  height: 150px;
}
.shop-item.selected {
  border-color: rgba(85, 198, 119, .62);
}
.shop-item.owned {
  background:
    linear-gradient(180deg, rgba(85,198,119,.08), rgba(0,0,0,.12)),
    #151b17;
}
.profile-background-shop-grid {
  grid-template-columns: repeat(auto-fill, 390px);
  justify-content: start;
  width: 100%;
}
.profile-background-shop-grid .shop-item {
  width: 390px;
  max-width: 100%;
  padding-top: 0;
  padding-right: 0;
  padding-left: 0;
}
.profile-background-shop-grid .profile-card {
  border: 0;
}
.shop-clear-frame {
  justify-self: start;
}
.profile-card {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 200px;
  max-height: 200px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(174, 137, 72, .42);
  background:
    linear-gradient(135deg, rgba(18, 28, 19, .95), rgba(6, 10, 7, .95)),
    rgba(6, 10, 7, .88);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 28px rgba(0,0,0,.4);
}
.profile-card-content {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 8px;
  width: 100%;
  padding: 18px 14px;
  text-align: left;
}
.profile-card-content strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: 24px;
  text-shadow: 0 2px 5px rgba(0,0,0,.85);
}
.profile-card-shop {
  height: auto;
  max-height: none;
  aspect-ratio: 5 / 2;
}
.profile-card-shop.has-profile-background {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.profile-card-shop .avatar-wrap {
  width: 92px;
  height: 92px;
}
.profile-card-shop .profile-card-content strong {
  font-size: 16px;
}
.profile-card-modal {
  height: 200px;
}
.public-stats-modal-content {
  width: min(920px, 96vw);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
}
.public-stats-body {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
}
.public-stats-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}
.public-stats-profile strong {
  font-family: var(--font-display);
  font-size: 22px;
}
.public-stats-overall {
  display: grid;
  gap: 10px;
}
.xp-progress-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(174, 137, 72, .42);
  background: rgba(6, 10, 7, .78);
}
.xp-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.xp-progress-track {
  height: 18px;
  overflow: hidden;
  border: 1px solid #755a2d;
  background: linear-gradient(#111a13, #070b08);
  box-shadow: inset 0 2px 5px rgba(0,0,0,.8);
}
.xp-progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7d4f18, #d3a63e 58%, #ffe39a);
  box-shadow: 0 0 10px rgba(233, 190, 87, .5);
}
.public-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.public-stat-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(174, 137, 72, .34);
  background: rgba(6, 10, 7, .68);
}
.public-stat-cell span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}
.public-stat-cell strong {
  overflow-wrap: break-word;
  font-size: 15px;
  line-height: 1.2;
}
.history-game {
  border: 1px solid rgba(174, 137, 72, .34);
  background: rgba(6, 10, 7, .8);
  padding: 10px;
  display: grid;
  gap: 10px;
}
.history-game.history-won {
  border-color: rgba(85, 198, 119, .55);
}
.history-game.history-lost {
  border-color: rgba(198, 85, 85, .7);
}
.history-game-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.history-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.history-cell strong {
  overflow-wrap: anywhere;
}
.history-table-wrap {
  overflow-x: auto;
}
.history-player-table {
  width: 100%;
  min-width: 1370px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: .92rem;
}
.history-col-player { width: 180px; }
.history-col-status { width: 110px; }
.history-col-race { width: 130px; }
.history-col-gold { width: 90px; }
.history-col-units { width: 105px; }
.history-col-favorite { width: 190px; }
.history-col-kills,
.history-col-losses { width: 90px; }
.history-col-damage,
.history-col-healing { width: 110px; }
.history-col-villages,
.history-col-castles { width: 85px; }
.history-player-table th,
.history-player-table td {
  border-bottom: 1px solid rgba(174, 137, 72, .22);
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.history-player-table th {
  color: var(--muted);
  font-weight: 700;
}
.history-player-table tbody tr:last-child td {
  border-bottom: 0;
}
.history-player-table .winner-row td {
  background: rgba(85, 198, 119, .08);
}
.history-player-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.panel {
  border: var(--ui-panel-border) solid transparent;
  border-image-source: var(--ui-panel-frame);
  border-image-slice: var(--ui-panel-slice);
  border-image-width: var(--ui-panel-border);
  border-image-outset: 0;
  border-image-repeat: stretch;
  border-radius: 0;
  background: transparent;
  padding: var(--ui-panel-padding);
  box-shadow: 0 14px 28px rgba(0,0,0,.28), inset 0 0 18px rgba(0,0,0,.22);
}
.panel h2, .panel h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .01em;
  position: relative;
  padding-bottom: 0;
}
.panel h2::after, .panel h3::after {
  display: none;
}
.home-panel {
  position: relative;
  width: 100%;
  max-width: none;
  grid-template-rows: auto;
  grid-auto-rows: auto;
  align-content: stretch;
  overflow: hidden;
  border-width: 30px;
  border-image-width: 30px;
}
.home-panel h2 {
  margin-bottom: 0;
}
.home-panel-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.home-panel-heading h2 {
  color: #f1e5c5;
  font-size: 18px;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.home-list-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
}
.home-list-panel .game-list-scroll {
  height: 100%;
  max-height: none;
  min-height: 0;
  align-self: stretch;
}
.home-create-panel {
  grid-template-rows: auto auto auto auto;
}
.home-create-fields {
  display: grid;
  gap: 5px;
}
.autofill-decoy {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.create-game-field {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon control";
  align-items: center;
  column-gap: 8px;
  row-gap: 1px;
}
.create-game-field > span {
  grid-area: label;
  font-size: 12px;
  font-weight: 700;
}
.create-game-field-icon {
  grid-area: icon;
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.create-game-field > input,
.create-game-field > select {
  grid-area: control;
  min-width: 0;
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}
.home-create-footer {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr);
  align-items: end;
  gap: 12px;
  padding-top: 2px;
}
.home-map-preview-wrap {
  display: block;
}
.home-create-button {
  width: 100%;
  min-height: 42px;
  text-transform: uppercase;
}
.home-map-preview {
  position: relative;
  width: 58px;
  height: 58px;
  min-height: 58px;
  padding: 0;
  border: 1px solid rgba(231, 200, 109, .28);
  border-image: none;
  border-radius: 0;
  background: #040504;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .58);
  display: grid;
  place-items: center;
  overflow: hidden;
  justify-self: center;
  text-shadow: none;
}
.home-map-preview[role="button"] {
  cursor: pointer;
}
.home-map-preview[role="button"]:hover {
  filter: brightness(1.08);
}
.home-map-preview[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.home-map-preview.random img {
  width: 56%;
  height: 56%;
  object-fit: contain;
}
.home-map-preview-grid {
  position: absolute;
  inset: 0;
  display: grid;
  width: auto;
  height: auto;
  background: #040504;
}
.home-map-preview-tile {
  position: relative;
  min-width: 0;
  min-height: 0;
}
.home-map-preview-tile.start {
  outline: 1px solid rgba(255, 234, 139, .9);
  outline-offset: -1px;
  z-index: 1;
}
.home-map-preview-building {
  position: absolute;
  inset: 24%;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(39, 27, 13, .65);
}
.home-map-preview-modal-content {
  width: min(600px, 94vw);
  display: grid;
  gap: 14px;
}
.home-map-preview-large {
  width: min(500px, 78vw);
  height: min(500px, 78vw);
  min-height: 0;
  cursor: default;
}
.home-available-panel {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}
.home-available-heading {
  align-items: end;
}
.home-game-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(130px, .65fr);
  gap: 8px;
  width: min(100%, 430px);
}
.home-game-toolbar label {
  min-width: 0;
}
.home-game-toolbar input,
.home-game-toolbar select {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 13px;
}
.home-game-search {
  position: relative;
}
.home-game-search::before {
  content: '';
  position: absolute;
  z-index: 1;
  left: 10px;
  top: 50%;
  width: 9px;
  height: 9px;
  border: 2px solid rgba(215, 181, 109, .8);
  border-radius: 50%;
  transform: translateY(-60%);
  pointer-events: none;
}
.home-game-search::after {
  content: '';
  position: absolute;
  z-index: 1;
  left: 20px;
  top: 22px;
  width: 6px;
  height: 2px;
  background: rgba(215, 181, 109, .8);
  transform: rotate(45deg);
  transform-origin: left center;
  pointer-events: none;
}
.home-game-search input {
  padding-left: 32px;
}
.home-game-table-head {
  display: grid;
  grid-template-columns: minmax(120px, 1.45fr) minmax(82px, .9fr) minmax(100px, 1fr) minmax(72px, .72fr) minmax(64px, .65fr) 94px;
  gap: 10px;
  align-items: center;
  padding: 1px 10px 7px;
  border-bottom: 1px solid rgba(174, 137, 72, .24);
  color: #b7aa89;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.home-available-panel .game-list-scroll {
  min-height: 244px;
}
.home-empty-state {
  height: 100%;
  min-height: 110px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(174, 137, 72, .22);
  background: rgba(4, 8, 5, .34);
  text-align: center;
}
.home-active-panel .game-list-scroll {
  min-height: 126px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.active-game-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "head action"
    "meta action";
  align-items: center;
  gap: 6px 14px;
  padding: 12px 14px;
}
.active-game-card-head {
  grid-area: head;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.active-game-card-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #f1e2bc;
  font-family: var(--font-display);
  font-size: 14px;
}
.active-game-card-meta {
  grid-area: meta;
  display: flex;
  gap: 5px 14px;
  flex-wrap: wrap;
  font-size: 12px;
}
.active-game-card-meta span {
  position: relative;
}
.active-game-card-meta span + span::before {
  content: '·';
  position: absolute;
  left: -9px;
  color: var(--accent);
}
.active-game-card > button {
  grid-area: action;
  width: 94px;
  min-width: 94px;
  height: 36px;
  align-self: center;
  white-space: nowrap;
}
.home-chat-panel {
  width: 100%;
  min-width: 0;
  grid-template-rows: auto minmax(0, 1fr);
  border-width: 30px;
  border-image-width: 30px;
  overflow: hidden;
}
.home-chat-heading {
  align-items: center;
}
.home-chat-body {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(140px, 1fr) auto auto;
  gap: 8px;
}
.home-chat-log {
  min-height: 140px;
  max-height: 200px;
  padding: 8px 10px;
  border: 1px solid rgba(174, 137, 72, .32);
  background: rgba(3, 7, 4, .72);
}
.home-chat-form {
  flex-wrap: nowrap;
}
.home-chat-form input {
  min-width: 0;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 13px;
}
.home-chat-panel .home-chat-form {
  flex-wrap: nowrap;
}
.home-chat-panel .home-chat-form input {
  width: auto;
  flex: 1 1 auto;
}
.home-chat-panel .home-chat-form button {
  flex: 0 0 auto;
}
.home-panel .error:empty,
.home-chat-panel .error:empty {
  display: none;
}
.stack { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.list { display: grid; gap: 8px; }
.game-list-scroll {
  max-height: min(360px, 38vh);
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
  padding-right: 4px;
}
.game-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.game-list-details {
  min-width: 0;
  overflow-wrap: anywhere;
}
.game-password-lock {
  width: 18px;
  height: 18px;
  object-fit: contain;
  margin-right: 6px;
  vertical-align: -3px;
}
.game-list-item button {
  white-space: nowrap;
}
.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(174, 137, 72, .34);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), rgba(0,0,0,.16)),
    #151b17;
}
.home-available-panel .game-list-item {
  display: grid;
  grid-template-columns: minmax(120px, 1.45fr) minmax(82px, .9fr) minmax(100px, 1fr) minmax(72px, .72fr) minmax(64px, .65fr) 94px;
  gap: 10px;
  min-width: 0;
  min-height: 54px;
  padding: 8px 10px;
  font-size: 12px;
}
.home-available-panel .game-list-item > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.home-available-panel .game-list-item strong {
  color: #f0dfb8;
  font-family: var(--font-display);
  font-size: 14px;
}
.home-available-panel .game-list-item .game-list-cell-label {
  display: none;
}
.home-available-panel .game-list-item button {
  width: 100%;
  min-width: 0;
}
.home-available-panel .game-list-item button,
.home-active-panel .active-game-card > button {
  font-size: 12px;
}
.home-active-panel .active-game-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "head action"
    "meta action";
  align-items: center;
  justify-content: initial;
  gap: 6px 14px;
  padding: 12px 14px;
}

.admin-map-main {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  height: 100vh;
  overflow: hidden;
}
.admin-map-toolbar {
  align-content: start;
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.admin-map-workspace {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(174, 137, 72, .24);
  background: rgba(6, 10, 7, .72);
}
.admin-map-list {
  display: grid;
  gap: 8px;
}
.admin-map-list-item {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(174, 137, 72, .28);
  background: rgba(6, 10, 7, .58);
}
.admin-map-list-item.selected {
  border-color: rgba(215, 181, 109, .72);
  background: rgba(215, 181, 109, .08);
}
.admin-map-list-item .row {
  gap: 6px;
}
.admin-map-list-item button {
  min-height: 32px;
  font-size: 12px;
}
.admin-map-grid {
  --admin-map-size: 20;
  --admin-map-tile-size: 32px;
  display: grid;
  grid-template-columns: repeat(var(--admin-map-size), var(--admin-map-tile-size));
  grid-auto-rows: var(--admin-map-tile-size);
  gap: 1px;
  width: max-content;
}
.admin-map-tile {
  width: var(--admin-map-tile-size);
  height: var(--admin-map-tile-size);
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(0,0,0,.55);
  border-image: none;
  background-color: #496033;
  background-size: cover;
  background-position: center;
  position: relative;
  display: grid;
  place-items: center;
}
.admin-map-tile.empty {
  background: #141813;
}
.admin-map-tile img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  pointer-events: none;
}
.admin-map-tile span {
  position: absolute;
  inset: auto 2px 1px auto;
  min-width: 12px;
  height: 12px;
  display: grid;
  place-items: center;
  font-size: 9px;
  color: #15100a;
  background: #e7c86d;
  border: 1px solid #20160b;
}
.admin-map-tile.start {
  outline: 2px solid #e7c86d;
  z-index: 1;
}
.success {
  color: #9ee6a8;
  min-height: 18px;
}
.pill {
  border: 1px solid rgba(174, 137, 72, .26);
  border-radius: 0;
  padding: 4px 8px;
  background: rgba(10,14,10,.82);
  color: var(--muted);
  font-size: 12px;
}
.admin-spectator-main {
  width: min(1120px, 100%);
  min-height: 100vh;
  display: grid;
  align-items: center;
}
.admin-spectator-panel {
  width: 100%;
  grid-template-rows: auto auto minmax(320px, 1fr) auto;
}
.admin-spectator-panel .game-list-scroll {
  max-height: min(620px, 70vh);
}
.admin-main {
  width: min(1280px, 100%);
  display: grid;
  gap: 16px;
  align-content: start;
}
.admin-surface {
  border: 1px solid rgba(174, 137, 72, .28);
  border-image: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(0, 0, 0, .18)),
    rgba(8, 12, 9, .94);
  padding: 18px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .32);
}
.admin-heading-panel {
  gap: 8px;
}
.admin-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(174, 137, 72, .22);
  background: rgba(6, 9, 7, .92);
}
.admin-tab {
  min-height: 44px;
  border-image: none;
  border: 1px solid rgba(174, 137, 72, .28);
  background: #111713;
  color: var(--muted);
  box-shadow: none;
}
.admin-tab.active {
  border-color: rgba(215, 181, 109, .72);
  background: #242b24;
  color: var(--text);
}
.admin-tab-panel {
  min-width: 0;
}
.admin-heading-row,
.admin-section-heading,
.admin-account-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.admin-heading-row h1,
.admin-section-heading h2,
.admin-account-head strong {
  margin: 0;
}
.admin-game-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}
.admin-game-actions {
  justify-content: flex-end;
}
.admin-ai-create-panel {
  padding: 16px;
  border: 1px solid rgba(215, 181, 109, .46);
  background: rgba(14, 19, 15, .94);
}
.admin-ai-create-panel h2 {
  margin: 0 0 4px;
}
.admin-ai-create-fields {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) repeat(4, minmax(140px, 1fr));
  gap: 12px;
}
.admin-ai-create-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.admin-ai-create-fields input,
.admin-ai-create-fields select {
  width: 100%;
}
.admin-ai-create-actions {
  justify-content: flex-end;
}
.admin-ai-player-config {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}
.admin-ai-player-config h3 {
  margin: 0 0 3px;
}
.admin-ai-player-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.admin-ai-player-choice {
  display: grid;
  grid-template-columns: 64px repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(174, 137, 72, .24);
  background: rgba(7, 11, 8, .72);
}
.admin-ai-player-choice strong {
  align-self: center;
}
.admin-ai-player-choice label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}
.admin-ai-player-choice select {
  width: 100%;
}
.admin-game-simulation-pill {
  margin-left: 6px;
}
.admin-ai-profile-layout,
.admin-ai-batch-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.admin-ai-profile-layout label,
.admin-ai-batch-fields label,
.admin-ai-parameter {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.admin-ai-profile-description {
  grid-column: span 1;
}
.admin-ai-parameter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.admin-ai-parameter {
  padding: 10px;
  border: 1px solid rgba(174, 137, 72, .24);
  background: rgba(7, 11, 8, .72);
}
.admin-ai-parameter small,
.admin-ai-map-option small {
  color: var(--muted);
  line-height: 1.35;
}
.admin-ai-profile-actions {
  justify-content: flex-end;
}
.admin-ai-batch-heading {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(174, 137, 72, .28);
}
.admin-ai-map-selection {
  padding: 12px;
  border: 1px solid rgba(174, 137, 72, .28);
  background: rgba(10, 14, 11, .74);
}
.admin-ai-map-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.admin-ai-map-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid rgba(174, 137, 72, .2);
  background: rgba(7, 11, 8, .72);
}
.admin-ai-map-option span {
  display: grid;
  gap: 2px;
}
.admin-ai-batch-list {
  display: grid;
  gap: 10px;
}
.admin-ai-batch-card {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(174, 137, 72, .32);
  background: rgba(10, 14, 11, .92);
}
.admin-ai-batch-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.admin-ai-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}
.admin-ai-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}
.admin-ai-batch-result {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.admin-ai-batch-result span {
  padding: 8px;
  border: 1px solid rgba(174, 137, 72, .18);
}
.admin-ai-batch-actions {
  justify-content: flex-end;
}
.admin-ai-batch-details {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(174, 137, 72, .24);
}
.admin-ai-batch-details.hidden {
  display: none;
}
.admin-ai-batch-games {
  display: grid;
  gap: 9px;
}
.admin-ai-batch-game {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(174, 137, 72, .22);
  background: rgba(5, 8, 6, .58);
}
.admin-ai-batch-game.is-running {
  border-color: rgba(215, 181, 109, .58);
}
.admin-ai-game-stats-table {
  min-width: 0;
  overflow-x: auto;
}
.admin-ai-game-stats-head,
.admin-ai-game-stats-row {
  min-width: 1160px;
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(7, minmax(110px, 1fr));
  align-items: center;
}
.admin-ai-game-stats-head {
  color: var(--muted);
  background: rgba(255, 255, 255, .035);
  font-size: 12px;
}
.admin-ai-game-stats-head span,
.admin-ai-game-stats-row > span {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  border-right: 1px solid rgba(174, 137, 72, .14);
  border-bottom: 1px solid rgba(174, 137, 72, .14);
}
.admin-ai-game-stats-row.is-winner {
  background: rgba(89, 122, 61, .13);
}
.admin-account-list {
  display: grid;
  gap: 12px;
}
.admin-account-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(174, 137, 72, .36);
  background: rgba(10, 14, 11, .92);
}
.admin-account-head > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.admin-moderation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.admin-ban-control {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(174, 137, 72, .24);
  background: rgba(14, 19, 15, .94);
}
.admin-ban-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.admin-ban-control .row {
  align-items: stretch;
}
.admin-ban-control .row button {
  flex: 1 1 140px;
}
.admin-status-banned {
  color: #ffd0ca;
  border-color: rgba(223, 100, 93, .62);
}
.admin-api-controls {
  align-items: center;
}
.admin-api-controls label {
  color: var(--muted);
}
.admin-api-controls select {
  min-width: 190px;
}
.admin-api-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
}
.admin-api-metric {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(174, 137, 72, .28);
  background: rgba(14, 19, 15, .94);
}
.admin-api-metric span {
  color: var(--muted);
  font-size: 13px;
}
.admin-api-metric strong {
  font-size: 20px;
}
.admin-api-table-wrap {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid rgba(174, 137, 72, .28);
}
.admin-api-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}
.admin-api-table th,
.admin-api-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(174, 137, 72, .18);
  text-align: right;
  white-space: nowrap;
}
.admin-api-table th {
  color: var(--muted);
  background: rgba(6, 9, 7, .94);
}
.admin-api-table th:first-child,
.admin-api-table td:first-child {
  text-align: left;
}
.admin-api-table tbody tr:last-child td {
  border-bottom: 0;
}
.admin-api-table code {
  color: var(--text);
}
.admin-api-method {
  display: inline-block;
  min-width: 58px;
  margin-right: 6px;
  text-align: center;
}
.admin-api-warning {
  color: #f1d48b;
}
.admin-api-error {
  color: #ffaaa2;
  font-weight: 800;
}
@media (max-width: 1100px) {
  .admin-ai-create-fields {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
  .admin-api-summary {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
  .admin-ai-parameter-grid,
  .admin-ai-map-grid,
  .admin-ai-batch-result {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 860px) {
  .admin-tabs {
    grid-template-columns: 1fr;
  }
  .admin-moderation-grid {
    grid-template-columns: 1fr;
  }
  .admin-heading-row,
  .admin-section-heading,
  .admin-account-head,
  .admin-game-item {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .admin-game-actions {
    justify-content: stretch;
  }
  .admin-game-actions button {
    flex: 1;
  }
  .admin-api-controls {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .admin-api-summary {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
  .admin-ai-create-fields {
    grid-template-columns: 1fr;
  }
  .admin-ai-profile-layout,
  .admin-ai-batch-fields,
  .admin-ai-parameter-grid,
  .admin-ai-map-grid,
  .admin-ai-batch-result {
    grid-template-columns: 1fr;
  }
  .admin-ai-player-list {
    grid-template-columns: 1fr;
  }
  .admin-ai-create-actions button {
    width: 100%;
  }
}
.ai-player-item {
  border-color: rgba(215, 181, 109, .42);
}
.ai-pill {
  color: #f7e4ad;
  border-color: rgba(215, 181, 109, .52);
}
.ai-remove-button {
  min-height: 34px;
  padding-inline: 12px;
}
.color-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.avatar-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}
.avatar-sm { width: 65px; height: 65px; }
.avatar-lg { width: 90px; height: 90px; }
.avatar-xl { width: 150px; height: 150px; }
.avatar-img,
.avatar-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center;
}
.avatar-img {
  transform: scale(0.78);
  border-radius: 50%;
}
.avatar-frame {
  transform: scale(1.06);
  pointer-events: none;
}
.color-dropdown {
  position: relative;
  min-width: 130px;
}
.color-dropdown-toggle,
.color-dropdown-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  text-transform: none;
}
.color-dropdown-toggle {
  padding-inline: 8px;
}
.color-dropdown-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(174, 137, 72, .48);
  background: rgba(6, 10, 7, .96);
  box-shadow: 0 12px 20px rgba(0,0,0,.42);
}
.color-dropdown-option {
  border-image: none;
  border: 1px solid transparent;
  background: rgba(255,255,255,.035);
  box-shadow: none;
  padding: 6px 8px;
}
.color-dropdown-option.selected {
  border-color: var(--accent);
  color: #f7e4ad;
}
.color-dropdown-option:disabled {
  opacity: .32;
  cursor: not-allowed;
}
.hidden { display: none !important; }
.error { color: var(--bad); min-height: 22px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chat {
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto;
  min-height: 360px;
}
.chat-log {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(174, 137, 72, .34);
  border-radius: 0;
  background: rgba(6, 10, 7, .82);
}
.lobby-heading {
  position: relative;
  display: block;
}
.lobby-heading h2 {
  width: 100%;
}
.lobby-heading .pill {
  position: absolute;
  top: 10px;
  right: 0;
}
.lobby-roster {
  padding: 18px;
  border: 1px solid rgba(174, 137, 72, .34);
  background: rgba(6, 10, 7, .86);
  box-shadow: 0 18px 36px rgba(0,0,0,.32);
}
.lobby-player-table-wrap {
  min-width: 0;
  border: 1px solid rgba(174, 137, 72, .34);
}
.lobby-player-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
}
.lobby-player-table th:nth-child(1) { width: 38%; }
.lobby-player-table th:nth-child(2),
.lobby-player-table th:nth-child(3),
.lobby-player-table th:nth-child(4) { width: 17%; }
.lobby-player-table th:nth-child(5) { width: 11%; }
.lobby-player-table th,
.lobby-player-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(174, 137, 72, .25);
  text-align: left;
  vertical-align: middle;
}
.lobby-player-table th {
  color: var(--muted);
  background: rgba(6, 10, 7, .94);
  font-size: 12px;
  white-space: nowrap;
}
.lobby-player-table tbody tr {
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), rgba(0,0,0,.16)),
    #151b17;
}
.lobby-player-table tbody tr:last-child td {
  border-bottom: 0;
}
.lobby-player-item {
  height: 86px;
}
.lobby-player-main {
  min-width: 0;
  justify-content: flex-start;
  flex-wrap: nowrap;
}
.lobby-player-details {
  display: grid;
  min-width: 0;
  gap: 5px;
}
.lobby-player-details strong {
  min-width: 0;
  overflow-wrap: anywhere;
}
.lobby-player-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.lobby-player-badges:empty {
  display: none;
}
.lobby-player-action-cell {
  min-width: 0;
}
.lobby-player-table .color-dropdown {
  min-width: 0;
}
.lobby-player-action-cell > * {
  width: 100%;
}
.lobby-player-action-placeholder {
  display: inline-block;
  color: var(--muted);
  text-align: center;
}
.lobby-player-color-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}
.lobby-ready-pill {
  display: inline-block;
  white-space: nowrap;
}
.chat-message { font-size: 14px; line-height: 1.35; }
.chat-name { font-weight: 800; }
.chat-name .player-level-name {
  gap: 3px;
}
.chat-name .level-icon {
  width: 18px;
  height: 18px;
}
.chat-name .level-label {
  font-size: 10px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.68);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 10000;
  isolation: isolate;
}
.modal-content {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: 86vh;
  overflow: auto;
  border: var(--ui-panel-border) solid transparent;
  border-image-source: var(--ui-panel-frame);
  border-image-slice: var(--ui-panel-slice);
  border-image-width: var(--ui-panel-border);
  border-image-outset: 0;
  border-image-repeat: stretch;
  border-radius: 0;
  background: transparent;
  padding: var(--ui-panel-padding);
  box-shadow: 0 22px 46px rgba(0,0,0,.5);
}
.modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}
.modal-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
}
.changelog-modal-content {
  width: min(720px, 94vw);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}
.changelog-list {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}
.changelog-day {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(174, 137, 72, .34);
  background: rgba(6, 10, 7, .72);
}
.changelog-day h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
}
.changelog-day ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}
.join-password-modal-content {
  width: min(440px, 94vw);
  display: grid;
  gap: 12px;
}
.feedback-modal-content {
  width: min(560px, 94vw);
  display: grid;
  gap: 12px;
}
.feedback-modal-content p {
  margin: 0;
}
.feedback-modal-content textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
}
.feedback-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.feedback-form-footer button {
  min-width: 140px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 1320px) {
  .home-primary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-create-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-create-footer {
    grid-template-columns: minmax(220px, auto) minmax(220px, 360px);
    justify-content: space-between;
  }
  .home-available-panel .game-list-scroll {
    min-height: 210px;
  }
}

@media (max-width: 1040px) {
  .home-secondary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-height: 820px) and (min-width: 1321px) {
  .home-main {
    padding-top: 0;
    padding-bottom: 0;
  }
  .home-dashboard {
    gap: 7px;
  }
  .home-dashboard-header {
    min-height: 50px;
  }
  .home-primary-grid,
  .home-secondary-grid {
    gap: 9px;
  }
  .home-panel,
  .home-chat-panel {
    border-width: 18px;
    border-image-width: 18px;
  }
  .home-create-fields {
    gap: 3px;
  }
  .create-game-field {
    grid-template-columns: 32px minmax(0, 1fr);
  }
  .create-game-field-icon {
    width: 32px;
    height: 32px;
  }
  .create-game-field > span {
    font-size: 12px;
    line-height: 1;
  }
  .create-game-field > input,
  .create-game-field > select {
    min-height: 28px;
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .home-map-preview {
    width: 46px;
    height: 46px;
    min-height: 46px;
  }
  .home-create-button {
    min-height: 38px;
  }
  .home-available-panel .game-list-scroll {
    min-height: 210px;
  }
  .home-active-panel .game-list-scroll {
    min-height: 108px;
  }
  .home-chat-body {
    grid-template-rows: minmax(116px, 1fr) auto auto;
  }
  .home-chat-log {
    min-height: 116px;
    max-height: none;
  }
}

@media (max-width: 860px) {
  .app-sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid rgba(215, 181, 109, .42);
  }
  .app-sidebar-logo {
    min-height: 0;
    width: 96px;
  }
  .app-sidebar-logo img {
    max-height: 62px;
  }
  .app-sidebar-player {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    text-align: left;
    gap: 2px 8px;
  }
  .app-sidebar-player .avatar-wrap {
    grid-row: 1 / span 2;
  }
  .app-sidebar-player .muted,
  .app-sidebar-player strong,
  .app-sidebar-player .app-sidebar-gold {
    grid-column: 2;
  }
  .app-sidebar-nav {
    grid-column: 1 / -1;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    max-height: 33vh;
  }
  .has-app-sidebar .main,
  .has-app-sidebar .topbar {
    width: 100%;
    margin-left: 0;
  }
  .avatar-page .account-layout {
    grid-template-columns: 1fr;
  }
  .shop-page-shell {
    padding: 16px;
    gap: 24px;
  }
  .shop-player-heading,
  .shop-catalog-heading {
    align-items: start;
    flex-direction: column;
  }
  .shop-gold-balance {
    justify-items: start;
  }
  .shop-player-card {
    min-height: 220px;
  }
  .shop-selection-background {
    grid-template-columns: 1fr;
  }
  .profile-background-shop-grid {
    grid-template-columns: 1fr;
  }
  .profile-background-shop-grid .shop-item {
    width: 100%;
  }
  body.menu-bg-page.has-app-sidebar {
    background-position: center center;
  }
  .statistics-page.has-app-sidebar .main,
  .leaderboard-page.has-app-sidebar .main,
  .wiki-page.has-app-sidebar .main {
    width: 100%;
  }
  .statistics-page .account-layout,
  .leaderboard-page .account-layout,
  .wiki-layout {
    min-height: calc(100vh - 24px);
  }
  .wiki-race-head {
    grid-template-columns: 1fr;
  }
  .split { grid-template-columns: 1fr; }
  .home-dashboard-header {
    align-items: flex-start;
  }
  .home-dashboard-stats {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
  .home-panel {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  .home-chat-panel {
    width: 100%;
  }
  .account-layout { grid-template-columns: 1fr; }
  .account-page-content {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .lobby-player-table-wrap {
    overflow-x: auto;
  }
  .lobby-player-table-wrap:has(.color-dropdown-menu:not(.hidden)) {
    padding-bottom: 320px;
  }
  .race-statistics-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .race-statistics-head h4 {
    grid-column: 1;
    grid-row: 1;
  }
  .race-statistics-head img {
    grid-column: 1;
    grid-row: 2;
  }
  .race-statistics-card > .statistics-table-wrap {
    grid-column: 1;
    grid-row: 3;
  }
  .leaderboard-controls { grid-template-columns: 1fr; }
  .leaderboard-period-tabs { justify-content: flex-start; }
  .leaderboard-current {
    align-items: start;
    flex-direction: column;
  }
  .leaderboard-current h2 {
    font-size: 24px;
  }
  .quest-overview { grid-template-columns: 1fr; }
  .quest-book-content {
    min-height: min(640px, 92vh);
    padding: 70px 42px 72px;
  }
  .quest-book-close {
    top: 42px;
    right: 38px;
    width: 34px;
    height: 34px;
  }
  .quest-book-list {
    grid-template-columns: 1fr;
    height: min(460px, calc(92vh - 190px));
  }
  .quest-book-page-heading {
    min-height: 26px;
    font-size: 19px;
  }
  .quest-book-right-page .quest-book-heading-spacer {
    display: none;
  }
  .quest-book-prev { left: 36px; }
  .quest-book-next { right: 36px; }
  .main { padding: 12px; }
}

@media (max-width: 700px) {
  .home-dashboard-header {
    display: grid;
  }
  .home-dashboard-stats {
    width: 100%;
  }
  .home-dashboard-stat {
    min-height: 44px;
  }
  .home-create-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-create-footer {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-create-button {
    min-height: 46px;
  }
  .home-available-heading {
    display: grid;
  }
  .home-game-toolbar {
    width: 100%;
  }
  .home-game-table-head {
    display: none;
  }
  .home-available-panel .game-list-item {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-auto-rows: auto;
    align-items: start;
  }
  .home-available-panel .game-list-item > span {
    grid-column: 1;
  }
  .home-available-panel .game-list-item > button {
    grid-column: 2;
    grid-row: 1 / span 5;
    width: auto;
  }
  .home-available-panel .game-list-item .game-list-cell-label {
    display: inline;
    color: #b7aa89;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
  }
  .home-active-panel .game-list-scroll {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .home-dashboard-stats,
  .home-game-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-panel,
  .home-chat-panel {
    border-width: 24px;
    border-image-width: 24px;
  }
  .active-game-card,
  .home-active-panel .active-game-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "meta"
      "action";
  }
  .active-game-card > button {
    width: 100%;
  }
}
