:root {
  --desktop: #3a6ea5;
  --chrome: #ece9d8;
  --chrome-dark: #c0c0c0;
  --chrome-line: #808080;
  --title: #0054e3;
  --title-dark: #003399;
  --ink: #111111;
  --muted: #4d4d4d;
  --paper: #f7f4e8;
  --paper-bright: #fffbe5;
  --paper-blue: #e8f1ff;
  --paper-line: #b8b39d;
  --excel: #107c41;
  --blue: #216cd6;
  --orange: #e87b23;
  --red: #c62828;
  --green: #007f3b;
  --shadow: 10px 10px 0 rgba(0, 0, 0, 0.22);
  --patents-bg: url("/assets/patents-background.jpg");
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  background:
    linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.08)),
    var(--patents-bg) center / cover fixed,
    #010101;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.35;
}

@media (hover: hover) and (pointer: fine) {
  body,
  body * {
    cursor: url("/assets/crosshair-cursor.svg?v=20260620") 32 32, crosshair !important;
  }
}

button,
input,
a,
select {
  font: inherit;
}

button,
.button-link,
.start-button {
  min-height: 34px;
  padding: 6px 14px;
  color: var(--ink);
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  border-radius: 0;
  box-shadow: inset -1px -1px 0 #404040, inset 1px 1px 0 #f8f8f8;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}

.action-green,
.submit-run-button,
#downloadRankCard,
#downloadRankCardTop,
#downloadStateCard,
#downloadStateCardTop,
#saveRankCard,
#saveStateCard,
#downloadWorkbook,
#startStateRound,
.share-card-actions button {
  color: #ffffff;
  background: linear-gradient(#18b85e, #007f3b);
  border-color: #b8ffd0 #075b2d #075b2d #d9ffe6;
}

.action-yellow,
#resetRun,
#resetStateRound,
#copyRankSummary,
#pauseState,
#skipState {
  color: #111111;
  background: linear-gradient(#fff68f, #ffcc00);
  border-color: #fffde1 #8a6400 #8a6400 #fffde1;
}

.action-red,
#closeSummary {
  color: #ffffff;
  background: linear-gradient(#ff6a54, #c62828);
  border-color: #ffd0c7 #6e1111 #6e1111 #ffe0db;
}

button:active,
.button-link:active,
.start-button:active {
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #404040;
}

button:focus-visible,
input:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px dotted #000;
  outline-offset: 2px;
}

input,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  color: var(--ink);
  background: var(--paper-bright);
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  border-radius: 0;
  box-shadow: inset 1px 1px 0 #404040;
  font-weight: 700;
}

textarea {
  min-height: 78px;
  resize: vertical;
}

select {
  min-height: 30px;
  padding: 4px 28px 4px 7px;
  color: var(--ink);
  background: var(--paper-bright);
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  border-radius: 0;
  box-shadow: inset 1px 1px 0 #404040;
  font-weight: 800;
  appearance: auto;
}

option[data-bookmarked="true"] {
  color: #d51f2a;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(30px, 4.2vw, 56px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.desktop {
  min-height: 100vh;
  padding: 52px 12px 48px;
}

.app-titlebar,
.taskbar {
  position: fixed;
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 8px;
  background: var(--chrome-dark);
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
}

.app-titlebar {
  top: 0;
  justify-content: space-between;
}

.titlebar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.titlebar-left:hover,
.titlebar-left:focus-visible {
  color: var(--ink);
  text-decoration: none;
}

.window-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  background: url("/assets/logo-brain-spinner.svg") center / contain no-repeat;
  image-rendering: pixelated;
}

.brand-brain-mark,
.hero-brain-mark {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  background: url("/assets/brain-globe-icon.png") center / contain no-repeat;
  image-rendering: pixelated;
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.titlebar-help-button,
.titlebar-chat-button,
.titlebar-challenge-button,
.titlebar-profile-button,
.titlebar-bookmark-button,
.titlebar-badge-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  color: #0a246a;
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  border-radius: 0;
  box-shadow: none;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.titlebar-help-button:hover,
.titlebar-help-button:focus-visible,
.titlebar-chat-button:hover,
.titlebar-chat-button:focus-visible,
.titlebar-challenge-button:hover,
.titlebar-challenge-button:focus-visible,
.titlebar-profile-button:hover,
.titlebar-profile-button:focus-visible,
.titlebar-bookmark-button:hover,
.titlebar-bookmark-button:focus-visible,
.titlebar-badge-button:hover,
.titlebar-badge-button:focus-visible {
  color: #ffffff;
  background: var(--title);
}

.titlebar-chat-button::before {
  content: "";
  width: 15px;
  height: 12px;
  background: #0a246a;
  border: 2px solid #111111;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 68% 72%, 50% 100%, 50% 72%, 0 72%);
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.78);
  image-rendering: pixelated;
}

.titlebar-chat-button:hover::before,
.titlebar-chat-button:focus-visible::before {
  background: #ffffff;
}

.titlebar-challenge-button::before {
  content: "!";
  position: absolute;
  display: grid;
  place-items: center;
  width: 14px;
  height: 18px;
  color: #d51f2a;
  font-family: Consolas, "Courier New", monospace;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  text-shadow:
    1px 0 #111111,
    -1px 0 #111111,
    0 1px #111111,
    0 -1px #111111;
  image-rendering: pixelated;
}

.titlebar-challenge-button:hover::before,
.titlebar-challenge-button:focus-visible::before {
  color: #ff4b55;
}

.titlebar-count-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: 2;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
  background: #d51f2a;
  border: 1px solid #111111;
  border-radius: 999px;
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 10px;
  font-weight: 900;
  line-height: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.7);
}

.titlebar-count-badge,
.titlebar-count-badge * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.titlebar-count-badge.challenge-count-pending {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
  background: #0057d9;
}

.titlebar-count-badge-text {
  display: block;
  width: auto;
  line-height: 1;
  text-align: center;
  transform: none;
}

.titlebar-bookmark-button::before {
  content: "";
  width: 12px;
  height: 15px;
  background: #d51f2a;
  border: 2px solid #111111;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 73%, 0 100%);
  box-shadow:
    inset 2px 2px 0 rgba(255, 172, 172, 0.75),
    inset -2px 0 0 rgba(80, 0, 0, 0.28);
  image-rendering: pixelated;
}

.titlebar-profile-button::before {
  content: "";
  width: 19px;
  height: 19px;
  background: url("/assets/pixel-profile-icon.png") center / contain no-repeat;
  image-rendering: pixelated;
}

.titlebar-profile-button:hover::before,
.titlebar-profile-button:focus-visible::before {
  filter: brightness(0) invert(1);
}

.titlebar-badge-button::before,
.titlebar-badge-button::after {
  content: "";
  position: absolute;
  clip-path: polygon(50% 0%, 61% 34%, 97% 34%, 68% 56%, 79% 92%, 50% 70%, 21% 92%, 32% 56%, 3% 34%, 39% 34%);
}

.titlebar-badge-button::before {
  width: 16px;
  height: 16px;
  background: #111111;
}

.titlebar-badge-button::after {
  width: 11px;
  height: 11px;
  background: #f6c400;
}

.taskbar {
  bottom: 0;
  display: flex;
  grid-template-columns: none;
}

.taskbar span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  background: #d8d8d8;
  border: 1px solid var(--chrome-line);
  font-size: 13px;
  font-weight: 700;
}

#taskbarGame {
  flex: 1 1 auto;
  min-width: 0;
}

.taskbar .taskbar-xp {
  position: relative;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  color: #111111;
  background: #d8d8d8;
  box-shadow: inset 1px 1px 0 #8a8a8a, inset -1px -1px 0 #ffffff;
}

.taskbar .taskbar-xp-fill {
  position: absolute;
  inset: 1px auto 1px 1px;
  width: 0%;
  z-index: 0;
  display: block;
  min-height: 0;
  padding: 0;
  background: #24c24a;
  border: 0;
  border-right: 1px solid #0b7c24;
  box-shadow: none;
  transition: width 240ms steps(8, end);
}

.taskbar .taskbar-xp-text {
  position: relative;
  z-index: 1;
  justify-content: center;
  width: 100%;
  min-height: auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #111111;
  text-align: center;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.taskbar .taskbar-xp-text {
  font-size: 13px;
}

.taskbar .taskbar-xp-bump {
  position: absolute;
  top: 50%;
  right: 10px;
  z-index: 2;
  min-height: auto;
  padding: 0;
  color: #0057ff;
  background: transparent;
  border: 0;
  box-shadow: none;
  font-weight: 900;
  opacity: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

.taskbar-xp-bump.show {
  opacity: 1;
}

.taskbar-xp-bump.fade {
  opacity: 0;
  transform: translateY(calc(-50% - 4px));
  transition: opacity 1s linear, transform 1s linear;
}

.taskbar-xp-help {
  display: inline-grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  min-height: 28px;
  padding: 0;
  color: #0a246a;
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  border-radius: 50%;
  font-weight: 900;
  line-height: 1;
}

.app {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 12px;
  width: min(1480px, 100%);
  margin: 0 auto;
}

.workspace {
  position: relative;
}

.previous-best-box {
  display: grid;
  gap: 1px;
  min-width: 0;
  max-width: none;
  padding: 10px;
  color: #111111;
  background: #fffef3;
  border: 0;
  box-shadow: inset 1px 1px 0 #b9b9b9, inset -1px -1px 0 #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.previous-best-box span,
.previous-best-box em {
  color: #333333;
  font-style: normal;
  overflow-wrap: anywhere;
}

.previous-best-box strong {
  color: #0a246a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scroll-logo-dock {
  display: flex;
  justify-content: center;
  width: min(1480px, 100%);
  margin: 26px auto 0;
  padding: 4px 0 6px;
}

.bottom-logo-button {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  opacity: 0.58;
  transition: opacity 140ms ease, transform 140ms ease;
}

.bottom-logo-button:hover,
.bottom-logo-button:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
}

.footer-pixel-envelope {
  position: relative;
  display: block;
  width: 46px;
  height: 34px;
  background: url("/assets/pixel-envelope.png?v=20260625") center / contain no-repeat;
  image-rendering: pixelated;
}

.bottom-logo-spinner {
  position: relative;
  display: block;
  width: 48px;
  height: 48px;
  perspective: 380px;
  transform-style: preserve-3d;
  animation: bottomLogoSpin 7.5s linear infinite;
}

.bottom-logo-spinner::before,
.bottom-logo-spinner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/rotating-brain-logo.png") center / contain no-repeat;
  transform-style: preserve-3d;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.32));
}

.bottom-logo-spinner::before {
  transform: translateZ(-4px);
  opacity: 0.55;
}

.bottom-logo-spinner::after {
  transform: translateZ(4px);
}

.bottom-logo-spinner img {
  display: none;
}

.admin-message-dialog {
  width: min(760px, calc(100vw - 28px));
  padding: 0;
  color: #111111;
  background: transparent;
  border: 0;
}

.admin-message-dialog::backdrop {
  background: rgba(0, 0, 0, 0.56);
}

.admin-message-card {
  display: grid;
  gap: 0;
  padding: 3px;
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow:
    inset 1px 1px 0 #dfdfdf,
    inset -1px -1px 0 var(--chrome-line),
    6px 6px 0 rgba(0, 0, 0, 0.48);
}

.admin-message-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  padding: 3px 4px 3px 8px;
  color: #ffffff;
  background: linear-gradient(90deg, #0a246a 0%, #0f4bc7 62%, #7eb7ff 100%);
  font-size: 13px;
  font-weight: 900;
  text-shadow: 1px 1px 0 #00133f;
}

.admin-message-titlebar button {
  display: grid;
  place-items: center;
  width: 23px;
  height: 21px;
  min-height: 0;
  padding: 0;
  color: #111111;
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: inset 1px 1px 0 #f8f8f8, inset -1px -1px 0 var(--chrome-line);
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 13px;
  line-height: 1;
  text-transform: uppercase;
}

.admin-message-titlebar button:active {
  border-color: #404040 #ffffff #ffffff #404040;
  box-shadow: inset 1px 1px 0 var(--chrome-line);
}

.admin-message-body {
  display: grid;
  gap: 13px;
  padding: 16px;
  background: var(--chrome);
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
}

.admin-message-type-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.admin-message-type-button {
  width: 100%;
  min-height: 40px;
  padding: 0 8px;
  color: #111111;
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: inset 1px 1px 0 #f8f8f8, inset -1px -1px 0 var(--chrome-line);
  font-size: clamp(11px, 2.6vw, 14px);
  text-transform: lowercase;
}

.admin-message-type-button:hover,
.admin-message-type-button:focus-visible {
  outline: 1px dotted #111111;
  outline-offset: -5px;
}

.admin-message-type-button.selected {
  color: #ffffff;
  background: #0a246a;
  border-color: #404040 #ffffff #ffffff #404040;
  box-shadow: inset 1px 1px 0 #00133f;
  text-shadow: 1px 1px 0 #00133f;
}

.admin-message-textbox {
  min-height: 220px;
  padding: 12px;
  color: #111111;
  background: #ffffff;
  border: 2px solid;
  border-color: #404040 #ffffff #ffffff #404040;
  box-shadow: inset 1px 1px 0 var(--chrome-line);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  outline: none;
  overflow-wrap: anywhere;
  overflow-y: auto;
  white-space: pre-wrap;
}

.admin-message-textbox:empty::before {
  content: attr(data-placeholder);
  color: #777777;
}

.admin-message-attachments {
  min-height: 0;
}

.admin-message-attachment-total {
  margin-bottom: 8px;
  color: #333333;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.admin-message-attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 8px;
}

.admin-message-attachment {
  position: relative;
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 6px;
  background: #ffffff;
  border: 2px solid;
  border-color: #404040 #ffffff #ffffff #404040;
  box-shadow: inset 1px 1px 0 var(--chrome-line);
}

.admin-message-attachment img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid #777777;
}

.admin-message-attachment figcaption {
  color: #111111;
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.admin-message-attachment button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
  color: #ffffff;
  background: #c1121f;
  border: 2px solid;
  border-color: #ffc2c8 #67000a #67000a #ffc2c8;
}

.admin-message-status {
  min-height: 20px;
  margin: -4px 0 0;
  color: #333333;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.admin-message-status[data-tone="error"] {
  color: #b00020;
}

.admin-message-status[data-tone="ok"] {
  color: #0b7a24;
}

.admin-message-actions {
  display: grid;
  grid-template-columns: minmax(96px, 120px) minmax(116px, 160px) minmax(96px, 120px);
  justify-content: center;
  gap: 12px;
  padding-top: 2px;
}

.admin-message-actions .submit-run-button {
  grid-column: 2;
  min-height: 42px;
  color: #ffffff;
  background: #0f9d36;
  border: 2px solid;
  border-color: #8cff9f #064b18 #064b18 #8cff9f;
  box-shadow: 1px 1px 0 #404040;
}

.admin-message-actions .action-red {
  grid-column: 1;
  min-height: 42px;
  color: #ffffff;
  background: #c1121f;
  border: 2px solid;
  border-color: #ffc2c8 #67000a #67000a #ffc2c8;
  box-shadow: 1px 1px 0 #404040;
}

.admin-message-actions .submit-run-button:active,
.admin-message-actions .action-red:active {
  transform: translate(1px, 1px);
  box-shadow: none;
}

.start-flash-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.58);
}

.start-flash-overlay.open {
  display: grid;
}

.start-flash-card {
  display: grid;
  place-items: center;
  min-width: min(420px, 86vw);
  padding: 18px 24px;
  color: #08256f;
  background: var(--cream);
  border: 3px solid;
  border-color: #ffffff #8a8a8a #8a8a8a #ffffff;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.28), inset -2px -2px 0 #b5b5a8, inset 2px 2px 0 #ffffff;
}

.loading-panel {
  display: grid;
  place-items: center;
  align-content: center;
  justify-content: center;
  gap: 10px;
  min-height: 168px;
  text-align: center;
}

.start-flash-loading {
  min-height: 150px;
  padding: 6px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.loading-logo-spinner {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
}

.loading-logo-spinner .bottom-logo-spinner {
  width: 116px;
  height: 116px;
  perspective: 460px;
}

.xp-loading-bar {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2px;
  width: min(584px, 84vw);
  height: 44px;
  padding: 6px;
  background: #fffef3;
  border: 2px solid #111111;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #8d8d8d, 2px 2px 0 #777777;
}

.xp-loading-bar span {
  opacity: 0;
  background: #21bd45;
  border: 1px solid #08721f;
  box-shadow: inset 1px 1px 0 #9cffaa;
  animation: xpLoadingBlock 1.5s steps(1, end) infinite;
}

.xp-loading-bar span:nth-child(1) { animation-delay: 0s; }
.xp-loading-bar span:nth-child(2) { animation-delay: 0.08s; }
.xp-loading-bar span:nth-child(3) { animation-delay: 0.16s; }
.xp-loading-bar span:nth-child(4) { animation-delay: 0.24s; }
.xp-loading-bar span:nth-child(5) { animation-delay: 0.32s; }
.xp-loading-bar span:nth-child(6) { animation-delay: 0.4s; }
.xp-loading-bar span:nth-child(7) { animation-delay: 0.48s; }
.xp-loading-bar span:nth-child(8) { animation-delay: 0.56s; }
.xp-loading-bar span:nth-child(9) { animation-delay: 0.64s; }
.xp-loading-bar span:nth-child(10) { animation-delay: 0.72s; }
.xp-loading-bar span:nth-child(11) { animation-delay: 0.8s; }
.xp-loading-bar span:nth-child(12) { animation-delay: 0.88s; }

.loading-typewriter {
  color: #111111;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  font-weight: 900;
  text-transform: lowercase;
}

.loading-dot {
  opacity: 0;
  animation: loadingDotOne 1.6s steps(1, end) infinite;
}

.loading-dot.dot-2 { animation-name: loadingDotTwo; }
.loading-dot.dot-3 { animation-name: loadingDotThree; }

.arcade-notification-stack {
  position: fixed;
  z-index: 1200;
  left: 50%;
  bottom: 58px;
  display: grid;
  gap: 6px;
  width: min(560px, calc(100vw - 28px));
  pointer-events: none;
  transform: translateX(-50%);
}

.challenge-submit-button {
  color: #ffffff;
  background: linear-gradient(#ff6a54, #c62828);
  border-color: #ffd0c7 #6e1111 #6e1111 #ffe0db;
}

.arcade-notification-stack .arcade-notification:nth-child(n + 4) {
  margin-bottom: -52px;
  opacity: 0.72;
  transform: scale(0.96);
}

.arcade-notification {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 6px 34px 6px 8px;
  color: #111111;
  background: #fffef3;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset 1px 1px 0 #ffffff, 3px 3px 0 rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  animation: arcadeNotificationIn 180ms ease-out both;
}

.arcade-notification.leaving {
  animation: arcadeNotificationOut 3s ease-in forwards;
}

.arcade-notification-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
}

.arcade-notification-icon .achievement-badge {
  transform: scale(1.25);
}

.arcade-notification-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.arcade-notification-copy strong {
  overflow: hidden;
  color: #111111;
  font-size: 13px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arcade-notification-copy span {
  overflow: hidden;
  color: #3b3b3b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arcade-notification-xp {
  color: #008a34;
  font-size: 12px;
  white-space: nowrap;
}

.arcade-notification-close {
  position: absolute;
  top: 3px;
  right: 4px;
  width: 20px;
  min-height: 18px;
  padding: 0;
  font-size: 12px;
  line-height: 14px;
}

.arcade-notification-level-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #ffe24a;
  font: 900 18px Tahoma, Verdana, Arial, sans-serif;
  text-shadow:
    -1px -1px 0 #005cff,
    1px -1px 0 #005cff,
    -1px 1px 0 #005cff,
    1px 1px 0 #005cff;
  animation: arcadeLevelPulse 1s linear 3;
}

.arcade-notification.level-up .arcade-notification-copy strong {
  color: #111111;
  white-space: normal;
}

.arcade-notification-avatar {
  display: block;
  width: 36px;
  height: 36px;
  overflow: hidden;
  background: #d7ebff;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
}

.arcade-notification-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes arcadeNotificationIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes arcadeNotificationOut {
  to {
    opacity: 0;
    transform: translateY(80px);
  }
}

@keyframes arcadeLevelPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(3);
  }
}

@media (max-width: 720px) {
  .arcade-notification-stack .arcade-notification:nth-child(n + 2) {
    margin-bottom: -52px;
    opacity: 0.7;
    transform: scale(0.96);
  }
}

@keyframes xpLoadingBlock {
  0%,
  72% {
    opacity: 1;
  }
  73%,
  100% {
    opacity: 0;
  }
}

@keyframes loadingDotOne {
  0%,
  18.74% {
    opacity: 0;
  }
  18.75%,
  81.24% {
    opacity: 1;
  }
  81.25%,
  100% {
    opacity: 0;
  }
}

@keyframes loadingDotTwo {
  0%,
  37.49% {
    opacity: 0;
  }
  37.5%,
  81.24% {
    opacity: 1;
  }
  81.25%,
  100% {
    opacity: 0;
  }
}

@keyframes loadingDotThree {
  0%,
  56.24% {
    opacity: 0;
  }
  56.25%,
  81.24% {
    opacity: 1;
  }
  81.25%,
  100% {
    opacity: 0;
  }
}

@keyframes bottomLogoSpin {
  from {
    transform: rotateX(-8deg) rotateY(0deg);
  }
  to {
    transform: rotateX(-8deg) rotateY(360deg);
  }
}

.workspace {
  min-width: 0;
  padding-top: 4px;
}

.window,
.window-pane,
dialog {
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: var(--shadow);
}

.window-title,
.pane-title {
  min-height: 30px;
  padding: 5px 9px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--title), var(--title-dark));
  font-weight: 800;
}

.sidebar {
  position: sticky;
  top: 58px;
  align-self: start;
  max-height: calc(100vh - 116px);
  overflow: auto;
}

.game-nav {
  display: grid;
  gap: 3px;
  padding: 8px;
}

.sidebar-logo-link {
  display: grid !important;
  grid-template-columns: none !important;
  place-items: center;
  min-height: 149px !important;
  padding: 10px 0 12px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible;
}

.sidebar-logo-link:hover,
.sidebar-logo-link:focus-visible,
.sidebar-logo-link.active {
  color: inherit;
  background: transparent !important;
  border-color: transparent !important;
  outline: none;
}

.sidebar-logo-scene {
  display: grid;
  width: 142px;
  height: 142px;
  place-items: center;
  perspective: 520px;
  transform-style: preserve-3d;
}

.sidebar-logo-rotator {
  position: relative;
  display: block;
  width: 125px;
  height: 125px;
  transform-style: preserve-3d;
  animation: sidebarLogoSpin 6.5s linear infinite;
}

.sidebar-logo-layer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  backface-visibility: visible;
  transform-style: preserve-3d;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
  image-rendering: auto;
}

@keyframes sidebarLogoSpin {
  from {
    transform: rotateX(-8deg) rotateY(0deg);
  }
  to {
    transform: rotateX(-8deg) rotateY(360deg);
  }
}

.nav-topic {
  display: grid;
  gap: 0;
  position: relative;
}

.nav-topic > summary {
  list-style: none;
  cursor: pointer;
}

.nav-topic > summary::-webkit-details-marker {
  display: none;
}

.nav-topic > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-right: 5px;
  color: #0a246a;
  background: #ffffff;
  border: 1px solid #777;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1;
}

.nav-topic[open] > summary::before {
  content: "-";
}

.game-nav a {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  min-height: 24px;
  padding: 3px 6px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.18;
  overflow-wrap: anywhere;
  width: 100%;
}

.game-nav a:has(.game-status-icon.earned-status) {
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 4px;
}

.game-nav .game-status-icon {
  min-width: 18px;
  min-height: 22px;
}

.game-nav .game-status-icon.earned-status {
  min-width: 22px;
  justify-content: center;
}

.game-nav .game-status-icon b {
  left: 14px;
  bottom: -1px;
}

.game-nav a.nav-primary {
  display: block;
  grid-template-columns: none;
  padding: 6px 8px;
  font-size: 14px;
}

.game-nav a.nav-primary.nav-social-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.game-nav a.nav-primary.nav-bookmarks {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-social-badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-social-badge {
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  color: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 999px;
  box-shadow: 1px 1px 0 #111111;
  font: 900 10px Tahoma, Verdana, Arial, sans-serif;
  line-height: 1;
}

.nav-social-badge.unread {
  background: #d51f2a;
}

.nav-social-badge.challenges {
  background: #005cff;
}

.game-nav a.nav-primary::before,
.game-nav a.nav-primary::after {
  display: none !important;
}

.topics-label {
  margin: 10px 0 2px;
  padding: 4px 8px;
  color: #111111;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.nav-topic-title {
  display: block !important;
  grid-template-columns: none !important;
  min-height: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-topic-title::before,
.nav-topic-title::after {
  display: none !important;
}

.nav-topic > a {
  position: relative;
  margin-left: 48px;
  padding-left: 0;
  width: calc(100% - 48px);
}

.nav-topic > a::before {
  display: none;
}

.nav-topic > a::after {
  content: "";
  position: absolute;
  left: -25px;
  top: -4px;
  width: 17px;
  height: 15px;
  border-left: 2px solid #8a8a8a;
  border-bottom: 2px solid #8a8a8a;
  pointer-events: none;
}

.game-nav > a::before {
  display: none;
}

.game-nav a:hover,
.game-nav a.active {
  background: #0a246a;
  color: #ffffff;
  border-color: #000;
}

.game-title-with-bookmark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.game-title-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.game-bookmark-indicator {
  display: inline-grid;
  flex: 0 0 auto;
  margin-left: auto;
  place-items: center;
}

.game-bookmark-indicator[hidden] {
  display: none !important;
}

.pixel-bookmark-icon {
  display: inline-block;
  position: relative;
  width: 14px;
  height: 18px;
  flex: 0 0 auto;
  background: #fff7cf;
  border: 2px solid #111111;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 73%, 0 100%);
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.8),
    inset -2px 0 0 rgba(0, 0, 0, 0.16),
    1px 1px 0 rgba(0, 0, 0, 0.35);
  image-rendering: pixelated;
}

.pixel-bookmark-icon.saved,
.game-bookmark-indicator.saved .pixel-bookmark-icon {
  background: #d51f2a;
  box-shadow:
    inset 2px 2px 0 rgba(255, 172, 172, 0.75),
    inset -2px 0 0 rgba(80, 0, 0, 0.28),
    1px 1px 0 rgba(0, 0, 0, 0.45);
}

.bookmark-game-button {
  display: inline-grid;
  width: 34px;
  min-width: 46px;
  min-height: 34px;
  place-items: center;
  padding: 4px;
  background: #f5f1dc;
  border: 2px solid;
  border-color: #ffffff #7b7766 #7b7766 #ffffff;
  box-shadow: inset -1px -1px 0 #b8b39d, inset 1px 1px 0 #fffef0;
}

.bookmark-game-button.saved {
  background: #f1d1d1;
}

.bookmark-game-button:hover,
.bookmark-game-button:focus-visible {
  background: #fff9df;
  outline: 1px dotted #111111;
  outline-offset: -4px;
}

.bookmark-game-button.saved:hover,
.bookmark-game-button.saved:focus-visible {
  background: #ffd9d9;
}

.bookmark-submit-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.bookmark-submit-group .submit-run-button {
  margin-left: 0;
}

.game-title-bookmark-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.game-title-bookmark-row h1 {
  flex: 1 1 auto;
  min-width: 0;
}

.game-title-bookmark-row .bookmark-game-button {
  flex: 0 0 auto;
  margin-top: 6px;
}

.nav-group {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  padding: 6px 8px 3px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.nav-topic-title {
  font-size: 13px;
}

.nav-group span {
  justify-self: end;
  color: #0a246a;
  font-family: Consolas, "Courier New", monospace;
}

.nav-subtopic {
  display: grid;
  gap: 2px;
  margin: 2px 0 7px 16px;
}

.nav-subtopic > summary {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  padding: 3px 4px 1px 0;
  list-style: none;
  cursor: pointer;
}

.nav-subtopic > summary::-webkit-details-marker {
  display: none;
}

.nav-subtopic > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 12px;
  height: 12px;
  color: #0a246a;
  background: #ffffff;
  border: 1px solid #777;
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
  line-height: 1;
}

.nav-subtopic[open] > summary::before {
  content: "-";
}

.nav-subtopic-label {
  color: #4b4b4b;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-subtopic-count {
  justify-self: end;
  color: #0a246a;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  font-weight: 900;
}

.game-nav .nav-topic[class*="topic-"],
.game-nav .nav-game-link[class*="topic-"],
.featured-browser-tree a[class*="topic-"] {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  text-shadow: none;
}

.game-nav .nav-game-link[class*="topic-"]:hover,
.game-nav .nav-game-link[class*="topic-"].active,
.featured-browser-tree a[class*="topic-"]:hover,
.featured-browser-tree a[class*="topic-"]:focus-visible {
  color: #ffffff;
  background: #0a246a;
  border-color: #000000;
}

.auth-panel {
  display: grid;
  gap: 7px;
  margin: 8px;
  padding: 8px;
  background: #f7f7f7;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #404040;
}

.auth-name {
  overflow-wrap: anywhere;
  color: #0a246a;
  font-size: 12px;
  font-weight: 900;
}

.auth-name-link {
  text-decoration: none;
}

.auth-name-link:hover,
.auth-name-link:focus-visible {
  text-decoration: underline;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.auth-actions button,
.auth-actions .button-link {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.auth-bookmarks-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-bookmarks-link .pixel-bookmark-icon {
  width: 11px;
  height: 15px;
}

.main-window {
  min-height: calc(100vh - 98px);
  margin-top: 4px;
}

.catalog-layout,
.rank-game > .game-grid,
.state-layout,
.empty-panel {
  padding: 12px;
}

.hero-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 92px;
  padding: 18px;
  background: linear-gradient(#f7f7f7, #ece9d8 62%, #d6d3c5);
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset -1px -1px 0 #9b9b9b, inset 1px 1px 0 #ffffff;
  text-align: center;
}

.hero-panel h1 {
  margin: 0;
  color: #0a246a;
  text-shadow: 1px 1px 0 #ffffff;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 0.95;
  font-weight: 900;
}

.hero-panel .window-icon {
  width: 42px;
  height: 42px;
}

.hero-panel .hero-brain-mark {
  width: 46px;
  height: 46px;
}

.primary {
  color: #ffffff;
  background: var(--title);
  border-color: #7fb1ff #001d78 #001d78 #7fb1ff;
}

.catalog-tabs {
  margin-top: 12px;
}

.catalog-topic-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  background: #d6d3c5;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
}

.catalog-topic-bar label {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.catalog-topic-bar select {
  min-height: 34px;
  min-width: min(280px, 100%);
  padding: 4px 30px 4px 8px;
  color: var(--ink);
  background: #ffffff;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  border-radius: 0;
  box-shadow: inset 1px 1px 0 #404040;
  font-weight: 800;
}

.catalog-topic-groups {
  display: grid;
  gap: 3px;
  padding: 8px;
  background: #f2efdf;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #6f6f6f;
}

.catalog-tabs > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.catalog-tab-list {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: end;
  gap: 2px;
  padding: 4px 10px 0;
  min-width: 0;
  width: 100%;
  overflow: visible;
}

.catalog-tab-list label {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 42px;
  padding: 8px 5px 7px;
  color: var(--ink);
  background: #d6d3c5;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) transparent #ffffff;
  border-radius: 4px 4px 0 0;
  box-shadow: inset 1px 1px 0 #ffffff;
  cursor: pointer;
  font-size: clamp(8px, 0.9vw, 13px);
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateY(4px);
  transition: transform 120ms ease;
}

.catalog-tab-list label.catalog-search-tab-label {
  flex: 0 0 54px;
  display: grid;
  min-height: 50px;
  place-items: center;
  padding: 1px 4px 3px;
}

.catalog-search-tab-icon {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  transform: translateY(-5px);
}

.catalog-search-tab-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  background:
    linear-gradient(#ffffff, #ffffff) 6px 4px / 7px 3px no-repeat,
    #68a8ff;
  border: 4px solid #111111;
  border-radius: 50%;
  box-shadow:
    inset 1px 1px 0 #d8ecff,
    2px 2px 0 #d69c00;
}

.catalog-search-tab-icon::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 23px;
  width: 13px;
  height: 5px;
  background: #111111;
  transform: rotate(45deg);
  transform-origin: left center;
  box-shadow: 2px 2px 0 #d69c00;
}

.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;
}

#catalogTopNTab:checked ~ .catalog-tab-list label[for="catalogTopNTab"],
#catalogFeaturedTab:checked ~ .catalog-tab-list label[for="catalogFeaturedTab"],
#catalogListTab:checked ~ .catalog-tab-list label[for="catalogListTab"],
#catalogOverUnderTab:checked ~ .catalog-tab-list label[for="catalogOverUnderTab"],
#catalogTopicTab:checked ~ .catalog-tab-list label[for="catalogTopicTab"],
#catalogLeaderboardsTab:checked ~ .catalog-tab-list label[for="catalogLeaderboardsTab"],
#catalogSearchTab:checked ~ .catalog-tab-list label[for="catalogSearchTab"] {
  z-index: 2;
  margin-bottom: 0;
  padding-top: 8px;
  color: #0a246a;
  background: var(--chrome);
  border-bottom-color: var(--chrome);
  overflow: visible;
  transform: translateY(0);
}

#catalogTopNTab:checked ~ .catalog-tab-list label[for="catalogTopNTab"]::after,
#catalogFeaturedTab:checked ~ .catalog-tab-list label[for="catalogFeaturedTab"]::after,
#catalogListTab:checked ~ .catalog-tab-list label[for="catalogListTab"]::after,
#catalogOverUnderTab:checked ~ .catalog-tab-list label[for="catalogOverUnderTab"]::after,
#catalogTopicTab:checked ~ .catalog-tab-list label[for="catalogTopicTab"]::after,
#catalogLeaderboardsTab:checked ~ .catalog-tab-list label[for="catalogLeaderboardsTab"]::after,
#catalogSearchTab:checked ~ .catalog-tab-list label[for="catalogSearchTab"]::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -2px;
  box-sizing: border-box;
  height: 4px;
  background: var(--chrome);
  border-right: 0;
  border-left: 0;
  pointer-events: none;
}

#catalogSearchTab:checked ~ .catalog-tab-list label[for="catalogSearchTab"] {
  padding: 1px 4px 3px;
}

.catalog-tab-panel {
  display: none;
  position: relative;
  z-index: 1;
  padding: 14px;
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  min-width: 0;
  overflow: hidden;
}

#catalogTopNTab:checked ~ .catalog-top-n-panel,
#catalogFeaturedTab:checked ~ .catalog-featured-panel,
#catalogListTab:checked ~ .catalog-list-panel,
#catalogOverUnderTab:checked ~ .catalog-over-under-panel,
#catalogTopicTab:checked ~ .catalog-topic-panel,
#catalogLeaderboardsTab:checked ~ .catalog-leaderboards-panel,
#catalogSearchTab:checked ~ .catalog-search-panel {
  display: block;
}

.catalog-search-panel-inner {
  display: grid;
  gap: 12px;
}

.catalog-search-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  padding: 10px;
  background: #d6d3c5;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
}

.catalog-search-toggle {
  display: flex;
  gap: 3px;
}

.catalog-search-toggle button {
  min-height: 34px;
  padding: 4px 12px;
  color: var(--ink);
  background: #c7c3b3;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  border-radius: 0;
  font-weight: 900;
}

.catalog-search-toggle button.active {
  color: #ffffff;
  background: #0a246a;
  border-color: #7fb1ff #001d78 #001d78 #7fb1ff;
}

.catalog-global-search {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.catalog-global-search span {
  color: #111111;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.catalog-global-search input {
  width: 100%;
  min-height: 36px;
  padding: 6px 9px;
  color: var(--ink);
  background: #ffffff;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  border-radius: 0;
  box-shadow: inset 1px 1px 0 #404040;
  font-weight: 800;
}

.catalog-search-results {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 6px;
  min-height: 260px;
  padding: 8px;
  background: #f2efdf;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #6f6f6f;
}

.catalog-search-result {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  padding: 8px;
  color: #111111;
  background: #f2efdf;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  text-decoration: none;
}

.catalog-search-result:hover,
.catalog-search-result:focus-visible {
  color: #ffffff;
  background: #0a246a;
  outline: none;
}

.catalog-search-result strong,
.catalog-search-result span,
.catalog-search-result em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.catalog-search-result strong {
  grid-column: 2;
  font-size: 15px;
  line-height: 1.15;
}

.catalog-search-result > span:not(.catalog-search-result-icon):not(.catalog-search-avatar) {
  grid-column: 2;
  color: inherit;
  font-size: 12px;
  font-weight: 900;
}

.catalog-search-result em {
  grid-column: 2;
  color: inherit;
  font-size: 12px;
  font-style: normal;
  opacity: 0.82;
}

.catalog-search-result-icon,
.catalog-search-avatar {
  grid-row: 1 / span 3;
  grid-column: 1;
}

.catalog-search-avatar {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  overflow: hidden;
  color: #ffffff;
  background: #0a246a;
  border: 1px solid #111111;
  font-size: 12px;
  font-weight: 900;
}

.catalog-search-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-search-result {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 3px 10px;
  min-height: 58px;
  padding: 6px 8px;
}

.user-search-result .catalog-search-avatar {
  grid-row: 1 / span 3;
  width: 44px;
  height: 44px;
  align-self: center;
  border-width: 2px;
  box-shadow: 1px 1px 0 #ffffff;
  font-size: 19px;
}

.user-search-result strong {
  grid-column: 2;
  align-self: end;
}

.catalog-search-result > .user-search-level {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  padding: 2px 5px;
  color: #ffffff;
  background: #0a246a;
  border: 1px solid;
  border-color: #ffffff #111111 #111111 #ffffff;
  white-space: nowrap;
  font-size: 11px;
}

.catalog-search-result:hover > .user-search-level,
.catalog-search-result:focus-visible > .user-search-level {
  color: #0a246a;
  background: #ffffff;
}

.catalog-search-result > .user-search-awards {
  grid-column: 2 / span 2;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  font-size: 12px;
}

.user-search-award {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.user-search-award .achievement-badge {
  width: 16px;
  height: 16px;
}

.user-search-award .achievement-badge.crown {
  height: 15px;
}

.user-search-award b {
  font-size: 12px;
  line-height: 1;
}

.catalog-search-result > .empty-awards {
  opacity: 0.82;
}

.user-search-result em {
  grid-column: 2 / span 2;
}

.user-search-result {
  grid-template-columns: 54px minmax(0, 1fr) minmax(max-content, auto);
  align-items: center;
  min-height: 64px;
  padding: 8px 10px;
  gap: 4px 10px;
}

.user-search-result strong {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  font-size: 15px;
}

.user-search-result > .user-search-level {
  grid-column: 3;
  grid-row: 1;
  align-self: end;
  justify-self: end;
}

.user-search-result > .user-search-awards {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  justify-self: start;
  font-size: 11px;
}

.user-search-result em {
  grid-column: 3;
  grid-row: 2;
  align-self: start;
  justify-self: end;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .user-search-result {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .user-search-result > .user-search-level,
  .user-search-result em {
    grid-column: 2;
    justify-self: start;
  }

  .user-search-result > .user-search-level {
    grid-row: 2;
  }

  .user-search-result > .user-search-awards {
    grid-row: 3;
  }

  .user-search-result em {
    grid-row: 4;
    white-space: normal;
  }
}

.catalog-search-empty {
  display: grid;
  min-height: 140px;
  place-items: center;
  color: #555555;
  background: #f2efdf;
  font-size: 16px;
  font-weight: 900;
}

.catalog-tab-description {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
  padding: 10px 12px;
  color: #0a246a;
  background: #f6f1cf;
  border: 2px solid;
  border-color: #ffffff #b19700 #b19700 #ffffff;
  box-shadow: inset 1px 1px 0 #fff7b2;
  font-weight: 900;
}

.catalog-tab-description strong {
  font-size: 18px;
  text-transform: uppercase;
}

.catalog-tab-description span,
.catalog-tab-description em {
  font-size: 14px;
  font-style: normal;
}

.catalog-leaderboard-host {
  margin-bottom: 14px;
}

.catalog-leaderboard-loading {
  padding: 18px;
  color: #0a246a;
  background: #f2efdf;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  font-weight: 900;
}

.catalog-leaderboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.catalog-leaderboard-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 8px;
  min-width: 0;
  aspect-ratio: auto;
  padding: 10px;
  background: #f2efdf;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #9f9f9f;
}

.catalog-leaderboard-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 28px 28px;
  gap: 8px;
  align-items: end;
}

.catalog-leaderboard-card h3,
.catalog-leaderboard-card p {
  margin: 0;
}

.catalog-leaderboard-card h3 {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #0a246a;
  font-size: 16px;
  line-height: 1.05;
  text-transform: uppercase;
}

.catalog-leaderboard-title-badge {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  transform: translateY(1px);
}

.catalog-leaderboard-card p {
  margin-top: 3px;
  color: #3b3b3b;
  font-size: 11px;
  font-weight: 900;
}

.catalog-leaderboard-expand {
  z-index: 3;
  align-self: end;
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  min-height: 0;
  line-height: 20px;
  font-size: 18px;
  font-weight: 900;
}

.catalog-leaderboard-popout-button {
  color: #111111;
  font-size: 0;
  line-height: 1;
  background:
    var(--chrome)
    url("/assets/leaderboard-popout-icon.svg")
    center / 21px 21px
    no-repeat;
}

.catalog-leaderboard-card.collapsed {
  min-height: 0;
}

.catalog-search-control {
  display: grid;
  grid-template-columns: 25px minmax(74px, 106px);
  align-items: center;
  gap: 6px;
  margin: 0;
}

.catalog-search-control input,
.catalog-leaderboard-filters select,
.xp-select-button {
  min-width: 0;
  width: 100%;
  min-height: 26px;
  padding: 2px 5px;
  color: #111111;
  background: #ffffff;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  border-radius: 0;
  font-size: 11px;
  font-weight: 800;
  appearance: none;
}

.pixel-magnifier {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}

.pixel-magnifier::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 13px;
  height: 13px;
  background:
    linear-gradient(#ffffff, #ffffff) 4px 3px / 5px 2px no-repeat,
    #68a8ff;
  border: 3px solid #111111;
  border-radius: 50%;
  box-shadow: inset 1px 1px 0 #d8ecff;
}

.pixel-magnifier::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 16px;
  width: 10px;
  height: 4px;
  background: #111111;
  transform: rotate(45deg);
  transform-origin: left center;
  box-shadow: 1px 1px 0 #7b4b00;
}

.catalog-leaderboard-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.catalog-leaderboard-filters label {
  display: grid;
  gap: 2px;
  color: #0a246a;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.xp-select-label {
  position: relative;
  min-width: 0;
}

.xp-select {
  position: relative;
  display: block;
  min-width: 0;
}

.xp-select-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  box-sizing: border-box;
  height: 28px;
  min-height: 28px;
  padding: 0 0 0 6px;
  padding-right: 0;
  text-align: left;
  cursor: pointer;
}

.xp-select-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xp-select-button::after {
  content: "";
  display: block;
  width: 24px;
  height: 100%;
  box-sizing: border-box;
  border-left: 1px solid #9f9f9f;
  background:
    linear-gradient(45deg, transparent 49%, #111111 50% 64%, transparent 65%) 8px 10px / 7px 7px no-repeat,
    linear-gradient(-45deg, transparent 49%, #111111 50% 64%, transparent 65%) 13px 10px / 7px 7px no-repeat,
    #ece9d8;
}

.xp-select:focus-within .xp-select-menu,
.xp-select:hover .xp-select-menu {
  display: grid;
}

.xp-select-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 1px);
  left: 0;
  right: 0;
  display: none;
  max-height: 220px;
  overflow: auto;
  padding: 2px;
  background: #f2efdf;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.28);
}

.xp-select-option {
  min-height: 22px;
  padding: 3px 8px;
  color: #111111;
  background: transparent;
  border: 0;
  border-radius: 0;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
}

.xp-select-option:hover,
.xp-select-option:focus-visible,
.xp-select-option.selected {
  color: #ffffff;
  background: #0a246a;
  outline: none;
}

.catalog-mode-button-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 3px;
  color: #0a246a;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.catalog-mode-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.catalog-mode-search-control {
  grid-template-columns: 24px minmax(72px, 128px);
  margin: 0;
}

.catalog-mode-buttons {
  display: flex;
  gap: 4px;
  min-width: 0;
  overflow: auto;
  padding: 3px;
  background: #d6d3c5;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
}

.catalog-mode-empty {
  padding: 8px 10px;
  color: #4b4b4b;
  background: #f2efdf;
  border: 1px solid #9f9f9f;
}

.catalog-mode-option {
  display: grid;
  flex: 0 0 min(240px, 78vw);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 900;
  text-align: left;
}

.catalog-mode-option b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-mode-option small {
  padding: 1px 4px;
  color: #0a246a;
  background: #ffffff;
  border: 1px solid #808080;
  font-size: 10px;
  font-weight: 900;
}

.catalog-mode-option.selected,
.catalog-mode-option:hover,
.catalog-mode-option:focus-visible {
  color: #ffffff;
  background: #0a246a;
  border-color: #7fb1ff #001d78 #001d78 #7fb1ff;
}

.catalog-mode-option.selected small,
.catalog-mode-option:hover small,
.catalog-mode-option:focus-visible small {
  color: #111111;
  background: #fff06a;
}

.catalog-leaderboard-list {
  min-height: 0;
  width: calc(100% - 10px);
  max-height: 176px;
  margin-right: 10px;
  margin-bottom: 4px;
  overflow: auto;
  background: #f2efdf;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #6f6f6f, 4px 4px 0 rgba(0, 0, 0, 0.28);
}

.catalog-leaderboard-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) minmax(56px, 82px);
  gap: 6px;
  align-items: center;
  min-height: 30px;
  padding: 4px 6px;
  border-bottom: 1px solid #d6d3c5;
  color: #111111;
  background: #f8f6e9;
  font-size: 12px;
  font-weight: 900;
}

.catalog-leaderboard-row.viewer-row {
  background: #fff06a;
  box-shadow: inset 0 0 0 2px #b19700;
}

.catalog-leaderboard-row > span:first-child {
  color: #0a246a;
}

.catalog-leaderboard-row a,
.catalog-leaderboard-row > span:nth-child(2) {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #111111;
  text-decoration: none;
}

.catalog-leaderboard-row a span:last-child,
.catalog-leaderboard-row > span:nth-child(2) span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-leaderboard-row strong {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}

.catalog-leaderboard-row .country-flag {
  width: 34px;
  height: 24px;
  padding: 2px;
}

.catalog-leaderboard-empty {
  padding: 14px;
  color: #3b3b3b;
  background: #f2efdf;
  font-weight: 900;
}

.catalog-leaderboard-dialog {
  width: min(1040px, calc(100vw - 24px));
  max-height: min(840px, calc(100vh - 24px));
  padding: 0;
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
}

.catalog-leaderboard-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.catalog-leaderboard-popout {
  display: grid;
  gap: 0;
  padding: 0;
}

.catalog-popout-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.catalog-popout-head h2,
.catalog-popout-head p {
  margin: 0;
}

.catalog-leaderboard-popout .catalog-leaderboard-card {
  aspect-ratio: auto;
  min-height: min(680px, calc(100vh - 150px));
  border: 0;
  box-shadow: none;
}

.catalog-leaderboard-popout .catalog-leaderboard-list {
  max-height: min(560px, calc(100vh - 270px));
}

.catalog-leaderboard-expanded-close {
  align-self: end;
  min-height: 28px;
  padding: 4px 10px;
}

.featured-browser {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-height: 420px;
  min-width: 0;
}

.ranked-browser {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.featured-browser-sidebar,
.featured-browser-main {
  min-width: 0;
  background: #f2efdf;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #6f6f6f;
}

.featured-browser-sidebar {
  padding: 8px;
}

.featured-browser-sidebar h2,
.featured-browser-main h2 {
  margin: 0 0 8px;
  padding: 6px 8px;
  color: #ffffff;
  background: var(--title);
  font-size: 16px;
}

.featured-browser-tree {
  display: grid;
  gap: 2px;
}

.featured-browser-tree a {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: 27px;
  padding: 3px 6px;
  color: #111111;
  text-decoration: none;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.featured-browser-tree a:hover,
.featured-browser-tree a:focus-visible {
  color: #ffffff;
  background: #0a246a;
}

.featured-browser-main {
  padding: 8px;
}

.featured-only .catalog-topic-groups,
.catalog-top-n-panel .catalog-topic-groups,
.catalog-list-panel .catalog-topic-groups,
.catalog-leaderboards-panel .catalog-topic-groups,
.catalog-over-under-panel .catalog-topic-groups {
  padding: 8px;
  background: #f2efdf;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #9f9f9f, inset -1px -1px 0 #ffffff;
}

.ranked-browser-main,
.catalog-topic-groups,
.catalog-grid,
.catalog-subtopic-groups {
  min-width: 0;
}

.featured-only .featured-grid,
.over-under-flat-grid {
  padding: 8px;
  background: #f2efdf;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #9f9f9f, inset -1px -1px 0 #ffffff;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 10px;
  min-width: 0;
}

.catalog-card {
  display: grid;
  grid-template-columns: 18px minmax(0, 1.1fr) minmax(82px, auto) minmax(0, 1.2fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 28px;
  padding: 5px 8px;
  color: #111111;
  background: #f2efdf;
  border: 1px solid transparent;
  box-shadow: none;
  text-decoration: none;
  text-shadow: none;
}

.catalog-card:has(.game-status-icon.earned-status) {
  grid-template-columns: 30px minmax(0, 1.1fr) minmax(82px, auto) minmax(0, 1.2fr);
}

.game-xp-floating,
.game-xp-inline {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 22px;
  padding: 1px 5px;
  color: #0a246a;
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset 1px 1px 0 #f7f7f7;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.game-xp-floating:hover,
.game-xp-floating:focus-visible,
.game-xp-inline:hover,
.game-xp-inline:focus-visible {
  color: #ffffff;
  background: #0a246a;
  outline: 1px dotted #ffffff;
  outline-offset: -3px;
}

.game-xp-inline {
  flex: 0 0 auto;
  margin-right: 2px;
}

.game-xp-floating {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
}

.catalog-card:hover,
.catalog-card:focus-visible {
  color: #ffffff;
  background: #0a246a;
  border-color: #0a246a;
  outline: 1px dotted #ffffff;
  outline-offset: -3px;
}

.catalog-card:hover *,
.catalog-card:focus-visible * {
  color: #ffffff;
}

.catalog-file-icon,
.game-status-icon {
  justify-self: center;
  align-self: center;
}

.catalog-file-icon.topic-dot {
  width: 14px;
  height: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0 28%, transparent 28%),
    var(--topic-color, #d8c342);
  border: 2px solid #111111;
  border-radius: 50%;
  box-shadow:
    inset -2px -2px 0 rgba(0, 0, 0, 0.18),
    inset 1px 1px 0 rgba(255, 255, 255, 0.75);
  image-rendering: pixelated;
}

.game-status-icon {
  display: inline-flex;
  position: relative;
  min-width: 24px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
}

.game-status-icon.earned-status {
  min-width: 30px;
  justify-content: flex-start;
}

.game-status-icon.played-status .topic-dot {
  filter: hue-rotate(18deg) saturate(1.2) brightness(1.05);
  box-shadow:
    0 0 0 1px rgba(10, 36, 106, 0.35),
    inset -2px -2px 0 rgba(0, 0, 0, 0.2),
    inset 1px 1px 0 rgba(255, 255, 255, 0.8);
}

.game-status-icon.list-count-status {
  min-width: 22px;
  height: 18px;
  padding: 0 3px;
  color: #0a246a;
  background: #f7f2c6;
  border: 2px solid #111111;
  border-radius: 3px;
  box-shadow:
    inset -2px -2px 0 rgba(0, 0, 0, 0.18),
    inset 1px 1px 0 rgba(255, 255, 255, 0.8);
  font: 900 10px Consolas, "Courier New", monospace;
  line-height: 14px;
}

.game-status-icon .achievement-badge {
  filter: none;
  flex: 0 0 auto;
}

.game-status-icon .achievement-badge.check,
.game-status-icon .achievement-badge.greenCheck {
  --badge-color: #009b3a;
  color: #009b3a;
}

.game-status-icon .achievement-badge.goldCheck {
  --badge-color: #f6c400;
  color: #f6c400;
}

.game-status-icon .achievement-badge.goldStar {
  --badge-color: #f6c400;
}

.game-status-icon .achievement-badge.redStar {
  --badge-color: #c62828;
}

.game-status-icon b {
  position: absolute;
  left: 20px;
  bottom: -2px;
  min-width: 11px;
  padding: 0 2px;
  color: #ffffff;
  background: #0a246a;
  border: 1px solid #ffffff;
  font: 900 9px Consolas, "Courier New", monospace;
  line-height: 1.1;
}

.catalog-card .catalog-file-mode,
.catalog-section-header span,
.eyebrow,
.source-chip,
.stat-grid span {
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.catalog-card strong {
  display: flex;
  min-width: 0;
  overflow: hidden;
  color: #111111;
  font-size: 13px;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-shadow: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.catalog-card strong .game-title-with-bookmark,
.catalog-search-result strong .game-title-with-bookmark,
.category-game-main strong .game-title-with-bookmark {
  width: 100%;
}

.catalog-card em {
  min-width: 0;
  overflow: hidden;
  color: #555555;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
}

.catalog-card .catalog-file-mode {
  min-width: 0;
  overflow: hidden;
  color: #4b4b4b;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
}

.featured-grid .catalog-card {
  grid-template-columns: 30px minmax(0, 1.2fr) minmax(0, 1fr);
  height: 74px;
  min-height: 74px;
  padding: 10px 12px;
  border-width: 2px;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.45),
    inset -2px -2px 0 rgba(0, 0, 0, 0.25),
    2px 2px 0 rgba(0, 0, 0, 0.28);
  color: #ffffff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.75);
}

.featured-grid .catalog-card.topic-economy,
.featured-grid .catalog-card.topic-population,
.featured-grid .catalog-card.topic-military,
.featured-grid .catalog-card.topic-health,
.featured-grid .catalog-card.topic-society,
.featured-grid .catalog-card.topic-resources,
.featured-grid .catalog-card.topic-energy,
.featured-grid .catalog-card.topic-climate,
.featured-grid .catalog-card.topic-rights,
.featured-grid .catalog-card.topic-olympics,
.featured-grid .catalog-card.topic-land,
.featured-grid .catalog-card.topic-strategic,
.featured-grid .catalog-card.topic-nobel,
.featured-grid .catalog-card.topic-architecture,
.featured-grid .catalog-card.topic-close,
.featured-grid .catalog-card.topic-science,
.featured-grid .catalog-card.topic-history {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--topic-color) 82%, #ffffff 18%),
    color-mix(in srgb, var(--topic-color) 78%, #111111 22%)
  );
  border-color:
    color-mix(in srgb, var(--topic-color) 30%, #ffffff 70%)
    color-mix(in srgb, var(--topic-color) 55%, #111111 45%)
    color-mix(in srgb, var(--topic-color) 55%, #111111 45%)
    color-mix(in srgb, var(--topic-color) 30%, #ffffff 70%);
}

.featured-grid .catalog-card strong {
  color: #ffffff;
  font-size: 14px;
  line-height: 1.08;
  overflow: visible;
  overflow-wrap: normal;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
}

.featured-grid .catalog-card .game-bookmark-indicator .pixel-bookmark-icon,
.catalog-card:hover .game-bookmark-indicator .pixel-bookmark-icon,
.catalog-card:focus-visible .game-bookmark-indicator .pixel-bookmark-icon,
.game-nav a:hover .game-bookmark-indicator .pixel-bookmark-icon,
.game-nav a.active .game-bookmark-indicator .pixel-bookmark-icon {
  border-color: #ffffff;
}

.featured-grid .catalog-card em {
  color: #fff6a8;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  overflow: visible;
  overflow-wrap: normal;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
}

.featured-grid .catalog-card .catalog-file-mode {
  display: none;
  color: #fff6a8;
  font-size: 11px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
}

.featured-grid .catalog-card:hover,
.featured-grid .catalog-card:focus-visible {
  color: #ffffff;
  background: #0a246a;
}

@media (max-width: 720px) {
  .catalog-leaderboard-grid {
    grid-template-columns: 1fr;
  }

  .catalog-leaderboard-card:not(.collapsed) {
    aspect-ratio: auto;
    min-height: 380px;
  }

  .catalog-leaderboard-card header,
  .catalog-popout-head {
    display: grid;
  }

  .catalog-search-control {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .catalog-leaderboard-filters {
    grid-template-columns: 1fr;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .featured-grid .catalog-card {
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
  }

  .featured-grid .catalog-card strong,
  .featured-grid .catalog-card em,
  .featured-grid .catalog-card .catalog-file-mode {
    grid-column: 2;
    width: 100%;
  }
}

.catalog-topic-section {
  display: grid;
  gap: 0;
  margin-bottom: 1px;
}

.catalog-topic-section[hidden] {
  display: none;
}

.catalog-topic-section > summary {
  position: relative;
  list-style: none;
  cursor: pointer;
}

.catalog-topic-section > summary::-webkit-details-marker {
  display: none;
}

.catalog-topic-section > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  margin-right: 6px;
  color: #111111;
  background: #ffffff;
  border: 1px solid #6f6f6f;
  text-shadow: none;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1;
}

.catalog-topic-section[open] > summary::before {
  content: "-";
}

.catalog-topic-section:last-child {
  margin-bottom: 0;
}

.bookmarked-games-page .bookmarks-header h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
}

.bookmarked-games-page .bookmarks-header .pixel-bookmark-icon {
  width: 0.72em;
  height: 1em;
}

.bookmarked-games-page .bookmarks-header {
  color: #ffffff;
  background: linear-gradient(90deg, var(--title), var(--title-dark));
  border-color: #ffffff #6f6f6f #6f6f6f #ffffff;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.65), 4px 4px 0 rgba(0, 0, 0, 0.22);
}

.bookmarked-games-page .bookmarks-header p {
  color: #ffffff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
}

.bookmarked-games-page .bookmarks-empty-state {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: clamp(260px, 42vh, 520px);
  text-align: center;
}

.bookmarked-games-page .bookmarks-empty-state h1 {
  margin: 0;
  max-width: 900px;
}

.bookmarked-games-page .bookmarks-empty-state p {
  max-width: 560px;
  margin: 12px 0 0;
}

.bookmarked-games-page .bookmarks-auth-empty .submit-run-button {
  margin-top: 18px;
}

.bookmarks-dialog {
  width: min(860px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  color: var(--ink);
  overflow: auto;
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.34);
}

.bookmarks-dialog[open] {
  top: 44px;
  right: 12px;
  left: auto;
  margin: 0;
}

.bookmarks-dialog::backdrop {
  background: rgba(0, 0, 0, 0.22);
}

.bookmarks-dialog-window {
  margin: 0;
  outline: 0;
}

.bookmarks-dialog-body {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: var(--chrome);
  border-top: 2px solid #ffffff;
}

.bookmarks-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  background: #f6f3e8;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
}

.bookmarks-dialog-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #0a246a;
  font-size: 22px;
  line-height: 1;
  text-transform: uppercase;
}

.bookmarks-dialog-header p {
  margin: 4px 0 0;
  color: #4c4c4c;
  font-size: 12px;
  font-weight: 900;
}

.bookmarks-dialog-results {
  max-height: min(62vh, 640px);
  overflow: auto;
  padding: 8px;
  background: #ece9d8;
  border: 2px inset #ffffff;
}

.bookmarks-dialog-list {
  display: grid;
  gap: 7px;
}

.bookmarks-dialog-list-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 3px 8px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  color: #111111;
  background: #fffef3;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  text-decoration: none;
}

.bookmarks-dialog-list-item:hover,
.bookmarks-dialog-list-item:focus-visible {
  color: #ffffff;
  background: #0a246a;
  outline: none;
}

.bookmarks-dialog-list-item .game-status-icon {
  grid-row: 1 / span 3;
}

.bookmarks-dialog-list-item strong,
.bookmarks-dialog-list-item span,
.bookmarks-dialog-list-item em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bookmarks-dialog-list-item strong {
  grid-column: 2 / 4;
  font-size: 15px;
  line-height: 1.12;
}

.bookmarks-dialog-list-item > span:not(.game-status-icon) {
  grid-column: 2;
  color: inherit;
  font-size: 12px;
  font-weight: 900;
}

.bookmarks-dialog-list-item em {
  grid-column: 2 / 4;
  color: inherit;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  opacity: 0.82;
}

.bookmarks-dialog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.catalog-section-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 26px;
  padding: 3px 7px;
  color: #111111;
  background: #ffffff;
  border: 1px solid transparent;
  box-shadow: none;
  text-shadow: none;
}

.catalog-section-header:hover {
  background: #e8efff;
  border-color: #b9c9e8;
}

.catalog-section-header h2 {
  margin: 0;
  color: #111111;
  font-size: 16px;
  line-height: 1;
}

.catalog-section-header span {
  flex: 0 0 auto;
  margin-left: auto;
  color: #4b4b4b;
  opacity: 1;
}

.catalog-topic-section .catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-left: 24px;
  padding-left: 8px;
  border-left: 1px dotted #777777;
}

.catalog-subtopic-groups {
  display: grid;
  gap: 0;
  margin-left: 24px;
  padding-left: 8px;
  border-left: 1px dotted #777777;
}

.catalog-subtopic-section {
  margin: 0;
}

.catalog-subtopic-section > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 25px;
  padding: 2px 7px;
  list-style: none;
  cursor: pointer;
  color: #111111;
  background: #ffffff;
  border: 1px solid transparent;
}

.catalog-subtopic-section > summary::-webkit-details-marker {
  display: none;
}

.catalog-subtopic-section > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  color: #111111;
  background: #ffffff;
  border: 1px solid #6f6f6f;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1;
}

.catalog-subtopic-section[open] > summary::before {
  content: "-";
}

.catalog-subtopic-section > summary:hover {
  background: #e8efff;
  border-color: #b9c9e8;
}

.catalog-subsection-header span {
  font-size: 13px;
  font-weight: 900;
}

.catalog-subsection-header b {
  margin-left: auto;
  color: #4b4b4b;
  font-size: 12px;
}

.catalog-subtopic-section .catalog-grid {
  margin-left: 24px;
}

.catalog-over-under-panel .catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 8px;
  background: #f2efdf;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #9f9f9f, inset -1px -1px 0 #ffffff;
}

.topic-economy {
  --topic-color: #00845b;
  background: linear-gradient(#25b57b, #006742);
  border-color: #d9fff0 #003c25 #003c25 #d9fff0;
}

.topic-population {
  --topic-color: #1e56f0;
  background: linear-gradient(#54a3ff, #123bbb);
  border-color: #dcecff #071f76 #071f76 #dcecff;
}

.topic-military {
  --topic-color: #59651f;
  background: linear-gradient(#8a9438, #3e4511);
  border-color: #f1f8a6 #222900 #222900 #f1f8a6;
}

.topic-health {
  --topic-color: #d62246;
  background: linear-gradient(#ff6677, #a70f2f);
  border-color: #ffdce1 #610719 #610719 #ffdce1;
}

.topic-society {
  --topic-color: #7847d6;
  background: linear-gradient(#9b70f0, #4d22a6);
  border-color: #eadfff #2d0f6a #2d0f6a #eadfff;
}

.topic-resources {
  --topic-color: #9a6a12;
  background: linear-gradient(#c98d23, #6d4608);
  border-color: #fff1be #3d2500 #3d2500 #fff1be;
}

.topic-energy {
  --topic-color: #f08a00;
  background: linear-gradient(#ffc037, #b65e00);
  border-color: #fff0c9 #723400 #723400 #fff0c9;
}

.topic-climate {
  --topic-color: #009ca6;
  background: linear-gradient(#45d0d0, #006874);
  border-color: #d8ffff #003c43 #003c43 #d8ffff;
}

.topic-rights {
  --topic-color: #b51d67;
  background: linear-gradient(#e95a9c, #801049);
  border-color: #ffd7eb #4d0528 #4d0528 #ffd7eb;
}

.topic-olympics {
  --topic-color: #ee5d16;
  background: linear-gradient(#ff8642, #b93a05);
  border-color: #ffe2ce #701d00 #701d00 #ffe2ce;
}

.topic-land {
  --topic-color: #2f8f2f;
  background: linear-gradient(#62ba4a, #1c671f);
  border-color: #e1ffd8 #0b3c0f #0b3c0f #e1ffd8;
}

.topic-strategic {
  --topic-color: #2f2f9e;
  background: linear-gradient(#5554d4, #19156f);
  border-color: #dedfff #090742 #090742 #dedfff;
}

.topic-nobel {
  --topic-color: #d2a000;
  color: #ffffff;
  background: linear-gradient(#ffd24d, #9d7000);
  border-color: #fff5b8 #5e4000 #5e4000 #fff5b8;
}

.catalog-card.topic-nobel span,
.catalog-card.topic-nobel strong,
.catalog-card.topic-nobel em,
.category-game-card.topic-nobel span,
.category-game-card.topic-nobel strong,
.category-game-card.topic-nobel em,
.category-page.topic-nobel .category-page-header span,
.category-page.topic-nobel .category-page-header strong,
.category-page.topic-nobel .category-page-header em {
  color: #ffffff;
}

.topic-architecture {
  --topic-color: #586b80;
  background: linear-gradient(#7e91a6, #334559);
  border-color: #edf3fa #1d2a36 #1d2a36 #edf3fa;
}

.topic-close {
  --topic-color: #bd2fc2;
  background: linear-gradient(#e565dc, #87158d);
  border-color: #ffe1fb #500653 #500653 #ffe1fb;
}

.topic-science {
  --topic-color: #0077b6;
  background: linear-gradient(#36a8e8, #00517d);
  border-color: #d9f2ff #002f4d #002f4d #d9f2ff;
}

.topic-history {
  --topic-color: #8b4f28;
  background: linear-gradient(#b87443, #633216);
  border-color: #f7dfcd #3a1a08 #3a1a08 #f7dfcd;
}

.topic-custom {
  --topic-color: #3d7770;
  background: linear-gradient(#6aa69d, #25534e);
  border-color: #dff8f3 #12322f #12322f #dff8f3;
}

.catalog-topic-section .catalog-section-header,
.catalog-topic-section .catalog-card,
.catalog-over-under-panel .catalog-card {
  grid-template-columns: 18px minmax(0, 1fr);
  color: #111111;
  background: #f2efdf;
  border-color: transparent;
  box-shadow: none;
  text-shadow: none;
}

.catalog-topic-section .catalog-card:has(.game-status-icon.earned-status),
.catalog-over-under-panel .catalog-card:has(.game-status-icon.earned-status) {
  grid-template-columns: 46px minmax(0, 1fr);
}

.catalog-topic-section .catalog-card:hover,
.catalog-topic-section .catalog-card:focus-visible,
.catalog-over-under-panel .catalog-card:hover,
.catalog-over-under-panel .catalog-card:focus-visible {
  color: #ffffff;
  background: #0a246a;
  border-color: #0a246a;
}

.catalog-topic-section .catalog-card strong,
.catalog-topic-section .catalog-card em,
.catalog-topic-section .catalog-card span,
.catalog-over-under-panel .catalog-card strong,
.catalog-over-under-panel .catalog-card em,
.catalog-over-under-panel .catalog-card span {
  color: inherit;
}

.catalog-topic-section .catalog-card strong,
.catalog-over-under-panel .catalog-card strong {
  min-width: 0;
  white-space: normal;
}

.catalog-topic-section .catalog-card .catalog-file-mode,
.catalog-topic-section .catalog-card em,
.catalog-over-under-panel .catalog-card .catalog-file-mode,
.catalog-over-under-panel .catalog-card em {
  display: none;
}

.catalog-section-header.topic-nobel span {
  color: #4b4b4b;
}

.command-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 8px;
  background: #d6d3c5;
  border-bottom: 2px solid var(--chrome-line);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.metric-control {
  flex: 1 1 100%;
}

.metric-control button {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
}

.temperature-unit-control button {
  min-width: 48px;
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
}

.distance-command-bar .temperature-unit-control button {
  min-width: 42px;
  min-height: 38px;
  padding: 6px 8px;
}

.strike-mode-control button {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
}

.ordered-mode-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 5px 7px 5px 9px;
  background: linear-gradient(#f5f1dc, #d9d4bd);
  border: 2px solid;
  border-color: #ffffff #7b7766 #7b7766 #ffffff;
  box-shadow: inset -1px -1px 0 #b8b39d, inset 1px 1px 0 #fffef0;
  color: #1d1d1d;
  font-size: 12px;
  font-weight: 800;
}

.ordered-mode-select[hidden] {
  display: none;
}

.ordered-mode-select span {
  color: #123178;
  white-space: nowrap;
}

.ordered-mode-select select {
  height: 24px;
  min-width: 148px;
  padding: 1px 24px 1px 6px;
  background: #ffffff;
  border: 2px solid;
  border-color: #6f6f6f #ffffff #ffffff #6f6f6f;
  box-shadow: inset 1px 1px 0 #9f9f9f;
  color: #111111;
  font: 800 12px var(--font-sans);
}

.segmented button.active {
  color: #ffffff;
  background: var(--title);
  border-color: #7fb1ff #001d78 #001d78 #7fb1ff;
}

.toggle-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  background: var(--chrome);
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #404040;
  font-size: 13px;
  font-weight: 800;
}

.toggle-control[hidden] {
  display: none;
}

.toggle-control input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  box-shadow: none;
}

.submit-run-button {
  margin-left: auto;
}

.gameplay-challenge-button {
  margin-left: auto;
  text-transform: uppercase;
}

.gameplay-challenge-button + .submit-run-button,
.gameplay-challenge-button + [data-periodic-submit],
.gameplay-challenge-button + #submitElements,
.gameplay-challenge-button + #commoditySubmit,
.gameplay-challenge-button + #giniSubmitFinal {
  margin-left: 0;
}

.catalog-leaderboard-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submit-run-button:hover {
  background: #14994f;
}

.game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr);
  gap: 12px;
}

.play-pane,
.score-pane,
.state-dashboard,
.state-side,
.summary-columns section,
.result-map-grid section {
  min-width: 0;
  padding: 12px;
  background: var(--paper);
  border: 2px inset #ffffff;
}

body.game-route .play-pane,
body.game-route .score-pane,
body.game-route .state-dashboard,
body.game-route .state-side {
  background: var(--chrome);
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset -1px -1px 0 #9b9b9b, inset 1px 1px 0 #ffffff;
}

body.game-route .prompt-line {
  padding: 10px;
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset 1px 1px 0 #ffffff;
}

body.game-route .stat-grid div,
body.game-route .metric-source-note,
body.game-route .submission-feed-window {
  background: #f7f4e8;
}

.prompt-line {
  display: flow-root;
}

.play-pane .prompt-line > div:first-child {
  text-align: center;
}

.play-pane .prompt-line h1 {
  text-transform: uppercase;
}

.prompt-line p {
  color: var(--muted);
  font-size: 16px;
}

.game-explainer {
  margin: 0 0 10px;
  padding: 8px 10px;
  color: #0a246a;
  background: #fffbe5;
  border: 2px solid;
  border-color: #ffffff #b99600 #b99600 #ffffff;
  box-shadow: inset -1px -1px 0 #d1b100, inset 1px 1px 0 #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.metric-source-note {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin: -3px 0 10px;
  padding: 7px 9px;
  color: #1f1f1f;
  background: #f7f7ef;
  border: 2px solid;
  border-color: #ffffff #8a8a8a #8a8a8a #ffffff;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #d0d0c8;
  font-size: 12px;
  font-weight: 800;
}

.metric-source-note span {
  width: 1px;
  align-self: stretch;
  background: #b6b6aa;
  border-right: 1px solid #ffffff;
}

.metric-source-note b {
  color: #0a246a;
  text-transform: uppercase;
}

.metric-info-button {
  display: inline;
  margin: 0;
  padding: 0;
  color: #0a246a;
  background: transparent;
  border: 0;
  box-shadow: none;
  font: inherit;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: underline;
  cursor: pointer;
}

.metric-info-button:hover,
.metric-info-button:focus-visible {
  color: #0054e3;
  outline: 1px dotted #0a246a;
  outline-offset: 2px;
}

.metric-source-note a {
  color: #0046d5;
  font-weight: 900;
  text-decoration: underline;
}

.game-workbook-link {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin: 12px 0 0;
  padding: 8px 10px;
  color: #1f1f1f;
  background: #eef7f1;
  border: 2px solid;
  border-color: #ffffff #6e987c #6e987c #ffffff;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #c3d7c9;
  font-size: 12px;
  font-weight: 800;
}

.game-workbook-link a {
  color: #005a2a;
  font-weight: 900;
  text-decoration: underline;
}

.game-workbook-link span {
  color: #333333;
}

.source-chip {
  display: none;
  float: right;
  max-width: min(360px, 48%);
  min-height: 34px;
  margin: 0 0 8px 12px;
  overflow: visible;
  padding: 7px 9px;
  color: #ffffff;
  background: var(--excel);
  border: 1px solid #075b2d;
  line-height: 1.25;
  overflow-wrap: break-word;
  text-overflow: clip;
  white-space: normal;
}

.guess-form {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}

.guess-form label,
.state-entry label {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.signed-number-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 7px;
  align-items: stretch;
}

.signed-number-row button {
  min-height: 38px;
  padding: 6px 8px;
  color: #0a246a;
  background: linear-gradient(#f7f7f7, #d8d8d8);
  font-weight: 900;
}

.message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.message.ok {
  color: var(--green);
}

.message.warn {
  color: #8a4d00;
}

.message.error {
  color: var(--red);
}

.submission-feed-window {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 132px;
  max-height: 190px;
  overflow: hidden;
  padding: 8px 42px 8px 10px;
  background: #fffef3;
  border: 2px solid;
  border-color: #777777 #ffffff #ffffff #777777;
  box-shadow: inset 1px 1px 0 #b9b9b9, inset -1px -1px 0 #ffffff;
  font-family: Consolas, "Courier New", monospace;
}

.submission-feed-toolbar {
  position: absolute;
  top: 6px;
  right: 8px;
  display: grid;
  justify-items: end;
  gap: 3px;
  z-index: 1;
}

.feed-filter-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.feed-filter-button::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  border: 2px solid #111111;
  border-radius: 50%;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.45), 1px 1px 0 #777777;
}

.feed-filter-button.correct::before {
  background: #15a13f;
}

.feed-filter-button.incorrect::before {
  background: #d93434;
}

.feed-filter-button.repeat::before {
  background: #efc400;
}

.feed-filter-button.none::before {
  background:
    linear-gradient(45deg, transparent 41%, #555555 42%, #555555 58%, transparent 59%),
    #c8c8c8;
}

.feed-filter-button.all {
  width: 24px;
  min-width: 24px;
  height: 44px;
  min-height: 44px;
  padding: 4px 0;
  border: 3px solid #111111;
  border-radius: 999px;
  background: #111111;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.5), 1px 1px 0 #777777;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.feed-filter-button.all::before {
  display: none;
}

.feed-filter-button.all span {
  display: block;
  width: 9px;
  height: 9px;
  border: 1px solid #111111;
  border-radius: 50%;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.45);
}

.feed-filter-button.all span:nth-child(1) {
  background: #15a13f;
}

.feed-filter-button.all span:nth-child(2) {
  background: #d93434;
}

.feed-filter-button.all span:nth-child(3) {
  background: #efc400;
}

.feed-filter-button.active {
  outline: 2px dotted #111111;
  outline-offset: 2px;
}

.submission-feed-list {
  display: grid;
  gap: 4px;
  max-height: 172px;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

@keyframes feedKaleidoscope {
  0% {
    background: conic-gradient(#15a13f 0 33%, #d93434 33% 66%, #efc400 66% 100%);
  }
  33% {
    background: conic-gradient(#d93434 0 33%, #efc400 33% 66%, #15a13f 66% 100%);
  }
  66% {
    background: conic-gradient(#efc400 0 33%, #15a13f 33% 66%, #d93434 66% 100%);
  }
}

.submission-feed-list li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: baseline;
  color: #111111;
  font-size: 12px;
  font-weight: 900;
}

.submission-feed-list li.latest.correct {
  color: #111111;
}

.submission-feed-list li.latest.incorrect {
  color: #111111;
}

.submission-feed-list li.repeat {
  color: #111111;
}

.submission-feed-list li.xp-feed-line {
  color: #0057ff;
}

.submission-feed-list li.xp-feed-line b,
.submission-feed-list li.xp-feed-line span,
.submission-feed-list li.xp-feed-line em {
  color: #0057ff;
}

.submission-feed-list li.empty {
  grid-template-columns: minmax(0, 1fr);
  color: #666666;
}

.submission-feed-list b,
.submission-feed-list em {
  font-style: normal;
  white-space: nowrap;
}

.submission-feed-list span {
  overflow-wrap: anywhere;
}

.submission-feed-token {
  color: #111111;
  background: transparent;
}

.submission-feed-list li.correct .submission-feed-token {
  color: var(--green);
}

.submission-feed-list li.incorrect .submission-feed-token {
  color: var(--red);
}

.submission-feed-list li.repeat .submission-feed-token {
  color: #8a5c00;
}

.entity-reveal-popup {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  color: #111111;
  background: #eef7ff;
  border: 2px solid;
  border-color: #ffffff #7d7d7d #7d7d7d #ffffff;
  box-shadow: inset -1px -1px 0 #c8d7ee, inset 1px 1px 0 #ffffff;
}

.entity-reveal-popup[hidden] {
  display: none;
}

.entity-reveal-popup:has(.molecule-canvas) {
  grid-template-columns: minmax(220px, 0.82fr) minmax(0, 1fr);
  align-items: stretch;
}

.molecule-canvas {
  display: block;
  width: 100%;
  min-width: 0;
  height: 158px;
  background: #dce8f6;
  border: 2px solid;
  border-color: #ffffff #7d7d7d #7d7d7d #ffffff;
  box-shadow: inset -1px -1px 0 #aebed2, inset 1px 1px 0 #ffffff;
}

.entity-reveal-popup img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  background: #ffffff;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
}

.entity-symbol {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #0a246a;
  background: #fff7b8;
  border: 2px solid;
  border-color: #ffffff #4d4d4d #4d4d4d #ffffff;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.7), 2px 2px 0 #777777;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 1px 1px 0 #ffffff;
}

.entity-reveal-popup strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.entity-reveal-popup span {
  display: block;
  color: #26313d;
  font-size: 12px;
  font-weight: 800;
}

.symbol-islam {
  color: #056839;
  background: #dfffe9;
}

.symbol-dharmic,
.symbol-tao {
  color: #9b2d00;
  background: #fff1d4;
}

.symbol-judaism {
  color: #0046b8;
  background: #e4f0ff;
}

.symbol-folk,
.symbol-new,
.symbol-bahai,
.symbol-shinto,
.symbol-druze,
.symbol-none {
  color: #3b1b7a;
  background: #efe6ff;
}

.entity-reveal-popup strong,
.entity-reveal-popup span {
  display: block;
}

.entity-reveal-popup strong {
  color: #0a246a;
  font-size: 18px;
  font-weight: 900;
}

.entity-reveal-popup span {
  margin-top: 3px;
  color: #333333;
  font-size: 12px;
  font-weight: 800;
}

.entity-reveal-popup .entity-symbol {
  display: inline-grid;
  margin-top: 0;
}

.map-host {
  overflow: hidden;
  background: #c7e6f4;
  border: 2px inset #ffffff;
}

body.game-route .workspace .map-host,
body.game-route .workspace .entity-visual-host,
body.game-route .workspace .entity-reveal-popup img,
body.game-route .workspace .entity-reveal-popup svg,
body.game-route .workspace .entity-reveal-popup canvas,
body.game-route .workspace .rank-row-thumb,
body.game-route .workspace .rank-country-flag img,
body.game-route .workspace .flag-tile img,
body.game-route .workspace .flag-popup-body > img,
body.game-route .workspace .country-preview-card,
body.game-route .workspace img,
body.game-route .workspace svg,
body.game-route .workspace canvas,
.summary-dialog .map-host,
.summary-dialog .country-preview-card,
.state-dialog .state-media img,
.state-dialog .state-media svg,
.state-dialog .state-preview {
  cursor: zoom-in !important;
}

.map-host.small {
  background: #f8f8f8;
}

.world-map,
.us-map,
.county-fill-map {
  display: block;
  width: 100%;
  aspect-ratio: 1000 / 520;
}

.us-map,
.county-fill-map {
  aspect-ratio: 980 / 560;
}

.ocean {
  fill: #c7e6f4;
}

.us-map-inset {
  fill: #d7ebff;
  stroke: #8a8a8a;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.country {
  fill: #efefef;
  stroke: #777777;
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}

.country.guessed {
  fill: #0078ff;
  stroke: #003f8f;
}

.feature-basemap {
  fill: #f4f0df;
  stroke: #8a8a7a;
  stroke-width: 0.55;
}

.feature-line {
  fill: none;
  stroke: #0057c2;
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 0 #ffffff);
  vector-effect: non-scaling-stroke;
}

.feature-marker {
  stroke: #111111;
  stroke-width: 1.3;
  filter: drop-shadow(0 1px 0 #ffffff);
  vector-effect: non-scaling-stroke;
}

.feature-marker.missing-feature {
  fill: #d7d0ba;
  stroke: #6e6a5b;
  opacity: 0.68;
}

.feature-marker.revealed-feature {
  fill: #0078ff;
  stroke: #003f8f;
  opacity: 0.95;
}

.feature-marker.metro-marker {
  stroke-width: 1;
}

.feature-marker.swiss-city-marker.revealed-feature {
  fill: #d51f2a;
  stroke: #6b0000;
}

.feature-marker.swiss-city-marker.missing-feature {
  fill: #e3ded0;
  stroke: #7a735f;
  opacity: 0.55;
}

.switzerland-point-map .entity-map-label {
  font-size: 12px;
  font-weight: 900;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.feature-line.missing-feature {
  stroke: #9f9984;
  opacity: 0.6;
}

.distance-pair-line {
  stroke: #111111;
  stroke-width: 3.4;
  stroke-dasharray: 7 5;
  stroke-linecap: round;
  filter: drop-shadow(0 1px 0 #ffffff);
  vector-effect: non-scaling-stroke;
}

.distance-pair-marker {
  fill: #005cff;
}

.distance-pair-label {
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.river-marker {
  fill: #0057c2;
}

.lake-marker {
  fill: #00a3ff;
}

.desert-marker {
  fill: #f2b400;
}

.entity-feature-map-host {
  margin-top: 12px;
}

.state-list-map-host {
  margin: 12px 0;
}

.entity-visual-host {
  margin: 12px 0;
  background: #f6f3e8;
  border: 2px inset #ffffff;
}

.entity-pie-host {
  margin: 12px 0;
}

.entity-pie-card {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid #b7c7d8;
  background: #ffffff;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #8a9aaa;
}

.entity-pie-chart {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1;
}

.entity-pie-number {
  font: 800 24px var(--mono);
  fill: #111111;
}

.entity-pie-label {
  font: 800 10px var(--mono);
  fill: #496175;
  text-transform: uppercase;
}

.entity-pie-legend {
  display: grid;
  gap: 8px;
}

.entity-pie-legend div {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  color: #50606e;
}

.entity-pie-legend div.revealed {
  color: #111111;
}

.entity-pie-legend span {
  width: 18px;
  height: 18px;
  border: 1px solid #7c8792;
}

.entity-pie-legend b,
.entity-pie-legend em {
  font-family: var(--mono);
  font-size: 12px;
}

.entity-pie-legend b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entity-visual-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px;
  background: #d8d8d8;
  border-bottom: 1px solid #8d8d8d;
}

.entity-visual-toolbar strong {
  min-width: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.entity-visual-tabs {
  margin-left: auto;
}

.entity-visual-tabs button {
  min-width: 64px;
}

.entity-visual-body {
  padding: 8px;
}

.entity-chart-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  background: #fffdf0;
  border: 1px solid #bdb799;
}

.entity-bar-chart,
.entity-timeline-chart {
  display: block;
  min-width: 100%;
  height: auto;
}

.entity-chart-title {
  font-family: var(--font-sans);
  font-size: 34px;
  font-weight: 900;
  fill: #111111;
}

.entity-chart-axis,
.entity-chart-grid {
  stroke: #555555;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.entity-chart-grid {
  stroke: #d1cdb8;
}

.entity-chart-axis-label,
.entity-chart-tick,
.entity-chart-rank,
.entity-chart-label,
.entity-chart-value,
.entity-timeline-label,
.entity-map-label {
  font-family: var(--font-sans);
  fill: #111111;
}

.entity-chart-value {
  font-size: 11px;
  font-weight: 900;
  text-anchor: middle;
}

.entity-chart-rank {
  font-size: 10px;
  font-weight: 900;
  text-anchor: middle;
}

.entity-chart-label {
  font-size: 10px;
  font-weight: 800;
  text-anchor: middle;
}

.entity-chart-axis-label,
.entity-chart-tick {
  font-size: 22px;
  font-weight: 800;
}

.entity-chart-tick {
  text-anchor: middle;
}

.entity-timeline-label {
  font-size: 30px;
  font-weight: 900;
  paint-order: stroke;
  stroke: #fffdf0;
  stroke-width: 5px;
  stroke-linejoin: round;
}

.entity-timeline-item.is-guessed {
  cursor: default;
  pointer-events: all;
}

.entity-map-label {
  font-size: 12px;
  font-weight: 900;
  paint-order: stroke;
  stroke: #fffdf0;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.entity-visual-map-host {
  margin: 0;
}

.university-nobel-map .university-nobel-map-label {
  font-size: 8px;
  font-weight: 800;
  stroke-width: 2px;
}

.entity-portrait-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 8px;
}

.entity-portrait-card {
  display: grid;
  gap: 5px;
  align-content: start;
  min-height: 160px;
  padding: 7px;
  background: #fffdf0;
  border: 2px outset #ffffff;
  font-family: var(--font-sans);
}

.entity-portrait-card.revealed {
  background: #e8fff1;
}

.entity-portrait-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  background: #ece8d8;
  border: 2px inset #ffffff;
  overflow: hidden;
}

.entity-portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entity-portrait-frame span {
  color: #404040;
  font-family: Consolas, "Courier New", monospace;
  font-size: 24px;
  font-weight: 900;
}

.entity-portrait-card strong {
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.1;
}

.entity-portrait-card em {
  color: #4e4e4e;
  font-size: 11px;
  font-style: normal;
  line-height: 1.15;
}

.state-shape {
  stroke: #5c5c5c;
  stroke-width: 0.75;
  vector-effect: non-scaling-stroke;
}

.county-shape {
  stroke: #5c5c5c;
  stroke-width: 0.55;
  vector-effect: non-scaling-stroke;
}

.county-shape.revealed {
  stroke: #173d24;
  stroke-width: 0.8;
}

.map-rank-label {
  fill: #111111;
  stroke: #ffffff;
  stroke-width: 3px;
  paint-order: stroke;
  text-anchor: middle;
  dominant-baseline: central;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 950;
  pointer-events: none;
}

.world-rank-label {
  font-size: 14px;
  stroke-width: 2.5px;
}

.county-map-loading {
  min-height: 180px;
  padding: 18px;
  color: #0a246a;
  font-family: "Lucida Console", Monaco, monospace;
  font-size: 14px;
  font-weight: 900;
}

.state-label {
  fill: #111111;
  stroke: #ffffff;
  stroke-width: 2px;
  paint-order: stroke;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: middle;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1px;
  margin-bottom: 10px;
  background: var(--chrome-line);
  border: 1px solid var(--chrome-line);
}

.stat-grid div {
  min-width: 0;
  padding: 10px;
  background: #f7f7f7;
}

.stat-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1;
}

.rank-list {
  display: grid;
  gap: 0;
  max-height: 68vh;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  border: 1px solid var(--chrome-line);
}

.rank-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(0, 170px);
  align-items: center;
  min-height: 34px;
  background: #f8f8f8;
  border-bottom: 1px solid #d0d0d0;
  font-family: Consolas, "Courier New", monospace;
}

.rank-list li.image-row {
  grid-template-columns: 44px 70px minmax(0, 1fr) minmax(118px, auto);
  column-gap: 7px;
  min-height: 64px;
}

.rank-list li:nth-child(even) {
  background: #eeeeee;
}

.rank-list li.revealed {
  background: #e8fff1;
}

.rank-list li.current-rank {
  position: relative;
  background: #fffbe5;
  outline: 2px solid #fff200;
  outline-offset: -2px;
}

.rank-list li.current-rank b {
  background: #c79000;
}

.rank-list b,
.rank-list span,
.rank-list em {
  min-width: 0;
  padding: 8px;
}

.rank-list b {
  color: #ffffff;
  background: #404040;
  text-align: center;
}

.rank-list span {
  overflow-wrap: anywhere;
  font-weight: 900;
}

.rank-list li:not(.revealed):not(.image-row),
.rank-list li.image-row:not(.revealed) {
  min-height: 34px;
}

.rank-list li:not(.revealed) .rank-row-thumb,
.rank-list li:not(.revealed) .rank-row-symbol {
  display: none;
}

.rank-list li.image-row:not(.revealed) {
  grid-template-columns: 44px minmax(0, 1fr) minmax(0, 170px);
  column-gap: 0;
}

.rank-list small {
  display: block;
  margin-top: 3px;
  color: #4e4e4e;
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1.2;
}

.usmle-note-button {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 24px;
  min-width: 26px;
  margin-left: 7px;
  padding: 0;
  font-size: 15px;
  line-height: 1;
  vertical-align: middle;
  background: #fff6c7;
  border: 2px solid;
  border-color: #ffffff #6f6f6f #6f6f6f #ffffff;
  box-shadow: inset -1px -1px 0 #c9b45c, 1px 1px 0 #202020;
}

.usmle-note-button:hover,
.usmle-note-button:focus-visible {
  filter: brightness(1.06);
}

.study-note-card dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 12px;
  margin: 12px 0 0;
}

.study-note-card dt {
  color: var(--xp-blue-dark);
  font-weight: 900;
  text-transform: uppercase;
}

.study-note-card dd {
  margin: 0;
}

.rank-row-thumb {
  width: 48px;
  height: 48px;
  margin: 6px 0;
  object-fit: cover;
  background: #d6d3c5;
  border: 2px solid;
  border-color: #ffffff #767676 #767676 #ffffff;
}

.rank-row-symbol {
  width: 42px;
  height: 42px;
  margin: 6px 8px;
  font-size: 21px;
}

.rank-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.rank-list li:not(.revealed) span,
.rank-list li:not(.revealed) em {
  white-space: nowrap;
}

.rank-list li:not(.revealed) span {
  overflow: hidden;
  text-overflow: clip;
}

.rank-list li:not(.revealed) span {
  font-size: 0;
  line-height: 1;
}

.rank-list li:not(.revealed) span::before {
  content: "";
  display: block;
  width: min(132px, 100%);
  height: 13px;
  background: #111111;
}

.prompt-line .source-chip {
  display: none;
}

.rank-list.dictionary-rank-list li {
  grid-template-columns: 54px minmax(0, 1fr) minmax(0, 180px);
  min-height: 30px;
}

.rank-list.dictionary-rank-list li b,
.rank-list.dictionary-rank-list li span,
.rank-list.dictionary-rank-list li em {
  padding: 5px 8px;
}

.rank-list.dictionary-rank-list .dictionary-empty {
  min-height: 44px;
}

.rank-list.dictionary-rank-list .compact-revealed span {
  font-size: 15px;
}

.entity-game .game-grid {
  grid-template-columns: minmax(0, 1fr) minmax(410px, 0.8fr);
}

.flags-game .game-grid {
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.32fr);
}

.flag-mode-control button {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
}

.flag-map-host {
  margin-top: 12px;
  margin-bottom: 8px;
}

.flag-world-map .country.flag-guessed {
  stroke: #111111;
  stroke-width: 0.9;
}

.flag-filled-swatch {
  background:
    linear-gradient(90deg, #b22234 0 18%, #ffffff 18% 32%, #b22234 32% 48%, #ffffff 48% 64%, #b22234 64% 80%, #ffffff 80%);
}

.flag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  max-height: 64vh;
  padding: 8px;
  overflow: auto;
  background: #d6d3c5;
  border: 2px inset #ffffff;
}

.flag-grid-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin: 8px 0 0;
  padding: 7px;
  background: #d6d3c5;
  border: 2px solid;
  border-color: #ffffff #7b7766 #7b7766 #ffffff;
}

.flag-tile {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 7px;
  background: #f7f4e8;
  border: 2px solid;
  border-color: #ffffff #7b7766 #7b7766 #ffffff;
  box-shadow: inset 1px 1px 0 #ffffff;
}

.flag-tile.guessed {
  background: #fff8c6;
}

.flag-tile-image-wrap {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: 4px;
  background: #ffffff;
  border: 2px inset #ffffff;
}

.flag-tile img {
  display: block;
  width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.flag-tile strong {
  min-height: 36px;
  color: #111111;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.1;
}

.flag-tile form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
}

.flag-tile input {
  min-width: 0;
  min-height: 30px;
  padding: 4px 6px;
  font-size: 13px;
}

.flag-tile button {
  min-height: 30px;
  padding: 4px 7px;
  font-size: 12px;
}

.flag-popup-backdrop {
  position: fixed;
  inset: 38px 0 42px;
  z-index: 24;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.34);
}

.flag-popup-window {
  width: min(620px, 92vw);
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}

.flag-popup-body {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.popup-step-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.popup-step-actions button {
  min-height: 32px;
  padding: 5px 12px;
  font-size: 12px;
}

.flag-popup-body > img {
  display: block;
  width: 100%;
  max-height: min(430px, 52vh);
  object-fit: contain;
  background: #ffffff;
  border: 2px inset #ffffff;
}

.flag-popup-body .guess-form {
  margin: 0;
}

.flag-recent-panel {
  background: #f7f4e8;
  border: 2px inset #ffffff;
}

.flag-recent-title {
  padding: 7px 9px;
  color: #ffffff;
  background: #0a246a;
  font-weight: 900;
}

.flag-recent-list {
  display: grid;
  gap: 1px;
  max-height: 56vh;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.flag-recent-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 8px;
  background: #fffef2;
  border-top: 1px solid #d2ccb1;
  font-weight: 800;
}

.flag-recent-list .empty-row {
  color: #555555;
}

.flag-mini-image {
  flex: 0 0 24px;
  width: 24px;
  height: 18px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #999999;
}

.breakdown-board {
  margin-top: 10px;
  padding: 10px;
  background: #f7f7f7;
  border: 2px inset #ffffff;
}

.breakdown-board h2 {
  margin-bottom: 8px;
  color: #0a246a;
  font-size: 18px;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 7px;
}

.breakdown-card,
.breakdown-empty {
  min-width: 0;
  padding: 9px;
  background: #ffffff;
  border: 1px solid #b7b7b7;
}

.breakdown-card {
  display: grid;
  gap: 4px;
}

.breakdown-card strong {
  overflow-wrap: anywhere;
}

.breakdown-card span,
.breakdown-card p,
.breakdown-empty {
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
}

.breakdown-card p {
  margin: 0;
}

.university-rank-list li {
  grid-template-columns: 44px minmax(0, 1fr) minmax(82px, auto);
  min-height: 52px;
}

.university-rank-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.state-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 12px;
}

.periodic-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
  padding: 12px;
}

.periodic-table {
  display: grid;
  grid-template-columns: repeat(18, minmax(42px, 1fr));
  grid-auto-rows: 58px;
  gap: 3px;
  overflow: auto;
  padding: 8px;
  background: #f4f4ee;
  border: 2px inset #ffffff;
}

.periodic-scoreboard-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  background: #f4f1df;
  border: 2px inset #ffffff;
}

.periodic-scoreboard-title {
  color: var(--xp-blue-dark);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.periodic-scoreboard-panel .button-link,
.periodic-scoreboard-panel button {
  display: block;
  width: 100%;
  min-height: 32px;
  text-align: center;
}

.element-tile {
  min-width: 42px;
  min-height: 58px;
  padding: 4px;
  color: #111111;
  background: linear-gradient(#ffffff, #dde8f7);
  border-width: 1px;
  font-family: Consolas, "Courier New", monospace;
}

.element-tile small,
.element-tile strong,
.element-tile em {
  display: block;
  line-height: 1;
}

.element-tile small {
  color: #333333;
  font-size: 10px;
  text-align: left;
}

.element-tile strong {
  min-height: 24px;
  color: var(--state-color);
  font-size: 22px;
  text-align: center;
}

.element-tile em {
  overflow: hidden;
  color: #333333;
  font-size: 9px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.element-tile:not(.revealed) strong::after {
  color: #777777;
  content: "?";
}

:root {
  --element-solid: #111111;
  --element-liquid: #0054e3;
  --element-gas: #c62828;
}

.group-alkali-metal { background: linear-gradient(#fff3e8, #e7c1a1); }
.group-alkaline-earth-metal { background: linear-gradient(#fff8df, #e4d08d); }
.group-transition-metal { background: linear-gradient(#eef7ff, #b9cfe8); }
.group-post-transition-metal { background: linear-gradient(#f4f4f4, #cacaca); }
.group-metalloid { background: linear-gradient(#edf8ed, #b8d4b6); }
.group-diatomic-nonmetal,
.group-polyatomic-nonmetal { background: linear-gradient(#f5fff6, #c7dfc9); }
.group-noble-gas { background: linear-gradient(#f2f4ff, #c3c9e8); }
.group-lanthanide { background: linear-gradient(#f7f0ff, #d3c4e4); }
.group-actinide { background: linear-gradient(#fff0f6, #e1bdcf); }
.group-unknown { background: linear-gradient(#ffffff, #dddddd); }

.temperature-bar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) 110px auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #d6d3c5;
  border-top: 2px solid var(--chrome-line);
  font-weight: 900;
}

.temperature-bar input[type="range"] {
  min-height: 24px;
  box-shadow: none;
}

.periodic-key {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #f7f7f7;
  border: 2px inset #ffffff;
  font-weight: 800;
}

.state-dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 7px;
  border: 1px solid var(--chrome-line);
  vertical-align: middle;
}

.solid-dot { background: var(--element-solid); }
.liquid-dot { background: var(--element-liquid); }
.gas-dot { background: var(--element-gas); }

.state-side p {
  color: var(--muted);
}

.legend-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  font-weight: 700;
}

.legend-swatch {
  height: 22px;
  border: 1px solid var(--chrome-line);
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 12px;
  padding: 7px 9px;
  color: var(--ink);
  background: #f7f7f7;
  border-top: 1px solid #9b9b9b;
  font-size: 12px;
  font-weight: 800;
}

.map-legend-title {
  color: #0a246a;
  font-weight: 900;
  text-transform: uppercase;
}

.map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.map-legend .legend-swatch {
  width: 34px;
  height: 14px;
  flex: 0 0 auto;
}

.map-legend .legend-gradient {
  width: 82px;
  height: 14px;
  flex: 0 0 auto;
  border: 1px solid #222;
  display: inline-block;
}

.temperature-gradient-legend .legend-gradient {
  width: 126px;
}

.map-legend-note {
  color: var(--muted);
}

.outline-key {
  border: 2px inset #ffffff;
  border-top: 0;
}

.legend-swatch.orange {
  background: var(--orange);
}

.legend-swatch.white {
  background: #ffffff;
}

.legend-swatch.blue {
  background: var(--blue);
}

.legend-swatch.ocean-swatch {
  background: #c7e6f4;
}

.legend-swatch.unrevealed-swatch {
  background: #efefef;
}

.legend-swatch.guessed-swatch {
  background: #0078ff;
}

.legend-swatch.feature-swatch {
  background: linear-gradient(90deg, #0057c2 0%, #00a3ff 50%, #f2b400 100%);
}

.legend-swatch.wrong-gradient {
  background: linear-gradient(90deg, #ffffff 0%, #ffb066 42%, #ff5d00 100%);
}

.legend-swatch.right-gradient {
  background: linear-gradient(90deg, #ffffff 0%, #65a4ff 42%, #005cff 100%);
}

.legend-swatch.exact-swatch {
  background: #ffffff;
}

.legend-swatch.state-outline-swatch {
  background: #00a4ef;
}

.legend-swatch.skipped-swatch {
  background: #d0d0d0;
}

.country-close-current {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(280px, 1fr);
  gap: 12px;
  align-items: stretch;
  margin: 10px 0;
}

.country-preview-card {
  min-width: 0;
}

.country-preview {
  display: block;
  width: 100%;
  aspect-ratio: 1000 / 520;
  background: #c7e6f4;
  border: 2px inset #ffffff;
}

.country-preview path {
  fill: #00a4ef;
  stroke: #003f8f;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.country.sample-country {
  stroke: #333333;
  stroke-width: 1.15;
}

.country-close-label {
  font-size: 10px;
}

.review-inline-input {
  width: 88px;
  max-width: 100%;
  padding: 3px 5px;
  font: inherit;
  font-family: Consolas, "Courier New", monospace;
  border: 2px inset #ffffff;
}

.excel-shell {
  max-height: 58vh;
  overflow: auto;
  border: 2px inset #ffffff;
}

.excel-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 13px;
}

.excel-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 7px 8px;
  color: #ffffff;
  background: var(--excel);
  border: 1px solid #075b2d;
  text-align: left;
}

.excel-table td {
  padding: 7px 8px;
  border: 1px solid #b8b8b8;
  font-weight: 700;
}

.redacted-cell {
  display: inline-block;
  max-width: 100%;
  padding: 2px 7px;
  color: #555555;
  background: repeating-linear-gradient(
    135deg,
    #ededed 0,
    #ededed 5px,
    #d7d7d7 5px,
    #d7d7d7 10px
  );
  border: 1px solid #b8b8b8;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  text-transform: uppercase;
  white-space: nowrap;
}

.state-dialog,
.summary-dialog,
.score-card-dialog,
.figure-dialog,
.auth-dialog {
  position: fixed;
  width: min(1120px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  color: var(--ink);
  overflow: auto;
}

.summary-dialog[open],
.score-card-dialog[open],
.figure-dialog[open],
.auth-dialog[open] {
  top: 12px;
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
}

.state-dialog::backdrop,
.summary-dialog::backdrop,
.score-card-dialog::backdrop,
.figure-dialog::backdrop,
.auth-dialog::backdrop {
  background: rgba(0, 0, 0, 0.42);
}

.state-prompt,
.summary-card {
  margin: 0;
  background: var(--chrome);
}

.state-prompt {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 28px);
}

.state-prompt-body {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  min-height: 0;
  overflow: auto;
}

.state-media {
  display: grid;
  gap: 10px;
}

.state-media img,
.state-preview {
  width: 100%;
  min-height: 180px;
  background: var(--paper);
  border: 2px inset #ffffff;
  object-fit: contain;
}

.state-preview path {
  fill: #00a4ef;
  stroke: #003f6b;
  stroke-width: 2;
}

.state-entry {
  min-width: 0;
  padding: 14px;
  background: var(--paper);
  border: 2px inset #ffffff;
}

.state-entry h2 {
  font-size: clamp(34px, 6vw, 64px);
  line-height: 0.95;
}

.state-entry p {
  margin-top: 8px;
  color: var(--muted);
}

.state-prompt-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 58px;
  padding: 10px 12px;
  background: var(--chrome);
  border-top: 1px solid #c7c3b3;
}

.state-prompt-actions button {
  min-width: 78px;
  min-height: 36px;
  padding: 6px 14px;
  text-align: center;
}

.summary-card {
  padding-bottom: 12px;
  border: 3px solid;
  border-color: #ffffff #6f6f6f #6f6f6f #ffffff;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.26);
}

.summary-dialog:has(.score-card-only) {
  width: min(1120px, calc(100vw - 16px));
  background: #ece9d8;
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.32);
}

.summary-card.score-card-only {
  padding: 10px;
  background: #ece9d8;
  border: 0;
  box-shadow: none;
}

.auth-dialog,
.help-dialog {
  width: min(520px, calc(100vw - 24px));
}

.help-dialog:has(.profile-trophy-detail-card) {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(600px, calc(100vw - 24px));
  max-height: calc(100dvh - 88px);
  margin: 0;
  padding: 0;
  overflow: auto;
  transform: translate(-50%, -50%);
}

.help-dialog:has(.challenge-invite-card) {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(860px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  transform: translate(-50%, -50%);
}

.auth-card,
.help-card {
  margin: 0;
  background: var(--chrome);
}

.auth-body,
.help-body {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--paper);
  border: 2px inset #ffffff;
}

.auth-body p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.help-body h2 {
  margin: 4px 0 0;
  color: #0a246a;
  font-size: 16px;
}

.help-body p {
  margin: 0;
  color: #2b2b2b;
  font-weight: 700;
}

.help-body ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.help-body li {
  font-weight: 700;
}

.auth-body label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-card > .summary-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 14px 12px;
  background: var(--chrome);
  border-top: 1px solid #d8d8c8;
  box-shadow: inset 0 1px 0 #ffffff;
}

.auth-card > .summary-actions .submit-run-button {
  margin-left: 0;
}

.auth-card > .summary-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 38px;
  line-height: 1;
}

.profile-social-actions,
.social-thread-header,
.challenge-titlebar,
.social-challenge-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-social-actions {
  margin: 8px 0 10px;
  justify-content: center;
}

.social-host,
.social-thread-view {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.social-panel,
.challenge-end-breakdown,
.challenge-result-card,
.chat-message {
  background: #ece9d8;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset -1px -1px 0 #9b9b9b, inset 1px 1px 0 #ffffff;
}

.social-panel {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
}

.social-wide {
  grid-column: 1 / -1;
}

.social-panel h2,
.challenge-titlebar h2 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  color: #0a246a;
  font-size: 16px;
}

.social-list,
.social-thread-list,
.social-challenge-list,
.chat-log {
  display: grid;
  gap: 8px;
}

.social-person,
.social-thread-card button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px;
  background: #fffef3;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #b9b9b9, inset -1px -1px 0 #ffffff;
}

.social-person-main,
.social-thread-card button {
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}

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

.social-person img,
.social-avatar-empty {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  object-fit: cover;
  background: #0a246a;
  border: 2px solid #ffffff;
  box-shadow: 1px 1px 0 #404040;
}

.social-thread-unread {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  color: #ffffff;
  background: #d51f2a;
  border: 1px solid #111111;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.social-person span span,
.social-thread-card span,
.social-thread-card em,
.chat-meta span,
.challenge-titlebar p {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.social-thread-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  justify-content: stretch;
  padding: 10px;
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
}

.social-thread-title {
  justify-self: center;
  min-width: 0;
  text-align: center;
}

.social-thread-header h1 {
  margin: 0;
  overflow-wrap: anywhere;
}

.chats-index-header {
  grid-template-columns: minmax(0, 1fr);
}

.chat-log {
  max-height: 58vh;
  overflow: auto;
  padding: 8px;
  background: #d7ebff;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
}

.chat-message {
  max-width: min(760px, 92%);
  padding: 9px;
}

.chat-message.mine {
  justify-self: end;
  background: #fffef3;
}

.chat-message.neutral {
  justify-self: center;
  width: min(900px, 100%);
  max-width: 100%;
  background: #f6f4e7;
  text-align: center;
}

.chat-message.neutral .chat-meta {
  justify-content: center;
}

.chat-message.challenge_scorecard {
  border-color: #ffffff #0a246a #0a246a #ffffff;
}

.chat-message.challenge_scorecard .challenge-end-breakdown {
  text-align: left;
}

.chat-message p {
  margin: 6px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.challenge-decline-button {
  justify-self: start;
  min-height: 28px;
  margin-top: 4px;
  color: #ffffff;
  background: #c62828;
  border-color: #ff9b9b #701111 #701111 #ff9b9b;
}

.chat-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #0a246a;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.challenge-end-breakdown {
  display: grid;
  gap: 10px;
  margin: 12px;
  padding: 10px;
}

.challenge-end-breakdown.compact {
  margin: 0;
}

.challenge-titlebar {
  justify-content: space-between;
}

.challenge-status {
  padding: 7px 9px;
  color: #ffffff;
  background: #0a246a;
  border: 2px inset #ffffff;
  font-weight: 900;
}

.challenge-status.complete {
  background: var(--green);
}

.challenge-status.tie,
.challenge-status.waiting_for_opponent,
.challenge-status.waiting_for_challenger {
  color: #111111;
  background: #ffcc00;
}

.challenge-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.challenge-result-card {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.challenge-result-card h3 {
  margin: 0;
  color: #0a246a;
}

.challenge-scoreline {
  color: #111111;
  font-size: 20px;
  font-weight: 900;
}

.challenge-stopwatch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 5px 8px;
  color: #111111;
  background: #e9f5ff;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset 1px 1px 0 #ffffff;
  font-weight: 900;
}

.challenge-stopwatch span {
  position: relative;
  width: 15px;
  height: 15px;
  background: #ffffff;
  border: 2px solid #111111;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #d7ebff;
}

.challenge-stopwatch span::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 4px;
  width: 5px;
  height: 4px;
  background: #111111;
}

.challenge-stopwatch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 6px;
  width: 2px;
  height: 5px;
  background: #d51f2a;
  box-shadow: -3px 4px 0 #0a246a;
  transform-origin: 1px 4px;
}

.challenge-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.challenge-metrics span {
  padding: 6px;
  background: #ffffff;
  border: 2px inset #ffffff;
}

.challenge-metrics em,
.challenge-metrics strong {
  display: block;
}

.challenge-metrics em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.challenge-detail-list {
  background: #ffffff;
  border: 2px inset #ffffff;
}

.challenge-detail-list summary {
  padding: 6px 8px;
  color: #0a246a;
  font-weight: 900;
}

.challenge-detail-list ol {
  max-height: 180px;
  margin: 0;
  overflow: auto;
  padding: 0 8px 8px 28px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.challenge-detail-list li {
  margin: 2px 0;
  padding: 1px 4px;
}

.challenge-detail-list li.challenge-row-wrong {
  color: #8a0000;
  background: #ffd6d6;
  font-weight: 900;
}

.challenge-detail-list li.challenge-row-unique {
  color: #111111;
  background: #fff16a;
  font-weight: 900;
}

.challenge-pending,
.compact-empty {
  padding: 10px;
  color: var(--muted);
  font-weight: 800;
}

.challenge-invite-card {
  display: grid;
  width: 100%;
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.challenge-invite-card .window-title {
  font-size: 22px;
}

.challenge-invite-body {
  align-content: start;
  gap: 12px;
  max-height: calc(100dvh - 150px);
  overflow: auto;
}

.challenge-invite-body label {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  text-transform: none;
}

.challenge-invite-body input,
.challenge-invite-body textarea,
.challenge-invite-body select {
  min-width: 0;
  font-size: 18px;
}

.challenge-game-picker {
  position: relative;
  min-width: 0;
}

.challenge-game-picker input[type="search"] {
  padding-right: 34px;
  background:
    linear-gradient(45deg, transparent 49%, #111111 50% 64%, transparent 65%) calc(100% - 21px) 15px / 8px 8px no-repeat,
    linear-gradient(-45deg, transparent 49%, #111111 50% 64%, transparent 65%) calc(100% - 14px) 15px / 8px 8px no-repeat,
    linear-gradient(90deg, transparent calc(100% - 34px), #c0c0c0 calc(100% - 34px), #c0c0c0 calc(100% - 33px), #ece9d8 calc(100% - 33px)),
    var(--paper-bright);
}

.challenge-game-picker input[type="search"]::-webkit-search-decoration,
.challenge-game-picker input[type="search"]::-webkit-search-cancel-button {
  appearance: none;
}

.challenge-game-options {
  position: absolute;
  z-index: 60;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  display: none;
  max-height: min(360px, 42vh);
  overflow: auto;
  padding: 3px;
  background: #f2efdf;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.28);
}

.challenge-game-picker.open .challenge-game-options {
  display: grid;
}

.challenge-game-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 5px 8px;
  color: #111111;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: left;
}

.challenge-game-option span,
.challenge-game-option strong,
.challenge-game-option em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-game-option span {
  display: grid;
  gap: 1px;
}

.challenge-game-option strong {
  font-size: 15px;
}

.challenge-game-option em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.challenge-game-option b {
  width: 10px;
  height: 16px;
  background: #d51f2a;
  border: 1px solid #7a0010;
  box-shadow: inset 2px 0 0 #ff9aa5;
}

.challenge-game-option:hover,
.challenge-game-option:focus-visible,
.challenge-game-option.selected {
  color: #ffffff;
  background: #0a246a;
  outline: none;
}

.challenge-game-option:hover em,
.challenge-game-option:focus-visible em,
.challenge-game-option.selected em {
  color: #d8e6ff;
}

.challenge-game-empty {
  padding: 10px;
  color: var(--muted);
  font-weight: 900;
}

.challenge-xp-select {
  appearance: none;
  padding-right: 34px;
  background:
    linear-gradient(45deg, transparent 49%, #111111 50% 64%, transparent 65%) calc(100% - 21px) 14px / 8px 8px no-repeat,
    linear-gradient(-45deg, transparent 49%, #111111 50% 64%, transparent 65%) calc(100% - 14px) 14px / 8px 8px no-repeat,
    linear-gradient(90deg, transparent calc(100% - 34px), #c0c0c0 calc(100% - 34px), #c0c0c0 calc(100% - 33px), #ece9d8 calc(100% - 33px)),
    var(--paper-bright);
}

.challenge-invite-card > .summary-actions {
  align-items: center;
  padding: 10px 12px 12px;
  background: var(--chrome);
  border-top: 1px solid #d8d8c8;
  box-shadow: inset 0 1px 0 #ffffff;
}

.challenge-invite-card > .summary-actions button {
  min-width: 150px;
  min-height: 44px;
  font-size: 18px;
}

.gameplay-challenge-card {
  position: relative;
  width: min(560px, calc(100vw - 24px));
}

.gameplay-challenge-body {
  display: grid;
  gap: 10px;
}

.challenge-user-search-label {
  display: grid;
  gap: 5px;
  font-weight: 900;
}

.challenge-user-results {
  min-height: 214px;
  max-height: 214px;
  overflow-y: auto;
  background: #ffffff;
  border: 2px inset #ffffff;
}

.challenge-user-result {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 42px;
  gap: 8px;
  padding: 6px 8px;
  color: #111111;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #d0d0c0;
  box-shadow: none;
  text-align: left;
}

.challenge-user-result:hover,
.challenge-user-result:focus-visible {
  color: #ffffff;
  background: #0a246a;
  outline: none;
}

.challenge-user-result img,
.challenge-user-result .social-avatar-empty {
  width: 28px;
  height: 28px;
}

.challenge-user-result span {
  min-width: 0;
}

.challenge-user-result strong,
.challenge-user-result em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-user-result em {
  color: #555555;
  font-size: 12px;
  font-style: normal;
}

.challenge-user-result:hover em,
.challenge-user-result:focus-visible em {
  color: #d8e6ff;
}

.challenge-share-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 4px 0;
}

.pixel-icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 38px;
  padding: 0;
}

.pixel-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 18px;
  image-rendering: pixelated;
}

.pixel-message {
  background: #ffffff;
  border: 3px solid #111111;
  box-shadow: 4px 4px 0 #0a246a;
}

.pixel-message::after {
  position: absolute;
  right: 2px;
  bottom: -8px;
  width: 7px;
  height: 7px;
  background: #ffffff;
  border-right: 3px solid #111111;
  border-bottom: 3px solid #111111;
  content: "";
}

.pixel-link::before,
.pixel-link::after {
  position: absolute;
  width: 13px;
  height: 8px;
  border: 3px solid #111111;
  content: "";
}

.pixel-link::before {
  left: 0;
  top: 5px;
  border-right: 0;
}

.pixel-link::after {
  right: 0;
  top: 5px;
  border-left: 0;
}

.pixel-envelope {
  width: 26px;
  height: 19px;
  background: url("/assets/pixel-envelope.png?v=20260625") center / contain no-repeat;
}

.challenge-guest-note {
  margin: 0;
  padding: 7px 8px;
  background: #fff8c6;
  border: 2px inset #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.challenge-confirm-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.24);
}

.challenge-confirm-overlay[hidden] {
  display: none;
}

.challenge-confirm-box {
  width: min(420px, 100%);
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.42);
}

.challenge-confirm-body {
  padding: 14px;
  background: var(--paper);
  border: 2px inset #ffffff;
}

.challenge-confirm-body h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.challenge-confirm-body p {
  margin: 0;
  font-weight: 800;
}

.challenge-confirm-actions {
  justify-content: center;
  padding: 12px;
}

@media (max-width: 760px) {
  .social-grid,
  .challenge-result-grid,
  .chat-form {
    grid-template-columns: 1fr;
  }

  .chat-message {
    max-width: 100%;
  }

  .challenge-invite-body label {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .challenge-invite-card > .summary-actions {
    justify-content: stretch;
  }

  .challenge-invite-card > .summary-actions button {
    flex: 1 1 180px;
  }
}

.summary-poster {
  margin: 12px;
  padding: 22px;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(236, 233, 216, 0.97)),
    repeating-linear-gradient(90deg, transparent 0 58px, rgba(0, 0, 0, 0.06) 59px 60px);
  border: 2px inset #ffffff;
}

.xp-popup-poster {
  background: #ece9d8;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: inset -1px -1px 0 #b6b2a3, inset 1px 1px 0 #ffffff;
}

.summary-poster h2 {
  color: var(--title);
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.9;
}

.summary-share-panel {
  padding: 12px 12px 0;
}

.score-card-only .summary-share-panel {
  padding: 0;
  background: #ece9d8;
}

.share-card-frame {
  padding: 10px;
  background: #d8d8d8;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset -1px -1px 0 #404040, inset 1px 1px 0 #f8f8f8;
}

.summary-reveal-trigger {
  display: block;
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.summary-reveal-trigger:focus-visible,
.summary-reveal-trigger:hover {
  outline: 2px dotted #111111;
  outline-offset: -8px;
}

.summary-reveal-trigger[aria-expanded="true"] {
  background: #c7c3b3;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #404040, inset -1px -1px 0 #f8f8f8;
}

.summary-share-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #ffffff;
  border: 2px inset #ffffff;
  object-fit: contain;
  cursor: zoom-in;
}

.score-card-only .summary-share-image {
  background: #ffffff;
  border: 0;
  cursor: default;
}

.end-leaderboard-panel {
  display: grid;
  gap: 10px;
  margin: 10px 0 0;
  padding: 10px;
  background: #ece9d8;
  border-top: 1px solid #b8b5a7;
}

.end-leaderboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.end-leaderboard-head h3,
.end-run-stats h3 {
  margin: 0;
  color: #0a246a;
  font-size: 16px;
  text-transform: uppercase;
}

.end-leaderboard-head p {
  margin: 3px 0 0;
  color: #4c4c4c;
  font-size: 13px;
  font-weight: 900;
}

.end-leaderboard-table {
  max-height: 236px;
  overscroll-behavior: contain;
}

.end-leaderboard-panel.expanded .end-leaderboard-table {
  max-height: 520px;
}

.end-leaderboard-row.current-run {
  color: #ffffff;
  background: #0a246a;
}

.end-leaderboard-row.current-run a,
.end-leaderboard-row.current-run strong {
  color: #ffffff;
}

.button-link.disabled {
  color: #555555;
  background: #d8d8d8;
  cursor: not-allowed;
  box-shadow: none;
}

.challenge-settings-locked-root #sizeControl button,
.challenge-settings-locked-root #rankModeControl button,
.challenge-settings-locked-root #metricControl button,
.challenge-settings-locked-root #temperatureUnitControl button,
.challenge-settings-locked-root #entityStrikeModeSelect,
.challenge-settings-locked-root #orderedStrikeModeSelect,
.challenge-settings-locked-root #hardModeToggle {
  opacity: 0.55;
  cursor: not-allowed;
}

.challenge-settings-locked {
  opacity: 0.8;
}

.end-run-stats {
  display: grid;
  gap: 8px;
}

.end-run-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.end-run-stats-grid div {
  min-width: 0;
  padding: 8px;
  background: #ffffff;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #6f6f6f;
}

.end-run-stats-grid span {
  display: block;
  color: #4c4c4c;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.end-run-stats-grid strong {
  display: block;
  margin-top: 4px;
  color: #111111;
  font-size: 15px;
}

.xp-end-breakdown {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 10px;
  color: #111111;
  background: #ece9d8;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset 1px 1px 0 #ffffff;
}

.xp-end-breakdown h2 {
  margin: 0;
  color: #0a246a;
  font-size: 16px;
  text-transform: uppercase;
}

.xp-end-total {
  display: inline-block;
  width: max-content;
  padding: 2px 7px;
  color: #0057ff;
  background: #fffef3;
  border: 1px solid #8a8a8a;
  font-weight: 900;
}

.xp-breakdown-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.xp-breakdown-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
}

.xp-breakdown-list strong {
  color: #0057ff;
}

.xp-dialog-stats {
  margin-top: 10px;
}

.summary-share-fallback {
  display: none;
  place-items: center;
  min-height: 260px;
  padding: 24px;
  color: #0a246a;
  background: #ffffff;
  border: 2px inset #ffffff;
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.summary-share-panel.render-failed .summary-share-image {
  display: none;
}

.summary-share-panel.render-failed .summary-share-fallback {
  display: grid;
}

.summary-share-image.mobile-score-image {
  aspect-ratio: 9 / 16;
}

.distance-summary-card .summary-share-panel {
  padding: 8px 8px 0;
}

.distance-summary-card .share-card-frame {
  padding: 0;
  background: #ffffff;
}

.summary-share-image.distance-score-image,
.score-card-large-image.distance-score-image {
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

.summary-share-image.distance-score-image {
  width: 100%;
  border: 0;
}

.score-card-large-image.distance-score-image {
  width: 100%;
  max-height: none;
  border: 0;
}

.score-card-dialog:has(.distance-score-image) {
  width: min(1240px, calc(100vw - 12px));
}

.score-card-dialog:has(.distance-score-image) .score-card-lightbox-body {
  padding: 0;
}

.score-card-dialog {
  width: min(1180px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  background: var(--chrome);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.32);
}

.score-card-lightbox {
  margin: 0;
  background: var(--chrome);
  outline: 0;
}

.score-card-lightbox-body {
  padding: 10px;
  background: #ece9d8;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #ffffff;
}

.score-card-large-image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 132px);
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #ffffff;
  border: 2px inset #ffffff;
}

.score-card-large-image.mobile-score-image {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
}

.score-card-lightbox-actions {
  justify-content: flex-end;
  gap: 10px;
  padding: 10px;
  margin: 0;
  border-top: 1px solid #b8b5a7;
  background: var(--chrome);
}

.figure-dialog {
  width: min(1180px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  background: var(--chrome);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.32);
}

.figure-lightbox {
  margin: 0;
  background: var(--chrome);
  outline: 0;
}

.figure-lightbox-body {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 10px;
  background: #ece9d8;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #ffffff;
}

.figure-lightbox-image,
.figure-lightbox-svg {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: calc(100vh - 132px);
  object-fit: contain;
  background: #ffffff;
  border: 2px inset #ffffff;
}

.figure-lightbox-svg {
  height: auto;
  overflow: visible;
}

.figure-lightbox-actions {
  justify-content: flex-end;
  gap: 10px;
  padding: 10px;
  margin: 0;
  border-top: 1px solid #b8b5a7;
  background: var(--chrome);
}

.score-card-only .summary-actions {
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 10px 0 0;
  background: #ece9d8;
  border: 0;
  box-shadow: none;
}

.share-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
}

.share-card-actions span {
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-details-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px;
  padding: 10px;
  background: #ece9d8;
  border: 2px inset #ffffff;
}

.summary-details-panel[hidden] {
  display: none;
}

.summary-details-panel section {
  min-width: 0;
  background: #ffffff;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
}

.summary-details-panel h3 {
  margin: 0;
  padding: 5px 8px;
  color: #ffffff;
  background: linear-gradient(90deg, #0a64d8, #003399);
  font-size: 13px;
}

.summary-details-panel ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 220px;
  overflow: auto;
}

.summary-details-panel li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-top: 1px solid #d8d8d8;
  font-size: 13px;
}

.summary-details-panel li b {
  color: #444444;
  text-align: right;
}

.poster-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.poster-stats div {
  min-width: 0;
  padding: 12px;
  background: #ffffff;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
}

.poster-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.poster-stats strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(24px, 4vw, 44px);
  line-height: 1;
}

.poster-stats div:nth-child(2) strong {
  font-size: clamp(18px, 2.4vw, 30px);
  line-height: 1.08;
}

.score-timestamp {
  margin: 8px 0 10px;
  color: #4f4f4f;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  font-weight: 800;
}

.summary-columns,
.result-map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 12px 12px;
}

.summary-columns ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary-columns li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 9px;
  background: #f7f7f7;
  border: 1px solid #cfcfcf;
  font-weight: 700;
}

.summary-columns li span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.summary-columns li b {
  flex: 0 0 auto;
  font-family: Consolas, "Courier New", monospace;
}

.summary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
  padding: 8px 12px 0;
}

.score-history-host {
  min-height: 320px;
  padding: 12px;
  background: var(--chrome);
}

.score-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.ip-high-score-panel {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
}

.ip-high-score-grid {
  margin-top: 10px;
}

.score-history-card {
  min-width: 0;
  padding: 10px;
  background: #f7f4e8;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset -1px -1px 0 #9b9b9b, inset 1px 1px 0 #ffffff;
}

.score-history-card .summary-share-image {
  margin: 8px 0;
  border: 2px inset #ffffff;
}

.compact-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 10px 0;
}

.compact-stats div {
  padding: 8px;
}

.compact-stats strong,
.compact-stats div:nth-child(2) strong {
  font-size: 18px;
  line-height: 1.05;
}

.score-history-meta {
  display: grid;
  gap: 3px;
}

.score-history-meta strong {
  color: #0a246a;
  font-size: 17px;
}

.score-history-meta span,
.score-history-meta em {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.score-history-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.score-sample-host {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: var(--chrome);
}

.score-sample-intro {
  padding: 14px;
  background: #f7f7f7;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #6f6f6f;
}

.score-sample-intro h1 {
  margin: 0;
  color: #0a246a;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 0.96;
}

.score-sample-intro p {
  max-width: 820px;
  margin: 8px 0 0;
  color: #333333;
  font-weight: 800;
}

.score-sample-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  padding: 10px;
  background: #d6d3c5;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #6f6f6f;
}

.score-sample-controls fieldset,
.score-sample-controls label {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: #111111;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.score-sample-controls fieldset {
  padding: 7px 9px;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
}

.score-sample-controls legend {
  padding: 0 4px;
  color: #0a246a;
}

.score-sample-controls select {
  min-width: 240px;
}

.score-sample-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.score-sample-card {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  background: #f7f4e8;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset -1px -1px 0 #9b9b9b, inset 1px 1px 0 #ffffff;
}

.score-sample-title {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
}

.score-sample-title span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 26px;
  color: #ffffff;
  background: #0a246a;
  border: 2px solid;
  border-color: #7fb1ff #001d78 #001d78 #7fb1ff;
  font-family: Consolas, "Courier New", monospace;
  font-weight: 900;
}

.score-sample-title h2 {
  margin: 0;
  overflow-wrap: anywhere;
  color: #0a246a;
  font-size: 18px;
  line-height: 1.05;
}

.score-sample-trigger {
  padding: 8px;
}

.score-sample-card .summary-share-image {
  border: 2px inset #ffffff;
}

.score-sample-card p {
  margin: 0;
  color: #333333;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.score-sort-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  min-height: 0;
  align-items: center;
  overflow: visible;
}

.score-sort-bar select {
  width: min(260px, 100%);
  min-width: 170px;
}

.profile-host {
  padding: 12px;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.35fr) minmax(280px, 1fr);
  gap: 12px;
}

.profile-card,
.profile-stats-panel {
  padding: 10px;
  background: #f7f4e8;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset -1px -1px 0 #9b9b9b, inset 1px 1px 0 #ffffff;
}

.profile-avatar-frame {
  width: 116px;
  height: 116px;
  flex: 0 0 116px;
  padding: 5px;
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
}

.profile-avatar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
}

.profile-origin-flag {
  display: inline-grid;
  place-items: center;
  width: 155px;
  height: 116px;
  flex: 0 0 155px;
  padding: 5px;
  background: #fffef3;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset 1px 1px 0 #ffffff, 1px 1px 0 #808080;
}

.profile-origin-flag img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.profile-avatar,
.empty-avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  background: #d7ebff;
  border: 2px inset #ffffff;
}

.profile-onboarding-note {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
  padding: 8px;
  color: #0a246a;
  background: #fffdf0;
  border: 2px solid;
  border-color: #ffffff #9d8d00 #9d8d00 #ffffff;
  box-shadow: inset 1px 1px 0 #fff7b8;
}

.profile-onboarding-note strong {
  font-size: 15px;
  text-transform: uppercase;
}

.profile-onboarding-note span {
  color: #222222;
  font-size: 12px;
  font-weight: 800;
}

.profile-form {
  display: grid;
  gap: 8px;
}

.profile-form label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-form textarea {
  min-height: 58px;
}

.profile-form input,
.profile-form select,
.profile-form textarea {
  font-family: "Apple Garamond", "ITC Garamond", "Garamond", Georgia, serif;
  letter-spacing: 0;
}

.profile-dob-field {
  position: relative;
}

.profile-form input[type="hidden"] {
  display: none;
}

.xp-date-picker {
  position: relative;
  display: block;
  width: 100%;
  text-transform: none;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.xp-date-display {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 0;
  overflow: hidden;
  background: var(--paper-bright);
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #404040;
  text-align: left;
}

.xp-date-display span {
  min-width: 0;
  padding: 7px 9px;
  overflow: hidden;
  color: #111111;
  font-family: "Apple Garamond", "ITC Garamond", "Garamond", Georgia, serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xp-date-display b {
  display: grid;
  place-items: center;
  align-self: stretch;
  border-left: 1px solid #9f9f9f;
  background: var(--chrome);
}

.xp-date-display b::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #111111;
}

.xp-date-popup {
  position: absolute;
  z-index: 80;
  top: calc(100% + 4px);
  left: 0;
  display: grid;
  width: min(100%, 376px);
  gap: 6px;
  padding: 0 7px 7px;
  color: #111111;
  background: #ece9d8;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #9f9f9f, 4px 4px 0 rgba(0, 0, 0, 0.25);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.xp-date-popup[hidden] {
  display: none;
}

.xp-date-titlebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  min-height: 26px;
  margin: 0 -7px;
  padding: 2px 3px 2px 8px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--title-dark), var(--title));
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.xp-date-titlebar button {
  width: 20px;
  min-height: 20px;
  padding: 0;
  color: #111111;
  background: var(--chrome);
  border-width: 1px;
  line-height: 1;
}

.xp-date-jumpbar,
.xp-date-monthbar,
.xp-date-footer {
  display: grid;
  gap: 4px;
  align-items: center;
}

.xp-date-jumpbar {
  grid-template-columns: 34px 34px minmax(56px, 1fr) minmax(62px, 1fr) 34px 34px;
}

.xp-date-monthbar {
  grid-template-columns: 34px minmax(0, 1fr) 34px;
}

.xp-date-monthbar strong {
  padding: 4px 8px;
  color: #ffffff;
  background: #0a246a;
  border: 1px solid #001d78;
  text-align: center;
  font-size: 14px;
  line-height: 1.15;
}

.xp-date-jumpbar button,
.xp-date-monthbar button,
.xp-date-footer button,
.xp-date-day {
  min-height: 28px;
  padding: 2px 3px;
  font-size: 11px;
  font-weight: 900;
}

.xp-date-jumpbar select {
  min-width: 0;
  width: 100%;
  min-height: 28px;
  padding: 2px 20px 2px 5px;
  color: #111111;
  background: #ffffff;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  border-radius: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
}

.xp-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.xp-date-weekdays {
  padding: 2px;
  color: #ffffff;
  background: #0a246a;
  border: 1px solid #001d78;
  text-align: center;
  font-size: 11px;
}

.xp-date-day {
  color: #111111;
  background: #fffdf1;
  border-width: 1px;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #b8b8b8;
}

.xp-date-day.muted {
  color: #777777;
  background: #dedbc9;
}

.xp-date-day.selected {
  color: #ffffff;
  background: #0a246a;
  border-color: #7fb1ff #001d78 #001d78 #7fb1ff;
}

.xp-date-day:disabled {
  color: #9f9f9f;
  background: #d8d5c6;
  box-shadow: none;
}

.xp-date-footer {
  justify-content: end;
}

.profile-affiliation-editor {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 6px;
  background: var(--chrome);
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #9f9f9f, inset -1px -1px 0 #ffffff;
}

.profile-affiliation-editor legend {
  display: inline-block;
  max-width: calc(100% - 12px);
  padding: 0 4px;
  background: var(--chrome);
  color: #111111;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
}

#profileAffiliations {
  display: grid;
  gap: 5px;
}

.profile-affiliation-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 5px;
  align-items: center;
}

.profileAffiliationLogo {
  grid-column: 1;
}

.profile-affiliation-remove {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.profile-affiliation-edit-row input {
  min-height: 28px;
  padding: 4px 6px;
  font-size: 12px;
}

.profile-affiliation-remove {
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  color: #ffffff;
  background: #0a246a;
  border-color: #7fb1ff #001d78 #001d78 #7fb1ff;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1;
}

#addProfileAffiliation {
  justify-self: start;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.profile-totals {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 220px;
  padding-top: 10px;
  background: #f7f4e8;
}

.profile-totals h1 {
  margin: -16px 0 34px;
  color: #0a246a;
  font-family: "Apple Garamond", "ITC Garamond", "Garamond", Georgia, serif;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.profile-totals .poster-stats,
.profile-totals .poster-stats div,
.profile-totals .poster-stats span,
.profile-totals .poster-stats strong,
.profile-side-username,
.profile-identity-panel,
.profile-identity-panel span,
.profile-identity-panel strong,
.profile-stat-main strong,
.profile-stat-main span,
.profile-stat-plays,
.profile-stat-detail span,
.profile-stat-detail strong {
  font-family: "Apple Garamond", "ITC Garamond", "Garamond", Georgia, serif;
  letter-spacing: 0;
}

.profile-identity-panel {
  display: grid;
  gap: 7px;
  margin: 0 0 10px;
  padding: 8px;
  background: #ece9d8;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #9f9f9f, inset -1px -1px 0 #ffffff;
}

.profile-identity-panel > div {
  display: grid;
  gap: 4px;
}

.profile-identity-panel span {
  color: var(--muted);
  font-family: "Apple Garamond", "ITC Garamond", "Garamond", Georgia, serif;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-identity-panel strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #111111;
  font-family: "Apple Garamond", "ITC Garamond", "Garamond", Georgia, serif;
  font-size: 16px;
  letter-spacing: 0;
}

.profile-affiliation-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.profile-affiliation-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  max-width: 100%;
  padding: 3px 6px 3px 3px;
  color: #111111;
  background: #fffef3;
  border: 1px solid #b8b39d;
  box-shadow: inset 1px 1px 0 #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.profile-affiliation-chip > span:last-child {
  min-width: 0;
  overflow: hidden;
  color: #111111;
  font-family: "Apple Garamond", "ITC Garamond", "Garamond", Georgia, serif;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.university-logo-badge {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  background: #d7ebff;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset -1px -1px 0 #9b9b9b, inset 1px 1px 0 #ffffff;
  overflow: hidden;
}

.university-logo-badge img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: contrast(1.15) saturate(1.1);
}

.university-logo-fallback {
  color: #0a246a;
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.profile-achievement-counter {
  display: grid;
  grid-template-columns: repeat(5, minmax(50px, auto));
  align-items: center;
  justify-content: end;
  justify-self: end;
  gap: 6px;
  max-width: 100%;
  margin-bottom: 10px;
  padding: 6px 7px;
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset 1px 1px 0 #f7f7f7;
}

.profile-achievement-total {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  place-items: center;
  gap: 5px;
  min-width: 50px;
  min-height: 28px;
  padding: 2px 5px;
  color: #111111;
  background: #fff7ca;
  border: 1px solid #b8ad72;
  font: inherit;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}

.profile-achievement-total:hover,
.profile-achievement-total:focus-visible {
  background: #fff1a6;
  outline: 1px dotted #111111;
  outline-offset: 1px;
}

.profile-totals .poster-stats div {
  background: #fffef3;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #b9b9b9, inset -1px -1px 0 #ffffff;
}

.profile-stat-button {
  display: grid;
  width: 100%;
  height: 100%;
  gap: 6px;
  padding: 0;
  appearance: none;
  color: inherit;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
}

.profile-stat-button:hover,
.profile-stat-button:focus-visible {
  outline: 1px dotted #111111;
  outline-offset: 2px;
}

.profile-totals .poster-stats span,
.profile-identity-panel > div > span {
  font-family: "Apple Garamond", "ITC Garamond", "Garamond", Georgia, serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-totals .poster-stats strong {
  font-family: "Apple Garamond", "ITC Garamond", "Garamond", Georgia, serif;
  letter-spacing: 0;
}

.profile-achievement-total b {
  display: grid;
  place-items: center;
  min-width: 10px;
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.profile-challenge-record {
  grid-template-columns: repeat(4, minmax(42px, auto)) 34px;
  justify-content: center;
  justify-self: center;
  margin: 6px auto 10px;
}

.profile-card-challenge-record {
  width: fit-content;
}

.challenge-record-total {
  gap: 4px;
  color: #111111;
  background: #edf7ff;
  cursor: default;
}

.challenge-record-total span {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  color: #ffffff;
  background: #0a246a;
  border: 1px solid #111111;
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.challenge-record-total.win span {
  background: var(--green);
}

.challenge-record-total.loss span {
  background: #d51f2a;
}

.challenge-record-total.tie span {
  color: #111111;
  background: #ffcc00;
}

.challenge-record-total.pending span {
  background: #0057d9;
}

.challenge-record-info-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  color: #ffffff;
  background: #0a246a;
  border: 2px solid #111111;
  border-radius: 50%;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.62), inset -2px -2px 0 rgba(0, 0, 0, 0.28), 1px 1px 0 #777777;
  cursor: pointer;
}

.challenge-record-info-button span {
  display: block;
  color: #ffffff;
  font-family: Consolas, "Courier New", monospace;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 1px 0 0 #ffffff, 0 1px 0 #ffffff;
  transform: translateY(-1px);
}

.challenge-record-info-button:hover,
.challenge-record-info-button:focus-visible {
  background: #0057d9;
  outline: 2px dotted #111111;
  outline-offset: 2px;
}

.challenge-record-info-list {
  display: grid;
  gap: 7px;
  margin: 0;
}

.challenge-record-info-list div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px;
  background: #fffdf0;
  border: 2px solid;
  border-color: #ffffff #b8ad72 #b8ad72 #ffffff;
}

.challenge-record-info-list dt {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0;
  color: #ffffff;
  background: #0a246a;
  border: 2px solid #111111;
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.challenge-record-info-list dt.win {
  background: var(--green);
}

.challenge-record-info-list dt.loss {
  background: #d51f2a;
}

.challenge-record-info-list dt.tie {
  color: #111111;
  background: #ffcc00;
}

.challenge-record-info-list dt.pending {
  background: #0057d9;
}

.challenge-record-info-list dd {
  margin: 0;
  color: #111111;
  font-weight: 800;
}

.challenge-page {
  display: grid;
  gap: 14px;
}

.challenge-record-panel .profile-challenge-record {
  justify-self: start;
  margin: 0;
}

.profile-trophy-case {
  display: grid;
  gap: 7px;
  width: 100%;
  margin: 0 0 10px;
  padding: 7px;
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset 1px 1px 0 #f7f7f7;
}

.profile-trophy-case h2 {
  margin: 0;
  color: #0a246a;
  font-size: 13px;
  line-height: 1;
  text-transform: uppercase;
}

.profile-trophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 5px;
}

.profile-trophy-button {
  display: grid;
  grid-template-rows: 38px minmax(24px, auto);
  place-items: center;
  gap: 4px;
  min-height: 70px;
  padding: 5px 4px;
  color: #111111;
  background: #fffef3;
  border: 1px solid #b8b39d;
  box-shadow: inset 1px 1px 0 #ffffff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
}

.profile-trophy-button:hover,
.profile-trophy-button:focus-visible {
  background: #e8f1ff;
  outline: 1px dotted #111111;
  outline-offset: 1px;
}

.profile-trophy-button.locked {
  color: #555555;
  background: #d7d7d7;
}

.profile-trophy-icon {
  --trophy-a: #ffd84a;
  --trophy-b: #ff8a00;
  --trophy-c: #0a246a;
  position: relative;
  display: inline-block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  image-rendering: pixelated;
  filter: saturate(1.15) contrast(1.06);
}

.profile-trophy-icon.has-asset {
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.profile-trophy-icon.locked {
  filter: grayscale(1) brightness(0);
  opacity: 0.78;
}

.profile-trophy-icon.locked.locked-muted {
  filter: grayscale(1) saturate(0.2) contrast(0.82) brightness(0.92);
  opacity: 0.72;
}

.profile-trophy-icon.locked.has-silhouette {
  filter: none;
  opacity: 0.82;
}

.profile-trophy-icon.has-asset::before,
.profile-trophy-icon.has-asset::after {
  content: none;
}

.profile-trophy-link {
  display: inline-block;
  margin: 0 10px 8px;
  color: #0a246a;
  font-size: 12px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.profile-trophy-icon::before {
  content: "";
  position: absolute;
  inset: 3px 8px 10px;
  background: linear-gradient(135deg, var(--trophy-a), var(--trophy-b));
  border: 2px solid #111111;
  border-radius: 3px 3px 7px 7px;
  box-shadow:
    -7px 4px 0 -3px var(--trophy-b),
    7px 4px 0 -3px var(--trophy-b),
    0 17px 0 -9px var(--trophy-c);
}

.profile-trophy-icon::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 3px;
  height: 7px;
  background: var(--trophy-c);
  border: 2px solid #111111;
}

.profile-trophy-icon.large {
  width: 58px;
  height: 58px;
}

.profile-trophy-icon.mini {
  width: 24px;
  height: 24px;
}

.trophy-icon-generalist,
.trophy-icon-list {
  --trophy-a: #44d7ff;
  --trophy-b: #216cd6;
  --trophy-c: #ffcc00;
}

.trophy-icon-polymath,
.trophy-icon-polyglot {
  --trophy-a: #9bff8f;
  --trophy-b: #00a651;
  --trophy-c: #0054e3;
}

.trophy-icon-philomath {
  --trophy-a: #38e375;
  --trophy-b: #007f3b;
  --trophy-c: #8b5a2b;
}

.trophy-icon-zero,
.trophy-icon-hater {
  --trophy-a: #ff6a54;
  --trophy-b: #c62828;
  --trophy-c: #111111;
}

.trophy-icon-ball,
.trophy-icon-gamer {
  --trophy-a: #ffffff;
  --trophy-b: #c0c0c0;
  --trophy-c: #0054e3;
}

.trophy-icon-medical {
  --trophy-a: #ff4d4d;
  --trophy-b: #ffffff;
  --trophy-c: #007f3b;
}

.trophy-icon-meat {
  --trophy-a: #ff9d9d;
  --trophy-b: #d84c4c;
  --trophy-c: #ffcc00;
}

.trophy-icon-red-star {
  --trophy-a: #ff6a54;
  --trophy-b: #c62828;
  --trophy-c: #111111;
}

.trophy-icon-weaponized {
  --trophy-a: #a2ff5f;
  --trophy-b: #4a7f22;
  --trophy-c: #303030;
}

.profile-trophy-detail-card p {
  margin: 0;
  padding: 0 10px 2px;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
}

.profile-trophy-detail-card {
  display: grid;
  width: 100%;
  max-height: calc(100dvh - 88px);
  overflow: auto;
}

.profile-trophy-detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 3px;
}

.profile-trophy-detail-head h1 {
  margin: 0 0 3px;
  font-size: 20px;
  line-height: 1;
}

.profile-trophy-detail-head span,
.profile-trophy-locked-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-trophy-progress {
  height: 15px;
  margin: 5px 10px 0;
  overflow: hidden;
  background: #ffffff;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #404040;
}

.profile-trophy-progress span {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(90deg, #18b85e 0 9px, #007f3b 9px 18px);
}

.profile-trophy-tier-spread,
.profile-trophy-requirements,
.profile-trophy-contributions {
  display: grid;
  gap: 3px;
  padding: 5px 10px;
}

.profile-trophy-tier-spread div,
.profile-trophy-requirements div {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 34px;
  gap: 6px;
  padding: 3px 6px;
  background: #fffef3;
  border: 1px solid #c6c2b3;
  box-shadow: inset 1px 1px 0 #ffffff;
}

.profile-trophy-tier-spread div {
  grid-template-columns: 24px minmax(74px, auto) minmax(0, 1fr) auto;
}

.profile-trophy-tier-spread div.locked,
.profile-trophy-requirements div:not(.complete) {
  background: #d7d7d7;
}

.profile-trophy-requirement-progress {
  grid-column: 2 / -1;
  display: block;
  height: 10px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #707070;
}

.profile-trophy-requirement-progress span {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(90deg, #18b85e 0 7px, #007f3b 7px 14px);
}

.profile-trophy-tier-spread strong,
.profile-trophy-requirements strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-trophy-tier-spread span,
.profile-trophy-tier-spread em,
.profile-trophy-requirements em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.profile-trophy-requirement-status {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: #ececec;
  border: 1px solid #8a8a8a;
  box-shadow: inset 1px 1px 0 #ffffff;
}

.profile-trophy-contributions h2 {
  margin: 0 0 2px;
  color: #4d4d4d;
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
}

.profile-trophy-contribution-list {
  display: grid;
  gap: 3px;
}

.profile-trophy-contribution {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 6px;
  color: #111111;
  background: #fffef3;
  border: 1px solid #c6c2b3;
  box-shadow: inset 1px 1px 0 #ffffff;
  text-decoration: none;
}

.profile-trophy-contribution:hover,
.profile-trophy-contribution:focus-visible {
  background: #e8f1ff;
  outline: 1px dotted #111111;
  outline-offset: 1px;
}

.profile-trophy-contribution strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-trophy-contribution span,
.profile-trophy-contribution em,
.profile-trophy-contribution-more {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.profile-trophy-contribution-more {
  padding: 4px 6px;
}

.profile-leaderboard-medals {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 4px 0 14px;
}

.profile-leaderboard-medal-total {
  min-width: 50px;
}

.profile-leaderboard-medal-total b {
  min-width: 10px;
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.leaderboard-medal {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  color: #111111;
  font-family: "Lucida Console", Consolas, monospace;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  background: var(--medal-color);
  border: 2px solid #111111;
  border-radius: 50%;
  text-shadow: none;
  image-rendering: pixelated;
}

.leaderboard-medal::before {
  content: none;
}

.leaderboard-medal::after {
  content: none;
}

.leaderboard-medal.gold-medal {
  --medal-color: #ffd84a;
}

.leaderboard-medal.silver-medal {
  --medal-color: #d7d7d7;
}

.leaderboard-medal.bronze-medal {
  --medal-color: #c47a35;
}

.leaderboard-medal.top-rank-circle {
  --medal-color: #111111;
  color: #ffffff;
  font-size: 8px;
}

.profile-totals .profile-stat-detail span,
.profile-totals .profile-stat-detail strong {
  font-family: "Apple Garamond", "ITC Garamond", "Garamond", Georgia, serif;
  letter-spacing: 0;
}

.profile-detail-card {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
}

.profile-detail-card.profile-trophy-detail-card {
  width: 100%;
  max-height: calc(100dvh - 88px);
  overflow: auto;
}

.profile-trophy-detail-card .summary-actions {
  align-items: center;
  padding: 6px 10px 10px;
}

.profile-detail-count {
  padding: 8px 10px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-detail-list {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.profile-detail-run {
  display: grid;
  gap: 6px;
  padding: 7px;
  background: #fffef3;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #b9b9b9, inset -1px -1px 0 #ffffff;
}

.profile-detail-run-main {
  display: grid;
  gap: 2px;
}

.profile-detail-run-main strong {
  font-size: 14px;
  line-height: 1.1;
}

.profile-detail-run-main a {
  color: #0a246a;
  font-size: 12px;
  font-weight: 900;
}

.profile-detail-run-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.profile-detail-run-stats span {
  display: inline-grid;
  gap: 1px;
  min-width: 72px;
  padding: 4px 5px;
  background: #ece9d8;
  border: 1px solid #c6c2b3;
}

.profile-detail-run-stats em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-detail-run-stats strong {
  font-family: "Apple Garamond", "ITC Garamond", "Garamond", Georgia, serif;
  font-size: 14px;
}

.profile-stats-panel {
  margin-top: 12px;
  background: var(--chrome);
}

.profile-stat-row {
  margin-top: 2px;
}

.profile-stat-row summary {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) minmax(80px, auto) 58px;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  padding: 3px 7px;
  list-style: none;
  cursor: pointer;
  background: #f7f4e8;
  border: 1px solid #c6c2b3;
  box-shadow: inset 1px 1px 0 #ffffff;
  font-weight: 900;
}

.profile-stat-row summary:hover,
.profile-stat-row[open] summary {
  color: #ffffff;
  background: #0a246a;
  border-color: #000000;
}

.profile-stat-row summary::-webkit-details-marker {
  display: none;
}

.profile-stat-row summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-left: 0;
  color: #0a246a;
  background: #ffffff;
  border: 1px solid #7f7f7f;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1;
}

.profile-stat-row[open] summary::before {
  content: "-";
}

.profile-stat-main,
.profile-stat-main strong,
.profile-stat-main span,
.profile-stat-plays {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-stat-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  min-width: 0;
}

.profile-stat-main strong {
  color: #111111;
  font-size: 14px;
  line-height: 1.05;
}

.profile-stat-main span,
.profile-stat-plays,
.achievement-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.profile-stat-row summary:hover .profile-stat-main strong,
.profile-stat-row summary:hover .profile-stat-main span,
.profile-stat-row summary:hover .profile-stat-plays,
.profile-stat-row[open] summary .profile-stat-main strong,
.profile-stat-row[open] summary .profile-stat-main span,
.profile-stat-row[open] summary .profile-stat-plays {
  color: #ffffff;
}

.profile-stat-badges {
  display: inline-flex;
  justify-content: flex-end;
  min-width: 0;
}

.profile-stat-row summary .achievement-row {
  gap: 2px;
}

.profile-stat-row summary .achievement-badge {
  width: 16px;
  height: 16px;
}

.profile-stat-row summary .achievement-row b {
  font-size: 12px;
}

.profile-stat-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 6px;
  padding: 6px 7px 7px 24px;
  background: #ece9d8;
  border: 1px solid #c6c2b3;
  border-top: 0;
}

.profile-stat-detail div {
  padding: 5px 6px;
  background: #fffef3;
  border: 1px solid #d3cfbd;
  box-shadow: inset 1px 1px 0 #ffffff;
}

.profile-stat-detail span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.achievement-row {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  justify-content: flex-end;
}

.achievement-badge {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  image-rendering: pixelated;
}

.achievement-badge.check,
.achievement-badge.greenCheck,
.achievement-badge.goldCheck {
  --check-shape: polygon(34% 68%, 15% 50%, 5% 62%, 35% 92%, 96% 20%, 83% 7%);
}

.achievement-badge.check::before,
.achievement-badge.greenCheck::before,
.achievement-badge.goldCheck::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: #111111;
  clip-path: var(--check-shape);
}

.achievement-badge.check::after,
.achievement-badge.greenCheck::after,
.achievement-badge.goldCheck::after {
  content: "";
  position: absolute;
  inset: 4px 3px 3px;
  background: var(--badge-color, #009b3a);
  clip-path: var(--check-shape);
}

.achievement-badge.greenCheck {
  --badge-color: #009b3a;
}

.achievement-badge.goldCheck {
  --badge-color: #f6c400;
}

.achievement-badge.check,
.achievement-badge.greenCheck,
.achievement-badge.goldCheck {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cpath d='M3.1 12.1c1.4 1.2 2.8 2.7 4.6 4.8C10.8 13 14.3 8 19.1 4.1' fill='none' stroke='%23111111' stroke-width='4.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M3.1 12.1c1.4 1.2 2.8 2.7 4.6 4.8C10.8 13 14.3 8 19.1 4.1' fill='none' stroke='%23009242' stroke-width='2.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
  image-rendering: auto;
}

.achievement-badge.goldCheck {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cpath d='M3.1 12.1c1.4 1.2 2.8 2.7 4.6 4.8C10.8 13 14.3 8 19.1 4.1' fill='none' stroke='%23111111' stroke-width='4.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M3.1 12.1c1.4 1.2 2.8 2.7 4.6 4.8C10.8 13 14.3 8 19.1 4.1' fill='none' stroke='%23f6c400' stroke-width='2.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.achievement-badge.check::before,
.achievement-badge.check::after,
.achievement-badge.greenCheck::before,
.achievement-badge.greenCheck::after,
.achievement-badge.goldCheck::before,
.achievement-badge.goldCheck::after {
  content: none;
}

.achievement-badge.check,
.achievement-badge.greenCheck,
.achievement-badge.goldCheck {
  overflow: visible;
  transform: none;
}

.achievement-badge.star,
.achievement-badge.goldStar,
.achievement-badge.redStar {
  --star-shape: polygon(50% 0%, 61% 34%, 97% 34%, 68% 56%, 79% 92%, 50% 70%, 21% 92%, 32% 56%, 3% 34%, 39% 34%);
}

.achievement-badge.star::before,
.achievement-badge.goldStar::before,
.achievement-badge.redStar::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: #111111;
  clip-path: var(--star-shape);
}

.achievement-badge.star::after,
.achievement-badge.goldStar::after,
.achievement-badge.redStar::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--badge-color, #f6c400);
  clip-path: var(--star-shape);
}

.achievement-badge.goldStar {
  --badge-color: #f6c400;
}

.achievement-badge.redStar {
  --badge-color: #c62828;
}

.achievement-badge.crown {
  width: 22px;
  height: 20px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='20' viewBox='0 0 22 20'%3E%3Cpath d='M3 16h16v3H3z' fill='%23d69c00' stroke='%23111111' stroke-width='1.4'/%3E%3Cpath d='M3 15V6l5 5 3-8 3 8 5-5v9z' fill='%23f2c900' stroke='%23111111' stroke-width='1.4' stroke-linejoin='round'/%3E%3Ccircle cx='8' cy='12' r='1.1' fill='%23e3362d' stroke='%23111111' stroke-width='.6'/%3E%3Ccircle cx='11' cy='8' r='1.1' fill='%232d70d6' stroke='%23111111' stroke-width='.6'/%3E%3Ccircle cx='14' cy='12' r='1.1' fill='%23009b3a' stroke='%23111111' stroke-width='.6'/%3E%3C/svg%3E")
    center / contain no-repeat;
  image-rendering: auto;
}

.achievement-badge.crown::before,
.achievement-badge.crown::after {
  content: none;
}

.achievement-key-grid {
  display: grid;
  gap: 8px;
}

.achievement-key-row {
  display: grid;
  grid-template-columns: 24px 120px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px;
  background: #ffffff;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
}

.achievement-key-row p {
  margin: 0;
}

.google-auth-button {
  color: #111111;
  background: linear-gradient(#ffffff, #d7ebff);
  border-color: #ffffff #4f73ad #4f73ad #ffffff;
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 52px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 28px));
  padding: 10px 12px;
  color: var(--ink);
  background: #ffffcc;
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
  font-weight: 800;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.ok {
  background: #dff7e8;
}

.toast.warn {
  background: #fff6c7;
}

.toast.error {
  background: #ffd9d9;
}

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

  .workspace {
    order: 1;
  }

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

  .game-nav {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .game-nav a.nav-primary,
  .game-nav .topics-label,
  .game-nav .nav-topic {
    grid-column: 1 / -1;
  }

  .ranked-browser {
    grid-template-columns: 1fr;
  }

  .nav-group {
    grid-column: 1 / -1;
  }

  .game-grid,
  .state-layout,
  .state-prompt-body,
  .summary-columns,
  .summary-details-panel,
  .result-map-grid {
    grid-template-columns: 1fr;
  }

  .score-sample-grid {
    grid-template-columns: 1fr;
  }

  .rank-list {
    max-height: none;
  }
}

@media (max-width: 640px) {
  .desktop {
    padding: 38px 6px 48px;
    overflow-x: hidden;
  }

  .catalog-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 0 2px;
    overflow: visible;
  }

  .catalog-tab-list label {
    display: grid;
    flex: 1 1 calc(33.333% - 2px);
    min-height: 34px;
    place-items: center;
    padding: 6px 3px 5px;
    font-size: 9px;
    line-height: 1.05;
    white-space: normal;
  }

  .catalog-tab-list label.catalog-search-tab-label {
    flex: 0 0 42px;
  }

  .catalog-search-topbar {
    grid-template-columns: 1fr;
  }

  .summary-dialog,
  .score-card-dialog,
  .figure-dialog {
    width: calc(100vw - 8px);
    max-height: calc(100vh - 8px);
  }

  .summary-dialog[open],
  .score-card-dialog[open],
  .figure-dialog[open] {
    top: 4px;
  }

  .score-sample-grid {
    grid-template-columns: 1fr;
  }

  .score-sample-host {
    padding: 8px;
  }

  .catalog-layout,
  .rank-game > .game-grid,
  .state-layout,
  .empty-panel {
    padding: 7px;
  }

  .prompt-line,
  .input-row,
  .poster-stats,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .prompt-line {
    display: grid;
  }

  .rank-list li {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .summary-share-panel {
    padding: 7px 7px 0;
  }

  .share-card-frame,
  .score-card-lightbox-body {
    padding: 5px;
  }

  .score-card-large-image {
    max-height: calc(100vh - 118px);
  }

  .rank-list em {
    grid-column: 2;
    padding-top: 0;
    text-align: left;
  }

  .state-entry h2 {
    font-size: 38px;
  }

  .summary-poster {
    padding: 14px;
  }

  .rank-game .game-grid,
  .entity-game .game-grid,
  .flags-game .game-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .rank-game .play-pane,
  .rank-game .score-pane,
  .entity-game .play-pane,
  .entity-game .score-pane,
  .flags-game .play-pane,
  .flags-game .score-pane {
    display: contents;
  }

  .rank-game .play-pane > .prompt-line,
  .rank-game .play-pane > .game-explainer,
  .rank-game .play-pane > .metric-source-note,
  .entity-game .play-pane > .prompt-line,
  .entity-game .play-pane > .game-explainer,
  .entity-game .play-pane > .metric-source-note,
  .entity-game .play-pane > .entity-feature-map-host {
    display: none;
  }

  .rank-game .score-pane .stat-grid,
  .entity-game .score-pane .stat-grid,
  .flags-game .score-pane .stat-grid {
    order: 1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
  }

  .entity-game .play-pane > .state-list-map-host {
    display: block;
    order: 3;
  }

  .rank-game .score-pane .stat-grid div,
  .entity-game .score-pane .stat-grid div,
  .flags-game .score-pane .stat-grid div {
    min-height: 42px;
    padding: 4px 3px;
    text-align: center;
  }

  .rank-game .score-pane .stat-grid span,
  .entity-game .score-pane .stat-grid span,
  .flags-game .score-pane .stat-grid span {
    display: block;
    min-height: 18px;
    font-size: 8px;
    line-height: 1.05;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
  }

  .rank-game .score-pane .stat-grid strong,
  .entity-game .score-pane .stat-grid strong,
  .flags-game .score-pane .stat-grid strong {
    margin-top: 1px;
    font-size: 15px;
    line-height: 1;
    white-space: nowrap;
  }

  .rank-game .guess-form,
  .entity-game .guess-form {
    order: 2;
    gap: 4px;
    padding: 6px;
    background: var(--chrome);
    border: 2px solid;
    border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
    box-shadow: inset -1px -1px 0 #9b9b9b, inset 1px 1px 0 #ffffff;
  }

  .rank-game .guess-form label,
  .entity-game .guess-form label {
    font-size: 10px;
  }

  .rank-game .input-row,
  .entity-game .input-row {
    grid-template-columns: minmax(0, 1fr) 64px;
    gap: 5px;
  }

  .rank-game .input-row input,
  .entity-game .input-row input {
    min-height: 34px;
    padding: 5px 7px;
    font-size: 16px;
  }

  .rank-game .input-row button,
  .entity-game .input-row button {
    min-height: 34px;
    padding: 4px 6px;
  }

  .rank-game .message,
  .entity-game .message {
    margin: 3px 0 0;
    font-size: 12px;
    line-height: 1.15;
  }

  .flags-game .prompt-line,
  .flags-game .game-explainer {
    display: none;
  }

  .flags-game .flag-map-host {
    order: 2;
    margin: 0;
  }

  .flags-game .message {
    order: 3;
    margin: 0;
    padding: 6px;
    background: #f7f4e8;
    border: 2px inset #ffffff;
    font-size: 12px;
    line-height: 1.15;
  }

  .flags-game .flag-grid-toolbar {
    order: 4;
    margin: 0;
    padding: 5px;
  }

  .flags-game .flag-grid {
    order: 5;
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
    max-height: none;
    padding: 6px;
  }

  .flags-game .flag-recent-panel {
    display: none;
  }

  .flag-popup-backdrop {
    inset: 34px 0 38px;
    padding: 8px;
  }

  .flag-popup-body {
    gap: 8px;
    padding: 8px;
  }

  .flag-popup-body > img {
    max-height: 42vh;
  }

  .entity-game .submission-feed-window {
    grid-template-columns: minmax(0, 1fr);
    min-height: 112px;
    max-height: 128px;
    padding: 5px 38px 5px 7px;
  }

  .entity-game .submission-feed-toolbar {
    gap: 3px;
  }

  .entity-game .feed-filter-button {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
  }

  .entity-game .feed-filter-button::before {
    width: 10px;
    height: 10px;
  }

  .entity-game .feed-filter-button.all {
    width: 22px;
    min-width: 22px;
    height: 42px;
    min-height: 42px;
  }

  .entity-game .feed-filter-button.all span {
    width: 8px;
    height: 8px;
  }

  .entity-game .submission-feed-list li {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 4px;
    font-size: 10px;
  }

  .entity-game .submission-feed-list li.empty {
    grid-template-columns: minmax(0, 1fr);
    line-height: 1.15;
  }

  .entity-reveal-popup,
  .entity-reveal-popup:has(.molecule-canvas) {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 6px;
  }

  .molecule-canvas {
    height: 168px;
  }

  .entity-reveal-popup strong {
    font-size: 14px;
  }

  .rank-game .rank-list,
  .entity-game .rank-list {
    order: 3;
    max-height: 44vh;
  }

  .rank-list li,
  .rank-list li.image-row {
    grid-template-columns: 30px minmax(0, 1fr) minmax(48px, auto);
    min-height: 28px;
  }

  .rank-row-thumb,
  .rank-row-symbol {
    display: none;
  }

  .rank-list b,
  .rank-list span,
  .rank-list em {
    padding: 4px;
  }

  .rank-list b {
    font-size: 12px;
  }

  .rank-list span {
    font-size: 12px;
    line-height: 1.1;
  }

  .rank-list small {
    display: none;
  }

  .rank-list em {
    grid-column: auto;
    padding-top: 4px;
    font-size: 9px;
    line-height: 1.05;
    text-align: right;
  }
}

.play-pane .prompt-line {
  align-items: flex-start;
}

.play-pane .prompt-line > div:first-child {
  min-width: 0;
}

.play-pane .prompt-line h1 {
  max-width: 100%;
  font-size: clamp(34px, 4.2vw, 62px);
  line-height: 0.98;
  overflow-wrap: normal;
  text-wrap: balance;
  word-break: normal;
}

.entity-game .play-pane .prompt-line h1,
.commodity-game .play-pane .prompt-line h1 {
  font-size: clamp(32px, 3.6vw, 56px);
}

.language-filter-control {
  display: grid;
  grid-template-columns: auto minmax(130px, 190px);
  align-items: center;
  gap: 6px;
}

.commodity-current-card {
  display: grid;
  gap: 8px;
  min-height: 210px;
  padding: 14px;
  background: var(--paper);
  border: 2px inset #ffffff;
}

.commodity-current-card h2 {
  margin: 0;
  color: #111111;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.95;
}

.commodity-current-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.inline-command-bar {
  justify-content: flex-end;
  margin-top: 10px;
  border-top: 0;
}

.distance-command-bar {
  gap: 8px;
}

.distance-game .entity-feature-map-host {
  margin: 12px 0;
}

.distance-pair-number {
  pointer-events: none;
  fill: #ffffff;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 8px;
  font-weight: 900;
  paint-order: stroke;
  stroke: #111111;
  stroke-width: 1.4px;
}

.distance-pair-map-key {
  align-items: center;
}

.legend-number-swatch {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #ffffff;
  background: #1687ff;
  border: 1px solid #111111;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 1px 1px 0 #111111;
}

.distance-game .game-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
}

.distance-game .score-pane {
  overflow: hidden;
}

.distance-map-placeholder {
  display: grid;
  min-height: 320px;
  place-items: center;
  padding: 18px;
  color: #123178;
  text-align: center;
  background: #d7ebff;
  border: 2px solid;
  border-color: #ffffff #8a8a8a #8a8a8a #ffffff;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #9b9b9b;
}

.distance-map-placeholder strong,
.distance-map-placeholder span {
  display: block;
}

.distance-start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.distance-unit-start-button {
  min-height: 42px;
  padding: 8px 18px;
  color: #ffffff;
  background: #0a7f3f;
  border: 2px solid;
  border-color: #8ff5b7 #044c25 #044c25 #8ff5b7;
  border-radius: 0;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.45), inset -1px -1px 0 rgba(0, 0, 0, 0.24);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.distance-unit-start-button:hover {
  background: #14994f;
}

.distance-current-card {
  margin-top: 12px;
  padding: 14px;
  background: #f6f3e8;
  border: 2px solid;
  border-color: #ffffff #8a8a8a #8a8a8a #ffffff;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #c7c7c7;
}

.distance-current-card h2 {
  margin: 4px 0 12px;
  color: #111111;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.05;
}

.distance-current-card h2 span {
  color: #1454b8;
  font-size: 0.56em;
  text-transform: uppercase;
}

.distance-review-card {
  color: #111111;
}

.distance-review-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.distance-review-stats div {
  min-width: 0;
  padding: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid;
  border-color: #ffffff #7b7766 #7b7766 #ffffff;
}

.distance-review-stats span,
.distance-next-row span {
  display: block;
  color: #123178;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.distance-review-stats strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #111111;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.distance-next-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.distance-history {
  display: grid;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
}

.distance-history li,
.distance-result-tile {
  border: 2px solid;
  border-color: #ffffff #6f6f6f #6f6f6f #ffffff;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.65), inset -1px -1px 0 rgba(0, 0, 0, 0.18);
}

.distance-history li {
  display: flex;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  font-size: 12px;
  font-weight: 900;
}

.distance-history span {
  min-width: 0;
  overflow: hidden;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.distance-history b {
  flex: 0 0 auto;
  white-space: nowrap;
}

.distance-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.distance-summary-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.distance-summary-list .distance-result-tile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  min-height: 70px;
  overflow: hidden;
}

.distance-result-tile div,
.distance-result-tile strong,
.distance-result-tile p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.distance-summary-list .distance-result-tile p {
  margin: 4px 0 0;
}

.distance-results-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding: 8px;
  background: #d6d3c5;
  border: 2px solid;
  border-color: #ffffff #8a8a8a #8a8a8a #ffffff;
}

.distance-results-table-shell {
  margin-top: 14px;
  overflow-x: auto;
  border: 2px inset #ffffff;
  background: #ffffff;
}

.distance-results-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 12px;
  font-weight: 800;
}

.distance-results-table th,
.distance-results-table td {
  padding: 7px 8px;
  border: 1px solid #808080;
  text-align: left;
}

.distance-results-table th {
  background: #d7ebff;
  color: #003399;
  text-transform: uppercase;
}

.distance-result-tile {
  min-height: 112px;
  padding: 10px;
}

.distance-result-tile div {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.distance-result-tile span {
  flex: 0 0 auto;
  color: #123178;
  font-weight: 900;
}

.distance-result-tile strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.18;
}

.distance-result-tile p {
  margin: 8px 0;
  font-size: 12px;
  font-weight: 800;
}

.distance-result-tile b {
  font-size: 20px;
}

.distance-error-red {
  background: #ffb8b8;
  color: #4a0000;
}

.distance-error-orange {
  background: #ffc46b;
  color: #3a2100;
}

.distance-error-yellow {
  background: #d8b64b;
  color: #241900;
}

.distance-error-green {
  background: #a8d88f;
  color: #0b3414;
}

.distance-error-blue {
  background: #8fc7ff;
  color: #062a55;
}

.compact-source-note {
  margin: 10px 0 0;
}

.knowledge-tree-panel {
  margin-top: 12px;
  background: #ffffff;
  border: 2px solid;
  border-color: #8a8a8a #ffffff #ffffff #8a8a8a;
  box-shadow: inset 1px 1px 0 #6f6f6f;
}

.knowledge-tree-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
  padding: 5px;
  background: #d6d3c5;
  border-bottom: 1px solid #8a8a8a;
}

.knowledge-tree-toolbar strong {
  overflow: hidden;
  color: #0a246a;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-tree {
  display: grid;
  gap: 1px;
  max-height: 360px;
  overflow: auto;
  padding: 6px;
  font-size: 13px;
}

.knowledge-tree-node {
  list-style: none;
}

.knowledge-tree-node > summary {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-height: 24px;
  padding: 2px 4px;
  cursor: pointer;
  list-style: none;
}

.knowledge-tree-node > summary::-webkit-details-marker {
  display: none;
}

.knowledge-tree-node > summary:hover {
  color: #ffffff;
  background: #0a246a;
}

.knowledge-tree-node.guessed > summary {
  color: #ffffff;
  background: #245edb;
}

.knowledge-tree-node.heading-node.guessed > summary {
  background: #107c41;
}

.tree-zoom-button {
  min-width: 18px;
  min-height: 18px;
  padding: 0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1;
}

.tree-zoom-placeholder {
  width: 18px;
  height: 18px;
}

.tree-node-label {
  min-width: 0;
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}

.knowledge-tree-node em {
  color: inherit;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.knowledge-tree-children {
  margin-left: 18px;
  padding-left: 7px;
  border-left: 1px dotted #7b7b7b;
}

.knowledge-hover-tooltip {
  position: fixed;
  z-index: 1000;
  max-width: 260px;
  padding: 7px 9px;
  color: #111111;
  background: #fff7a8;
  border: 2px solid;
  border-color: #ffffff #8a7400 #8a7400 #ffffff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.25);
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.leaderboard-host,
.category-page-body {
  padding: 12px;
}

.category-page[class*="topic-"] {
  color: var(--ink);
  background: var(--chrome);
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
}

.leaderboard-header,
.category-page-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  text-align: center;
  color: #111111;
  background: #ffffff;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #6f6f6f;
}

.category-page-header[class*="topic-"] {
  color: #ffffff;
  background: linear-gradient(
    color-mix(in srgb, var(--topic-color) 82%, #ffffff),
    color-mix(in srgb, var(--topic-color) 84%, #000000)
  );
  border-color: #ffffff #6f6f6f #6f6f6f #ffffff;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.55), 4px 4px 0 rgba(0, 0, 0, 0.22);
}

.leaderboard-header h1,
.category-page-header h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  text-transform: uppercase;
}

.leaderboard-header p,
.category-page-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.category-page-header[class*="topic-"] p {
  color: #ffffff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
}

.category-page-header > div {
  display: grid;
  justify-items: center;
  width: 100%;
  gap: 4px;
}

.category-topic-description {
  max-width: 980px;
  color: #ffffff;
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 900;
  line-height: 1.25;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.48);
}

.leaderboard-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  background: #d6d3c5;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
}

.leaderboard-controls button.active {
  color: #ffffff;
  background: var(--title);
  border-color: #7fb1ff #001d78 #001d78 #7fb1ff;
}

.leaderboard-mode-empty {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  background: #efeddf;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  color: #4c4c4c;
  font-size: 12px;
  font-weight: 900;
}

.leaderboard-controls label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.leaderboard-mode-buttons-panel {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: min(100%, 620px);
  font-weight: 900;
}

.leaderboard-mode-empty {
  gap: 8px;
}

.leaderboard-mode-empty span,
.leaderboard-mode-filter span {
  color: #111111;
  text-transform: uppercase;
}

.leaderboard-mode-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.leaderboard-mode-buttons button {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 98px;
  min-height: 32px;
  padding: 4px 7px;
  text-align: left;
  font-size: 12px;
  font-weight: 900;
}

.leaderboard-mode-buttons b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-mode-buttons small {
  padding: 1px 5px;
  color: #0a246a;
  background: #ffffff;
  border: 1px solid #808080;
  font-size: 10px;
  font-weight: 900;
}

.leaderboard-mode-buttons button.active small {
  color: #111111;
  background: #fff06a;
}

.leaderboard-mode-empty strong {
  color: #0a246a;
}

.leaderboard-controls select {
  min-height: 32px;
  min-width: min(320px, 70vw);
  padding: 4px 38px 4px 8px;
  background: #ffffff;
  background:
    linear-gradient(45deg, transparent 49%, #111111 50% 64%, transparent 65%) right 19px center / 7px 7px no-repeat,
    linear-gradient(-45deg, transparent 49%, #111111 50% 64%, transparent 65%) right 13px center / 7px 7px no-repeat,
    linear-gradient(#ece9d8, #ece9d8) right top / 32px 100% no-repeat,
    #ffffff;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  border-radius: 0;
  appearance: none;
}

.leaderboard-table {
  display: grid;
  gap: 0;
  overflow: auto;
  background: #ffffff;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
  box-shadow: inset 1px 1px 0 #6f6f6f;
}

.leaderboard-table-shell {
  background: #ffffff;
  border: 2px solid;
  border-color: var(--chrome-line) #ffffff #ffffff var(--chrome-line);
}

.leaderboard-table-shell > summary {
  padding: 8px 10px;
  color: #0a246a;
  background: #d6d3c5;
  border-bottom: 1px solid #8a8a8a;
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 54px 70px minmax(140px, 1fr) minmax(150px, 0.8fr) minmax(120px, 0.65fr) minmax(105px, 0.55fr) minmax(180px, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 970px;
  padding: 8px 10px;
  border-bottom: 1px solid #d0d0d0;
  font-weight: 800;
}

.leaderboard-row > span,
.leaderboard-row a,
.end-run-stats-grid strong,
.end-run-stats-grid span {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

.leaderboard-row.header {
  color: #ffffff;
  background: var(--title);
  text-transform: uppercase;
}

.leaderboard-row a {
  color: #0046d5;
  font-weight: 900;
}

.leaderboard-user {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.leaderboard-user span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.country-flag,
.leaderboard-country-flag,
.rank-country-flag,
.profile-origin-flag {
  position: relative;
  box-sizing: border-box;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  width: 56px;
  height: 38px;
  padding: 4px;
  overflow: hidden;
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset 1px 1px 0 #ffffff, 1px 1px 0 #808080;
  line-height: 0;
  --flag-image-inset: 6px;
  --flag-y-offset: 0px;
}

.country-flag-image,
.country-flag img,
.leaderboard-country-flag img,
.rank-country-flag img,
.profile-origin-flag img {
  display: block;
  position: absolute;
  top: var(--flag-image-inset);
  left: var(--flag-image-inset);
  place-self: auto;
  max-width: 100%;
  max-height: 100%;
  width: calc(100% - var(--flag-image-inset) - var(--flag-image-inset));
  height: calc(100% - var(--flag-image-inset) - var(--flag-image-inset));
  object-fit: contain;
  object-position: center center;
  transform: translateY(var(--flag-y-offset));
}

.leaderboard-flag-cell {
  display: inline-grid;
  place-items: center;
  min-width: 0;
}

.leaderboard-country-flag {
  width: 52px;
  height: 34px;
}

.rank-country-flag {
  width: 48px;
  height: 32px;
  margin: 5px 0;
  --flag-y-offset: -4px;
}

.rank-list .rank-country-flag {
  padding: 4px;
}

.metro-city-flag {
  width: 42px;
  height: 28px;
  padding: 3px;
  --flag-image-inset: 5px;
}

.rank-list .metro-city-flag {
  padding: 3px;
}

.reveal-metro-flag {
  width: 60px;
  height: 40px;
}

.profile-origin-flag {
  width: 155px;
  height: 116px;
  flex: 0 0 155px;
  padding: 5px;
  background: #fffef3;
  --flag-image-inset: 7px;
}

@media (max-width: 720px) {
  .entity-pie-card {
    grid-template-columns: 1fr;
  }

  .entity-pie-chart {
    justify-self: center;
  }

  .taskbar {
    gap: 4px;
  }

  .taskbar .taskbar-xp {
    min-width: 0;
    padding: 0;
  }

  .taskbar .taskbar-xp-text {
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .taskbar-xp-help {
    flex-basis: 26px;
    width: 26px;
    min-height: 26px;
  }

  .game-xp-floating {
    position: static;
    margin: 0 0 6px auto;
    max-width: 100%;
  }

  .end-leaderboard-head {
    align-items: stretch;
    display: grid;
  }

  .end-leaderboard-head .button-link {
    width: 100%;
    text-align: center;
  }

  .end-leaderboard-table {
    max-height: 340px;
  }

  .leaderboard-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .leaderboard-mode-empty {
    grid-column: 1 / -1;
    width: 100%;
  }

  .leaderboard-controls label {
    grid-column: 1 / -1;
    display: grid;
    align-items: start;
  }

  .leaderboard-mode-buttons-panel {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    align-items: stretch;
    width: 100%;
  }

  .leaderboard-mode-buttons button {
    flex: 1 1 120px;
  }

  .leaderboard-controls select {
    width: 100%;
    min-width: 0;
  }

  .leaderboard-row {
    grid-template-columns: 32px 50px minmax(78px, 1fr) minmax(68px, 0.8fr) minmax(76px, 0.8fr) minmax(54px, 0.6fr);
    min-width: 0;
    gap: 5px;
    padding: 7px 6px;
    font-size: 12px;
  }

  .leaderboard-row > span:last-child {
    display: none;
  }

  .leaderboard-row.header > span:last-child {
    display: none;
  }

  .leaderboard-country-flag {
    width: 40px;
    height: 28px;
    padding: 3px;
  }
}

.category-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 10px;
}

.category-game-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  color: #ffffff;
  border: 2px solid;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.55), 4px 4px 0 rgba(0, 0, 0, 0.28);
}

.category-game-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.category-game-main strong,
.category-game-main em {
  min-width: 0;
  color: inherit;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
  overflow-wrap: anywhere;
}

.category-game-main strong {
  font-size: 18px;
  line-height: 1.05;
}

.category-game-main em {
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.category-size-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.category-size-buttons a {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 32px;
  min-width: 48px;
  min-height: 32px;
  padding: 0;
  color: #111111;
  background: var(--chrome);
  border: 2px solid;
  border-color: #ffffff var(--chrome-line) var(--chrome-line) #ffffff;
  box-shadow: inset -1px -1px 0 #404040, inset 1px 1px 0 #f8f8f8;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 980px) {
  .profile-grid,
  .periodic-layout {
    grid-template-columns: 1fr;
  }

  .score-sort-bar {
    grid-template-columns: 1fr;
  }

  .profile-stat-row summary {
    grid-template-columns: 16px minmax(0, 1fr) auto;
    gap: 4px 8px;
  }

  .profile-stat-main {
    grid-column: 2;
    grid-row: 1;
  }

  .profile-stat-badges {
    grid-column: 2;
    grid-row: 2;
    justify-content: flex-start;
  }

  .profile-stat-plays {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
  }
}

@media (max-width: 640px) {
  .profile-totals {
    padding-top: 12px;
  }

  .profile-achievement-counter {
    position: static;
    display: grid;
    grid-template-columns: repeat(5, minmax(50px, auto));
    justify-content: flex-start;
    margin-bottom: 10px;
  }

  .catalog-card {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .catalog-card:has(.game-status-icon.earned-status) {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .catalog-card .catalog-file-mode,
  .catalog-card em {
    grid-column: 2;
    white-space: normal;
  }

  .play-pane .prompt-line {
    display: grid;
  }

  .play-pane .prompt-line h1 {
    font-size: clamp(30px, 10vw, 44px);
  }

  .source-chip {
    float: none;
    justify-self: start;
    max-width: 100%;
    margin: 0;
  }
}

.xp-mobile-warning {
  width: min(92vw, 420px);
  padding: 0;
  color: #111111;
  background: var(--chrome);
  border: 2px solid #d4d0c8;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.32);
}

.xp-mobile-warning::backdrop {
  background: rgba(0, 0, 0, 0.68);
}

.xp-mobile-warning__window {
  margin: 0;
  background: var(--chrome);
}

.xp-mobile-warning__title {
  padding: 8px 10px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--title), var(--title-dark));
  font-size: 16px;
  font-weight: 900;
}

.xp-mobile-warning__body {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-top: 2px solid #ffffff;
}

.xp-mobile-warning__body h2 {
  margin: 0;
  color: var(--title-dark);
  font-size: 24px;
  line-height: 1.05;
}

.xp-mobile-warning__body p {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.xp-mobile-warning__ok {
  justify-self: end;
  min-width: 84px;
}

.guest-name-prompt {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.68);
}

.guest-name-prompt__window {
  width: min(92vw, 430px);
  color: #111111;
  background: var(--chrome);
  border: 2px solid #d4d0c8;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.35);
}

.guest-name-prompt__title {
  padding: 8px 10px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--title), var(--title-dark));
  font-size: 16px;
  font-weight: 900;
}

.guest-name-prompt__body {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: var(--chrome);
  border-top: 2px solid #ffffff;
}

.guest-name-prompt__body p {
  margin: 0;
  color: #0a246a;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.guest-name-prompt__body label {
  color: #111111;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.guest-name-prompt__body input,
.guest-name-prompt__body select {
  width: 100%;
  min-height: 38px;
  padding: 7px 8px;
  font-size: 18px;
  font-weight: 900;
  background: #fffef2;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  outline: none;
}

.guest-name-prompt__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.guest-name-prompt__actions button {
  min-width: 96px;
}

@media (min-width: 721px) {
  .xp-mobile-warning {
    display: none;
  }
}
