:root {
  color-scheme: light;
  --bg: #e9e9e9;
  --bg-raised: #ffffff;
  --bg-main: #f2f2f2;
  --ink: #11181c;
  --muted: #3d4a52;
  --gold: #3c5665;
  --gold-dim: #2a3d49;
  --line: #b7b7b7;
  --accent: #c23b22;
  --link: #3c5665;
  --link-hover: #1a2830;
  --error: #f07167;
  --ok: #8fce7a;
  --focus: #3c5665;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  line-height: 1.45;
  background: var(--bg);
  color: var(--ink);
}

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

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

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.proto-banner {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: 0.05rem 1.25rem 0.65rem;
}

.proto-banner img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}

.proto-header {
  position: sticky;
  top: 0;
  z-index: 20;
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  background: var(--bg-raised);
  border: 1px solid var(--line);
}

.proto-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.1rem;
  padding: 0.65rem 1.25rem;
}

.proto-links,
.proto-guest,
.proto-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.9rem;
}

.proto-end {
  margin-left: auto;
}

.proto-links a,
.proto-guest a,
.proto-panel a {
  text-decoration: none;
}

.proto-links a[aria-current="page"],
.proto-guest a[aria-current="page"],
.proto-panel a[aria-current="page"] {
  font-weight: 700;
}

.proto-menu {
  position: relative;
}

.proto-menu > summary {
  cursor: pointer;
  list-style: none;
}

.proto-menu > summary::-webkit-details-marker {
  display: none;
}

.proto-menu > summary::after {
  content: "";
  display: inline-block;
  margin-left: 0.35rem;
  border: 0.28rem solid transparent;
  border-top-color: currentColor;
  vertical-align: 0.15rem;
}

.proto-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 21;
  display: flex;
  flex-direction: column;
  min-width: 11rem;
  padding: 0.35rem 0;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  text-align: left;
}

.proto-panel form {
  margin: 0;
}

.proto-panel a,
.proto-panel button,
.proto-panel button[type="submit"] {
  box-sizing: border-box;
  display: block;
  width: 100%;
  padding: 0.4rem 0.85rem;
  font: inherit;
  font-weight: 400;
  color: var(--link);
  text-align: left;
  background: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.proto-panel a:hover,
.proto-panel button:hover,
.proto-panel button[type="submit"]:hover {
  color: var(--link-hover);
  background: var(--bg);
  filter: none;
}

.proto-main {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  min-height: 1200px;
  margin-inline: auto;
  padding: 2rem 1.25rem 4rem;
  background: var(--bg-main);
  border: 1px solid var(--line);
  border-top: 0;
  margin-bottom: 300px;
}

.proto-main h1 {
  margin-top: 0;
  font-size: 1.6rem;
}

main h2 {
  margin-top: 0;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 20rem;
}

.account-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--muted);
}

.account-form.challenge-form {
  max-width: 28rem;
}

.proto-main:has(.challenge-stage) {
  display: flex;
  flex-direction: column;
}

.challenge-stage {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: transparent;
}

.challenge-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  height: 90%;
  width: auto;
  max-width: 90%;
  object-fit: contain;
  opacity: 0.10;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.challenge-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 36rem);
  background: transparent;
  text-align: center;
}

.challenge-copy > p {
  max-width: 36rem;
}

.challenge-stage .account-form,
.challenge-stage fieldset,
.challenge-stage label {
  background: transparent;
}

.challenge-stage .account-form.challenge-form {
  align-items: center;
  width: min(100%, 28rem);
}

.challenge-stage fieldset,
.challenge-stage .account-form label {
  box-sizing: border-box;
  width: 100%;
  text-align: center;
}

.challenge-stage legend {
  margin-inline: auto;
  text-align: center;
}

.challenge-stage .account-form label {
  align-items: center;
}

.challenge-stage .account-form label.check {
  justify-content: center;
}

.challenge-stage .account-form select,
.challenge-stage .account-form textarea {
  box-sizing: border-box;
  width: 100%;
  background-color: rgb(242 242 242 / 65%);
}

.challenge-stage .account-form select {
  appearance: none;
  padding-right: 1.8rem;
  border: 1px solid var(--line);
  background-color: rgb(242 242 242 / 65%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2311181c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 0.7rem;
  color: var(--ink);
}

.challenge-stage .account-form button {
  align-self: center;
  width: auto;
}

.account-form fieldset {
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 0;
}

.account-form legend {
  color: var(--ink);
  padding: 0 0.3rem;
}

.account-form label.check {
  flex-direction: row;
  align-items: center;
  color: var(--ink);
}

.account-form input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  padding: 0;
  accent-color: var(--gold);
}

.account-form input,
.account-form select,
.account-form textarea,
.account-form button,
.arena-controls button,
button[type="submit"] {
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.account-form button,
.arena-controls button,
button[type="submit"] {
  cursor: pointer;
  background: var(--gold);
  color: #ffffff;
  border-color: var(--gold);
  font-weight: 700;
}

.account-form button:hover,
.arena-controls button:hover,
button[type="submit"]:hover {
  filter: brightness(1.08);
}

.promotion-offer {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--gold);
}

.promotion-offer button {
  font-size: 1.15rem;
  padding: 0.75rem 1rem;
}

.account-form input:focus,
.account-form select:focus,
.account-form textarea:focus,
.account-form button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.form-error {
  color: var(--error);
}

.form-ok {
  color: var(--ok);
}

.admin-card {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 0.25rem 1rem;
  max-width: 36rem;
  margin: 0 0 1rem;
}

.admin-card dt {
  color: var(--muted);
}

.admin-card dd {
  margin: 0;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.admin-actions form {
  margin: 0;
}

.pager {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.pager span {
  color: var(--muted);
}

.data-table {
  border-collapse: collapse;
  margin: 1rem 0;
  width: 100%;
  
}

.data-table th,
.data-table td {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  text-align: left;
}

.data-table th {
  font-weight: 700;
  color: var(--muted);
  background: var(--bg-raised);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.data-table tbody tr:hover {
  background: var(--bg-raised);
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: min(100%, 48rem);
}

.profile-fights {
  width: 100%;
}

.profile-fights > p {
  text-align: center;
}

.profile-identity {
  text-align: center;
}

.profile-identity img {
  display: block;
  margin: 0 auto 0.4rem;
}

.profile-record {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.win {
  color: var(--ok);
}

.loss {
  color: var(--error);
}

.draw {
  color: var(--ink);
}

.win a,
.loss a,
.draw a {
  color: inherit;
}

.rank-1,
.rank-2,
.rank-3,
.rank-4,
.rank-5,
.rank-6,
.rank-7,
.rank-8,
.rank-9,
.rank-10,
.rank-11,
.rank-12,
.rank-13,
.rank-14,
.rank-15,
.rank-16,
.rank-17 {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
  font-weight: 600;
  box-shadow: 0px 1px 3px #000000;  
  margin-left: 3px;
  margin-right: 3px;


}

.rank-1 { color: #000; background: #fff; }
.rank-2 { color: #000; background: #ffff80; }
.rank-3 { color: #000; background: #ff8000; }
.rank-4 { color: #000; background: #80ff80; }
.rank-5 { color: #fff; background: #791579; }
.rank-6 { color: #fff; background: #663300; }
.rank-7 { color: #fff; background: #000; }
.rank-8,
.rank-9,
.rank-10,
.rank-11,
.rank-12,
.rank-13,
.rank-14,
.rank-15,
.rank-16,
.rank-17 { color: #f00; background: #000; }

.replay-pair {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
}

.replay-classic .replay-pair {
  gap: 4rem;
}

.replay-fighter {
  text-align: center;
}

.replay-fighter img {
  display: block;
  margin: 0 auto 0.4rem;
}

.replay-taunt {
  font-style: italic;
}

.replay-switch {
  display: flex;
  gap: 1rem;
}

.replay-switch a[aria-current="page"] {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.replay-rounds,
.replay-log {
  list-style: none;
  padding: 0;
}

.replay-rounds li {
  margin: 2.75rem 0;
}

.replay-log li {
  margin: 1rem 0;
}

.replay-center,
.replay-results {
  text-align: center;
}

.replay-round-title {
  font-size: 1.5em;
}

.replay-result-title {
  font-size: 2em;
}

.replay-pose-name {
  margin: 0 0 0.35rem;
  color: #a8a8a8;
  font-weight: 500;
  letter-spacing: 0;
}

.replay-board {
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 1rem 1.25rem 1.15rem;
  background: #f7f7f7;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.replay-results {
  padding-top: 0.6875rem;
}

.replay-results > p {
  font-size: 1.5em;
}

.replay-poses,
.arena-stage-row {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.replay-poses {
  gap: 4.5rem;
  align-items: flex-end;
}

.replay-poses.is-bow {
  gap: 7rem;
}

.replay-figure {
  color: var(--ink);
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.04em;
  width: min(100%, 14rem);
}

.replay-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 16rem;
}

.replay-stage .replay-stack {
  width: max-content;
  max-width: 100%;
  max-height: 100%;
  background-color: transparent;
}

.replay-stage .replay-stack > img {
  width: auto;
  height: auto;
  max-width: 14rem;
  max-height: 16rem;
  object-fit: contain;
  object-position: bottom center;
}

.replay-classic .replay-fighter > a {
  display: block;
}

.replay-classic .replay-board .replay-poses {
  flex-wrap: nowrap;
  width: max-content;
  max-width: 100%;
}

.replay-classic .replay-board .replay-figure {
  width: 15.4rem;
  flex: 0 0 auto;
}

.replay-classic .replay-stage {
  height: 17.6rem;
}

.replay-classic .replay-stage .replay-stack > img {
  max-width: 15.4rem;
  max-height: 17.6rem;
}

@media (max-width: 640px) {
  .replay-classic .replay-board {
    width: 100%;
  }

  .replay-classic .replay-board .replay-poses {
    width: 100%;
  }

  .replay-classic .replay-board .replay-figure {
    width: min(100%, 15.4rem);
  }
}

.arena {
  margin: 1.25rem 0;
  padding: 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
}

.arena-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.arena-fighter {
  flex: 1 1 8rem;
  text-align: center;
  max-width: 14rem;
}

.arena-caption {
  flex: 1 1 12rem;
  text-align: center;
  margin: 0;
}

.hp-bar {
  position: relative;
  height: 1.65rem;
  margin-top: 0.45rem;
  background: #2a2a2a;
  border: 1px solid #111;
  border-radius: 3px;
  overflow: hidden;
}

.hp-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
}

.hp-bar[data-band="high"] .hp-fill {
  background: #2e9e3a;
}

.hp-bar[data-band="mid"] .hp-fill {
  background: #e07a12;
}

.hp-bar[data-band="low"] .hp-fill {
  background: #c62828;
}

.hp-value {
  position: relative;
  z-index: 1;
  display: block;
  font-weight: 700;
  line-height: 1.65rem;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 1px #000;
}

@media (max-width: 640px) {
  .arena-stage-row,
  .replay-poses,
  .replay-poses.is-bow {
    flex-direction: column;
    gap: 2rem;
  }
}

.help {
  max-width: 62rem;
  margin-inline: auto;
  text-align: center;
}

.help h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
  color: var(--gold);
  letter-spacing: 0.03em;
}

.help p {
  margin: 0.5rem 0;
  color: var(--ink);
}

.term {
  position: relative;
  display: inline;
  color: var(--gold);
  text-decoration: underline dotted;
  text-underline-offset: 0.18em;
  cursor: help;
}

.term:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.term-panel {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 0.35rem);
  z-index: 2;
  width: max-content;
  max-width: 18rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-raised);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 400;
  text-decoration: none;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.4);
}

.term:hover .term-panel,
.term:focus-within .term-panel {
  display: block;
}

.rankings {
  width: min(100%, 36rem);
  margin-inline: auto;
}

.rank-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.rank-switcher h2 {
  flex: 0 1 auto;
  margin: 0;
  text-align: center;
}

.rank-arrow {
  min-width: 3.25rem;
  min-height: 3.25rem;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: var(--gold);
  color: #ffffff;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
}

.rank-arrow:hover {
  background: var(--link-hover);
}

.rank-arrow:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rank-place {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin: 1.35rem 0;
  text-align: center;
}

.rank-line {
  margin: 0;
}

.rank-number,
.rank-stat {
  color: var(--gold);
  font-weight: 700;
}

.rank-place img {
  display: block;
  height: auto;
}

.rank-place-1 img {
  width: 195px;
}

.rank-place-2 img,
.rank-place-3 img {
  width: 156px;
}

.rank-place-rest img {
  width: 98px;
}

.message-unread {
  font-weight: 700;
}

.message-has-url {
  background: #fff4d6;
}

.message-link-mark {
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid currentColor;
}

.message-window {
  display: flex;
  gap: 1rem;
}

.chat-log {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0.5rem 0.75rem;
  max-height: 24rem;
  overflow-y: auto;
  background: #11181c;
  color: #e8e6e3;
  border: 1px solid #11181c;
  font-family: Fixedsys, "Lucida Console", Consolas, monospace;
  font-size: 16px;
  line-height: 1.2;
}

.chat-line {
  display: grid;
  grid-template-columns: 5ch max-content minmax(0, 1fr);
  column-gap: 0ch;
  align-items: start;
  margin: 0.15rem 0;
}

.chat-line a {
  font-family: Consolas, "Cascadia Mono", monospace;
  width: 15ch;
  min-width: 15ch;
  max-width: 15ch;
  overflow: hidden;
  white-space: nowrap;
  text-align: right;
}

.chat-body {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-log a.chat-rank-1,
.chat-log a.chat-rank-1:hover { color: #fff; }
.chat-log a.chat-rank-2,
.chat-log a.chat-rank-2:hover { color: #ffff80; }
.chat-log a.chat-rank-3,
.chat-log a.chat-rank-3:hover { color: #ff8000; }
.chat-log a.chat-rank-4,
.chat-log a.chat-rank-4:hover { color: #80ff80; }
.chat-log a.chat-rank-5,
.chat-log a.chat-rank-5:hover { color: #d070d0; }
.chat-log a.chat-rank-6,
.chat-log a.chat-rank-6:hover { color: #c4843c; }
.chat-log a.chat-rank-7,
.chat-log a.chat-rank-7:hover { color: #d0d0d0; }
.chat-log a.chat-rank-8,
.chat-log a.chat-rank-8:hover,
.chat-log a.chat-rank-9,
.chat-log a.chat-rank-9:hover,
.chat-log a.chat-rank-10,
.chat-log a.chat-rank-10:hover,
.chat-log a.chat-rank-11,
.chat-log a.chat-rank-11:hover,
.chat-log a.chat-rank-12,
.chat-log a.chat-rank-12:hover,
.chat-log a.chat-rank-13,
.chat-log a.chat-rank-13:hover,
.chat-log a.chat-rank-14,
.chat-log a.chat-rank-14:hover,
.chat-log a.chat-rank-15,
.chat-log a.chat-rank-15:hover,
.chat-log a.chat-rank-16,
.chat-log a.chat-rank-16:hover,
.chat-log a.chat-rank-17,
.chat-log a.chat-rank-17:hover { color: #f00; background: #000; }

.message-body {
  white-space: pre-wrap;
}

.options-pictures,
.replay-outcome {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}

.replay-outcome {
  justify-content: center;
}

.options-pictures figure,
.replay-outcome figure {
  margin: 0;
}

.options-pictures figcaption,
.replay-outcome figcaption {
  color: var(--muted);
  font-size: 0.9rem;
}

.replay-outcome figcaption {
  text-align: center;
}

.options-form {
  max-width: 24rem;
}

.player-picture,
.options-pictures img,
.replay-fighter img,
.replay-outcome img {
  box-sizing: border-box;
}

.agreement-form {
  max-width: 36rem;
}

.agreement-dialog {
  max-width: 36rem;
  border: 1px solid var(--muted);
  padding: 1rem;
}

.agreement-text {
  white-space: pre-wrap;
}

.agreement-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.agreement-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.crop-dialog {
  max-width: 22rem;
  border: 1px solid var(--muted);
  padding: 1rem;
}

.crop-dialog canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #111;
  cursor: grab;
  touch-action: none;
}

.crop-actions {
  display: flex;
  gap: 0.5rem;
}

.image-style[hidden] {
  display: none;
}

.muted {
  color: var(--muted);
}

.dojo-title {
  margin-top: 0;
}

.dojo {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dojo-columns {
  display: grid;
  grid-template-columns: minmax(16rem, 0.85fr) minmax(0, 1.45fr);
  gap: 1rem;
  align-items: start;
}

.dojo-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  padding: 0.9rem 1rem;
  margin: 0 0 0.85rem;
}

.dojo-card h2,
.dojo-card h3 {
  margin: 0 0 0.55rem;
}

.dojo > .dojo-chat {
  margin-bottom: 0;
}

.dojo-identity h2 {
  font-size: 1.45rem;
}

.dojo-identity h2 a {
  color: var(--ink);
  text-decoration: none;
}

.dojo-identity h2 a:hover {
  color: var(--gold);
}

.dojo-status {
  margin: 0.35rem 0;
  color: var(--muted);
}

.dojo-exp {
  margin: 0.35rem 0 0.45rem;
  font-variant-numeric: tabular-nums;
}

.exp-bar {
  height: 0.7rem;
  background: #2a241c;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.exp-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
}

.dojo .chat-log {
  height: 16rem;
  max-height: none;
  margin-bottom: 0.75rem;
}

.dojo .chat-line {
  grid-template-columns: 15ch minmax(0, 1fr);
}

.dojo .chat-line time {
  display: none;
}

.dojo .chat-form {
  flex-direction: row;
  align-items: flex-end;
  max-width: none;
  margin: 0;
}

.dojo .chat-form label {
  flex: 1 1 40rem;
  max-width: 40rem;
  min-width: 0;
}

.dojo .chat-form input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.dojo .chat-form button {
  flex: 0 0 auto;
}

.dojo-feed {
  min-width: 0;
}

.activity-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.activity-feed li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 6ch;
  column-gap: 0.75rem;
  align-items: center;
  width: 100%;
  margin: 0.45rem 0;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
}

.activity-feed li:first-child {
  border-top: 0;
  padding-top: 0;
}

.activity-icon {
  width: 32px;
  height: 32px;
  justify-self: start;
}

.activity-icon img {
  display: block;
  width: 32px;
  height: 32px;
}

.activity-detail {
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-time {
  text-overflow: ellipsis;
  white-space: nowrap;
  justify-self: end;
  text-align: right;
}

.dojo-side .data-table {
  margin: 0;
}

.incoming-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.incoming-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  column-gap: 0.75rem;
  align-items: center;
  margin: 0.45rem 0;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
}

.incoming-list li:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.incoming-list li > a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.incoming-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.incoming-actions form {
  margin: 0;
}

a.incoming-accept,
button.incoming-decline {
  display: inline-block;
  padding: 0.45rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font: inherit;
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none;
  cursor: pointer;
  color: #ffffff;
}

a.incoming-accept {
  background: #2e7d32;
  border-color: #2e7d32;
}

button.incoming-decline {
  background: #c23b22;
  border-color: #c23b22;
}

a.incoming-accept:hover,
button.incoming-decline:hover {
  filter: brightness(1.08);
  color: #ffffff;
}

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

.belt-lab {
  --belt: #ffff80;
  --stage: #d8d2c6;
  --belt-image: url("/public/combat/kfm_punch_belt_med.png");
}

.belt-lab-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 0.75rem 0 1.25rem;
}

.belt-lab-controls label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.belt-lab-controls select,
.belt-lab-controls input[type="text"],
.belt-lab-controls input[type="number"] {
  font: inherit;
  color: var(--ink);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  padding: 0.2rem 0.4rem;
}

.belt-lab-controls input[type="number"] {
  width: 4.5rem;
}

.belt-lab-controls input[type="text"] {
  width: 14rem;
}

.belt-lab-presets,
.belt-lab-facing {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.belt-lab-presets button,
.belt-lab-facing button {
  font: inherit;
  color: var(--ink);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
}

.belt-lab-presets button:hover,
.belt-lab-presets button:focus-visible,
.belt-lab-facing button:hover,
.belt-lab-facing button:focus-visible,
.belt-lab-facing button[aria-pressed="true"] {
  border-color: var(--gold);
  outline: none;
}

.belt-lab-figure {
  margin: 0;
  width: min(100%, 36rem);
}

.belt-lab-stack,
.replay-stack {
  position: relative;
  background-color: var(--stage);
}

.replay-stack {
  --stage: #d8d2c6;
}

.belt-lab-stack.is-flipped,
.replay-stack.is-flipped {
  transform: scaleX(-1);
}

.belt-lab-stack > img,
.replay-stack > img {
  display: block;
  width: 100%;
  height: auto;
}

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

.center-page .account-form {
  width: min(100%, 20rem);
}

.center-page .login-footer img,
.center-page .signup-footer img,
.center-page .login-success img,
.center-page .signup-success img {
  margin-inline: auto;
}

.center-page .data-table {
  width: min(100%, 48rem);
}

.login-links a + a {
  margin-left: 1.25rem;
}

.login-footer img,
.signup-footer img,
.login-success img,
.signup-success img {
  display: block;
  max-width: 100%;
  height: auto;
}

.login-success-heading,
.signup-success-heading {
  font-size: calc(1.45rem * 1.25);
  font-weight: 700;
  color: green;
}

a.login-courtyard {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--gold);
  border-radius: 4px;
  background: var(--gold);
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

a.login-courtyard:hover {
  color: #ffffff;
  filter: brightness(1.08);
}

.login-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.login-image-grid figure {
  margin: 0;
}

.login-image-grid img {
  display: block;
  width: 100%;
  height: auto;
}

.login-image-grid figcaption {
  color: var(--muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.belt-layer {
  position: absolute;
  inset: 0;
}

.belt-both {
  background-color: var(--belt);
  background-image: var(--belt-image);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-blend-mode: multiply;
  -webkit-mask-image: var(--belt-image);
  mask-image: var(--belt-image);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.belt-label-lab {
  margin-top: 2.5rem;
}

.belt-label-lab h3 {
  margin: 0;
  font-size: 1.15rem;
}

.belt-label-lab h3 + p {
  margin: 0.4rem 0 0;
}

.belt-label-sides {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.7rem;
}

.belt-label-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: min(100%, 36rem);
  min-height: 7rem;
  margin: 0.25rem 0 0.75rem;
  padding: 1.5rem;
  background: #e9e9e9;
  border: 1px solid var(--line);
}

.belt-label-note {
  margin: 0 0 0.5rem;
  color: var(--muted);
}

.belt-label-css {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  width: min(100%, 42rem);
}

.belt-label-css textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 18rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  background: var(--bg-raised);
  color: var(--ink);
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  line-height: 1.4;
  resize: vertical;
}

.about {
  max-width: 58rem;
  margin-inline: auto;
  text-align: center;
}

.about h3 {
  margin: 1.6rem 0 0.45rem;
  font-size: 1.05rem;
  color: var(--gold);
  text-align: center;
}

.about p {
  margin: 0.55rem 0;
}

.about-scene {
  display: grid;
  grid-template-columns: minmax(7.5rem, 1fr) minmax(12rem, 18rem) minmax(7.5rem, 1fr);
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin: 1.35rem 0;
}

.about-scene .replay-figure {
  width: min(100%, 14rem);
  margin: 0 auto;
}

.about-scene-line {
  margin: 0;
  text-align: center;
  font-weight: 650;
  line-height: 1.35;
}

.about-belts-intro {
  text-align: center;
}

.about-scene-belts {
  grid-template-columns: minmax(6rem, 10rem) minmax(12rem, 1fr) minmax(6rem, 10rem);
  align-items: center;
}

.about-belt-names {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
}

.about-belt-xp {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.about .rank-1 {
  box-shadow: inset 0 0 0 1px #c8c8c8;
}

.about-next {
  margin-top: 1.4rem;
  text-align: center;
}

@media (max-width: 640px) {
  .about-scene,
  .about-scene-belts {
    grid-template-columns: 1fr;
  }

  .about-scene .replay-figure {
    width: min(100%, 12rem);
  }
}
