/* ----- source: _pointercrate_ref/pointercrate-core-pages/static/css/core.css ----- */
/* Basic css classes that can be applied to various components to make them look fancy*/

/* https://stackoverflow.com/questions/16679146/force-footer-on-bottom-on-pages-with-little-content */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

.content {
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
}

.bordered {
  border: 1px solid #ddd;
}

.fade {
  box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1);
  border: 1px lightgray dashed;
}

@media (min-width: 1072px) {
  .fade-hide {
    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1);
  }

  .m-center {
    max-width: 1072px;
    margin-left: calc(50% - 1072px / 2) !important;
    margin-right: calc(50% - 1072px / 2) !important;
  }

  /* center using padding */
  .center {
    max-width: 1072px;
    padding-left: calc(50% - 1072px / 2);
    padding-right: calc(50% - 1072px / 2);
  }
}

@media (min-width: 1359px) {
  /* center using margin */
  .m-center {
    max-width: 1072px;
    margin-left: calc(50% - 1072px / 2) !important;
    margin-right: calc(50% - 1072px / 2) !important;
  }

  /* center using padding */
  .center {
    max-width: 1072px;
    padding-left: calc(50% - 1072px / 2);
    padding-right: calc(50% - 1072px / 2);
  }
}


.clickable {
  cursor: pointer;
}

.see-through {
  opacity: 0.95;
}

.disabled,
*[disabled] {
  opacity: 0.7;
}

.hover,
.hover:hover:not(.disabled):not([disabled]) {
  transition: all 0.8s ease;
}

.hover.scale:hover:not(.disabled):not([disabled]) {
  transform: scale(1.1);
}

/* color modifying styles */

.blue {
  background-color: var(--color-pc-button-bg);
  color: var(--color-pc-button-text);
}

.blue.hover:not(.disabled):not([disabled]):hover,
.blue.active {
  background-color: var(--color-pc-button-bg-hover);
}

.blue.hover:not(.disabled):not([disabled]):active {
  background-color: var(--color-pc-button-bg-click);
  color: var(--color-pc-button-text-click);
}

.white {
  background-color: var(--color-unobstrusive-button-bg);
  color: var(--color-unobstrusive-button-text);
}

.white.hover:not(.disabled):not([disabled]):hover,
.white.active {
  background-color: var(--color-unobstrusive-button-bg-hover);
}

.white.hover:not(.disabled):not([disabled]):active {
  background-color: var(--color-unobstrusive-button-bg-click);
  color: var(--color-unobstrusive-button-text-click);
}

.red {
  background: var(--color-imp-button-bg);
  color: var(--color-pc-button-text);
}

.red.hover:not(.disabled):not([disabled]):hover,
.red.active {
  background: var(--color-imp-button-bg-hover);
}

.red.hover:not(.disabled):not([disabled]):active,
.red.active {
  background: var(--color-imp-button-bg-click);
  color: var(--color-pc-button-text-click);
}

/* size modifying styles */

.large {
  padding: 20px 40px;
}

.medium {
  padding: 10px 20px;
}

.small {
  padding: 5px 10px;
}

.xsmall {
  padding: 1px 2px;
}

/* animations */

.fade-in,
.fade-out {
  animation-name: fade;
  animation-duration: 1s;
  animation-timing-function: ease-out;
}

.fade-in {
  opacity: 1;
}

.fade-out {
  opacity: 0;
}

.scale-in,
.scale-out {
  animation-name: scale;
  animation-duration: 1;
  animation-timing-function: ease-out;
}

.fade-out,
.scale-out {
  animation-direction: reverse;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scale {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}


/* ----- source: _pointercrate_ref/pointercrate-core-pages/static/css/main.css ----- */
:root {
  --color-ok-bg: rgb(238, 255, 228);
  --color-ok-border: #a8ff93;
  --color-ok-text: #074d07;
  --color-ok-accent: #68bf0b;

  --color-warn-bg: #fffadd;
  --color-warn-border: #e0e37b;
  --color-warn-text: #4d4707;
  /* --color-warn-accent */

  --color-error-bg: #fdd;
  --color-error-border: #ff9393;
  --color-error-text: #4d0707;
  /* --color-error-accent */

  --color-consider-bg: #D8EFF3;
  /* --color-consider-border */
  --color-consider-text: #326067;
  /* --color-consider-accent */

  --color-text: #444446;
  --color-text-accent: #222;

  --color-border: lightgray;
  --color-border-broken: #555;

  --color-bg: white;

  --color-link: blue;
  --color-link-dark: #f77e39;

  --color-pc-button-bg: #0881c6;
  --color-pc-button-bg-hover: #076696;
  --color-pc-button-bg-click: #055075;
  --color-pc-button-text: white;
  --color-pc-button-text-click: #eee;

  --color-imp-button-bg: #ff003c;
  --color-imp-button-bg-hover: #ff2457;
  --color-imp-button-bg-click: #f21347;

  --color-unobstrusive-button-bg: var(--color-bg);
  --color-unobstrusive-button-bg-hover: #ddd;
  --color-unobstrusive-button-bg-click: #aaa;
  --color-unobstrusive-button-text: var(--color-text);
  --color-unobstrusive-button-text-click: #111;
}

body {
  color: var(--color-text);

  position: relative;

  min-width: 100%;
  height: 100%;

  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

@media (max-width: 767px) {
  body {
    background-image: none;
  }
}

body {
  font-family: "Montserrat", sans-serif;
}

/* input elements are weird about their font */
input {
  font-family: inherit;
  font-size: inherit;
}

/* If element to scroll to is selected by id in URL, add offset to account for nav bar */
:target:before {
  content: "";
  display: block;
  height: calc(90px + 0.6em); /* fixed header height*/
  margin-top: calc(-90px - 0.6em); /* negative fixed header height */
}


/* ----- source: _pointercrate_ref/pointercrate-core-pages/static/css/ui.css ----- */
/* Default Button style */

.button {
  padding: 10px 20px;
  text-align: center;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  text-wrap: wrap;
}

.button.disabled,
.button[disabled] {
  cursor: not-allowed;
}

.button.fade {
  box-shadow: 0px 0px 20px 3px rgba(0, 0, 0, 0.2);
}

.button.hover:not(.disabled):not(.no-shadow):not([disabled]):hover {
  box-shadow: 5px 5px 20px 0px rgba(0, 0, 0, 0.5);
}

/* Link styles */

a.link {
  color: var(--color-link);
}

a.link:after {
  font-family: "Font Awesome 5 Free";
  font-weight: 600;
  font-style: normal;

  display: inline-block;

  text-decoration: inherit;

  margin: auto 3px;
}

a.link:after {
  content: "\f35d";
  text-decoration: none;
}

@media (max-width: 768px) {
  a.mobile-only-link {
    color: var(--color-link);
  }

  a.mobile-only-link:after {
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    font-style: normal;
    display: inline-block;
    text-decoration: inherit;
    margin: auto 3px;
  }

  a.mobile-only-link:after {
    content: "\f35d";
    text-decoration: none;
  }
}

/* Default header styles */

body,
html {
  height: 100%;
}

body {
  margin: 0px;
}

h1,
h2,
h3,
h4,
h5 {
  text-align: center;
}

h1 {
  font-size: 2.2em;
  margin: 0.6em 0;
}

h2 {
  font-size: 1.5em;
  margin: 0.5em 0;
}

h3 {
  font-size: 1em;
  margin: 0.3em 0;
}

h4 {
  font-size: 0.76em;
  margin: 0.4em 0;
}

@media (max-width: 767px) {
  h1 {
    font-size: 1.9em;
  }

  h2 {
    font-size: 1.5em;
  }

  h3 {
    font-size: 1.1em;
  }
}

/* Misc element styles */

iframe {
  border: none;
}

table {
  border-collapse: collapse;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: var(--color-text-accent);
  text-decoration: none;
  cursor: pointer;
}

*:focus {
  outline: none;
}

/* Flex layout classes */

.flex {
  display: flex;
  justify-content: flex-start;
  position: relative;
  max-width: 100%;
  flex-flow: row nowrap;
}

.flex.wrap {
  flex-wrap: wrap;
}

.flex.col {
  flex-direction: column;
}

@media (max-width: 767px) {
  .flex.mobile-col {
    flex-direction: column;
  }
}

.flex.space {
  justify-content: space-between;
}

.flex.cen {
  justify-content: center;
  align-items: center;
}

.flex:not(.no-stretch) > *:not(.no-stretch) {
  flex-grow: 1;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 1083458237;
}

.dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-bg);;
  box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.3);
  border: 1px var(--color-border-broken) dashed;
  padding: 10px;
  max-width: 600px;
  overflow:auto;
  max-height:100%;
  box-sizing:border-box
}

.dialog p {
  margin: 15px;
}

/* Panel styles */

.panel {
  padding: 20px;
  margin: 30px 10px;

  text-align: center;

  position: relative;

  background: var(--color-bg);

  flex-grow: 1;
  overflow: hidden;
}

.closable {
  transition: opacity 1s;
}

.closable.initial-hidden {
  display: none;
  opacity: 0;
}

/* Roman list */

ul.roman {
  list-style-position: inside;
}

ul.roman li {
  font-weight: bolder;
  list-style-type: upper-roman;
  margin: 8px 0px;
}

/* General Input Styles */

input, textarea {
  border-radius: 0;
}

textarea {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 5px;
  box-sizing: border-box;
  resize: none;
}

input[type="text"],
input[type="number"],
input[type="url"],
input[type="password"],
input[type="datetime-local"],
textarea {
  border: 1px solid var(--color-border);
  color: var(--color-text);
  min-width: 0; /* Firefox and Egde need this */

  padding: 0px 5px;

  background: var(--color-bg);
  box-sizing: border-box;
}

input[type="text"],
input[type="number"],
input[type="url"],
input[type="password"],
input[type="datetime-local"]{
  min-height: 1em;
  height: 2em;
}

form input[type="text"]:valid,
form input[type="number"]:valid,
form input[type="url"]:valid,
form input[type="password"]:valid,
form input[type="datetime-local"]:valid,
textarea:valid {
  border-bottom: 1px solid var(--color-ok-border);
}

form input[type="text"]:invalid,
form input[type="number"]:invalid,
form input[type="url"]:invalid,
form input[type="password"]:invalid,
form input[type="datetime-local"]:invalid,
textarea:invalid {
  border-bottom: 1px solid var(--color-link-dark);
}

.form-input > * {
  text-align: left;
  font-style: italic;

  margin-top: 2px !important;
  margin-bottom: 2px !important;
}

p.error {
  font-size: 60% !important;
  color: var(--color-link-dark);
  margin: 0;
}

.form-input {
  display: flex;
  flex-direction: column;

  margin: 10px 0px;
}

/* Turns out browser checkboxes are ass-ugly */
/* Customize the label (the container) */
.cb-container {
  display: block;
  position: relative;
  padding-left: 1.5em;
  cursor: pointer;
}

/* Hide the browser's default checkbox */
.cb-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  left: 0;
  top: 0;
  margin-top: 2px;
  z-index: 100;
}

/* Create a custom checkbox */
.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 1em;
  width: 1em;
  background-color: #eee;
  margin-top: 2px;
}
.stats-container .checkmark {
  font-size: 111%;
}

/* On mouse-over, add a grey background color */
.cb-container:hover input ~ .checkmark {
  background-color: #ccc;
}

/* When the checkbox is checked, add a blue background */
.cb-container input:checked ~ .checkmark {
  background-color: var(--color-pc-button-bg);
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

/* Show the checkmark when checked */
.cb-container input:checked ~ .checkmark:after {
  display: block;
}

/* Style the checkmark/indicator */
.cb-container .checkmark:after {
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
/* Search UI Element */

.search {
  padding: 0px 4px;

  border: 1px solid #999;
  border-radius: 0px;

  display: flex;
  justify-content: space-between;
}

.search:before,
.search:after,
.dropdown-menu div:first-child:after {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-style: normal;

  cursor: pointer;

  display: inline-block;

  text-decoration: inherit;

  margin: auto 3px;
}

.search:before {
  content: "\f002";
}

.search:after {
  content: "\f057";
}

.dropdown-menu div:first-child:after {
  content: "\f078";
  position: absolute;
  right: 0;
  top: .5em;
}

.search input {
  margin: 5px;
  border: 0;
  flex-grow: 2;
}

.search.seperated input {
  border-left: 1px solid var(--color-border-broken);
  border-right: 1px solid var(--color-border-broken);
}

/*
 * Stats Viewer like Panels:
 * + .viewer is the element that contains the paginator and the content
 * + .viewer-content is the element that contains the content of the viewer, displayed to the right of the paginator
 */

.viewer {
  margin-top: 10px;
}

/* Hidden until first element in paginator is selected */
.viewer .viewer-content {
  display: none;
  margin-left: 10px;
}

.viewer .viewer-welcome {
  text-align: center;
  margin-left: 10px;
}

@media (min-width:1440px) {
  #bg {
    background-image: url(/static/images/squares3.png);
    background-size: cover;
    background-repeat: repeat-y;
    position: fixed;
    top: 0;
    pointer-events: none;
    height: 100vh;
    width: 100vw;
  }
}

@media (min-width: 768px) {
  .viewer .paginator {
    max-width: 35%;
  }

  .viewer .viewer-content,
  .viewer .viewer-welcome {
    max-width: 65%;
  }
}

@media (max-width: 767px) {
  .viewer .viewer-content,
  .viewer .viewer-welcome,
  .viewer .paginator {
    max-width: 100%;
  }

  .viewer {
    flex-wrap: wrap;
  }
  
  .no-mobile {
    display: none
  }
}

.stats-container {
  margin: 5px 0%;
  flex-wrap: wrap;
}

.stats-container > * {
  margin: 5px 1%;
}

.stats-container b {
  font-size: 110%;
}

.stats-container :not(b):not(.fa) {
  font-size: 90%;
}

/* Dropdown selection menu thingy styles */

.dropdown-menu {
  position: relative;
  display: inline-block;
}

.dropdown-menu .menu {
  position: absolute;
  display: none;
  top: 2em; /* place it below the box! */

  width: calc(100% - 2px);
  max-height: 290px;
  overflow-y: scroll;

  background: var(--color-bg);

  border: 1px solid var(--color-border);

  z-index: 100;

  box-shadow: 0px 8px 10px #ccc, -10px 8px 15px #ccc, 10px 8px 15px #ccc;
}

h1 .dropdown-menu ul,
h2 .dropdown-menu ul {
  font-size: 0.55em;
  font-weight: normal;
}

.dropdown-menu > div {
  border-bottom: 1px dotted var(--color-border-broken);
  width: 100%;
}

.dropdown-menu input[type="text"] {
  border: none;
  font-size: 1em;
  width: 100%
}

.dropdown-menu div:focus-within {
  border: 1px solid #bbb;
  border-bottom: none;
  box-shadow: 0 0 10px 5px #ccc;
}

.dropdown-menu input:focus, .dropdown-menu input:invalid {
  border: none;
}

.dropdown-menu div:focus-within + .menu {
  /*opacity: 0.95;*/
  border-top: none;
}

.dropdown-menu .menu ul {
  margin: 0;
}

.dropdown-menu .menu ul li {
  padding: 3px 10px;
  text-align: left;
  cursor: pointer;
}

/* DropDown styles */
.dropdown {
  z-index: 10;
  width: 100%;
  position: absolute;
  display: none;
  left: 0;
}

/*
 * Tooltip stuff
 */

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  opacity: 0;
  font-weight: normal;
  font-size: 0.7em;
  text-align: center;
  white-space: normal;

  visibility: hidden;
  z-index: 1000;

  border: 1px lightgray dashed;
  background: var(--color-bg);
  box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1);

  top: 125%;
  left: 50%;
  transform: translateX(-50%);

  padding: 10px 12px;
  max-width: 350px;
  word-wrap: break-word;

  position: absolute;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* (Under)lines */
.underlined {
  border-bottom: 1px solid var(--color-border);
}

.underlined.pad {
  padding-bottom: 10px;
}

.leftlined {
  border-left: 1px solid var(--color-border);
}

.leftlined.pad {
  padding-left: 10px;
}

.rightlined {
  border-right: 1px solid var(--color-border);
}

.rightlined.pad {
  padding-right: 10px;
}

.overlined {
  border-top: 1px solid var(--color-border);
}

.overlined.pad {
  padding-top: 10px;
}

.underdotted {
  border-bottom: 1px dotted var(--color-border-broken);
}

@media (max-width: 767px) {
  .tooltip .tooltiptext {
    left: auto;
    right: 0;
    transform: none;
    min-width: 0;
    width: min(280px, calc(100vw - 28px));
    max-width: min(280px, calc(100vw - 28px));
    overflow-wrap: anywhere;
  }
}

.info-green, .ok {
  background: var(--color-ok-bg);
  border-color: var(--color-ok-border);
  color: var(--color-ok-text);
}

.info-green {
  padding: 5px 15px;
  margin: 5px 0px;
  border-width: 1px;
  border-style:  solid;
}

.info-green a {
  color: var(--color-ok-accent);
}

.info-yellow, .warn {
  background: var(--color-warn-bg);
  border-color: var(--color-warn-border);
  color: var(--color-warn-text);
}

.info-yellow {
  padding: 5px 15px;
  margin: 5px 0px;
  border-width: 1px;
  border-style:  solid;
}

.info-red, .err {
  background: var(--color-error-bg);
  border-color: var(--color-error-border);
  color: var(--color-error-text);
}

.info-red {
  padding: 5px 15px;
  margin: 5px 0px;
  border-width: 1px;
  border-style:  solid;
}

.consider {
  background: var(--color-consider-bg);
}

.output {
  display: none;
  font-style: italic;
  font-size: 80%;
  margin: 0px;
}

ul.selection-list {
  overflow-y: scroll;
  border: 1px solid #999;
  font-size: 80%;
  margin: 10px 0px;
}

ul.selection-list li {
  padding: 5px;
  text-align: left;
  cursor: pointer;
}

/* Tab panel stuff */
.tab-content:not(.tab-content-active) {
  display: none;
}

.tab {
  cursor: pointer;
}

.tab-active {
  color: var(--color-pc-button-bg);
}


/* ----- source: _pointercrate_ref/pointercrate-core-pages/static/css/nav.css ----- */
header nav {
  width: 100%;
  height: 70px;

  display: flex;
  flex-direction: row;
  flex-wrap: wrap;

  position: fixed;

  z-index: 999;
  overflow: visible;

  background: var(--color-bg);

  font-size: 1.2em;
  font-weight: 600;
  text-align: center;
}

header nav + * {
  padding-top: 70px;
}

header nav .nav-icon {
  font-size: 150%;
  padding: 5px 20px;
  display: flex;
  align-items: center;
}

.nav-brand-wrap {
  margin-right: auto;
  min-width: 0;
}

.nav-brand-link {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.nav-brand-logo {
  display: block;
  height: 34px;
  max-height: 34px;
  width: auto !important;
  max-width: min(48vw, 220px);
  object-fit: contain;
}

@media (max-width: 767px) {
  .nav-brand-logo {
    height: 28px;
    max-height: 28px;
    max-width: min(56vw, 180px);
  }
}

.nav-demonlist-menu {
  flex: 0 0 auto;
}

.nav-demonlist-trigger {
  min-width: 220px;
  width: 220px;
  height: 70px !important;
  box-sizing: border-box;
  align-items: center !important;
  flex-direction: row !important;
  justify-content: flex-start;
  line-height: 1.1;
  text-align: left;
  white-space: nowrap;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

.nav-demonlist-kicker {
  display: block;
  color: #555;
  font-size: 0.44em;
  font-weight: 700;
  line-height: 1.1;
  text-transform: none;
}

.nav-demonlist-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #4b4b4d;
  font-size: 1em;
  font-weight: 600;
  line-height: 1.2;
  text-transform: none;
  white-space: nowrap;
}

.nav-demonlist-title i {
  color: #4f5a67;
  font-size: 0.78em;
  line-height: 1;
  transform: translateY(-2px);
}

header nav .nav-item {
  height: 60px;

  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;

  padding: 5px 20px;

  cursor: pointer;

  position: relative;
}

header nav .nav-item-right {
  margin-left: auto;
}

header nav .nav-group {
  display: flex;
  position: relative;
  z-index: 1;
}

header nav .nav-group:hover {
  z-index: 2001;
}

header nav .nav-group-right {
  justify-content: flex-end;
  margin-left: auto;
}

header nav .nav-button {
  width: 40px;
}

header nav .nav-drop-down {
  top: 70px;
  position: absolute;

  background: inherit;
  width: 100%;
  display: none;

  z-index: 1000;

  box-shadow: 0px 7px 10px 1px rgba(0, 0, 0, 0.2);
}

/*
 * Things for on hover sub-menus.
 */
header nav .nav-hover-dropdown {
  margin: 0;
  width: 100%;
  font-size: 90%;
}

header nav .nav-group .nav-hover-dropdown {
  position: absolute;
  top: 70px;

  border: 1px solid rgba(211, 211, 211, 1);
  border-top: 0;
  display: none;
  z-index: 2100;
}

header nav .nav-group:hover .nav-hover-dropdown {
  display: block;
}

header nav .nav-hover-dropdown.nav-demonlist-dropdown {
  left: 0;
  min-width: 220px;
  width: 220px;
  max-width: 220px;
  box-sizing: border-box;
  padding: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

header nav .nav-demonlist-dropdown li {
  margin: 0;
}

header nav .nav-hover-dropdown a {
  padding: 10px 20px;
  display: block;
  text-align: left;
}

header nav .nav-demonlist-dropdown a {
  padding: 11px 14px;
  color: #444446;
  font-size: 1em;
  font-weight: 600;
  line-height: 1.2;
  text-transform: none;
  white-space: nowrap;
}

header nav .nav-demonlist-dropdown a.active,
header nav .nav-demonlist-dropdown a:hover {
  background: #ededed;
}

header nav .nav-drop-down .nav-hover-dropdown a {
  padding-left: 35px;
}

/* --------- smartphone ----------- */
@media (max-width: 1071px) {
  .collapse > :not(.nav-drop-down).nav-group:not(.nav-nohide) {
    display: none;
  }

  .nav-drop-down * {
    align-content: flex-start !important;
    text-align: left !important;
  }

  .nav-drop-down .nav-item {
    justify-content: flex-start;
    height: 50px;
  }

  .nav-demonlist-trigger,
  header nav .nav-hover-dropdown.nav-demonlist-dropdown {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .nav-drop-down .nav-item > * {
    margin: 0;
  }

  .nav-drop-down.extended {
    display: block;
  }

  .collapse-button {
    display: flex;
    height: 27px !important;
    width: 32px !important;
    margin-top: 24.5px !important;
    margin-bottom: 18.5px !important;
    margin-right: 20px;
    padding: 0px !important;
  }
}

@media (min-width: 1072px) {

  .nav-drop-down {
    display: none;
  }

  .collapse-button {
    display: none !important;
  }
}

footer {
  display: flex;
  flex-direction: column;
  justify-content: center;

  padding-top: 1% !important;

  width: 100%;

  font-size: 0.75em;
  font-weight: 300;
  text-align: center;

  background: #171921;
  color: #ddd;

  box-shadow: 0px -1px 10px 6px #171921;

  position: relative;
  z-index: 1;
}

footer .flex {
  justify-content: center;
}

footer .flex > * {
  margin: 1% 1%;
  min-width: 150px;
  max-width: 30%;
}

footer a.link {
  color: var(--color-link-dark);
}

footer h2 {
  font-size: 1.3em;
}

footer > * {
  margin: 0.4% 1%;
}

footer * {
  font-weight: inherit;
}

@media (max-width: 1071px) {
  footer > * {
    margin: 10px 10px;
  }

  footer .flex {
    flex-direction: column;
    align-items: center;
  }

  footer .flex {
    flex-wrap: wrap;
  }
}


/* ----- source: _pointercrate_ref/pointercrate-core-pages/static/css/sidebar.css ----- */
.left {
  max-width: 70%;
}

.right {
  max-width: 30%;
}

@media (max-width: 1071px) {
  .container {
    flex-wrap: wrap;
  }

  .left {
    max-width: 100%;
    min-width: 100%;
  }

  .right {
    max-width: 100%;
    min-width: 100%;

    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
  }
}

.left {
  max-width: 70%;
}

.right {
  align-items: flex-start;
  max-width: 30%;
}

.right p {
  font-size: 0.76em;
}


/* ----- source: _pointercrate_ref/pointercrate-core-pages/static/css/icon.css ----- */
.plus {
  height: 25px;
  width: 25px;
  top: 10px;
  right: 10px;
}

.plus,
.plus:before,
.plus:after {
  position: absolute;
}

.plus:before,
.plus:after {
  position: absolute;
  left: 15px;
  content: " ";
  height: 25px;
  width: 3px;
  background-color: #333;
  border-radius: 10px;
}

.plus:before {
  transform: rotate(90deg);
}

.plus.cross:before {
  transform: rotate(45deg);
}

.plus.cross:after {
  transform: rotate(-45deg);
}

.hamburger {
  display: block;
  position: relative;
  top: 0px;
  left: 0px;

  padding: 5px;
}

.hamburger input {
  display: block;
  width: 40px;
  height: 32px;
  position: absolute;
  top: -2px;
  left: -2px;

  opacity: 0; /* hide this */
  z-index: 2; /* and place it over the hamburger */
}

.hamburger span {
  display: block;
  width: 33px;
  height: 4px;
  margin-bottom: 5px;
  position: relative;

  background: #888;
  border-radius: 3px;

  z-index: 1;

  transform-origin: 4px 0px;

  transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1),
    background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), opacity 0.55s ease;
}

.hamburger span:first-child {
  transform-origin: 0% 0%;
}

.hamburger span:nth-last-child(1) {
  transform-origin: 0% 100%;
}

.hamburger input:checked ~ span {
  opacity: 1;
  transform: rotate(45deg) translate(-1px, -1px);
  background: #232323;
}

.hamburger input:checked ~ span:nth-last-child(2) {
  opacity: 0;
  transform: rotate(0deg) scale(0.2, 0.2);
}

.hamburger input:checked ~ span:nth-last-child(1) {
  transform: rotate(-45deg) translate(1px, 1px);
}

.hamburger.hover,
.plus.hover,
.arrow.hover,
i.fa.hover {
  opacity: 0.3;
  cursor: pointer;
}

.hamburger.hover input {
  cursor: pointer;
}

.hamburger.hover > span {
  background: #333;
}

.hamburger.hover:hover,
.plus.hover:hover,
.arrow.hover:hover,
i.fa.hover:hover {
  opacity: 1;
}

.arrow {
  width: 13px;
  height: 13px;
  display: inline-block;
  position: relative;
  bottom: -5px;
  left: -10px;
  transition: 0.4s ease;
  margin-top: 2px;
  text-align: left;
  transform: rotate(45deg);
  float: right;
}

.arrow:before,
.arrow:after {
  position: absolute;
  content: "";
  display: inline-block;
  width: 12px;
  height: 3px;
  background-color: #333;
  transition: 0.4s ease;
}

.arrow:after {
  position: absolute;
  transform: rotate(90deg);
  top: -5px;
  left: 5px;
}

.active .arrow {
  transform: rotate(45deg) translate(-5px, -5px);
}

.active .arrow:before {
  transform: translate(10px, 0);
}

.active .arrow:after {
  transform: rotate(90deg) translate(10px, 0);
}


/*
 Flag styles, taken from https://github.com/lipis/flag-icon-css
 */

.flag-icon-background{background-size:contain;background-position:50%;background-repeat:no-repeat}.flag-icon{background-size:contain;background-position:50%;background-repeat:no-repeat;position:relative;display:inline-block;width:1.33333333em;line-height:1em}.flag-icon:before{content:'\00a0'}

/* ----- source: _pointercrate_ref/pointercrate-demonlist-pages/static/css/demonlist.css ----- */
table {
  width: 90%;
  margin: 0 5%;
}

th {
  height: 3em;
  padding: 6px;

  color: #fff;
}

td {
  line-height: 2em;
  text-indent: 5px;
}

tr {
  background: #fefeff;
}

tr:nth-child(even) {
  background: #e6eeff;
}

#history-table {
  font-weight: bold;
}

#history-table tr {
  background: var(--color-warn-bg);
  color: var(--color-warn-text);
}

/* same colors as info boxes! */
#history-table tr.moved-up {
  background: var(--color-ok-bg);
  color: var(--color-ok-text);
}

#history-table tr.moved-down {
  background: var(--color-error-bg);
  color: var(--color-error-text);
}

.staff-contact-panel .underlined.pad {
  text-align: center;
}

.staff-contact-panel .staff-contact-note {
  margin: 12px 8% 14px;
  text-align: center;
  font-size: 0.74em;
  line-height: 1.35;
  color: #33455f;
}

.staff-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}

.staff-contact-list li {
  text-align: center;
  font-variant: small-caps;
  font-size: 1.08em;
  letter-spacing: 0.01em;
}

.staff-contact-list li b {
  font-weight: 700;
}

.staff-contact-empty {
  font-variant: normal;
  font-size: 0.92em;
  color: #5e6c7d;
}

.staff-contact-subsection + .staff-contact-subsection {
  margin-top: 16px;
}

.right p,
.right span,
#rules span {
  font-size: 0.76em;
  font-weight: normal;
}

@media (max-width: 1071px) {
  #rules,
  #discord {
    order: -1;
  }

  #discord {
    width: 100%;
  }

  #staff-contacts,
  #submit,
  #stats {
    min-width: 200px;
    width: 30%;
    box-sizing: border-box;
  }
}

@media (max-width: 768px) {
  #staff-contacts,
  #submit,
  #stats {
    width: 100%;
  }

  .video-link {
    display: none;
  }
}

.dropdown {
  background: var(--color-bg);
  text-align: center;
}

.dropdown li {
  padding: 10px calc(10px + 0.52434444444444%);
  min-width: 200px;
  width: 200px;
  flex-grow: 1;
}

.dropdown i {
  font-variant: small-caps;
  font-size: 0.76em;
}

#lists .button {
  font-weight: 600;
}

#level-info span {
  margin: 5px 10px;
}

/* Stats viewer styles */

#stats-viewer-pagination li i {
  padding-left: 5px;

  color: #444;

  font-size: 70%;
  font-variant: small-caps;
}

/* Submission form styles */

#submission-form h3 {
  margin: 20px 0px 10px 0px;
}

#submission-form > p {
  margin: 5px 0;

  font-size: 90%;
  text-align: center;
}

.submit-guidelines-agreement {
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  text-align: left;
}

.submit-guidelines-agreement .cb-container {
  margin: 0;
}

.submit-guidelines-agreement .link {
  display: inline-flex;
  align-items: center;
}

.thumb {
  background: black;
  background-size: cover;
}

.completed {
  background: var(--color-ok-bg);
}

@media (max-width: 767px) {
  .thumb {
    width: 100%;
    box-shadow: 1px -53px 26px -20px var(--color-bg) inset;
  }

  .completed .thumb {
    box-shadow: 1px -53px 26px -20px var(--color-ok-bg) inset;
  }

  .demon-byline {
    font-size: 80%;
  }

  .demon-info {
      margin-top: -10px;
  }
}

@media (min-width: 768px) {
  .thumb {
    max-width: 30%;
    min-width: 30%;
  }

  .demon-byline {
    padding-left: 15px;
  }
}

.ct-series-a .ct-line,
.ct-series-a .ct-point {
  stroke: #0881c6;
}


/* ----- local compatibility / overrides ----- */

body {
  background-color: #f5f7fc;
}

.page-shell {
  width: min(1092px, 98vw);
  margin: 0 auto;
}

.ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.thumb {
  background-position: center;
}

#demon-list .panel {
  margin-top: 16px;
  margin-bottom: 16px;
}

#lists {
  text-align: center;
  position: relative;
  z-index: 120;
  overflow: visible;
  width: calc(100% - 20px);
  margin-left: auto !important;
  margin-right: auto !important;
}

#lists > div {
  flex: 1 1 0;
  min-width: 0;
}

#lists .button {
  width: 100%;
  box-sizing: border-box;
}

#lists .dropdown {
  z-index: 500;
}

.search input {
  width: 100%;
}

.panel-head {
  margin-bottom: 12px;
}

.panel-head p {
  margin: 6px 0 0;
}

.panel-head.split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.panel.subtle {
  background: #fbfcff;
}

.panel-narrow {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.homepage-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.homepage-tool-card {
  height: 100%;
}

.homepage-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.centered-actions {
  justify-content: center;
}

.time-machine-tool {
  position: relative;
}

.time-machine-tool .underlined h2 {
  margin-top: 0;
}

.time-machine-tool .plus {
  z-index: 2;
}

.time-machine-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: #1a84c6;
  color: #fff;
}

.time-machine-banner .button.white {
  flex: 0 0 auto;
}

.time-machine-banner-copy {
  font-size: 1.04em;
  line-height: 1.45;
}

.roulette-focus {
  box-shadow: 0 0 0 3px rgba(26, 132, 198, 0.28);
}

.roulette-panel {
  overflow: hidden;
}

.roulette-panel-head {
  align-items: flex-start;
}

.roulette-panel-head h2,
.roulette-panel-head p {
  text-align: left;
}

.roulette-save-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.roulette-load-button {
  position: relative;
  overflow: hidden;
}

.roulette-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 12px;
  border: 1px solid #d9e1ec;
  background: #f8fbff;
}

.roulette-list-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  min-width: 0;
}

.roulette-check {
  margin: 0;
  font-size: 0.92em;
  font-weight: 600;
  color: #33435a;
}

.roulette-check input[disabled] ~ .checkmark {
  opacity: 0.7;
}

.roulette-start-actions {
  flex: 0 0 auto;
}

.roulette-game-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.roulette-demon-card {
  display: flex;
  align-items: stretch;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #d8e1ec;
  background: #fff;
  box-shadow: 0 10px 22px rgba(22, 33, 52, 0.06);
  padding: 12px;
}

.roulette-demon-card.is-active {
  border-color: #7fa8d6;
  box-shadow: 0 12px 26px rgba(25, 90, 150, 0.16);
}

.roulette-demon-thumb {
  width: 190px;
  flex: 0 0 190px;
  min-height: 108px;
  display: block;
  background-size: cover;
  background-position: center;
  background-color: #111;
}

.roulette-demon-body {
  display: grid;
  flex: 1 1 auto;
  align-content: center;
  gap: 5px;
  min-width: 0;
  text-align: left;
}

.roulette-demon-body h3,
.roulette-demon-body p {
  margin: 0;
  text-align: left;
}

.roulette-demon-body h3 {
  font-size: 1.15em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.roulette-demon-body a,
.roulette-demon-body p {
  overflow-wrap: anywhere;
}

.roulette-demon-creator {
  color: #4f5e72;
  font-style: italic;
}

.roulette-demon-score,
.roulette-demon-meta {
  color: #5e6d83;
  font-size: 0.78em;
  line-height: 1.35;
}

.roulette-demon-controls {
  margin-left: auto;
  width: 230px;
  flex: 0 0 230px;
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
}

.roulette-demon-controls input {
  width: 100%;
}

.roulette-card-actions {
  justify-content: flex-end;
}

.roulette-card-actions .button {
  min-width: 84px;
}

.roulette-progress-error {
  min-height: 1.1em;
  text-align: left;
}

.roulette-percent-badge {
  justify-self: end;
  align-self: center;
  color: #2f4d72;
  font-size: 1.7em;
  line-height: 1;
}

.roulette-results,
.roulette-remaining {
  margin-top: 14px;
  padding-top: 12px;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-top: 1px solid #dbe2ec;
}

.roulette-results h3,
.roulette-remaining h3 {
  margin-top: 0;
}

@keyframes rouletteFadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.fade-in-up {
  animation: rouletteFadeInUp 280ms ease-out;
}

.stack-form {
  display: grid;
  gap: 10px;
}

.recaptcha-field {
  display: flex;
  justify-content: center;
  margin: 4px 0;
  min-height: 78px;
}

.field {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.field[hidden] {
  display: none;
}

.field > span {
  font-style: italic;
  margin-bottom: 5px;
  font-size: 0.76em;
}

input,
select,
textarea {
  width: 100%;
  box-sizing: border-box;
}

.button.small {
  padding: 5px 10px;
  font-size: 0.86em;
}

.button.ghost {
  background: var(--color-unobstrusive-button-bg);
  color: var(--color-unobstrusive-button-text);
  border: 1px solid var(--color-border);
}

.button.danger {
  background: var(--color-imp-button-bg);
  color: var(--color-pc-button-text);
}

.badge {
  display: inline-block;
  border: 1px solid var(--color-border);
  font-size: 0.73em;
  font-weight: 600;
  padding: 2px 8px;
  text-transform: uppercase;
}

.badge.success,
.badge.approved {
  background: var(--color-ok-bg);
  color: var(--color-ok-text);
  border-color: var(--color-ok-border);
}

.badge.error,
.badge.rejected {
  background: var(--color-error-bg);
  color: var(--color-error-text);
  border-color: var(--color-error-border);
}

.user-badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
  vertical-align: middle;
}

.user-badge {
  --badge-size: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--badge-size);
  height: var(--badge-size);
  flex: 0 0 var(--badge-size);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  box-shadow: none;
  line-height: 0;
}

.user-badge-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 90%;
  margin: 0 5%;
}

.data-table th {
  background: var(--color-pc-button-bg);
}

.data-table td,
.data-table th {
  text-align: left;
}

.key-value {
  margin: 0;
  display: grid;
  gap: 8px;
}

.key-value.compact {
  gap: 5px;
}

.key-value div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dotted var(--color-border);
  padding-bottom: 3px;
}

.key-value dt {
  flex: 0 0 auto;
  white-space: nowrap;
}

.key-value dd {
  margin: 0;
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.key-value dd .creator-more-wrap {
  display: inline;
  white-space: normal;
}

.key-value dd .creator-more {
  display: inline;
  pointer-events: none;
}

.key-value dd .creator-more-trigger {
  display: none;
}

.key-value dd .creator-more-popover {
  position: static;
  display: inline;
  min-width: 0;
  width: auto;
  max-width: none;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  font: inherit;
  text-align: inherit;
  white-space: normal;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: none;
  transition: none;
}

.key-value dd .creator-more-popover::before {
  display: none;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 12px;
}

.video-wrap {
  width: 90%;
  margin: 15px 5%;
}

.video-wrap iframe {
  border: 0;
  width: 100%;
  height: 100%;
}

.moderation-card {
  border: 1px dashed var(--color-border);
  padding: 12px;
  margin: 10px 0;
}

.moderation-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.moderation-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: end;
}

.muted {
  color: #666;
}

#mobile-nav-dropdown .nav-item {
  border-top: 1px solid #eee;
}

@media (max-width: 900px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .moderation-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .page-shell {
    width: 100%;
  }

  .panel-head.split {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Main-list card info closer to pointercrate */
main.left .demon-byline h3 {
  text-transform: none;
  font-size: 0.98em;
  font-weight: 500;
  line-height: 1.45;
}

main.left .demon-card-byline {
  line-height: 1.45;
}

.creator-more-wrap {
  white-space: nowrap;
}

.creator-more {
  display: inline-block;
  position: relative;
  vertical-align: baseline;
  line-height: inherit;
  outline: none;
}

.creator-more-trigger {
  color: var(--color-text-accent);
  cursor: help;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.creator-more-popover {
  position: absolute;
  z-index: 40;
  left: 50%;
  top: calc(100% + 7px);
  display: block;
  min-width: 180px;
  width: max-content;
  max-width: min(320px, 76vw);
  max-height: 180px;
  overflow-y: auto;
  padding: 7px 9px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  box-shadow: 0 10px 22px rgba(21, 31, 48, 0.18);
  font-size: 0.9em;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translate(-50%, -4px);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 0s linear 160ms;
}

.creator-more-popover::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -6px;
  width: 10px;
  height: 10px;
  border-left: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}

.creator-more:hover .creator-more-popover,
.creator-more:focus .creator-more-popover,
.creator-more:focus-within .creator-more-popover {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}

main.left .demon-card-byline .creator-more-popover,
.demon-hero-byline .creator-more-popover {
  text-align: center;
}

.demon-hero-panel,
.demon-detail-grid .panel.subtle {
  overflow: visible;
}

@media (max-width: 767px) {
  .creator-more-popover {
    left: auto;
    right: 0;
    max-width: min(280px, 86vw);
    transform: translateY(-4px);
  }

  .creator-more-popover::before {
    left: auto;
    right: 18px;
    transform: rotate(45deg);
  }

  .creator-more:hover .creator-more-popover,
  .creator-more:focus .creator-more-popover,
  .creator-more:focus-within .creator-more-popover {
    transform: translateY(0);
  }
}

main.left .demon-points {
  margin-top: 2px;
  font-size: 0.9em !important;
  color: var(--color-text);
}

main.left .demon-info {
  justify-content: flex-start;
}

main.left .demon-byline {
  width: 100%;
}


/* Auth + account navigation */
.nav-inline-form,
.nav-mobile-form {
  margin: 0;
  width: 100%;
}

.nav-inline-form .nav-item,
.nav-mobile-form .nav-item {
  width: 100%;
  border: none;
  background: transparent;
  font: inherit;
}

.nav-auth-status {
  flex-grow: 0;
}

.nav-login-link::after,
.nav-login-link .fa-sort-down,
.nav-login-link .fas.fa-sort-down {
  content: none !important;
  display: none !important;
}

.nav-profile-dropdown {
  right: 0;
  left: auto;
  min-width: 240px;
  width: 240px;
  max-width: min(92vw, 320px);
  background: var(--color-bg);
  overflow: hidden;
  box-sizing: border-box;
}

.nav-profile-dropdown * {
  box-sizing: border-box;
}

.nav-profile-dropdown form {
  margin: 0;
  width: 100%;
}

header nav .nav-profile-dropdown a,
header nav .nav-profile-dropdown button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1em;
  font-weight: 600;
  color: var(--color-text-accent);
  cursor: pointer;
}

header nav .nav-profile-dropdown a:hover,
header nav .nav-profile-dropdown button:hover {
  background: var(--color-unobstrusive-button-bg-hover);
}

.nav-profile-language-form,
.nav-mobile-language-form {
  padding: 10px 16px;
}

.nav-profile-language-form label,
.nav-mobile-language-form label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--color-text-accent);
  font-size: 0.85em;
  font-weight: 700;
}

.nav-profile-language-form select,
.nav-mobile-language-form select {
  width: 100%;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 0.95em;
}

/* Demon page improvements */
.demon-hero {
  gap: 14px;
  align-items: stretch;
}

.demon-hero-thumb {
  width: clamp(280px, 34vw, 380px);
  flex: 0 0 clamp(280px, 34vw, 380px);
  height: clamp(158px, 20vw, 214px);
  max-width: none;
  display: block;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-color: #111;
}

.demon-hero-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.demon-hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
}

.demon-hero-title {
  text-align: left;
  margin: 0 0 8px;
}

.demon-hero-byline {
  text-align: left;
  font-size: 0.98em;
  line-height: 1.45;
  margin: 0 0 8px;
}

.demon-hero-score {
  text-align: left;
  font-size: 0.95em;
  margin: 0;
}

.demon-hero-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.demon-hero-completions {
  min-width: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-left: 1px dashed var(--color-border);
  padding-left: 18px;
}

.demon-hero-completions-value {
  font-size: 4.2em;
  font-weight: 700;
  line-height: 0.95;
}

.demon-hero-completions-label {
  font-size: 1.45em;
  font-weight: 600;
  color: #333;
}

.demon-detail-grid {
  grid-template-columns: 1fr 1fr;
}

.demon-preview-frame {
  width: 100%;
  display: block;
  margin: 0;
}

@media (max-width: 767px) {
  .demon-hero-thumb {
    width: 100%;
    flex-basis: auto;
    height: min(56vw, 260px);
  }

  .demon-hero-actions {
    flex-direction: column;
  }

  .demon-hero-completions {
    border-left: 0;
    border-top: 1px dashed var(--color-border);
    padding-left: 0;
    padding-top: 12px;
    min-width: 100%;
  }

  .demon-hero-completions-value {
    font-size: 3.3em;
  }

  .demon-hero-completions-label {
    font-size: 1.2em;
  }

  .demon-detail-grid {
    grid-template-columns: 1fr;
  }
}
.history-toggle {
  text-align: left;
}

.history-toggle > summary {
  cursor: pointer;
  font-size: 1.15em;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.history-toggle > summary::-webkit-details-marker {
  display: none;
}

.history-toggle > summary::after {
  content: '\f078';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  flex: 0 0 auto;
  transition: transform 220ms ease;
}

.history-toggle[open] > summary::after {
  transform: rotate(180deg);
}

.history-toggle > .history-toggle-content {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  overflow: hidden;
}

.history-toggle > .history-toggle-content > .history-toggle-inner {
  min-height: 0;
}

.history-toggle[open] > .history-toggle-content {
  max-height: none;
  margin-top: 12px;
  opacity: 1;
}

.history-toggle:not([open]) > .history-toggle-content {
  pointer-events: none;
}

.history-toggle .table-wrap {
  margin-top: 0;
}

/* Extra UX improvements */
.field {
  position: relative;
}

.suggest-menu {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 40;
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  max-height: 220px;
  overflow-y: auto;
}

.suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: 0;
  background: #fff;
  color: var(--color-text-accent);
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.suggest-item:hover,
.suggest-item:focus {
  background: #e8eef8;
}

.suggest-meta {
  color: #667;
  font-size: 0.82em;
  margin-left: 10px;
  white-space: nowrap;
}

.suggest-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.suggest-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggest-flag {
  width: 1.33333333em;
  min-width: 1.33333333em;
  height: 1em;
  line-height: 1em;
}

.player-link {
  color: var(--color-text-accent);
  font-weight: 600;
  text-decoration: underline;
}

.player-link:hover {
  color: var(--color-text-accent);
}

header nav .nav-group.nav-auth-status {
  flex: 0 0 auto;
}

header nav .nav-hover-dropdown.nav-profile-dropdown {
  width: 240px;
  min-width: 240px;
}

header nav .nav-profile-dropdown a,
header nav .nav-profile-dropdown button {
  white-space: nowrap;
}

.player-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.player-inline .flag-icon {
  margin-right: 0 !important;
}

.records .records-table {
  width: 100%;
  margin: 0;
  table-layout: fixed;
  border-collapse: collapse;
}

.records .records-table thead th {
  padding: 8px 10px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95em;
  letter-spacing: 0.01em;
  border: 0;
}

.records .records-table thead th.blue {
  background: #1a84c6;
  color: #fff;
}

.records .records-table tbody td {
  padding: 4px 10px;
  text-align: center;
  font-size: 0.92em;
  font-weight: 600;
  border: 0;
}

.records .records-table tbody tr:nth-child(odd) {
  background: #cfd8e8;
}

.records .records-table tbody tr:nth-child(even) {
  background: #f2f5fb;
}

.records .records-table th:nth-child(1),
.records .records-table td:nth-child(1) {
  width: 50%;
  position: relative;
}

.records .records-table th:nth-child(2),
.records .records-table td:nth-child(2) {
  width: 20%;
}

.records .records-table th:nth-child(3),
.records .records-table td:nth-child(3) {
  width: 30%;
}

.records .player-inline {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 1.1em;
  white-space: normal;
}

.records .player-inline .flag-icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  margin-right: 0 !important;
}

.records .player-inline .player-link {
  display: block;
  min-width: 0;
  width: min(calc(100% - 34px), 420px);
  margin: 0 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  vertical-align: bottom;
}

.records .records-table td:nth-child(2) {
  color: #2e3441;
  font-weight: 700;
}

.records .records-table td:nth-child(3) .link {
  color: #001fff;
  font-weight: 700;
  white-space: nowrap;
}

.level-comments-panel .panel-head {
  text-align: left;
}

.level-comments-panel .panel-head h2,
.level-comments-panel .panel-head p {
  margin-left: 0;
  margin-right: 0;
}

.level-comment-form {
  margin-top: 10px;
  text-align: left;
}

.level-comment-form textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.45;
}

.level-comment-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.level-comments-login,
.level-comments-status,
.level-comments-empty {
  text-align: left;
}

.level-comments-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.level-comments-pagination {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.level-comments-page-status {
  color: #4f5f76;
  font-weight: 700;
}

.level-comments-pagination .is-disabled {
  opacity: 0.48;
  pointer-events: none;
}

.level-comment {
  border: 1px solid #dbe3ef;
  border-left: 3px solid #7c8da6;
  background: #fbfcff;
  padding: 10px 12px;
  text-align: left;
}

.level-comment.is-pinned {
  border-left-color: #2f9d65;
  background: #f8fffb;
}

.level-comment-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.level-comment-head time {
  color: #667;
  font-size: 0.82em;
}

.level-comment-head .player-inline {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  gap: 6px;
  align-items: center;
}

.level-comment-author {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
}

.level-comment-author .player-link {
  font-weight: 800;
  border-bottom: 0;
  box-shadow: none;
  text-decoration: none;
}

.level-comment-author .player-link:hover,
.level-comment-author .player-link:focus {
  border-bottom: 0;
  box-shadow: none;
  text-decoration: none;
}

.level-comment-badges .user-badge {
  --badge-size: 18px;
}

.level-comment-pin {
  border: 1px solid #b7dfc8;
  color: #287248;
  background: #edf9f1;
  font-size: 0.68em;
  font-weight: 800;
  line-height: 1.1;
  padding: 2px 5px;
  text-transform: uppercase;
}

.level-comment-body {
  margin: 8px 0 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.level-comment-edited {
  display: inline;
  font-size: 0.78em;
  margin: 0;
}

.level-comment-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.level-comment-actions form {
  margin: 0;
}

.level-comment-actions .level-comment-edit-box {
  margin-top: 0;
}

.level-comment-action,
.level-comment-action-static {
  border: 1px solid #d7dfeb;
  background: #fff;
  box-sizing: border-box;
  color: #445166;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  min-height: 28px;
  padding: 4px 7px;
  font: inherit;
  font-size: 0.82em;
  line-height: 1;
}

.level-comment-action {
  cursor: pointer;
}

.level-comment-action:hover,
.level-comment-action:focus {
  border-color: #9baec8;
  background: #f4f7fb;
}

.level-comment-action.is-active {
  border-color: #5274c9;
  background: #eaf0ff;
  color: #244993;
}

.level-comment-action.is-danger {
  color: #9d2d2d;
}

.level-comment-action.is-danger:hover,
.level-comment-action.is-danger:focus {
  border-color: #dfa8a8;
  background: #fff1f1;
}

.level-comment-action-static {
  color: #667;
}

.level-comment-report {
  position: relative;
}

.level-comment-report[open] {
  flex-basis: 100%;
}

.level-comment-report > summary {
  border: 1px solid #d7dfeb;
  background: #fff;
  box-sizing: border-box;
  color: #5b6576;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  height: 28px;
  min-height: 28px;
  padding: 4px 7px;
  font-size: 0.82em;
  line-height: 1;
  list-style: none;
}

.level-comment-report > summary::-webkit-details-marker {
  display: none;
}

.level-comment-report > summary::marker {
  content: '';
}

.level-comment-mini-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.level-comment-mini-form input {
  flex: 1 1 190px;
  min-width: 0;
}

.level-comment-reply-box,
.level-comment-edit-box {
  margin-top: 8px;
}

.level-comment-reply-box > summary,
.level-comment-edit-box > summary {
  color: #315f9a;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.86em;
  font-weight: 700;
}

.level-comment-reply-form,
.level-comment-edit-form {
  border: 1px solid #e2e8f2;
  background: #fff;
  margin-top: 8px;
  padding: 8px;
}

.level-comment-reply-form textarea,
.level-comment-edit-form textarea {
  min-height: 72px;
}

.level-comment-replies {
  border-left: 2px solid #e0e8f2;
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding-left: 12px;
}

.level-comment-replies-toggle {
  margin-top: 10px;
}

.level-comment-replies-toggle > summary {
  border: 1px solid #d7dfeb;
  background: #fff;
  box-sizing: border-box;
  color: #315f9a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 0.86em;
  font-weight: 700;
  list-style: none;
}

.level-comment-replies-toggle > summary:hover,
.level-comment-replies-toggle > summary:focus {
  border-color: #9baec8;
  background: #f4f7fb;
}

.level-comment-replies-toggle > summary .fa {
  font-size: 0.78em;
  transition: transform 140ms ease;
}

.level-comment-replies-toggle[open] > summary .fa {
  transform: rotate(180deg);
}

.level-comment-replies-toggle > summary::-webkit-details-marker {
  display: none;
}

.level-comment-replies-toggle > summary::marker {
  content: '';
}

.level-comment-reply {
  border: 0;
  border-left: 2px solid #cbd8eb;
  background: transparent;
  padding: 7px 0 7px 10px;
}

.discord-widget-wrap {
  margin-top: 12px;
  border: 1px solid var(--color-border);
  background: #fff;
}

.discord-widget-frame {
  width: 100%;
  height: 320px;
  border: 0;
  display: block;
}

.demon-hero {
  align-items: flex-start;
}

.demon-hero-thumb {
  background-size: cover;
}

@keyframes soft-page-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-shell .panel {
  animation: soft-page-enter 280ms ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .page-shell .panel {
    animation: none;
  }
}




/* Stats Viewer page */
.stats-viewer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 18px;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.stats-viewer-panel {
  overflow: visible;
}

.stats-viewer-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.stats-viewer-tabs .button {
  flex: 0 0 auto;
}

.stats-viewer-sidebar {
  border: 1px solid var(--color-border);
  background: #fff;
  padding: 10px;
  box-sizing: border-box;
  max-width: 100%;
}

.stats-viewer-country {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  text-align: left;
}

.stats-viewer-country span {
  font-size: 0.76em;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #5e6775;
  text-transform: uppercase;
}

.stats-viewer-country select {
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text-accent);
  font: inherit;
  padding: 6px 8px;
}

.stats-viewer-search {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--color-border);
  background: #fff;
  padding: 6px 8px;
  margin-bottom: 10px;
}

.stats-viewer-search input {
  border: 0;
  outline: none;
  width: 100%;
  font-size: 1.05em;
  padding: 2px 0;
}

.stats-viewer-search button {
  border: 0;
  background: transparent;
  color: #666;
  font-size: 1.2em;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.stats-player-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  max-height: 560px;
  overflow-y: auto;
}

.stats-player-item + .stats-player-item {
  border-top: 1px solid #e4e8ef;
}

.stats-player-button {
  width: 100%;
  border: 0;
  background: #fff;
  color: var(--color-text-accent);
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  padding: 8px 10px;
  font: inherit;
}

.stats-player-item.active .stats-player-button {
  background: #f1f3f6;
  box-shadow: inset 3px 0 0 #8c98a9;
}

.stats-player-button:hover {
  background: #f7f8fa;
}

.stats-player-rank {
  font-weight: 700;
}

.stats-player-name {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.stats-player-name > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-player-score {
  color: #566073;
  font-size: 0.88em;
  font-weight: 600;
}

.stats-viewer-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.stats-viewer-detail {
  border: 1px solid var(--color-border);
  background: #fff;
  padding: 14px;
  min-height: 560px;
  box-sizing: border-box;
  max-width: 100%;
}

.stats-viewer-player-head {
  text-align: center;
  margin-bottom: 8px;
}

.stats-viewer-player-title {
  margin: 0;
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  line-height: 1.18;
  max-width: 100%;
  overflow-wrap: anywhere;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.stats-viewer-player-name {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.stats-viewer-badges {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.stats-viewer-badges .user-badge {
  --badge-size: 30px;
}

.stats-viewer-badges:empty {
  display: none;
}

.stats-viewer-badge-list {
  justify-content: center;
}

.stats-viewer-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.stats-viewer-summary-card {
  grid-column: span 2;
  min-width: 0;
  border: 1px solid #dde2ea;
  background: #f8f9fb;
  text-align: center;
  padding: 9px 10px;
  box-sizing: border-box;
}

.stats-viewer-summary-card-contrib {
  grid-column: 1 / span 3;
}

.stats-viewer-summary-card-breakdown {
  grid-column: 4 / span 3;
}

.stats-viewer-summary-card h3 {
  margin: 0 0 3px;
  font-size: 0.76em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5e6775;
}

.stats-viewer-summary-card p {
  margin: 0;
  font-size: 1em;
  font-weight: 600;
  color: #2d3440;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .stats-viewer-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-viewer-summary-card,
  .stats-viewer-summary-card-contrib,
  .stats-viewer-summary-card-breakdown {
    grid-column: auto;
  }

  .stats-viewer-summary-card-breakdown {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .stats-viewer-summary {
    grid-template-columns: 1fr;
  }
}

.stats-viewer-lines {
  margin-top: 14px;
}

.stats-viewer-lines article {
  padding-top: 11px;
  border-top: 1px solid #e3e7ef;
}

.stats-viewer-lines h3 {
  margin: 0;
  text-align: center;
  font-size: 1.05em;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.stats-viewer-lines p {
  margin: 4px 0 0;
  text-align: center;
  color: #5e6675;
  font-size: 0.94em;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

a.stats-demon-link {
  white-space: normal;
  color: #2f3744;
  text-decoration: underline;
}

a.stats-demon-link:hover {
  color: var(--color-pc-button-bg);
}

a.stats-demon-link:after {
  content: none !important;
}

.admin-section-focus {
  border-color: #9db6d8;
  box-shadow: 0 0 0 2px rgba(76, 117, 176, 0.18), 0 12px 24px rgba(23, 35, 56, 0.08);
  animation: admin-section-focus-pulse 900ms ease;
  transition: box-shadow 180ms ease, border-color 180ms ease;
}

@keyframes admin-section-focus-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(76, 117, 176, 0.28);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(76, 117, 176, 0.06), 0 10px 20px rgba(23, 35, 56, 0.07);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(76, 117, 176, 0), 0 8px 18px rgba(23, 35, 56, 0.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-section-focus {
    animation: none;
  }
}

.admin-dashboard-panel {
  border: 1px solid #d3dae6;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  box-shadow: 0 10px 24px rgba(19, 30, 48, 0.05);
}

.admin-dashboard-head {
  align-items: stretch;
  gap: 16px;
}

.admin-dashboard-intro {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.admin-dashboard-eyebrow {
  margin: 0 0 5px;
  font-size: 0.74em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #4a5d79;
}

.admin-dashboard-head h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.3rem);
  color: #1d2f4b;
}

.admin-dashboard-description {
  margin: 6px 0 0;
  color: #4d5f7a;
  font-size: 0.95em;
}

.admin-dashboard-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-dashboard-tag {
  border: 1px solid #d5ddeb;
  background: #f7f9fc;
  color: #3c4d67;
  padding: 5px 10px;
  font-size: 0.78em;
  letter-spacing: 0.03em;
  font-weight: 600;
}

.admin-dashboard-tag.is-alert {
  border-color: #ecc3c3;
  background: #fff2f2;
  color: #9f3e3e;
}

.admin-dashboard-tag.is-ok {
  border-color: #bddbc5;
  background: #eef9f2;
  color: #2f6d44;
}

.admin-dashboard-command {
  width: min(360px, 100%);
  border: 1px solid #d3ddec;
  background: #f7f9fd;
  padding: 12px;
  text-align: left;
}

.admin-dashboard-command h2 {
  margin: 0 0 8px;
  font-size: 1em;
  color: #223754;
}

.admin-dashboard-command-line {
  margin: 6px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  color: #4e607a;
  font-size: 0.76em;
}

.admin-dashboard-command-line strong {
  color: #24344f;
}

.admin-dashboard-command.is-alert {
  border-color: #e5c1c1;
  background: linear-gradient(180deg, #fff7f7 0%, #fff3f3 100%);
}

.admin-dashboard-command.is-ok {
  border-color: #bed7c6;
  background: linear-gradient(180deg, #f5fbf7 0%, #eef9f2 100%);
}

.admin-dashboard-head-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-head-jump,
.admin-logout-button {
  min-width: 124px;
  text-align: center;
}

.admin-kpi-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-kpi-card {
  border: 1px solid #d7dfeb;
  background: #fff;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  text-align: left;
}

.admin-kpi-icon {
  width: 38px;
  height: 38px;
  border: 1px solid #d9e2ef;
  background: #f4f7fc;
  color: #355075;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92em;
  flex-shrink: 0;
  margin-top: 1px;
}

.admin-kpi-copy {
  display: grid;
  gap: 2px;
  align-content: start;
  min-width: 0;
}

.admin-kpi-copy h3 {
  margin: 0 0 1px;
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.25;
  color: #4f627f;
}

.admin-kpi-copy p {
  margin: 2px 0 1px;
  font-size: 1.14em;
  line-height: 1.2;
  font-weight: 700;
  color: #21324d;
}

.admin-kpi-copy small {
  display: block;
  color: #5d6d85;
  font-size: 0.78em;
  line-height: 1.35;
}

.admin-kpi-card-pending.is-alert {
  border-color: #e7c7c7;
  background: #fff6f6;
}

.admin-kpi-card-pending.is-alert .admin-kpi-icon {
  border-color: #f0d2d2;
  background: #fff1f1;
  color: #aa4f4f;
}

.admin-kpi-card-pending.is-ok {
  border-color: #c8dfcf;
  background: #f2fbf5;
}

.admin-kpi-card-pending.is-ok .admin-kpi-icon {
  border-color: #cfe4d6;
  background: #eaf8ef;
  color: #357149;
}

.admin-kpi-card-review .admin-kpi-icon {
  color: #355f8d;
}

.admin-kpi-card-community .admin-kpi-icon {
  color: #46765d;
}

.admin-kpi-card-list .admin-kpi-icon {
  color: #8d6335;
}

.admin-dashboard-lower {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 10px;
}

.admin-overview-card {
  border: 1px solid #d8dfeb;
  background: #fff;
  padding: 11px 12px;
  text-align: left;
}

.admin-overview-card h3 {
  margin: 0;
  font-size: 1em;
  color: #21324b;
}

.admin-overview-note {
  margin: 6px 0 0;
  color: #56667f;
  font-size: 0.88em;
}

.admin-overview-metrics {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-overview-metrics span {
  border: 1px solid #dbe3ef;
  background: #f8faff;
  color: #435572;
  font-size: 0.76em;
  padding: 7px 8px;
}

.admin-overview-metrics b {
  color: #273b5a;
}

.admin-workflow-track {
  margin-top: 9px;
  height: 9px;
  border: 1px solid #dae2ee;
  background: #f4f7fc;
  overflow: hidden;
  display: flex;
}

.admin-workflow-segment {
  display: block;
  height: 100%;
}

.admin-workflow-segment.approved {
  background: #4f9c65;
}

.admin-workflow-segment.rejected {
  background: #c56060;
}

.admin-workflow-segment.pending {
  background: #c9924f;
}

.admin-workflow-legend {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 0.82em;
  color: #4f5f77;
}

.admin-workflow-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.admin-workflow-legend .fa-check-circle {
  color: #43995f;
}

.admin-workflow-legend .fa-times-circle {
  color: #c35555;
}

.admin-workflow-legend .fa-hourglass-half {
  color: #bc7e31;
}

.admin-quick-action-groups {
  margin-top: 8px;
  display: grid;
  gap: 12px;
}

.admin-dashboard-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  width: 100%;
}

.admin-sidebar {
  display: grid;
  gap: 12px;
  align-content: start;
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.admin-sidebar-role {
  border: 1px solid #d8dfeb;
  background: #fbfcfe;
  padding: 10px 11px;
  display: grid;
  gap: 2px;
}

.admin-sidebar-role .muted {
  font-size: 0.76em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-sidebar-empty {
  border: 1px solid #d8dfeb;
  background: #fbfcfe;
  padding: 10px 11px;
}

.admin-content {
  min-width: 0;
}

@media (max-width: 1400px) {
  .admin-content .detail-grid[style] {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  }
}

.admin-action-badge {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #c0392b;
  color: #fff;
  font-size: 0.72em;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  vertical-align: middle;
}

@media (max-width: 820px) {
  .admin-dashboard-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    max-height: none;
  }
}

.admin-action-group {
  border: 1px solid #d8dfeb;
  background: #fbfcfe;
  padding: 10px;
}

.admin-action-group-title {
  margin: 0 0 8px;
  font-size: 0.93em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #445978;
}

.admin-action-group-note {
  margin: -2px 0 9px;
  color: #5b6d86;
  font-size: 0.79em;
  line-height: 1.4;
}

.admin-action-group-owner {
  border-color: #d6cde8;
  background: linear-gradient(180deg, #fcfafe 0%, #f7f3fd 100%);
}

.admin-action-group-owner .admin-action-group-title {
  color: #5b4a7d;
}

.admin-quick-actions {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.admin-action-tile {
  text-decoration: none;
  border: 1px solid #d6deea;
  border-left: 4px solid #cad5e6;
  background: #fff;
  padding: 9px 11px;
  color: #24334a;
  min-height: 0;
  display: grid;
  gap: 3px;
  position: relative;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.admin-action-tile::after {
  content: "\f061";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #9cacc5;
  font-size: 0.74em;
}

.admin-action-title {
  font-weight: 700;
  letter-spacing: 0.01em;
  padding-right: 22px;
}

.admin-action-tile small {
  color: #56657d;
  line-height: 1.35;
  padding-right: 22px;
}

.admin-action-meta {
  font-size: 0.69em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7b94;
  padding-right: 22px;
}

.admin-action-tile.is-primary {
  border-left-color: #2a6398;
  background: #f4f8ff;
}

.admin-action-tile.is-owner {
  border-left-color: #8b6db8;
  background: #fff;
}

.admin-action-tile.is-owner .admin-action-meta {
  color: #6c5695;
}

.admin-action-tile.is-active {
  border-color: #2b5f97;
  border-left-color: #204e82;
  background: linear-gradient(180deg, #eef5ff 0%, #e4eefc 100%);
  box-shadow: 0 10px 18px rgba(24, 45, 74, 0.14);
}

.admin-action-tile.is-active::after {
  color: #2e5f93;
}

.admin-action-tile.is-active .admin-action-title,
.admin-action-tile.is-active .admin-action-meta {
  color: #1e426f;
}

.admin-action-tile:hover {
  border-color: #bdc9db;
  box-shadow: 0 8px 16px rgba(32, 46, 71, 0.1);
  background: #fbfcfe;
}

.admin-action-tile:focus-visible {
  outline: 2px solid #6f93c8;
  outline-offset: 2px;
}

#admin-user-management .table-wrap {
  margin-top: 10px;
}

#admin-user-management .data-table {
  width: 100%;
  margin: 0;
  table-layout: fixed;
}

.admin-user-table {
  min-width: 1220px;
}

.admin-user-action-cell {
  min-width: 250px;
  text-align: left;
}

.admin-user-edit-form {
  display: grid;
  gap: 8px;
  margin: 0;
}

.admin-user-edit-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.admin-user-edit-field {
  display: grid;
  gap: 4px;
}

.admin-user-edit-field > span {
  font-size: 0.69em;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #4d607d;
}

.admin-user-edit-field input,
.admin-user-edit-field select {
  width: 100%;
  border: 1px solid #c7d3e3;
  background: #fff;
  color: #24344e;
  padding: 6px 8px;
  font-size: 0.86em;
}

.admin-user-edit-field input:focus,
.admin-user-edit-field select:focus {
  border-color: #5f88c1;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(95, 136, 193, 0.16);
}

.admin-user-note {
  display: block;
  margin-top: 4px;
  font-size: 0.78em;
}

.admin-user-note.is-warning {
  color: #8a4d2e;
}

.admin-user-identity {
  display: grid;
  gap: 3px;
  align-content: start;
  min-width: 0;
}

.admin-user-identity b {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.admin-user-country {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #5f718d;
}

.admin-user-country-flag {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.admin-user-country-flag .flag-icon {
  margin-right: 0;
}

.admin-list-section .panel-head {
  margin-bottom: 14px;
  text-align: left;
}

.admin-list-section .panel-head h2 {
  margin: 0;
  color: #2d405f;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.admin-list-section .panel-head p {
  margin-top: 6px;
  color: #5b6d88;
  line-height: 1.45;
}

.admin-user-toolbar {
  margin-top: 2px;
}

.admin-user-search-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) auto;
  gap: 10px;
  align-items: end;
}

.admin-user-search-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-user-search-note {
  margin: 2px 0 0;
  text-align: left;
  font-size: 0.87em;
}

.admin-level-info-builder {
  display: grid;
  gap: 10px;
}

.admin-level-info-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.6fr) minmax(170px, 0.8fr) minmax(190px, 1fr) minmax(190px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid #d8e0eb;
  background: #fbfcfe;
}

.admin-level-info-row .field {
  margin: 0;
}

.admin-level-info-row select,
.admin-level-info-row input {
  width: 100%;
}

.admin-level-info-row select {
  min-height: 38px;
  padding: 7px 34px 7px 10px;
  border: 1px solid #bac7d8;
  border-radius: 0;
  background:
    linear-gradient(45deg, transparent 50%, #42536a 50%) right 14px center / 6px 6px no-repeat,
    linear-gradient(135deg, #42536a 50%, transparent 50%) right 10px center / 6px 6px no-repeat,
    linear-gradient(180deg, #fff 0%, #f5f7fb 100%);
  color: #24344d;
  font: inherit;
  font-size: 0.92em;
  cursor: pointer;
  appearance: none;
}

.admin-level-info-row select:focus,
.admin-level-info-row input:focus {
  border-color: #5f88c1;
  box-shadow: 0 0 0 2px rgba(95, 136, 193, 0.16);
}

.admin-level-info-remove {
  min-width: 96px;
}

.admin-level-info-actions {
  justify-content: flex-start;
}

.admin-custom-level-info {
  border: 1px solid #d8e0eb;
  background: #fbfcfe;
  padding: 10px;
}

.admin-custom-level-info h3 {
  margin: 0 0 10px;
  text-align: left;
  color: #2d405f;
  font-size: 1em;
}

.admin-custom-level-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-custom-level-info-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.admin-custom-level-info-clear {
  margin-bottom: 7px;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .admin-level-info-row {
    grid-template-columns: 1fr;
  }

  .admin-level-info-remove {
    width: 100%;
  }

  .admin-custom-level-info-grid,
  .admin-custom-level-info-field {
    grid-template-columns: 1fr;
  }
}
.admin-list-section .table-wrap {
  margin-top: 10px;
  border: 1px solid #dbe4f0;
  background: #fff;
  box-shadow: 0 10px 20px rgba(18, 30, 49, 0.05);
}

.admin-list-section .data-table {
  width: 100%;
  margin: 0;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
}

.admin-list-section .data-table th {
  background: linear-gradient(180deg, #f7f9fd 0%, #eef3fa 100%);
  color: #3a4f6f;
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: 0.065em;
  border-bottom: 1px solid #d8e2ef;
  padding: 10px 11px;
  line-height: 1.25;
}

.admin-list-section .data-table td {
  border-bottom: 1px solid #e7edf6;
  background: #fff;
  padding: 10px 11px;
  color: #2b3d57;
  font-size: 0.76em;
  line-height: 1.45;
  vertical-align: middle;
}

.admin-list-section .data-table tbody tr:nth-child(odd) {
  background: #fbfdff;
}

.admin-list-section .data-table tbody tr:hover {
  background: #eff5ff;
}

.admin-list-section .data-table tbody tr:last-child td {
  border-bottom: 0;
}


.admin-role-permissions-section .table-wrap {
  margin-top: 10px;
  border: 1px solid #dbe4f0;
  background: #fff;
  box-shadow: 0 10px 20px rgba(18, 30, 49, 0.05);
}

.role-permission-table {
  width: 100%;
  margin: 0;
  min-width: 560px;
  border-collapse: separate;
  border-spacing: 0;
}

.role-permission-table th,
.role-permission-table td {
  vertical-align: middle;
}

.role-permission-table th:not(:first-child),
.role-permission-table td.role-permission-cell {
  text-align: center;
}

.role-permission-name {
  font-weight: 600;
  color: #2b3d57;
}

.role-permission-checkbox {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--color-pc-button-bg);
}

.role-permission-checkbox:focus-visible {
  outline: 2px solid rgba(33, 102, 169, 0.35);
  outline-offset: 2px;
}
.admin-user-table td:nth-child(2) b {
  color: #1f3351;
  font-weight: 700;
}

.admin-user-table th:nth-child(1),
.admin-user-table td:nth-child(1) {
  width: 72px;
}

.admin-user-table th:nth-child(2),
.admin-user-table td:nth-child(2) {
  width: 200px;
}

.admin-user-table th:nth-child(3),
.admin-user-table td:nth-child(3) {
  width: 240px;
}

.admin-user-table th:nth-child(4),
.admin-user-table td:nth-child(4) {
  width: 92px;
}

.admin-user-table th:nth-child(5),
.admin-user-table td:nth-child(5),
.admin-user-table th:nth-child(6),
.admin-user-table td:nth-child(6) {
  width: 98px;
}

.admin-user-table th:nth-child(7),
.admin-user-table td:nth-child(7),
.admin-user-table th:nth-child(8),
.admin-user-table td:nth-child(8) {
  width: 98px;
}

.admin-user-table th:nth-child(9),
.admin-user-table td:nth-child(9) {
  width: 112px;
}

.admin-user-table th:nth-child(10),
.admin-user-table td:nth-child(10) {
  width: 300px;
}
.admin-user-table td:nth-child(3) {
  max-width: 300px;
  word-break: break-word;
}

.admin-user-table td:nth-child(4) .badge,
.admin-user-table td:nth-child(5) .badge,
.admin-user-table td:nth-child(6) .badge {
  min-width: 68px;
  text-align: center;
}

.admin-badge-toolbox {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.admin-badge-card {
  border: 1px solid #d8dfeb;
  background: #fbfcfe;
  padding: 14px 16px;
}

.admin-badge-card-title {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d8dfeb;
  font-size: 0.93em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #445978;
}

.admin-badge-form {
  display: grid;
  gap: 10px;
}

.admin-badge-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-badge-actions .button {
  min-width: 96px;
}

.admin-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.admin-badge-item {
  border: 1px solid #d8dfeb;
  background: #fbfcfe;
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
  overflow: hidden;
  text-align: left;
  transition: border-color 150ms ease;
}

.admin-badge-item:hover {
  border-color: #9cacc5;
}

.admin-badge-item-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.admin-badge-card-preview .user-badge {
  --badge-size: 40px;
}

.admin-badge-item-noimage {
  --size: 40px;
  width: var(--size);
  height: var(--size);
  flex: 0 0 var(--size);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #cdd6e4;
  font-size: 0.6em;
  text-align: center;
  line-height: 1.2;
}

.admin-badge-item-info {
  min-width: 0;
  flex: 1 1 auto;
}

.admin-badge-item-info strong {
  display: block;
  overflow-wrap: break-word;
  word-break: break-word;
}

.admin-badge-item-info small {
  display: block;
  margin-top: 2px;
  color: #667;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: break-word;
}

.admin-badge-item-meta {
  display: flex;
}

.admin-badge-item-meta .badge {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-badge-edit-details > summary {
  cursor: pointer;
  list-style: none;
  width: fit-content;
}

.admin-badge-edit-details > summary::-webkit-details-marker {
  display: none;
}

.admin-badge-edit-details[open] > summary {
  margin-bottom: 10px;
}

.admin-badge-edit-form {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d8dfeb;
}

.admin-badge-delete-form {
  justify-self: start;
}

@media (max-width: 520px) {
  .level-comment-form-actions {
    align-items: stretch;
  }

  .level-comment-form-actions .button {
    width: 100%;
  }

  .level-comment-mini-form {
    align-items: stretch;
    flex-direction: column;
  }

  .level-comment-mini-form input,
  .level-comment-mini-form .button {
    width: 100%;
  }

  .level-comment-replies {
    padding-left: 9px;
  }
}

.admin-list-section .moderation-card {
  margin: 12px 0;
  border: 1px solid #d8e0eb;
  background: #fff;
  box-shadow: 0 10px 22px rgba(22, 33, 52, 0.06);
  padding: 13px 14px;
}

.admin-list-section .moderation-head {
  align-items: center;
  justify-content: flex-start;
  gap: 8px 10px;
  color: #3d4f69;
  padding-bottom: 6px;
  border-bottom: 1px solid #e6ecf4;
  margin-bottom: 8px;
}

.admin-list-section .key-value.compact {
  gap: 7px;
  margin-top: 6px;
}

.admin-list-section .key-value.compact div {
  border-bottom: 1px solid #e8edf5;
  padding: 6px 0;
  align-items: center;
}

.admin-list-section .key-value.compact dt {
  color: #5f708b;
  font-size: 0.76em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-list-section .key-value.compact dd {
  color: #23344c;
  font-weight: 600;
}

.admin-reported-comments {
  margin-top: 16px;
}

.reported-comment-card .key-value.compact div {
  align-items: flex-start;
}

.reported-comment-card .key-value.compact dd {
  text-align: left;
}

.reported-comment-card form {
  margin-top: 10px;
}

.admin-records-toolbar {
  margin-top: 2px;
}

.admin-records-filter-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) auto;
  gap: 10px;
  align-items: end;
}

.admin-records-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-records-focus {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.admin-records-focus h3 {
  margin: 0;
  text-align: left;
}

.admin-records-focus p {
  margin: 6px 0 0;
  text-align: left;
}

.admin-records-account {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-records-account span {
  border: 1px solid #dfe4ee;
  background: #f8fafe;
  padding: 6px 10px;
  font-size: 0.76em;
  white-space: nowrap;
}

.admin-records-summary {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.admin-records-summary article {
  border: 1px solid #dbe1eb;
  background: #fbfcff;
  padding: 8px 10px;
}

.admin-records-summary h4 {
  margin: 0 0 4px;
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5c6574;
}

.admin-records-summary p {
  margin: 0;
  font-size: 1.02em;
  font-weight: 600;
  color: #2c3442;
  line-height: 1.3;
}

.admin-records-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.admin-record-editor {
  border: 1px solid #d3ddeb;
  background: #fff;
  box-shadow: 0 10px 22px rgba(21, 34, 54, 0.06);
}

.admin-record-editor > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  background: #f8fbff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.admin-record-editor > summary::-webkit-details-marker {
  display: none;
}

.admin-record-editor > summary:hover {
  background: #edf4ff;
}

.admin-record-editor-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-record-editor-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #5f6776;
  font-size: 0.76em;
}

.admin-record-editor-body {
  border-top: 1px solid #e2e7f0;
  padding: 10px 12px 12px;
  background: #fff;
}

.admin-record-edit-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.8fr;
  gap: 10px;
}

.admin-record-edit-grid.two-col {
  grid-template-columns: 1fr 1fr;
}

.admin-record-delete-form {
  margin-top: 8px;
}

@media (max-width: 980px) {
  .admin-dashboard-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-dashboard-command {
    width: 100%;
  }

  .admin-dashboard-head-actions {
    justify-content: flex-start;
  }

  .admin-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-dashboard-lower {
    grid-template-columns: 1fr;
  }

  .admin-overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-records-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-user-search-grid {
    grid-template-columns: 1fr;
  }

  .admin-user-edit-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .admin-dashboard-head h1 {
    font-size: 1.75em;
  }

  .admin-dashboard-tags {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-dashboard-command-line strong {
    font-size: 0.76em;
  }

  .admin-dashboard-head-actions {
    width: 100%;
  }

  .admin-head-jump,
  .admin-logout-button {
    min-width: 0;
    flex: 1 1 auto;
  }

  .admin-kpi-grid {
    grid-template-columns: 1fr;
  }

  .admin-overview-metrics {
    grid-template-columns: 1fr;
  }

  .admin-records-filter-grid {
    grid-template-columns: 1fr;
  }

  .admin-user-search-actions {
    width: 100%;
  }

  .admin-user-search-actions .button {
    flex: 1 1 auto;
    text-align: center;
  }

  .admin-user-action-cell {
    min-width: 240px;
  }

  .admin-user-edit-controls {
    grid-template-columns: 1fr;
  }

  .admin-records-filter-actions {
    width: 100%;
  }

  .admin-records-filter-actions .button {
    flex: 1 1 auto;
    text-align: center;
  }

  .admin-records-focus {
    flex-direction: column;
  }

  .admin-records-account {
    justify-content: flex-start;
  }

  .admin-records-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-record-editor > summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-record-edit-grid,
  .admin-record-edit-grid.two-col,
  .admin-quick-actions {
    grid-template-columns: 1fr;
  }
}




/* ----- mobile responsiveness pass ----- */

@media (max-width: 980px) {
  .stats-viewer-grid {
    grid-template-columns: 1fr;
  }

  .stats-viewer-sidebar,
  .stats-viewer-detail {
    width: 100%;
  }

  .stats-viewer-detail {
    min-height: 0;
  }

  .stats-player-list {
    max-height: min(56vh, 420px);
  }
}

@media (max-width: 767px) {
  .page-shell {
    width: 100%;
  }

  .panel {
    margin: 16px 8px;
    padding: 14px;
  }

  #lists {
    width: calc(100% - 12px);
  }

  #lists > div {
    flex: 1 1 100%;
  }

  .dropdown li {
    min-width: 0;
    width: 100%;
  }

  #editors,
  #submit,
  #stats,
  #stats-viewer {
    width: 100%;
    min-width: 0;
  }

  .detail-grid[style] {
    grid-template-columns: 1fr !important;
  }

  .key-value div {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .key-value dd {
    text-align: left;
    word-break: break-word;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    width: 100%;
    margin: 0;
  }

  .data-table th,
  .data-table td {
    padding: 8px 9px;
    line-height: 1.45;
  }

  .player-inline {
    white-space: normal;
  }

  .records .player-inline {
    white-space: nowrap;
  }

  .records .player-inline .player-link {
    max-width: min(100%, 240px);
  }

  .stats-viewer-sidebar {
    padding: 8px;
  }

  .stats-viewer-detail {
    padding: 10px;
    min-height: 0;
  }

  .stats-player-button {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    padding: 8px;
  }

  .stats-viewer-lines h3 {
    font-size: 1em;
  }

  .stats-viewer-lines p {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  a.stats-demon-link {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .discord-widget-frame {
    height: 280px;
  }

  .admin-user-edit-form .button,
  .admin-records-filter-actions .button,
  .admin-user-search-actions .button,
  .admin-head-jump,
  .admin-logout-button {
    width: 100%;
  }

  header nav .nav-hover-dropdown.nav-profile-dropdown {
    min-width: 0;
    width: min(92vw, 320px);
  }

  header nav .nav-profile-dropdown a,
  header nav .nav-profile-dropdown button {
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .stats-player-button {
    grid-template-columns: 46px minmax(0, 1fr);
    row-gap: 3px;
  }

  .stats-player-score {
    grid-column: 2;
    justify-self: start;
  }

  .stats-viewer-pagination {
    grid-template-columns: 1fr;
  }

  .admin-records-summary {
    grid-template-columns: 1fr;
  }

  .admin-records-account span {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .history-toggle > summary::after,
  .history-toggle > .history-toggle-content {
    transition: none;
  }
}

/* ----- mobile hotfix: stats + admin dashboard ----- */

.stats-viewer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

@media (min-width: 1101px) {
  .stats-viewer-grid {
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 18px;
  }
}

.stats-viewer-sidebar,
.stats-viewer-detail {
  min-width: 0;
}

.admin-dashboard-counters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.admin-dashboard-counters > .admin-dashboard-counter {
  margin: 0;
  min-width: 0;
  padding: 12px 8px;
}

.admin-dashboard-counter h3 {
  margin: 0;
  font-size: clamp(1.2rem, 3.6vw, 1.9rem);
}

.admin-dashboard-counter p {
  margin: 6px 0 0;
  font-size: 0.76em;
  line-height: 1.35;
  word-break: break-word;
}

@media (max-width: 1200px) {
  .admin-dashboard-counters {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 980px) {
  .admin-tool-section .detail-grid[style] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 767px) {
  .admin-dashboard-counters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  .admin-dashboard-counters {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 900px) {
  .homepage-tools {
    grid-template-columns: 1fr;
  }

  .roulette-panel-head,
  .roulette-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .roulette-save-actions,
  .roulette-start-actions,
  .roulette-card-actions {
    justify-content: flex-start;
  }

  .roulette-demon-card {
    flex-direction: column;
  }

  .roulette-demon-thumb {
    width: 100%;
    flex-basis: auto;
    min-height: min(54vw, 240px);
  }

  .roulette-demon-controls {
    width: 100%;
    flex-basis: auto;
    margin-left: 0;
  }

  .roulette-percent-badge {
    justify-self: start;
  }

  .time-machine-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in-up {
    animation: none;
  }
}
