* {
  box-sizing: border-box;
}

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

body {
  --board-track-size: min(calc(100vh - 150px), calc(100vw - 690px));
  --sidebar-panel-height: min(calc(100vh - 56px), calc(var(--board-track-size) + 60px));
  display: grid;
  place-items: center;
  padding: 28px 24px 28px 224px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    #161616;
  background-size: 18px 18px;
  color: #f3f1ea;
  font-family: Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 0;
  width: 220px;
  height: auto;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    #161616;
  background-size: 18px 18px;
  border-radius: 0;
  pointer-events: none;
  transform: none;
}

body.info-page {
  display: block;
  padding: 46px 18px 46px 224px;
}

button {
  font: inherit;
}

.site-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: 200px;
  height: auto;
  padding: 30px 12px;
  color: #ffbb00;
  background:
    linear-gradient(180deg, rgba(255, 74, 58, 0.08), transparent 210px),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    #000000;
  background-size: auto, 18px 18px, 18px 18px;
  border-right: 2px solid rgba(255, 255, 255, 0.07);
  border-radius: 0;
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.035),
    inset -18px 0 34px rgba(255, 255, 255, 0.025);
  transform: none;
}

.site-sidebar-brand,
.site-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.site-sidebar-brand {
  position: relative;
  height: 54px;
  gap: 7px;
  padding: 6px 4px 12px 0;
  margin-bottom: 30px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  min-width: 0;
}

.site-sidebar-brand::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #ffe058;
}

.site-sidebar-button {
  appearance: none;
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.site-sidebar-logo,
.site-sidebar-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  font-weight: 900;
  line-height: 1;
}

.site-sidebar-logo {
  width: 34px;
  height: 34px;
  color: transparent;
  background:
    url("assets/yellow_wing_225x225.png") center / 84% no-repeat,
    linear-gradient(145deg, rgba(255, 230, 98, 0.14), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(242, 207, 67, 0.2);
  border-radius: 11px;
  box-shadow: none;
  font-size: 0;
}

.site-sidebar-brand > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-sidebar-links {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding-top: 4px;
}

.site-sidebar-links .site-sidebar-link:nth-child(5) {
  width: 100%;
  max-width: 176px;
  min-height: 50px;
  margin-top: auto;
  margin-bottom: auto;
  padding: 0 16px;
  gap: 12px;
  color: #f8f6ee;
  border-color: rgba(255, 224, 88, 0.48);
  font-size: 18px;
  letter-spacing: 0.2px;
}

.site-sidebar-links .site-sidebar-link:nth-child(5):not(.is-active) {
  background: rgba(255, 224, 88, 0.025);
}

.site-sidebar-links .site-sidebar-link:nth-child(5).is-active {
  border-color: transparent;
}

.site-sidebar-social {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  margin: 0 0 16px;
}

.site-sidebar-social-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 224, 88, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  text-decoration: none;
  transition:
    transform 140ms ease,
    filter 140ms ease,
    border-color 140ms ease;
}

.site-sidebar-social-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  border-color: rgba(255, 224, 88, 0.56);
}

.site-sidebar-social-logo {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 6px;
}

.site-sidebar-social-link-discord {
  background: #5865f2;
  border-color: rgba(164, 174, 255, 0.54);
}

.site-sidebar-info-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  padding: 18px 13px 0;
  color: #8f897f;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.site-sidebar-info-links::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: #ffe058;
}

.site-sidebar-info-links a {
  color: inherit;
  text-decoration: none;
}

.site-sidebar-info-links a:hover {
  color: #ffe058;
  text-decoration: underline;
}

.site-sidebar-link {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 42px;
  padding: 0 13px;
  color: #cfcac0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  transition:
    color 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.site-sidebar-link > span {
  position: relative;
  z-index: 1;
}

.site-sidebar-link:hover {
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  transform: translateX(2px);
}

.site-sidebar-link.is-active {
  color: #ffffff;
  background:
    linear-gradient(to left, rgba(242, 207, 67, 0.34), rgba(242, 207, 67, 0));
  border-color: transparent;
  box-shadow: none;
}

.site-sidebar-link.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(to left, rgba(255, 224, 88, 0.72), rgba(255, 224, 88, 0)) top right / 100% 2px no-repeat,
    linear-gradient(to left, rgba(255, 224, 88, 0.72), rgba(255, 224, 88, 0)) bottom right / 100% 2px no-repeat,
    linear-gradient(rgba(255, 224, 88, 0.72), rgba(255, 224, 88, 0.72)) top right / 2px 100% no-repeat;
  filter: drop-shadow(0 0 5px rgba(255, 224, 88, 0.22));
}

.site-sidebar-link.is-active .site-sidebar-icon {
  color: #181200;
  background: linear-gradient(145deg, #ffe465, #d4aa16);
}

.site-sidebar-link:not(.is-active) .site-sidebar-icon {
  color: #cbc6bd;
  background: rgba(255, 255, 255, 0.075);
}

.review-nav-icon,
.review-title-icon {
  background:
    url("assets/magnifier-analysis-red.png") center / contain no-repeat,
    transparent !important;
}

.board-editor-nav-icon,
.board-editor-title-icon {
  background:
    url("assets/board-editor-icon.jpg") center / cover no-repeat,
    transparent !important;
}

.donate-image-mark {
  background:
    url("assets/yellow_wing_225x225.png") center / contain no-repeat,
    transparent !important;
}

.donate-nav-icon {
  background:
    url("assets/donate3-transparent.png") center / cover no-repeat,
    transparent !important;
}

.review-nav-icon {
  width: 25px;
  height: 25px;
  border-radius: 0;
}

.board-editor-nav-icon {
  width: 25px;
  height: 25px;
  border-radius: 6px;
}

.donate-nav-icon {
  width: 25px;
  height: 25px;
  border-radius: 7px;
}

.site-sidebar-muted {
  color: #b5afa6;
  cursor: default;
}

.site-sidebar-muted:hover {
  color: #cfc8bd;
  background: transparent;
  transform: none;
}

.site-sidebar-muted .site-sidebar-icon {
  opacity: 0.86;
}

.site-sidebar-link .review-nav-icon {
  opacity: 1;
}

.site-sidebar-link .donate-nav-icon {
  opacity: 1;
}

.site-sidebar-links .site-sidebar-link:nth-child(5) .donate-nav-icon {
  width: 36px;
  height: 36px;
}

.site-sidebar-button:focus-visible,
.site-sidebar-link:focus-visible {
  outline: 2px solid rgba(255, 213, 83, 0.8);
  outline-offset: 2px;
}

.analysis-layout {
  position: relative;
  display: grid;
  grid-template-columns:
    minmax(360px, var(--board-track-size))
    minmax(320px, 390px);
  gap: 18px;
  align-items: stretch;
  justify-content: center;
  width: min(100%, calc(100vw - 248px));
}

.donate-layout {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, calc(100vw - 248px));
  min-height: min(720px, calc(100vh - 56px));
  padding: 28px;
}

.donate-card {
  position: relative;
  display: grid;
  gap: 18px;
  width: min(100%, 680px);
  overflow: hidden;
  padding: 42px;
  color: #f6f3ec;
  background:
    radial-gradient(circle at 84% 12%, rgba(255, 78, 62, 0.18), transparent 34%),
    radial-gradient(circle at 10% 88%, rgba(115, 149, 82, 0.14), transparent 34%),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    #181a18;
  background-size: auto, auto, 18px 18px, 18px 18px, auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 28px 78px rgba(0, 0, 0, 0.38);
}

.donate-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.donate-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(255, 205, 55, 0.18);
  line-height: 1;
}

.donate-kicker {
  margin: 0;
  color: #ffb3aa;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.donate-card h1 {
  max-width: 560px;
  margin: 0;
  color: #ffffff;
  font-size: 42px;
  line-height: 1.04;
  letter-spacing: 0;
}

.donate-card p {
  max-width: 590px;
  margin: 0;
  color: #d8d3c8;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.55;
}

.donate-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 48px;
  margin-top: 8px;
  padding: 0 22px;
  color: #17110f;
  text-decoration: none;
  background: linear-gradient(145deg, #ffdf6f, #ffb33f);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9px;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.35),
    0 18px 34px rgba(255, 179, 63, 0.2);
  font-size: 16px;
  font-weight: 900;
}

.donate-button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.donate-note {
  color: #aaa69d !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.board-wrap {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  align-self: center;
  justify-self: end;
  width: 100%;
  max-width: none;
  padding-block: 42px;
}

.board-shell {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
}

.board-player-card {
  position: absolute;
  left: 10px;
  right: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  max-width: none;
  min-height: 30px;
  padding:
    2px
    8px
    2px
    6px;
  color: #f4f2ec;
  background: rgba(32, 31, 29, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid rgba(255, 255, 255, 0.42);
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36);
  pointer-events: none;
}

.board-player-card[hidden] {
  display: none !important;
}

.board-player-card-top {
  top: -42px;
}

.board-player-card-bottom {
  bottom: -42px;
}

.board-player-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  color: #ffffff;
  background: #5b63c7;
  border-radius: 5px;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
}

.board-player-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.board-player-card[data-color="black"] {
  border-left-color: rgba(95, 100, 115, 0.9);
}

.board-player-card[data-color="black"] .board-player-avatar {
  color: #ffffff;
  background: #11110f;
}

.board-player-card[data-color="white"] .board-player-avatar {
  color: #161613;
  background: #ffffff;
}

.board-player-card[data-color="white"] {
  border-left-color: rgba(232, 229, 219, 0.9);
}

body.board-editor-page.is-editor-setup .nav-controls {
  display: none !important;
}

body.board-editor-page {
  --board-track-size: min(calc(100vh - 150px), calc(100vw - 730px));
}

body.board-editor-page .modal-backdrop {
  display: none !important;
}

body.board-editor-page .analysis-layout {
  grid-template-columns:
    minmax(360px, var(--board-track-size))
    minmax(360px, 430px);
  width: min(100%, calc(100vw - 248px));
}

body.board-editor-page .game-panel {
  width: min(430px, 100%);
}

body.board-editor-page .panel-header h1 {
  font-size: 20px;
}

body.board-editor-page .board-editor-share-pgn {
  display: none !important;
}

body.board-editor-page .share-popover {
  width: min(420px, calc(100vw - 28px));
}

body.board-editor-page .board-editor-setup-view {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 223, 104, 0.08), transparent 30%),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    #171917;
  background-size: 18px 18px;
}

.board-editor-setup-view[hidden] {
  display: none !important;
}

.editor-piece-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  padding: 13px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    rgba(44, 44, 40, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.09),
    0 14px 30px rgba(0, 0, 0, 0.22);
}

.editor-piece-button {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  background-color: rgba(0, 0, 0, 0.12);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 96% 96%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.editor-piece-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.editor-tool-button.is-selected {
  background: linear-gradient(180deg, #ffe979, #d5aa2d);
  border-color: rgba(255, 235, 132, 0.9);
  color: #1d1b12;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.38),
    0 0 0 1px rgba(255, 223, 104, 0.18),
    0 10px 22px rgba(213, 170, 45, 0.18);
}

.editor-piece-button.is-selected {
  background-color: rgba(248, 221, 88, 0.14);
  border-color: rgba(248, 221, 88, 0.7);
  box-shadow:
    inset 0 0 0 2px rgba(248, 221, 88, 0.42),
    0 0 0 1px rgba(248, 221, 88, 0.12);
}

.editor-tool-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
}

.editor-tool-button {
  height: 34px;
  color: #f1eee6;
  background: rgba(48, 48, 45, 0.92);
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}

.editor-tool-button:hover {
  color: #ffffff;
  background: rgba(64, 64, 59, 0.98);
  border-color: rgba(255, 255, 255, 0.24);
}

.editor-field {
  display: grid;
  gap: 8px;
  padding: 10px;
  color: #d8d6ce;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
}

.editor-field > span {
  font-size: 14px;
  font-weight: 900;
}

.editor-field select,
.editor-field textarea {
  width: 100%;
  min-width: 0;
  color: #f3f1ea;
  background: rgba(18, 18, 16, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 8px;
  font: 12px/1.35 Consolas, "Courier New", monospace;
}

.editor-field select {
  height: 34px;
  font: inherit;
  font-size: 14px;
}

.editor-side-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: rgba(18, 18, 16, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
}

.editor-side-button {
  height: 34px;
  color: #d8d6ce;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.editor-side-button:hover {
  color: #ffffff;
  background: #3b3b36;
}

.editor-side-button.is-selected {
  color: #11110f;
  background: linear-gradient(180deg, #ffe979, #d5aa2d);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.42),
    0 8px 18px rgba(213, 170, 45, 0.2);
}

.editor-castling-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-top: 0;
  padding: 10px;
  color: #d8d6ce;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

.editor-castling-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.editor-castling-grid input {
  width: 16px;
  height: 16px;
  accent-color: #739552;
}

.editor-load-button {
  flex: 0 0 auto;
  align-self: center;
  width: auto;
  min-width: 0;
  min-height: 34px;
  padding: 0 18px;
  color: #10110f;
  background: linear-gradient(180deg, #f8dd58, #d5aa2d);
  border-color: rgba(255, 230, 112, 0.7);
  border-radius: 6px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.editor-load-button:hover {
  background: linear-gradient(180deg, #ffe979, #e2b83e);
  filter: none;
  transform: none;
}

.editor-status {
  min-height: 16px;
  color: #d7eac2;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.editor-status.is-error {
  color: #f2b8a9;
}

.board-player-text {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  font-size: 14px;
  line-height: 1.15;
}

.board-player-text strong {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-player-text span {
  flex: 0 0 auto;
  color: #c9c5bb;
  font-weight: 700;
}

.board-player-side {
  flex: 0 0 auto;
  width: 15px;
  height: 12px;
  margin-left: 2px;
  background: #e8e5db;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 2px;
}

.board-player-card[data-color="black"] .board-player-side {
  background: #565656;
  border-color: rgba(255, 255, 255, 0.22);
}

.board {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-image: url("assets/board 3.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  border-radius: 3px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  touch-action: none;
  user-select: none;
}

html[data-board-theme="classic"] .board,
body[data-board-theme="classic"] .board {
  background-image: url("assets/board.png");
}

html[data-board-theme="board2"] .board,
body[data-board-theme="board2"] .board {
  background-image: url("assets/board2.png");
}

html[data-board-theme="board3"] .board,
body[data-board-theme="board3"] .board {
  background-image: url("assets/board 3.png");
}

.eval-bar {
  position: relative;
  min-width: 40px;
  height: 100%;
  overflow: hidden;
  background: #f2f0e8;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28), 0 18px 48px rgba(0, 0, 0, 0.22);
  user-select: none;
}

.eval-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: #11110f;
  transition: height 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.eval-bar.is-flipped .eval-bar-fill {
  top: auto;
  bottom: 0;
}

.eval-bar-label {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  color: #22221e;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.eval-bar-label.is-top {
  top: 8px;
  bottom: auto;
  color: #f5f3ed;
}

.eval-bar-label.is-bottom {
  top: auto;
  bottom: 8px;
  color: #1d1d1a;
}

.eval-bar.is-flipped .eval-bar-label.is-top {
  color: #1d1d1a;
}

.eval-bar.is-flipped .eval-bar-label.is-bottom {
  color: #f5f3ed;
}

.eval-bar.is-empty .eval-bar-label {
  top: 50%;
  bottom: auto;
  color: #67655d;
  opacity: 0.85;
  transform: translateY(-50%);
}

.coordinates {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  font-weight: 700;
  pointer-events: none;
}

.coordinate-light {
  fill: #739552;
}

.coordinate-dark {
  fill: #ebecd0;
}

.game-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-self: center;
  width: 100%;
  height: min(720px, calc(100vh - 48px));
  min-height: 360px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    #131212;
  background-size: 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
}

.panel-header {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 14px 0 16px;
  background: #131212;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-header h1 {
  position: absolute;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: calc(100% - 170px);
  margin: 0;
  color: #f5f3ed;
  font-size: 19px;
  line-height: 1;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateX(-50%);
}

.panel-title-icon {
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.panel-actions-left {
  justify-content: flex-start;
}

.panel-actions-right {
  justify-content: flex-end;
  margin-left: auto;
}

.move-count {
  display: none;
  color: #a9a69c;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.settings-button,
.share-button,
.home-button,
.flip-button,
.import-button,
.review-button,
.copy-button,
.copy-all-button {
  color: #f3f1ea;
  background: #30302d;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.settings-button,
.share-button,
.home-button,
.flip-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  min-width: 42px;
  height: 39px;
  padding: 0;
  color: #ffffff;
  background: rgba(48, 48, 45, 0.92);
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 7px;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 12px rgba(255, 255, 255, 0.13),
    0 2px 8px rgba(0, 0, 0, 0.28);
  font-size: 0;
  line-height: 1;
}

.settings-button:hover,
.share-button:hover,
.home-button:hover,
.flip-button:hover {
  color: #ffffff;
  background: rgba(64, 64, 59, 0.98);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 18px rgba(255, 255, 255, 0.2),
    0 4px 10px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.settings-button span,
.share-button span,
.home-button span,
.flip-button span {
  display: none;
}

.settings-button::before,
.share-button::before,
.home-button::before,
.flip-button::before {
  content: "";
  display: block;
  width: 21px;
  height: 21px;
  background: #ffffff;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.35));
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.home-button::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20 11H7.8l5.6-5.6L12 4 4 12l8 8 1.4-1.4L7.8 13H20z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20 11H7.8l5.6-5.6L12 4 4 12l8 8 1.4-1.4L7.8 13H20z'/%3E%3C/svg%3E");
}

.flip-button::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17.7 6.3A8 8 0 1 0 20 12h-2a6 6 0 1 1-1.76-4.24L13 11h8V3z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17.7 6.3A8 8 0 1 0 20 12h-2a6 6 0 1 1-1.76-4.24L13 11h8V3z'/%3E%3C/svg%3E");
}

.settings-button::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19.4 13.5c.1-.5.1-1 .1-1.5s0-1-.1-1.5l2.1-1.6-2-3.5-2.5 1a8 8 0 0 0-2.6-1.5L14 2h-4l-.4 2.9A8 8 0 0 0 7 6.4l-2.5-1-2 3.5 2.1 1.6c-.1.5-.1 1-.1 1.5s0 1 .1 1.5l-2.1 1.6 2 3.5 2.5-1a8 8 0 0 0 2.6 1.5L10 22h4l.4-2.9a8 8 0 0 0 2.6-1.5l2.5 1 2-3.5zm-7.4 2A3.5 3.5 0 1 1 12 8a3.5 3.5 0 0 1 0 7.5z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19.4 13.5c.1-.5.1-1 .1-1.5s0-1-.1-1.5l2.1-1.6-2-3.5-2.5 1a8 8 0 0 0-2.6-1.5L14 2h-4l-.4 2.9A8 8 0 0 0 7 6.4l-2.5-1-2 3.5 2.1 1.6c-.1.5-.1 1-.1 1.5s0 1 .1 1.5l-2.1 1.6 2 3.5 2.5-1a8 8 0 0 0 2.6 1.5L10 22h4l.4-2.9a8 8 0 0 0 2.6-1.5l2.5 1 2-3.5zm-7.4 2A3.5 3.5 0 1 1 12 8a3.5 3.5 0 0 1 0 7.5z'/%3E%3C/svg%3E");
}

.share-button::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M18 16.1c-1 0-1.9.4-2.5 1.1L8.9 13.4a3.4 3.4 0 0 0 0-2.8l6.5-3.8A3.5 3.5 0 1 0 14.5 5l-6.6 3.8a3.5 3.5 0 1 0 0 6.4l6.6 3.9a3.5 3.5 0 1 0 3.5-3z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M18 16.1c-1 0-1.9.4-2.5 1.1L8.9 13.4a3.4 3.4 0 0 0 0-2.8l6.5-3.8A3.5 3.5 0 1 0 14.5 5l-6.6 3.8a3.5 3.5 0 1 0 0 6.4l6.6 3.9a3.5 3.5 0 1 0 3.5-3z'/%3E%3C/svg%3E");
}

.import-button,
.review-button {
  min-width: 53px;
  height: 28px;
  padding: 0 10px;
  font-size: 13px;
}

.panel-tabs {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 9px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    #131212;
  background-size: 18px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.game-panel.is-start-review .panel-tabs {
  grid-template-columns: 1fr;
}

.game-panel.is-review-running #review-tab,
.game-panel.is-review-running #review-button {
  display: none !important;
}

.panel-tab {
  height: 36px;
  color: #d8d6ce;
  background: #30302d;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.panel-tab:hover {
  background: #3b3b36;
}

.panel-tab.is-active {
  color: #ffffff;
  background: #739552;
  border-color: rgba(255, 255, 255, 0.18);
}

.panel-view {
  flex: 1 1 auto;
  min-height: 0;
}

.panel-view[hidden] {
  display: none !important;
}

.analysis-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    #131212;
  background-size: 18px 18px;
}

.report-view {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
  padding: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    #131212;
  background-size: 18px 18px;
}

.report-view.is-empty-state,
.report-view:has(#report-feedback-card.is-empty-state) {
  justify-content: center;
  align-items: center;
}

.report-view.is-empty-state > :not(#report-feedback-card),
.report-view:has(#report-feedback-card.is-empty-state) > :not(#report-feedback-card) {
  display: none !important;
}

.report-feedback-card,
.report-review-progress-card,
.report-card {
  flex: 0 0 auto;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    #131212;
  background-size: 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
}

.report-feedback-card {
  display: grid;
  overflow: visible;
  padding: 6px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    #131212;
  background-size: 18px 18px;
}

.report-review-progress-card {
  display: grid;
  gap: 8px;
  height: 58px;
  padding: 9px 10px;
  background: #131212;
}

.report-review-progress-card[hidden] {
  display: none !important;
}

.report-review-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.report-review-progress-meta span {
  min-width: 0;
  overflow: hidden;
  color: #d8d6ce;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-review-progress-meta strong {
  flex: 0 0 auto;
  color: #7dff45;
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.report-eval-graph {
  display: block;
  width: 100%;
  height: 96px;
}

.report-eval-wrap {
  position: relative;
  min-width: 0;
}

.report-eval-bg {
  fill: #18191d;
}

.report-eval-midline {
  stroke: #585252;
  stroke-width: 1.35;
}

.report-eval-area {
  fill: #f4f4f1;
}

.report-eval-line {
  fill: none;
  stroke: #ffffff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.report-eval-current {
  stroke: #f0a037;
  stroke-width: 2;
}

.report-eval-hover-line {
  stroke: #8d8f94;
  stroke-width: 1;
}

.report-eval-dot {
  stroke: rgba(33, 34, 36, 0.9);
  stroke-width: 1.2;
}

.report-eval-hit-area {
  fill: transparent;
  cursor: pointer;
}

.report-eval-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 72px;
  padding: 3px 5px 4px;
  color: #141414;
  background: rgba(238, 238, 235, 0.96);
  border: 1px solid rgba(20, 20, 20, 0.35);
  border-radius: 4px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
  pointer-events: none;
  transform: none;
  transition:
    left 130ms ease-out,
    top 130ms ease-out;
}

.report-eval-tooltip[hidden] {
  display: none;
}

.report-eval-tooltip-head {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 17px;
}

.report-eval-tooltip-icon {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  color: #ffffff;
  background: #9bdf43;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
}

.report-eval-tooltip-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.report-eval-tooltip-head strong {
  color: #111111;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.report-eval-tooltip-move {
  margin-top: 1px;
  color: #111111;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.report-eval-tooltip-classification {
  margin-top: 2px;
  color: #555555;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.report-feedback-title {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  color: #ff9b3d;
}

.report-feedback-title strong {
  min-width: 0;
  font-size: 18px;
  line-height: 1.2;
}

.report-feedback-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #ffffff;
  background: #f69a44;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 900;
}

.report-feedback-icon img,
.report-count-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
}

.report-best-line {
  color: #35f46d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.report-opening-line {
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.report-feedback-empty {
  padding: 6px 0;
  color: #a9a69c;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.report-feedback-card.is-empty-state {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: transparent;
  border-color: transparent;
}

.report-feedback-empty-stuck {
  max-width: 310px;
  color: #ffffff !important;
  font-size: 17px;
  line-height: 1.5;
}

.report-counts-card {
  flex: 0 0 auto;
}

.report-counts-table {
  display: grid;
  gap: 0;
  padding: 8px 28px 10px 8px;
}

.report-counts-header,
.report-count-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 22px 56px;
  align-items: center;
  gap: 6px;
  min-height: 25px;
}

.report-counts-header {
  color: #f5f3ed;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.report-counts-header span,
.report-accuracy-player span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-count-row {
  color: #d8d6ce;
  font-size: 13px;
  font-weight: 800;
}

.report-count-label {
  min-width: 0;
  padding-left: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-count-row strong {
  color: #f3f1ea;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.report-count-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
}

.report-brilliant .report-count-label { color: #21d8ff; }
.report-critical .report-count-label { color: #8db6d1; }
.report-best .report-count-label { color: #9bdf43; }
.report-excellent .report-count-label { color: #a4e15e; }
.report-okay .report-count-label { color: #b6caa4; }
.report-inaccuracy .report-count-label { color: #ffd348; }
.report-mistake .report-count-label { color: #ff9b3d; }
.report-blunder .report-count-label { color: #ff3d2e; }
.report-miss .report-count-label { color: #ff6d63; }
.report-theory .report-count-label { color: #c7a086; }

.report-accuracy-card {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.report-accuracy-card[hidden] {
  display: none !important;
}

.report-accuracy-title {
  color: #f5f3ed;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.report-accuracy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.report-accuracy-player {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 9px;
  background: #202124;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
}

.report-accuracy-player span {
  color: #aaa69d;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.report-accuracy-player strong {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.report-accuracy-white {
  border-left: 3px solid #f5f3ed;
}

.report-accuracy-black {
  border-left: 3px solid #11110f;
}

.import-button:hover,
.review-button:hover,
.copy-button:hover,
.copy-all-button:hover {
  background: #3b3b36;
  border-color: rgba(255, 255, 255, 0.18);
}

#import-button,
#review-button {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(7, 8, 10, 0.62);
}

.modal-backdrop[hidden] {
  display: none;
}

.settings-popover,
.share-popover {
  position: fixed;
  top: var(--modal-center-y, 50%);
  left: var(--modal-center-x, 50%);
  z-index: 100;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 28px));
  max-height: min(620px, calc(100vh - 48px));
  overflow: auto;
  padding: 14px;
  background: #2b2b29;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%);
}

.share-popover {
  width: min(500px, calc(100vw - 28px));
}

.import-popover,
.review-popover {
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
  width: auto;
  max-height: min(360px, calc(100vh - 180px));
  overflow: auto;
  margin: 8px;
  padding: 12px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    #131212;
  background-size: 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
}

.review-view {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-content: start;
  min-height: 0;
  max-height: none;
  margin: 6px 4px;
  padding: 10px;
  overflow: hidden;
}

.settings-popover[hidden],
.share-popover[hidden],
.import-popover[hidden],
.review-popover[hidden] {
  display: none;
}

.import-mode {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.import-mode-button {
  height: 26px;
  color: #d8d6ce;
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.import-mode-button.is-active {
  color: #ffffff;
  background: #739552;
  border-color: rgba(255, 255, 255, 0.18);
}

.import-field,
.review-field {
  display: grid;
  gap: 8px;
}

.review-field[hidden],
.review-actions[hidden] {
  display: none !important;
}

.review-game-search {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  margin-top: 15px;
  margin-bottom: 1px;
  padding-bottom: 0px;
  border-bottom: 0px;
}

.review-view > .settings-title {
  justify-content: center;
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
  border-bottom: 2px solid rgb(94, 79, 35);
}

.review-source-row {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 86px;
  gap: 7px;
  align-items: center;
}

.review-source-row + .review-source-row {
  margin-top: 8px;
}

.review-source-row[data-review-source-row="chesscom"] {
  grid-template-columns:
    25px
    minmax(0, 1fr)
    64px
    86px;
}

.review-source-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.review-source-icon-chesscom {
  color: #f7fff0;
  background: linear-gradient(145deg, #8bb75f, #4d7f32);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.review-source-icon-lichess {
  color: #111111;
  background: #f1f0ea;
  box-shadow: inset 0 0 0 2px rgba(17, 17, 17, 0.72);
}

.review-date-row {
  min-width: 0;
}

.review-search-button {
  height: 32px;
  padding: 0 12px;
  color: #10110f;
  background: linear-gradient(180deg, #f8dd58, #d5aa2d);
  border: 2px solid rgba(255, 230, 112, 0.72);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: none;
}

.review-search-button:hover {
  background: linear-gradient(180deg, #ffe979, #e2b83e);
}

.review-famous-players {
  position: relative;
  display: grid;
  grid-template-columns: 76px repeat(3, 72px);
  justify-content: end;
  gap: 6px;
  align-items: center;
  margin: 18px 10px 12px;
  padding: 22px 8px 0px;
  border-top: 2px solid rgba(248, 221, 88, 0.34);
}

.review-famous-label {
  align-self: start;
  padding-top: 6px;
  color: #f9df76;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.review-famous-players::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 2px;
  background: rgba(246, 246, 246, 0.58);
}

.review-famous-player {
  display: grid;
  justify-items: center;
  gap: 1px;
  min-width: 0;
  color: #f3f1ea;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
}

.review-famous-player img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 2px solid rgba(248, 221, 88, 0.42);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.review-famous-player:hover img {
  border-color: rgba(248, 221, 88, 0.84);
  box-shadow:
    0 0 0 2px rgba(248, 221, 88, 0.12),
    0 10px 22px rgba(0, 0, 0, 0.36);
  transform: translateY(-1px);
}

.review-famous-player span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-username-input {
  width: 100%;
  min-width: 0;
  height: 32px;
  color: #f3f1ea;
  background: #252522;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 0 10px 2px;
  font: 14px/1.15 Consolas, "Courier New", monospace;
}

.review-username-input.is-saved-username {
  color: #f9df76;
  font-weight: 900;
}

.review-date-select {
  width: 100%;
  min-width: 0;
  height: 32px;
  color: #f3f1ea;
  background: #252522;
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  padding: 0 8px 2px;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 800;
}

.review-view.has-username-games[data-loaded-source="chesscom"] [data-review-source-row="lichess"],
.review-view.has-username-games[data-loaded-source="lichess"] [data-review-source-row="chesscom"] {
  display: none;
}

.review-view.has-username-games .review-famous-players,
.review-view.is-review-running .review-famous-players {
  display: none;
}

.review-game-status {
  justify-content: center;
}

.review-game-status.has-status {
  color: #ffd34d;
  font-size: 13px;
  line-height: 1.15;
  text-align: center;
}

.review-game-status.is-error {
  color: #f2b8a9;
}

.review-game-list {
  flex: 0 0 auto;
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 0;
  overflow: auto;
}

.review-view.has-username-games .review-game-search {
  flex: 1 1 0;
}

.review-view.has-username-games .review-game-list {
  flex: 1 1 0;
  padding-bottom: 2px;
}

.review-view.has-username-games:not(.is-review-running) .review-progress,
.review-view.has-username-games:not(.is-review-running) .review-meta,
.review-view.has-username-games:not(.is-review-running) .review-status {
  display: none;
}

.review-view:not(.is-review-running) .review-progress,
.review-view:not(.is-review-running) .review-meta {
  display: none;
}

.review-view.is-review-running {
  justify-content: flex-start;
  gap: 0;
  padding: 8px;
}

.review-view.is-review-running .settings-title,
.review-view.is-review-running .review-game-search,
.review-view.is-review-running .review-field,
.review-view.is-review-running .review-actions {
  display: none !important;
}

.review-view.is-review-running .review-status {
  display: none !important;
}

.review-view.is-review-running .review-meta,
.review-view.is-review-running .review-progress {
  display: none !important;
}

.review-game-card {
  display: grid;
  gap: 6px;
  padding: 8px;
  background: #131212;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
}

.review-game-main {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: #f3f1ea;
  font-size: 12px;
  font-weight: 800;
}

.review-game-main strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-game-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 7px;
  color: #848176;
  font-size: 11px;
  font-weight: 700;
}

.review-game-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-game-start {
  height: 26px;
  font-size: 12px;
}

.import-field label,
.review-field label {
  color: #d8d6ce;
  font-size: 12px;
  font-weight: 800;
}

.review-field label {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  width: max-content;
  padding: 0;
  color: #ffffff;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 13px;
  font-weight: 900;
}

.review-field[data-review-pgn-field] {
  position: relative;
  margin-top: 2px;
}

.import-field textarea,
.review-field textarea {
  width: 100%;
  min-width: 0;
  resize: vertical;
  color: #f3f1ea;
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 7px;
  font: 12px/1.35 Consolas, "Courier New", monospace;
}

#review-pgn {
  color: #f8f6ee;
  background: #2c2c29;
  border-color: rgba(255, 255, 255, 0.2);
  min-height: 180px;
}

#chesscom-username::placeholder,
#lichess-username::placeholder {
  color: #bdb8aa;
  opacity: 1;
}

#review-pgn::placeholder {
  color: transparent;
  opacity: 0;
}

.review-field[data-review-pgn-field]:has(#review-pgn:placeholder-shown)::after {
  content: "Paste PGN.....|";
  position: absolute;
  left: 8px;
  top: 31px;
  color: #bdb8aa;
  font: 12px/1.35 Consolas, "Courier New", monospace;
  pointer-events: none;
  animation: pgn-placeholder-flicker 1.05s steps(1, end) infinite;
}

@keyframes pgn-placeholder-flicker {
  0%,
  45% {
    color: #bdb8aa;
    opacity: 1;
  }

  46%,
  100% {
    color: #f9df76;
    opacity: 0.18;
  }
}

.import-actions,
.review-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.review-actions {
  grid-template-columns: max-content;
  justify-content: center;
}

.review-start-button,
.editor-load-button,
.review-game-start {
  color: #10110f;
  background: linear-gradient(180deg, #f8dd58, #d5aa2d);
  border-color: rgba(255, 230, 112, 0.7);
  box-shadow: none;
}

.review-start-button {
  min-width: 0;
  width: auto;
  padding: 0 18px;
}

.review-start-button:hover,
.editor-load-button:hover,
.review-game-start:hover {
  background: linear-gradient(180deg, #ffe979, #e2b83e);
}

.import-status,
.review-status {
  order: 3;
  min-height: 16px;
  color: #d7eac2;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.import-status.is-error,
.review-status.is-error {
  color: #f2b8a9;
}

.review-meta {
  order: 1;
  min-height: 18px;
  color: #aeb6a4;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.review-progress {
  order: 2;
  display: grid;
  gap: 5px;
}

.review-progress-track {
  height: 12px;
  overflow: hidden;
  background: #1f1f1f;
  border-radius: 999px;
}

.review-progress-fill {
  width: 0%;
  height: 100%;
  background: #7dff45;
  transition: width 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.settings-title {
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 0 8px;
  color: #f5f3ed;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #d8d6ce;
  font-size: 13px;
  font-weight: 700;
}

.setting-row[hidden] {
  display: none !important;
}

.setting-row select,
.setting-row input[type="number"] {
  width: 174px;
  min-width: 0;
  height: 28px;
  color: #f3f1ea;
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0 8px;
}

.setting-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #739552;
}

.setting-inline {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.setting-inline input[type="number"] {
  width: 122px;
}

.suggestion-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 174px;
  padding: 3px;
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.suggestion-toggle-button {
  height: 28px;
  color: #d8d6ce;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.suggestion-toggle-button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.suggestion-toggle-button.is-active {
  color: #ffffff;
  background: linear-gradient(145deg, #8bb75f, #4d7f32);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.18),
    0 8px 18px rgba(76, 127, 50, 0.22);
}

.share-field {
  display: grid;
  gap: 8px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.share-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.share-label-row label {
  color: #f4f1e9;
  font-size: 14px;
  font-weight: 900;
}

.copy-button {
  height: 27px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.share-field textarea {
  width: 100%;
  min-width: 0;
  resize: vertical;
  color: #f3f1ea;
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 9px;
  font: 12px/1.35 Consolas, "Courier New", monospace;
}

#share-pgn {
  min-height: 220px;
}

.share-status {
  min-height: 16px;
  color: #d7eac2;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.engine-panel {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  margin: 8px 8px 8px;
  padding: 10px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    #262424;
  background-size: 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
}

.engine-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.engine-lines {
  display: grid;
  gap: 5px;
  min-height: 26px;
}

.engine-line {
  display: grid;
  grid-template-columns:
    21px
    50px
    minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #ffffff;
  font-size: 12px;

}

.engine-line-rank {
  color: #a9a69c;
  font-variant-numeric: tabular-nums;
}

.engine-line-score {
  color: #ffffff;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.engine-line-pv {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.engine-line-first-move {
  display: inline-block;
  padding: 1px 5px;
  color: #11110f;
  background: #d7eac2;
  border-radius: 4px;
  font-weight: 900;
}

.engine-line-move {
  color: #ffffff;
}

.engine-empty {
  color: #a9a69c;
  font-size: 13px;
}

.opening-name-strip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 21px;
  margin: -1px 8px 0;
  padding: 4px 8px;
  overflow: hidden;
  color: #d8d6ce;
  background:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    #131212;
  background-size: 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.opening-name-strip[hidden] {
  display: none !important;
}

.opening-name-strip .opening-name-label {
  flex: 0 0 auto;
  color: #a9a69c;
}

.opening-name-strip strong {
  min-width: 0;
  overflow: hidden;
  color: #f3f1ea;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.move-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 6px 8px 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    #131212;
  background-size: 18px 18px;
}

.history-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1fr);
  gap: 5px;
  min-height: 21px;
  padding: 0 2px 3px;
  color: #a9a69c;
  background:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    #131212;
  background-size: 18px 18px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.history-header span {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 8px;
}

.tree-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-height: 27px;
  padding-left: calc(var(--depth, 0) * 14px);
  border-radius: 0;
}

.tree-row:nth-child(odd) {
  background: transparent;
}

.tree-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.025);
}

.tree-row.is-variation {
  border-left: 2px solid rgba(115, 149, 82, 0.48);
}

.move-number {
  padding-left: 6px;
  color: #9f9b91;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.move-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  height: 23px;
  padding: 0 8px;
  overflow: hidden;
  color: #f1eee6;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.move-san {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.classification-move-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-left: auto;
}

.classification-move-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
}

button.move-cell {
  cursor: pointer;
}

button.move-cell:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.035);
}

.move-cell.is-current {
  color: #ffffff;
  background: rgba(115, 149, 82, 0.42);
  border-bottom-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(143, 201, 93, 0.36);
}

.move-cell.is-active-line:not(.is-current) {
  border-bottom-color: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.move-cell-empty {
  display: block;
  min-width: 0;
  height: 23px;
}

.variation-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-left: 2px;
  min-width: 22px;
  height: 18px;
  color: #d7eac2;
  background: rgba(115, 149, 82, 0.22);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
}

.variation-badge:empty {
  display: none;
}

.nav-controls {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
  background: #1f1f1f;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.game-panel.is-start-review .nav-controls {
  display: none;
}

.nav-button {
  display: grid;
  place-items: center;
  height: 42px;
  color: #f3f1ea;
  background: #30302d;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  cursor: pointer;
  touch-action: manipulation;
  font-size: 16px;
  font-weight: 800;
}

.nav-button:hover:not(:disabled) {
  background: #3b3b36;
  border-color: rgba(255, 255, 255, 0.18);
}

.nav-button:disabled {
  opacity: 0.38;
  cursor: default;
}

.piece {
  position: absolute;
  z-index: 3;
  width: 12.5%;
  height: 12.5%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  cursor: grab;
}

.piece.dragging {
  z-index: 8;
  cursor: grabbing;
  pointer-events: none;
}

.piece.is-animating {
  z-index: 8;
  will-change: transform;
}

.engine-arrow-layer,
.annotation-arrow-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.engine-arrow-layer {
  z-index: 6;
}

.annotation-arrow-layer {
  z-index: 7;
}

.square-highlight,
.last-move-square,
.classified-move-square,
.annotation-square,
.legal-move-dot {
  position: absolute;
  width: 12.5%;
  height: 12.5%;
  pointer-events: none;
}

.square-highlight,
.last-move-square,
.classified-move-square {
  z-index: 1;
}

.square-highlight {
  background: rgba(255, 255, 51, 0.42);
}

.last-move-square {
  background: rgba(246, 246, 105, 0.32);
}

.classified-move-square[class*="classification-last-"] {
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.18),
    inset 0 0 24px rgba(255, 255, 255, 0.08);
}

.classified-move-square.classification-last-brilliant {
  background: rgba(0, 198, 255, 0.44);
}

.classified-move-square.classification-last-critical,
.classified-move-square.classification-last-great {
  background: rgba(77, 170, 255, 0.38);
}

.classified-move-square.classification-last-best {
  background: rgba(132, 214, 75, 0.42);
}

.classified-move-square.classification-last-excellent {
  background: rgba(153, 223, 83, 0.34);
}

.classified-move-square.classification-last-good,
.classified-move-square.classification-last-okay {
  background: rgba(115, 149, 82, 0.33);
}

.classified-move-square.classification-last-forced {
  background: rgba(185, 213, 198, 0.32);
}

.classified-move-square.classification-last-inaccuracy {
  background: rgba(255, 214, 58, 0.42);
}

.classified-move-square.classification-last-mistake {
  background: rgba(255, 144, 49, 0.42);
}

.classified-move-square.classification-last-blunder,
.classified-move-square.classification-last-miss,
.classified-move-square.classification-last-missed,
.classified-move-square.classification-last-missed-win {
  background: rgba(255, 58, 58, 0.42);
}

.classified-move-square.classification-last-theory,
.classified-move-square.classification-last-book,
.classified-move-square.classification-last-opening {
  background: rgba(201, 143, 88, 0.4);
}

.legal-move-dot {
  z-index: 4;
  display: grid;
  place-items: center;
}

.legal-move-dot::after {
  content: "";
  display: block;
  width: 27%;
  height: 27%;
  background: rgba(28, 31, 27, 0.34);
  border-radius: 50%;
}

.legal-move-dot.is-capture::after {
  width: 78%;
  height: 78%;
  background: transparent;
  border: 5px solid rgba(28, 31, 27, 0.3);
}

.promotion-picker {
  position: absolute;
  z-index: 15;
  display: grid;
  gap: 4px;
  width: 12.5%;
  min-width: 58px;
  padding: 4px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #131212;
  background-size: 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.promotion-picker.is-bottom-edge {
  transform: translateY(-75%);
}

.promotion-choice {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 3px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  cursor: pointer;
}

.promotion-choice:hover {
  background: rgba(242, 207, 67, 0.22);
  border-color: rgba(242, 207, 67, 0.55);
}

.promotion-piece {
  display: block;
  width: 86%;
  height: 86%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.annotation-square {
  z-index: 5;
  background: #eb6150;
  opacity: 0.8;
}

.classification-board-icon {
  position: absolute;
  z-index: 9;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  width: 12.5%;
  height: 12.5%;
  padding: 3px 1px 4px 4px;
  pointer-events: none;
}

.classification-board-icon img {
  display: block;
  width: clamp(26px, 40%, 44px);
  height: clamp(26px, 40%, 44px);
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
  transform: translateX(3px);
}

.wk { background-image: url("assets/pieces/wk.png"); }
.wq { background-image: url("assets/pieces/wq.png"); }
.wr { background-image: url("assets/pieces/wr.png"); }
.wb { background-image: url("assets/pieces/wb.png"); }
.wn { background-image: url("assets/pieces/wn.png"); }
.wp { background-image: url("assets/pieces/wp.png"); }
.bk { background-image: url("assets/pieces/bk.png"); }
.bq { background-image: url("assets/pieces/bq.png"); }
.br { background-image: url("assets/pieces/br.png"); }
.bb { background-image: url("assets/pieces/bb.png"); }
.bn { background-image: url("assets/pieces/bn.png"); }
.bp { background-image: url("assets/pieces/bp.png"); }

.square-18, .square-17, .square-16, .square-15, .square-14, .square-13, .square-12, .square-11 { left: 0%; }
.square-28, .square-27, .square-26, .square-25, .square-24, .square-23, .square-22, .square-21 { left: 12.5%; }
.square-38, .square-37, .square-36, .square-35, .square-34, .square-33, .square-32, .square-31 { left: 25%; }
.square-48, .square-47, .square-46, .square-45, .square-44, .square-43, .square-42, .square-41 { left: 37.5%; }
.square-58, .square-57, .square-56, .square-55, .square-54, .square-53, .square-52, .square-51 { left: 50%; }
.square-68, .square-67, .square-66, .square-65, .square-64, .square-63, .square-62, .square-61 { left: 62.5%; }
.square-78, .square-77, .square-76, .square-75, .square-74, .square-73, .square-72, .square-71 { left: 75%; }
.square-88, .square-87, .square-86, .square-85, .square-84, .square-83, .square-82, .square-81 { left: 87.5%; }

.square-88, .square-78, .square-68, .square-58, .square-48, .square-38, .square-28, .square-18 { top: 0%; }
.square-87, .square-77, .square-67, .square-57, .square-47, .square-37, .square-27, .square-17 { top: 12.5%; }
.square-86, .square-76, .square-66, .square-56, .square-46, .square-36, .square-26, .square-16 { top: 25%; }
.square-85, .square-75, .square-65, .square-55, .square-45, .square-35, .square-25, .square-15 { top: 37.5%; }
.square-84, .square-74, .square-64, .square-54, .square-44, .square-34, .square-24, .square-14 { top: 50%; }
.square-83, .square-73, .square-63, .square-53, .square-43, .square-33, .square-23, .square-13 { top: 62.5%; }
.square-82, .square-72, .square-62, .square-52, .square-42, .square-32, .square-22, .square-12 { top: 75%; }
.square-81, .square-71, .square-61, .square-51, .square-41, .square-31, .square-21, .square-11 { top: 87.5%; }

.board.is-flipped .square-88, .board.is-flipped .square-87, .board.is-flipped .square-86, .board.is-flipped .square-85, .board.is-flipped .square-84, .board.is-flipped .square-83, .board.is-flipped .square-82, .board.is-flipped .square-81 { left: 0%; }
.board.is-flipped .square-78, .board.is-flipped .square-77, .board.is-flipped .square-76, .board.is-flipped .square-75, .board.is-flipped .square-74, .board.is-flipped .square-73, .board.is-flipped .square-72, .board.is-flipped .square-71 { left: 12.5%; }
.board.is-flipped .square-68, .board.is-flipped .square-67, .board.is-flipped .square-66, .board.is-flipped .square-65, .board.is-flipped .square-64, .board.is-flipped .square-63, .board.is-flipped .square-62, .board.is-flipped .square-61 { left: 25%; }
.board.is-flipped .square-58, .board.is-flipped .square-57, .board.is-flipped .square-56, .board.is-flipped .square-55, .board.is-flipped .square-54, .board.is-flipped .square-53, .board.is-flipped .square-52, .board.is-flipped .square-51 { left: 37.5%; }
.board.is-flipped .square-48, .board.is-flipped .square-47, .board.is-flipped .square-46, .board.is-flipped .square-45, .board.is-flipped .square-44, .board.is-flipped .square-43, .board.is-flipped .square-42, .board.is-flipped .square-41 { left: 50%; }
.board.is-flipped .square-38, .board.is-flipped .square-37, .board.is-flipped .square-36, .board.is-flipped .square-35, .board.is-flipped .square-34, .board.is-flipped .square-33, .board.is-flipped .square-32, .board.is-flipped .square-31 { left: 62.5%; }
.board.is-flipped .square-28, .board.is-flipped .square-27, .board.is-flipped .square-26, .board.is-flipped .square-25, .board.is-flipped .square-24, .board.is-flipped .square-23, .board.is-flipped .square-22, .board.is-flipped .square-21 { left: 75%; }
.board.is-flipped .square-18, .board.is-flipped .square-17, .board.is-flipped .square-16, .board.is-flipped .square-15, .board.is-flipped .square-14, .board.is-flipped .square-13, .board.is-flipped .square-12, .board.is-flipped .square-11 { left: 87.5%; }

.board.is-flipped .square-81, .board.is-flipped .square-71, .board.is-flipped .square-61, .board.is-flipped .square-51, .board.is-flipped .square-41, .board.is-flipped .square-31, .board.is-flipped .square-21, .board.is-flipped .square-11 { top: 0%; }
.board.is-flipped .square-82, .board.is-flipped .square-72, .board.is-flipped .square-62, .board.is-flipped .square-52, .board.is-flipped .square-42, .board.is-flipped .square-32, .board.is-flipped .square-22, .board.is-flipped .square-12 { top: 12.5%; }
.board.is-flipped .square-83, .board.is-flipped .square-73, .board.is-flipped .square-63, .board.is-flipped .square-53, .board.is-flipped .square-43, .board.is-flipped .square-33, .board.is-flipped .square-23, .board.is-flipped .square-13 { top: 25%; }
.board.is-flipped .square-84, .board.is-flipped .square-74, .board.is-flipped .square-64, .board.is-flipped .square-54, .board.is-flipped .square-44, .board.is-flipped .square-34, .board.is-flipped .square-24, .board.is-flipped .square-14 { top: 37.5%; }
.board.is-flipped .square-85, .board.is-flipped .square-75, .board.is-flipped .square-65, .board.is-flipped .square-55, .board.is-flipped .square-45, .board.is-flipped .square-35, .board.is-flipped .square-25, .board.is-flipped .square-15 { top: 50%; }
.board.is-flipped .square-86, .board.is-flipped .square-76, .board.is-flipped .square-66, .board.is-flipped .square-56, .board.is-flipped .square-46, .board.is-flipped .square-36, .board.is-flipped .square-26, .board.is-flipped .square-16 { top: 62.5%; }
.board.is-flipped .square-87, .board.is-flipped .square-77, .board.is-flipped .square-67, .board.is-flipped .square-57, .board.is-flipped .square-47, .board.is-flipped .square-37, .board.is-flipped .square-27, .board.is-flipped .square-17 { top: 75%; }
.board.is-flipped .square-88, .board.is-flipped .square-78, .board.is-flipped .square-68, .board.is-flipped .square-58, .board.is-flipped .square-48, .board.is-flipped .square-38, .board.is-flipped .square-28, .board.is-flipped .square-18 { top: 87.5%; }

body[data-theme="light"] {
  background:
    linear-gradient(rgba(34, 38, 34, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 38, 34, 0.045) 1px, transparent 1px),
    #e5e8df;
  color: #1f241f;
}

body[data-theme="light"]::before,
body[data-theme="light"] .site-sidebar {
  background:
    linear-gradient(rgba(34, 38, 34, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 38, 34, 0.055) 1px, transparent 1px),
    #d9ded2;
}

body[data-theme="light"] .site-sidebar {
  color: #20251f;
  border-right-color: rgba(48, 58, 48, 0.32);
}

body[data-theme="light"] .site-sidebar-brand {
  color: #182018;
}

body[data-theme="light"] .site-sidebar-brand::after {
  background: rgba(32, 37, 31, 0.18);
}

body[data-theme="light"] .site-sidebar-link {
  color: #3f453d;
}

body[data-theme="light"] .site-sidebar-link:hover {
  color: #151a14;
  background: rgba(34, 38, 34, 0.07);
}

body[data-theme="light"] .site-sidebar-link.is-active {
  color: #1f1715;
  background:
    linear-gradient(to left, rgba(219, 174, 24, 0.3), rgba(219, 174, 24, 0));
  border-color: transparent;
  box-shadow: none;
}

body[data-theme="light"] .site-sidebar-link.is-active::after {
  background:
    linear-gradient(to left, rgba(186, 142, 10, 0.58), rgba(186, 142, 10, 0)) top right / 100% 2px no-repeat,
    linear-gradient(to left, rgba(186, 142, 10, 0.58), rgba(186, 142, 10, 0)) bottom right / 100% 2px no-repeat,
    linear-gradient(rgba(186, 142, 10, 0.58), rgba(186, 142, 10, 0.58)) top right / 2px 100% no-repeat;
  filter: drop-shadow(0 0 5px rgba(186, 142, 10, 0.2));
}

body[data-theme="light"] .site-sidebar-link.is-active .site-sidebar-icon {
  color: #181200;
  background: linear-gradient(145deg, #ffe465, #d4aa16);
}

body[data-theme="light"] .site-sidebar-link:not(.is-active) .site-sidebar-icon {
  color: #3c443b;
  background: rgba(34, 38, 34, 0.1);
}

body[data-theme="light"] .site-sidebar-muted {
  color: #5c6258;
}

body[data-theme="light"] .site-sidebar-info-links {
  color: #62685f;
}

body[data-theme="light"] .donate-card {
  color: #20241f;
  background:
    radial-gradient(circle at 84% 12%, rgba(255, 78, 62, 0.14), transparent 34%),
    radial-gradient(circle at 10% 88%, rgba(115, 149, 82, 0.14), transparent 34%),
    linear-gradient(rgba(34, 38, 34, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 38, 34, 0.035) 1px, transparent 1px),
    #f2f1eb;
  background-size: auto, auto, 18px 18px, 18px 18px, auto;
  border-color: rgba(50, 57, 48, 0.18);
  box-shadow: 0 18px 44px rgba(31, 35, 30, 0.16);
}

body[data-theme="light"] .donate-card h1 {
  color: #171b16;
}

body[data-theme="light"] .donate-card p {
  color: #4a5148;
}

body[data-theme="light"] .donate-kicker {
  color: #bd3026;
}

body[data-theme="light"] .review-source-icon-chesscom {
  color: #ffffff;
  background: linear-gradient(145deg, #82ad57, #4d7f32);
}

body[data-theme="light"] .review-source-icon-lichess {
  color: #111111;
  background: #ffffff;
  box-shadow: inset 0 0 0 2px rgba(17, 17, 17, 0.65);
}

body[data-theme="light"] .game-panel,
body[data-theme="light"] .panel-header,
body[data-theme="light"] .engine-panel,
body[data-theme="light"] .report-card,
body[data-theme="light"] .report-feedback-card,
body[data-theme="light"] .settings-popover,
body[data-theme="light"] .share-popover,
body[data-theme="light"] .import-popover,
body[data-theme="light"] .review-popover,
body[data-theme="light"] .board-editor-setup-view {
  color: #20241f;
  background: #f2f1eb;
  border-color: rgba(50, 57, 48, 0.18);
}

body[data-theme="light"] .game-panel,
body[data-theme="light"] .settings-popover,
body[data-theme="light"] .share-popover,
body[data-theme="light"] .import-popover,
body[data-theme="light"] .review-popover {
  box-shadow: 0 18px 44px rgba(31, 35, 30, 0.16);
}

body[data-theme="light"] .panel-header h1,
body[data-theme="light"] .settings-title,
body[data-theme="light"] .report-accuracy-player strong {
  color: #171b16;
}

body[data-theme="light"] .settings-title {
  border-bottom-color: rgba(50, 57, 48, 0.14);
}

body[data-theme="light"] .share-field {
  background: rgba(50, 57, 48, 0.035);
  border-color: rgba(50, 57, 48, 0.14);
}

body[data-theme="light"] .move-count,
body[data-theme="light"] .engine-panel-header,
body[data-theme="light"] .setting-row,
body[data-theme="light"] .share-label-row label,
body[data-theme="light"] .import-field label,
body[data-theme="light"] .review-field label,
body[data-theme="light"] .report-accuracy-player span {
  color: #5a6256;
}

body[data-theme="light"] .share-label-row label {
  color: #20241f;
}

body[data-theme="light"] .settings-button,
body[data-theme="light"] .share-button,
body[data-theme="light"] .home-button,
body[data-theme="light"] .flip-button,
body[data-theme="light"] .import-button,
body[data-theme="light"] .review-button,
body[data-theme="light"] .copy-button,
body[data-theme="light"] .copy-all-button,
body[data-theme="light"] .nav-button,
body[data-theme="light"] .panel-tab,
body[data-theme="light"] .import-mode-button,
body[data-theme="light"] .editor-tool-button {
  color: #20241f;
  background: #e4e2d9;
  border-color: rgba(50, 57, 48, 0.2);
}

body[data-theme="light"] .settings-button:hover,
body[data-theme="light"] .share-button:hover,
body[data-theme="light"] .home-button:hover,
body[data-theme="light"] .flip-button:hover,
body[data-theme="light"] .copy-button:hover,
body[data-theme="light"] .copy-all-button:hover,
body[data-theme="light"] .panel-tab:hover {
  background: #d7d5ca;
  border-color: rgba(50, 57, 48, 0.3);
}

body[data-theme="light"] .settings-button,
body[data-theme="light"] .share-button,
body[data-theme="light"] .home-button,
body[data-theme="light"] .flip-button {
  color: #ffffff;
  background: rgba(48, 48, 45, 0.92);
  border: 2px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 12px rgba(255, 255, 255, 0.13),
    0 2px 8px rgba(0, 0, 0, 0.28);
}

body[data-theme="light"] .settings-button:hover,
body[data-theme="light"] .share-button:hover,
body[data-theme="light"] .home-button:hover,
body[data-theme="light"] .flip-button:hover {
  background: rgba(64, 64, 59, 0.98);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 18px rgba(255, 255, 255, 0.2),
    0 4px 10px rgba(0, 0, 0, 0.3);
}

body[data-theme="light"] .panel-tab.is-active,
body[data-theme="light"] .import-mode-button.is-active {
  color: #ffffff;
  background: #739552;
}

body[data-theme="light"] .review-start-button,
body[data-theme="light"] .editor-load-button,
body[data-theme="light"] .review-game-start {
  color: #191705;
  background: linear-gradient(180deg, #ffea75, #d4a91f);
}

body[data-theme="light"] .setting-row select,
body[data-theme="light"] .setting-row input[type="number"],
body[data-theme="light"] .share-field textarea,
body[data-theme="light"] .import-field textarea,
body[data-theme="light"] .review-field textarea,
body[data-theme="light"] .review-username-input,
body[data-theme="light"] .review-date-select,
body[data-theme="light"] .editor-field select,
body[data-theme="light"] .editor-field textarea {
  color: #20241f;
  background: #fbfaf5;
  border-color: rgba(50, 57, 48, 0.22);
}

body[data-theme="light"] .review-username-input.is-saved-username {
  color: #b88400;
}

body[data-theme="light"] .suggestion-toggle {
  background: #fbfaf5;
  border-color: rgba(50, 57, 48, 0.22);
}

body[data-theme="light"] .suggestion-toggle-button {
  color: #4f574c;
}

body[data-theme="light"] .suggestion-toggle-button:hover {
  color: #20241f;
  background: rgba(42, 48, 40, 0.07);
}

body[data-theme="light"] .suggestion-toggle-button.is-active {
  color: #ffffff;
  background: linear-gradient(145deg, #82ad57, #4d7f32);
}

body[data-theme="light"] .board-editor-setup-view {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 210, 58, 0.2), transparent 32%),
    linear-gradient(rgba(34, 38, 34, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 38, 34, 0.035) 1px, transparent 1px),
    #f2f1eb;
  background-size: auto, 18px 18px, 18px 18px, auto;
}

body[data-theme="light"] .editor-piece-grid,
body[data-theme="light"] .editor-tool-row,
body[data-theme="light"] .editor-field,
body[data-theme="light"] .editor-castling-grid {
  color: #20241f;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(50, 57, 48, 0.045)),
    rgba(255, 255, 255, 0.46);
  border-color: rgba(50, 57, 48, 0.16);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.68);
}

body[data-theme="light"] .editor-piece-button {
  background-color: rgba(50, 57, 48, 0.05);
  border-color: rgba(50, 57, 48, 0.13);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .editor-piece-button:hover {
  background-color: rgba(50, 57, 48, 0.09);
  border-color: rgba(50, 57, 48, 0.24);
}

body[data-theme="light"] .editor-tool-button {
  color: #20241f;
  background: #e4e2d9;
  border-color: rgba(50, 57, 48, 0.2);
}

body[data-theme="light"] .editor-tool-button:hover {
  color: #111610;
  background: #d7d5ca;
  border-color: rgba(50, 57, 48, 0.3);
}

body[data-theme="light"] .editor-tool-button.is-selected,
body[data-theme="light"] .editor-side-button.is-selected {
  color: #171301;
  background: linear-gradient(180deg, #ffea75, #d4a91f);
  border-color: rgba(122, 91, 12, 0.34);
}

body[data-theme="light"] .editor-piece-button.is-selected {
  background-color: rgba(248, 221, 88, 0.18);
  border-color: rgba(184, 137, 19, 0.58);
  box-shadow:
    inset 0 0 0 2px rgba(184, 137, 19, 0.28),
    0 0 0 1px rgba(184, 137, 19, 0.08);
}

body[data-theme="light"] .editor-load-button {
  box-shadow: none;
}

body[data-theme="light"] .review-username-input::placeholder,
body[data-theme="light"] .review-field textarea::placeholder {
  color: #7a8176;
}

body[data-theme="light"] .editor-side-toggle {
  background: #fbfaf5;
  border-color: rgba(50, 57, 48, 0.22);
}

body[data-theme="light"] .editor-side-button {
  color: #4f574c;
  background: transparent;
  border-color: transparent;
}

body[data-theme="light"] .editor-side-button:hover {
  color: #20241f;
  background: rgba(42, 48, 40, 0.07);
}

body[data-theme="light"] .editor-side-button.is-selected {
  color: #ffdf68;
  background: linear-gradient(180deg, #ffea75, #d4a91f);
  border-color: rgba(122, 91, 12, 0.34);
}

body[data-theme="light"] .move-list,
body[data-theme="light"] .history-header,
body[data-theme="light"] .tree-row,
body[data-theme="light"] .move-cell {
  color: #242a22;
}

body[data-theme="light"] .history-header,
body[data-theme="light"] .move-list {
  background: #f2f1eb;
}

body[data-theme="light"] .tree-row:nth-child(even) {
  background: rgba(42, 48, 40, 0.035);
}

body[data-theme="light"] .move-cell.is-current {
  color: #10200d;
  background: rgba(115, 149, 82, 0.32);
}

body[data-theme="light"] .board-player-card {
  color: #1d211c;
  background: rgba(242, 241, 235, 0.96);
  border-color: rgba(45, 52, 43, 0.22);
}

body[data-theme="light"] .board-player-card strong {
  color: #171b16;
}

@media (max-width: 980px) {
  body {
    align-items: start;
    padding: 70px 12px 70px;
  }

  body.info-page {
    padding: 70px 12px 70px;
  }

  body::before {
    inset: 0 0 auto 0;
    width: auto;
    height: 58px;
    border-radius: 0;
    transform: none;
  }

  .site-sidebar {
    inset: 0 0 auto 0;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    width: auto;
    height: 58px;
    padding: 7px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0;
    transform: none;
    scrollbar-width: none;
  }

  .site-sidebar::-webkit-scrollbar {
    display: none;
  }

  .site-sidebar-brand {
    flex: 0 0 auto;
    height: 32px;
    gap: 5px;
    margin: 0 4px 0 0;
    padding: 0 6px 0 0;
    font-size: 14px;
  }

  .site-sidebar-brand::after {
    display: none;
  }

  .site-sidebar-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .site-sidebar-brand > span:last-child {
    display: none;
  }

  .site-sidebar-links {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    gap: 5px;
    padding-top: 0;
  }

  .site-sidebar-links .site-sidebar-link:nth-child(5) {
    width: auto;
    max-width: none;
    min-height: 32px;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0 8px;
    gap: 5px;
    font-size: 12px;
    letter-spacing: 0;
  }

  .site-sidebar-social {
    display: none;
  }

  .site-sidebar-info-links {
    display: none;
  }

  .site-sidebar-info-links::before {
    display: none;
  }

  .site-sidebar-link {
    flex: 0 0 auto;
    min-height: 32px;
    gap: 5px;
    padding: 0 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .site-sidebar-icon {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    font-size: 10px;
  }

  .site-sidebar-link .review-nav-icon,
  .site-sidebar-link .donate-nav-icon,
  .site-sidebar-link .board-editor-nav-icon {
    background-size: 18px 18px;
  }

  .site-sidebar-links .site-sidebar-link:nth-child(5) .donate-nav-icon {
    width: 22px;
    height: 22px;
  }

  .analysis-layout {
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
    width: min(100%, 680px);
  }

  .donate-layout {
    width: min(100%, 680px);
    min-height: auto;
    padding: 0;
  }

  .donate-card {
    padding: 28px;
  }

  .donate-card h1 {
    font-size: 34px;
  }

  body.board-editor-page .analysis-layout {
    grid-template-columns: 1fr;
    width: min(100%, 680px);
  }

  .board-wrap {
    order: 1;
    justify-self: center;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 4px;
    width: min(96vw, 678px);
  }

  .eval-bar {
    min-width: 14px;
  }

  .eval-bar-label {
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0;
    white-space: nowrap;
    transform: rotate(-90deg);
  }

  .eval-bar-label.is-top {
    top: 16px;
  }

  .eval-bar-label.is-bottom {
    bottom: 16px;
  }

  .eval-bar.is-empty .eval-bar-label {
    transform: translateY(-50%) rotate(-90deg);
  }

  .classification-board-icon {
    padding: 2px 0 3px 3px;
  }

  .classification-board-icon img {
    width: clamp(16px, 32%, 28px);
    height: clamp(16px, 32%, 28px);
    transform: translateX(1px);
  }

  .panel-header h1 {
    display: none;
  }

  .nav-controls {
    order: -2;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
    background: #131212;
    border-top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-button {
    height: 34px;
    font-size: 14px;
  }

  .panel-header {
    order: -1;
    min-height: 46px;
  }

  .board-player-card {
    left: 5px;
    right: 5px;
    min-height: 20px;
    gap: 3px;
    padding: 1px 5px 1px 3px;
    border-left-width: 2px;
    border-radius: 4px;
  }

  .board-player-avatar {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    font-size: 10px;
  }

  .board-player-card strong {
    font-size: 11px;
  }

  .board-player-rating {
    font-size: 9px;
  }

  .board-player-card-top {
    top: -28px;
  }

  .board-player-card-bottom {
    bottom: -28px;
  }

  .game-panel {
    order: 2;
    justify-self: center;
    width: min(96vw, 640px);
    height: auto;
    min-height: min(620px, calc(100vh - 108px));
    max-height: none;
  }

  .settings-popover,
  .share-popover {
    max-height: calc(100vh - 32px);
  }

  .import-popover,
  .review-popover {
    max-height: none;
  }
}

body.donate-page {
  display: block;
  padding: 0 0 0 200px;
  overflow: hidden;
  background: #03060a;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body.donate-page .donate-layout {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(260px, 360px);
  align-items: center;
  justify-content: start;
  gap: clamp(26px, 4vw, 58px);
  width: calc(100vw - 200px);
  min-height: 100vh;
  padding: clamp(34px, 5vw, 70px) clamp(32px, 6vw, 92px);
  background:
    radial-gradient(circle at 74% 42%, rgba(42, 84, 126, 0.2), transparent 30%),
    linear-gradient(90deg, rgba(3, 5, 10, 0.08), rgba(3, 5, 10, 0.6)),
    linear-gradient(180deg, rgba(3, 5, 10, 0.1), rgba(3, 5, 10, 0.28)),
    url("assets/df62f703-14a2-44ae-b107-73576aed3982.png") center / cover no-repeat;
}

body.donate-page .donate-feature-detail {
  display: none;
  grid-column: 1;
  width: min(100%, 820px);
  margin-left: -80px;
  padding: clamp(22px, 2.6vw, 34px) clamp(26px, 3.2vw, 42px);
  color: #ffffff;
  background: #2d3036;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  box-shadow: none;
}

body.donate-page .donate-feature-detail.is-active {
  display: block;
  margin-top: -32px;
  margin-bottom: -22px;
}

body.donate-page.has-donate-feature .donate-feature-detail.is-active ~ .donate-card {
  grid-column: 1;
  grid-row: 2;
  width: min(100%, 760px);
  padding: clamp(20px, 2.3vw, 30px) clamp(22px, 2.8vw, 34px);
}

body.donate-page.has-donate-feature .donate-feature-detail.is-active ~ .donate-support-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
}

body.donate-page .donate-feature-eyebrow {
  margin: 0 0 8px !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  letter-spacing: 0.12em;
  line-height: 1 !important;
  text-transform: uppercase;
}

body.donate-page .donate-feature-detail h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 950;
  line-height: 1.08;
}

body.donate-page .donate-feature-detail p:last-child {
  max-width: 680px;
  margin: 14px 0 0;
  color: #ffffff;
  font-size: clamp(14px, 1.15vw, 17px);
  font-weight: 650;
  line-height: 1.55;
}

body.donate-page .donate-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 820px);
  min-height: auto;
  padding: clamp(24px, 2.7vw, 36px) clamp(26px, 3.2vw, 42px);
  overflow: hidden;
  color: #ffffff;
  text-align: center;
  background: #2d3036;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.14),
    0 34px 80px rgba(0, 0, 0, 0.42);
  transform: translateX(-34px);
}

body.donate-page .donate-card::before {
  display: none;
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 0%, rgba(67, 172, 255, 0.14), transparent 34%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent 36%);
  opacity: 0.7;
}

body.donate-page .donate-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 14px !important;
  color: #ffdf68 !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  letter-spacing: 0.14em;
  line-height: 1 !important;
  text-transform: uppercase;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.78);
}

body.donate-page .donate-card h1 {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 100%;
  margin: 0;
  color: #ffffff;
  font-size: clamp(30px, 2.8vw, 42px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.72);
}

body.donate-page .donate-title-logo {
  flex: 0 0 auto;
  width: clamp(44px, 4vw, 58px);
  height: clamp(44px, 4vw, 58px);
  background: url("assets/donate3-transparent.png") center / cover no-repeat;
  border-radius: 8px;
  filter: none;
}

body.donate-page .donate-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.7fr);
  gap: clamp(22px, 3.8vw, 46px);
  width: 100%;
  margin-top: clamp(24px, 3.4vh, 36px);
  text-align: left;
}

body.donate-page .donate-message {
  display: grid;
  gap: clamp(16px, 2.4vh, 24px);
}

body.donate-page .donate-message p {
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(14px, 1.1vw, 17px);
  font-weight: 600;
  line-height: 1.55;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.52);
}

body.donate-page .donate-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  text-align: center;
}

body.donate-page .donate-feature-block {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(14px, 1.1vw, 17px);
  font-weight: 850;
  line-height: 1.35;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.58);
}

body.donate-page .donate-feature-block p,
body.donate-page .donate-feature-block span {
  margin: 0;
}

body.donate-page .donate-feature-block p {
  color: #ffdf68;
  font-size: clamp(16px, 1.35vw, 20px);
  font-weight: 950;
  letter-spacing: 0;
  text-transform: none;
  text-shadow:
    0 0 18px rgba(255, 205, 70, 0.28),
    0 8px 24px rgba(0, 0, 0, 0.74);
}

body.donate-page .donate-feature-block ul {
  display: grid;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin: 12px auto 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

body.donate-page .donate-feature-block li {
  position: relative;
  padding-left: 21px;
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(13px, 1vw, 16px);
  font-weight: 800;
  line-height: 1.25;
}

body.donate-page .donate-feature-block li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.57em;
  width: 6px;
  height: 6px;
  background: #ffdf68;
  border-radius: 50%;
}

body.donate-page .donate-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 30px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(15px, 1.15vw, 16px);
  font-weight: 700;
  line-height: 1.7;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.78);
}

body.donate-page .donate-divider {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  height: 1px;
  margin-top: 28px;
  background: linear-gradient(90deg, transparent, rgba(255, 223, 104, 0.72), transparent);
}

body.donate-page .donate-action {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  width: 100%;
  margin-top: clamp(26px, 4vh, 40px);
}

body.donate-page .donate-button {
  position: static;
  display: inline-grid;
  grid-template-columns: 52px auto;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 12px;
  width: max-content;
  max-width: 100%;
  min-height: 56px;
  min-width: 0;
  margin-top: 0;
  padding: 0 18px;
  transform: none;
  color: #171301;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.92),
    0 18px 42px rgba(255, 255, 255, 0.16);
  font-size: clamp(17px, 1.35vw, 21px);
  font-weight: 950;
  letter-spacing: 0.02em;
  text-shadow: none;
}

body.donate-page .donate-button::before {
  content: none;
}

body.donate-page .donate-button span:last-child {
  color: #171301;
  line-height: 1;
  white-space: nowrap;
}

body.donate-page .donate-button-icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  background: url("assets/donate3-transparent.png") center / cover no-repeat;
  border-radius: 6px;
}

body.donate-page .donate-button:hover {
  transform: translateY(-1px);
}

body.donate-page .donate-note {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.68) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.45;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.8);
}

body.donate-page .donate-support-panel {
  position: relative;
  z-index: 1;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  width: min(100%, 330px);
  min-height: min(68vh, 620px);
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(9, 12, 18, 0.42);
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 14px;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.12),
    0 30px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(4px);
}

body.donate-page .donate-support-panel h2 {
  margin: 0;
  min-height: 46px;
  padding: 11px 16px;
  color: #ffdf68;
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 2px solid rgba(255, 255, 255, 0.82);
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0.04em;
  line-height: 1.5;
  text-align: center;
}

body.donate-page .donate-support-list {
  display: grid;
  gap: 0;
}

body.donate-page .donate-support-row {
  display: block;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 14px;
  font-weight: 750;
}

body.donate-page .donate-support-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  body.donate-page {
    padding: 72px 0 0;
    overflow: auto;
  }

  body.donate-page .donate-layout {
    grid-template-columns: 1fr;
    width: 100vw;
    min-height: calc(100vh - 72px);
    padding: 34px 22px 42px;
    place-items: center;
    background-position: center bottom;
  }

  body.donate-page .donate-feature-detail {
    grid-column: 1;
    width: 100%;
    margin-left: 0;
  }

  body.donate-page .donate-card {
    min-height: calc(100vh - 148px);
    justify-content: center;
    transform: none;
  }

  body.donate-page.has-donate-feature .donate-feature-detail.is-active ~ .donate-card,
  body.donate-page.has-donate-feature .donate-feature-detail.is-active ~ .donate-support-panel {
    grid-column: 1;
    grid-row: auto;
  }

  body.donate-page .donate-support-panel {
    width: 100%;
    min-height: 280px;
  }

  body.donate-page .donate-copy {
    margin-top: 26px;
  }
}
