:root {
  --bg: #302e2b;
  --rail: #262522;
  --panel: #242321;
  --panel-raised: #1f1e1b;
  --tile: #262522;
  --tile-hover: #2d2b28;
  --ink: #f7f6f2;
  --muted: #b8b3aa;
  --subtle: #8f8a82;
  --line: #3a3835;
  --accent: #81b64c;
  --accent-strong: #95c45a;
  --accent-soft: #363431;
  --flare: #31d0aa;
  --flare-soft: rgba(49, 208, 170, .08);
  --shadow: rgba(0, 0, 0, .34);
  --display-font: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 400;
}

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

button {
  border: 1px solid var(--line);
  background: var(--tile);
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: var(--display-font);
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25);
}

button:hover { background: var(--tile-hover); }

input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1d1c1a;
  color: var(--ink);
  padding: 8px 9px;
}

label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  margin: 8px 0 5px;
}

input::placeholder, textarea::placeholder { color: #7f7970; }
::selection { background: #6d9f42; color: #fff; }

.app {
  min-height: 100vh;
  height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(460px, 1fr);
  overflow: hidden;
}

.app:has(.debug-panel) {
  grid-template-columns: 260px minmax(460px, 1fr) minmax(320px, 380px);
}

.app.sidebar-collapsed {
  grid-template-columns: 76px minmax(460px, 1fr);
}

.app.sidebar-collapsed:has(.debug-panel) {
  grid-template-columns: 76px minmax(460px, 1fr) minmax(320px, 380px);
}

.mobile-sidebar-toggle,
.mobile-sidebar-backdrop {
  display: none;
}

aside, main {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

aside {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--rail);
  border-right: 1px solid var(--line);
  min-height: 100vh;
}

.debug-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  background: #201f1d;
  border-left: 1px solid var(--line);
  border-right: 0;
  overflow: hidden;
}

.debug-panel::before { display: none; }

.debug-head {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.debug-head strong {
  font-family: var(--display-font);
  font-size: 14px;
}

.debug-status {
  padding: 6px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--subtle);
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.debug-copy {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--ink);
  border-color: #504d46;
  box-shadow: none;
  font-size: 11px;
  font-weight: 750;
}

.debug-copy:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.debug-tabs {
  display: flex;
  gap: 6px;
  padding: 9px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.debug-turn-tabs {
  padding-bottom: 0;
  border-bottom: 0;
}

.debug-tab {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-weight: 650;
}

.debug-tab.active {
  background: var(--accent-soft);
  color: var(--ink);
  border-color: #504d46;
}

.debug-content {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 12px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #ddd8ce;
  background: #1b1a18;
  font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

aside::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  left: -90px;
  top: 80px;
  background: radial-gradient(circle, var(--flare-soft), transparent 68%);
  pointer-events: none;
}

.brand {
  position: relative;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.brand-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-family: var(--display-font);
  font-size: 18px;
  white-space: nowrap;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(129, 182, 76, .95), rgba(49, 208, 170, .75));
  display: inline-grid;
  place-items: center;
  color: #172112;
  font-size: 14px;
  box-shadow: 0 0 24px rgba(49, 208, 170, .13);
  flex: 0 0 auto;
}

.sidebar-toggle {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 9px;
  color: var(--muted);
  box-shadow: none;
}

.sidebar-toggle::before {
  content: "";
  width: 15px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 4px;
  box-shadow: inset 5px 0 0 rgba(184, 179, 170, .22);
}

.app.sidebar-collapsed .brand {
  justify-content: center;
  padding: 0;
}

.app.sidebar-collapsed .brand-name,
.app.sidebar-collapsed .side-body {
  display: none;
}

.side-body {
  flex: 1;
  padding: 12px;
  overflow: auto;
  background: linear-gradient(180deg, rgba(49, 208, 170, .025), transparent 260px), var(--rail);
}

.new-chat-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, #2c2b28, #24231f);
  border-color: #46423b;
}

.new-chat-button .button-icon {
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  background: rgba(129, 182, 76, .14);
  color: var(--accent-strong);
  font-size: 14px;
  line-height: 1;
}

details.prompt-drawer {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 14px;
}

details.prompt-drawer summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  list-style: none;
  user-select: none;
}

details.prompt-drawer summary::-webkit-details-marker { display: none; }
details.prompt-drawer summary::before {
  content: "›";
  display: inline-block;
  margin-right: 6px;
  color: var(--muted);
}
details.prompt-drawer[open] summary::before { transform: rotate(90deg); }

.thread, .quick {
  width: 100%;
  text-align: left;
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
}

.thread.active {
  background: var(--accent-soft);
  color: var(--ink);
  border-color: #47443f;
}

.thread span,
.thread small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread span {
  color: inherit;
  font-weight: 700;
}

.thread small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.quick.danger {
  color: #ffb4a9;
}

.quick:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.quick[hidden],
.account-status[hidden] {
  display: none;
}

.account-status {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.account-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  margin-bottom: 8px;
}

.account-create input {
  min-width: 0;
  height: 34px;
  border-radius: 8px;
}

.account-create button {
  height: 34px;
  padding: 0 9px;
  box-shadow: none;
}

.account-list {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.account-list[hidden] {
  display: none;
}

.account-actions {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.account-edit-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.account-edit-button .connect-games-logos img {
  width: 18px;
  height: 18px;
}

.account-auth-panel {
  margin-bottom: 8px;
}

.account-auth-panel[hidden] {
  display: none;
}

.account-auth-actions {
  display: grid;
  gap: 6px;
}

.account-row {
  width: 100%;
  display: grid;
  gap: 2px;
  justify-items: start;
  text-align: left;
  margin: 0;
  box-shadow: none;
  background: transparent;
}

.account-row.saved {
  border-color: transparent;
}

.account-row.saved:hover {
  background: rgba(255, 255, 255, .05);
  border-color: #3a3732;
}

.account-row.active {
  background: var(--accent-soft);
  border-color: #47443f;
}

.account-row span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 12px;
}

.account-row small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--subtle);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 650;
}

main {
  position: relative;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% 44%, rgba(49, 208, 170, .045), transparent 32%),
    var(--bg);
}

.top-auth-actions {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-auth-actions[hidden] {
  display: none;
}

.top-auth-actions button {
  min-height: 36px;
  padding: 8px 13px;
  border-radius: 8px;
  box-shadow: none;
}

.top-auth-login {
  background: transparent;
  color: var(--muted);
}

.top-auth-login:hover {
  color: var(--ink);
}

.top-auth-signup {
  color: #172112;
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.top-auth-signup:hover {
  background: #a5d269;
}

.messages {
  position: relative;
  flex: 1;
  overflow: auto;
  padding: 14px 18px 122px;
}

.account-recent-games {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(31, 30, 27, .96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
}

.account-recent-games[hidden] { display: none; }

.account-recent-pointer {
  display: grid;
  gap: 3px;
  padding: 13px 42px 13px 14px;
  border: 1px solid rgba(149, 196, 90, .24);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(49, 208, 170, .12), rgba(149, 196, 90, .06)),
    rgba(31, 30, 27, .92);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .34);
  backdrop-filter: blur(14px);
}

.account-recent-pointer::after {
  content: "";
  position: absolute;
  left: 34px;
  bottom: -7px;
  width: 13px;
  height: 13px;
  border-right: 1px solid rgba(149, 196, 90, .24);
  border-bottom: 1px solid rgba(149, 196, 90, .24);
  background: rgba(31, 30, 27, .92);
  transform: rotate(45deg);
}

.account-recent-pointer-kicker {
  color: var(--flare);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-recent-pointer strong {
  color: var(--ink);
  font-family: var(--display-font);
  font-size: 14px;
}

.account-recent-pointer small {
  color: var(--muted);
  font-size: 12px;
}

.account-recent-pointer-close {
  position: absolute;
  right: 9px;
  top: 9px;
  width: 25px;
  height: 25px;
  min-height: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  box-shadow: none;
}

.account-recent-pointer-close::before,
.account-recent-pointer-close::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 12px;
  width: 9px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--muted);
}

.account-recent-pointer-close::before { transform: rotate(45deg); }
.account-recent-pointer-close::after { transform: rotate(-45deg); }

.account-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.account-recent-head > span {
  color: var(--ink);
  font-family: var(--display-font);
  font-size: 13px;
  font-weight: 900;
}

.account-recent-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.account-filter-menu {
  position: relative;
}

.account-filter-menu summary {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 210px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  font-size: 11px;
  font-weight: 750;
}

.account-filter-menu summary::-webkit-details-marker {
  display: none;
}

.account-filter-menu summary:hover,
.account-filter-menu[open] summary {
  background: rgba(255, 255, 255, .06);
  color: var(--ink);
}

.account-filter-menu summary span {
  color: var(--subtle);
  font-weight: 700;
}

.account-filter-menu summary strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #dff3c0;
  font-weight: 850;
}

.account-filter-menu summary img,
.account-filter-menu-list img {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: contain;
}

.account-filter-menu-list {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 190px;
  display: grid;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #24231f;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .36);
}

.account-filter-menu-list button {
  min-height: 31px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.account-filter-menu-list button:hover,
.account-filter-menu-list button.active {
  background: rgba(129, 182, 76, .14);
}

.account-filter-box {
  position: relative;
  width: 14px;
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, .035);
}

.account-filter-box.checked {
  border-color: rgba(129, 182, 76, .62);
  background: var(--accent);
}

.account-filter-box.checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #172112;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.account-filter-menu-list button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-filter-menu-list button small {
  color: var(--subtle);
  font-size: 10px;
}

.account-filter-clear {
  min-height: 29px;
  padding: 5px 7px;
  border: 0;
  background: transparent;
  color: var(--subtle);
  box-shadow: none;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-filter-clear:hover {
  background: transparent;
  color: var(--muted);
}

.account-recent-scroll {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 7px;
  scrollbar-width: thin;
  scrollbar-color: rgba(129, 182, 76, .56) rgba(255, 255, 255, .05);
}

.account-recent-scroll::-webkit-scrollbar {
  height: 8px;
}

.account-recent-scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
}

.account-recent-scroll::-webkit-scrollbar-thumb {
  border: 2px solid rgba(31, 30, 27, .96);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--flare));
}

.account-recent-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, var(--accent-strong), #47c99f);
}

.account-recent-empty {
  min-height: 78px;
  display: grid;
  place-items: center;
  flex: 1 0 100%;
  color: var(--muted);
  font-size: 12px;
}

.account-recent-game {
  flex: 0 0 180px;
  min-width: 0;
  display: grid;
  gap: 4px;
  justify-items: start;
  text-align: left;
  box-shadow: none;
  background: var(--tile);
}

.account-game-topline {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.account-game-source {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
  height: 19px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  color: var(--muted);
  background: rgba(255, 255, 255, .035);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.account-game-source img {
  width: 13px;
  height: 13px;
  object-fit: contain;
  flex: 0 0 auto;
}

.account-game-source span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-game-source.lichess {
  color: #d8d5cf;
}

.account-game-source.chesscom {
  color: #a8d66f;
}

.account-game-result {
  flex: 0 0 auto;
  height: 19px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

.account-game-result.won {
  color: #dff3c0;
  background: rgba(129, 182, 76, .20);
  border-color: rgba(129, 182, 76, .34);
}

.account-game-result.lost {
  color: #ffc8c0;
  background: rgba(229, 88, 70, .18);
  border-color: rgba(229, 88, 70, .32);
}

.account-game-result.draw,
.account-game-result.neutral {
  color: var(--muted);
  background: rgba(255, 255, 255, .04);
}

.account-recent-game strong,
.account-recent-game small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-recent-game strong {
  color: var(--ink);
  font-size: 12px;
}

.account-recent-game small {
  color: var(--muted);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 600;
}

.account-recent-manage {
  flex: 0 0 auto;
  min-height: 0;
  padding: 2px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--subtle);
  box-shadow: none;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-recent-manage:hover {
  background: transparent;
  color: var(--muted);
}

.account-recent-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.account-recent-refresh {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  min-height: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--subtle);
  box-shadow: none;
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}

.account-recent-refresh:hover {
  color: var(--muted);
  background: rgba(255, 255, 255, .05);
  border-color: var(--line);
}

.account-recent-refresh.refreshing svg {
  animation: spin-refresh .7s linear infinite;
}

@keyframes spin-refresh {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

.connect-games-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 14px;
  border-color: rgba(129, 182, 76, .34);
  background: rgba(129, 182, 76, .12);
  color: var(--ink);
  box-shadow: none;
  pointer-events: auto;
}

.connect-games-button[hidden] {
  display: none;
}

.app.accounts-loading .connect-games-button {
  visibility: hidden;
  pointer-events: none;
}

.connect-games-button:hover {
  background: rgba(129, 182, 76, .18);
}

.connect-games-logos {
  display: inline-flex;
  align-items: center;
}

.connect-games-logos img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 50%;
  background: #eee;
  border: 1px solid rgba(255, 255, 255, .18);
}

.connect-games-logos img + img {
  margin-left: -6px;
}

.suggestions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  max-width: 760px;
  margin: 0 auto;
  pointer-events: auto;
}

.suggestions button {
  background: transparent;
  min-height: 0;
  border-radius: 999px;
  color: var(--muted);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-weight: 500;
  font-size: 13px;
  padding: 9px 13px;
  box-shadow: none;
}

.suggestions button:hover {
  color: var(--ink);
  background: var(--tile);
}

.onboarding-card {
  position: absolute;
  left: 18px;
  right: 18px;
  top: calc(50% + 86px);
  z-index: 4;
  width: min(820px, calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(129, 182, 76, .28);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(49, 208, 170, .08), transparent 38%),
    rgba(31, 30, 27, .96);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .30);
}

.onboarding-card[hidden] {
  display: none;
}

.onboarding-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.onboarding-kicker {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.onboarding-copy strong {
  font-family: var(--display-font);
  font-size: 15px;
}

.onboarding-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.onboarding-steps {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.onboarding-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.onboarding-step span {
  width: 13px;
  height: 13px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #1d1c1a;
}

.onboarding-step.done {
  color: #dff3c0;
}

.onboarding-step.done span {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 3px #25321e;
}

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

.onboarding-actions button {
  min-height: 34px;
  box-shadow: none;
}

.onboarding-actions .onboarding-primary {
  color: #172112;
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.onboarding-actions .onboarding-primary:hover {
  background: #a5d269;
}

.onboarding-skip {
  color: var(--muted);
  background: transparent;
}

.composer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 1px solid var(--line);
  padding: 10px 18px 12px;
  background: linear-gradient(180deg, transparent, var(--bg) 18%, var(--panel) 100%);
  z-index: 15;
}

.composer-inner {
  width: min(820px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #2f2e2b;
  padding: 8px 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .14);
}

.composer-attachment {
  padding: 0 0 8px 48px;
}

.composer-attachment-card {
  width: fit-content;
  max-width: min(520px, 100%);
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid rgba(148, 201, 91, .35);
  border-radius: 8px;
  background: rgba(148, 201, 91, .1);
}

.composer-attachment-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(148, 201, 91, .18);
  color: var(--accent);
}

.composer-attachment-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.composer-attachment-copy strong,
.composer-attachment-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-attachment-copy strong {
  color: var(--ink);
  font-size: 12px;
}

.composer-attachment-copy small {
  color: var(--muted);
  font-size: 11px;
}

.composer-input {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 10px;
  align-items: end;
}

.attachment-picker {
  position: relative;
  width: 38px;
  height: 38px;
}

.attach-button {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  box-shadow: none;
  color: var(--muted);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

.attach-button:hover { color: var(--ink); }

.attachment-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  width: min(260px, calc(100vw - 36px));
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #23221f;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .42);
  z-index: 16;
}

.attachment-menu[hidden] { display: none; }

.attachment-menu button {
  min-height: 44px;
  display: grid;
  gap: 2px;
  justify-items: start;
  padding: 7px 9px;
  border-radius: 8px;
  text-align: left;
  box-shadow: none;
  background: transparent;
}

.attachment-menu button:hover { background: var(--tile-hover); }

.attachment-menu span {
  color: var(--ink);
  font-size: 12px;
}

.attachment-menu small {
  color: var(--muted);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 600;
}

textarea {
  width: 100%;
  height: 38px;
  border: 0;
  outline: 0;
  resize: none;
  min-height: 38px;
  max-height: 110px;
  background: transparent;
  color: var(--ink);
  line-height: 20px;
  font-size: 16px;
  font-weight: 500;
  padding: 9px 5px;
  overflow: hidden;
}

textarea::-webkit-scrollbar {
  width: 8px;
}

textarea::-webkit-scrollbar-track {
  background: transparent;
}

textarea::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(236, 233, 223, .24);
  background-clip: padding-box;
}

textarea::-webkit-scrollbar-thumb:hover {
  background: rgba(236, 233, 223, .38);
  background-clip: padding-box;
}

.send-button {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  min-width: 0;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: #ece9df;
  color: #242321;
  box-shadow: none;
  text-indent: -999px;
  overflow: hidden;
  position: relative;
}

.send-button::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translate(-52%, -48%);
  background: currentColor;
  clip-path: polygon(8% 11%, 94% 50%, 8% 89%, 24% 56%, 55% 50%, 24% 44%);
}

.send-button:hover { background: #fffaf0; }

.message {
  max-width: 820px;
  margin: 0 auto 10px;
  display: block;
}

.avatar {
  display: none;
}

.message.user {
  display: flex;
  justify-content: flex-end;
}

.message.user .bubble {
  max-width: min(680px, 100%);
}

.bubble {
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .015)),
    var(--panel);
  padding: 10px 12px;
  line-height: 1.5;
  white-space: normal;
  font-weight: 450;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .16);
}

.message.assistant .bubble {
  color: #eee9df;
}

.message.user .bubble {
  background: var(--accent-soft);
  border-color: #47443f;
  font-weight: 650;
}

.error-bubble {
  border-color: rgba(255, 120, 120, .28);
  color: #ffd1c9;
}

.answer-summary {
  font-weight: 750;
  margin-bottom: 5px;
}

.stream-answer {
  white-space: normal;
}

.message.streaming .stream-answer {
  white-space: normal;
}

.stream-answer::after {
  content: "";
  display: block;
  clear: both;
}

.stream-answer p {
  margin: 0 0 10px;
}

.stream-answer p:last-child { margin-bottom: 0; }

.stream-answer h1,
.stream-answer h2,
.stream-answer h3,
.stream-answer h4,
.stream-answer h5,
.stream-answer h6 {
  margin: 10px 0 5px;
  font-family: var(--display-font);
  line-height: 1.25;
}

.stream-answer h1 { font-size: 17px; }
.stream-answer h2 { font-size: 15px; }
.stream-answer h3 { font-size: 14px; }
.stream-answer h4,
.stream-answer h5,
.stream-answer h6 {
  font-size: 13px;
}

.stream-answer ul,
.stream-answer ol {
  margin: 6px 0 10px;
  padding-left: 20px;
}

.stream-answer li { margin: 3px 0; }

.stream-answer code {
  padding: 1px 4px;
  border-radius: 5px;
  background: rgba(0, 0, 0, .18);
  color: #f1eadc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
}

.stream-answer pre {
  margin: 8px 0;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 9px;
  background: rgba(0, 0, 0, .18);
  overflow: auto;
}

.stream-answer pre code {
  padding: 0;
  background: transparent;
}

.stream-answer blockquote {
  margin: 8px 0 10px;
  padding: 5px 0 5px 10px;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

.stream-widget-placeholder {
  clear: both;
  width: min(100%, 560px);
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid rgba(244, 227, 161, .14);
  border-radius: 8px;
  background: #171714;
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .14);
}

.stream-widget-placeholder strong,
.stream-widget-placeholder small {
  display: block;
}

.stream-widget-placeholder strong {
  font-size: 13px;
  font-weight: 850;
}

.stream-widget-placeholder small {
  margin-top: 2px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 650;
}

.stream-widget-spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 2px solid rgba(244, 227, 161, .22);
  border-top-color: #f4e3a1;
  border-radius: 999px;
  animation: widget-spin .9s linear infinite;
}

.message.streaming .stream-answer > .board-widget {
  float: none;
  clear: both;
  width: min(100%, 560px);
  max-width: 100%;
  margin: 10px 0;
}

.message.streaming .stream-answer > .board-widget:not(.board-widget-playable) {
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: var(--panel-raised);
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}

.message.streaming .stream-answer > .board-widget:not(.board-widget-playable) .board-widget-main {
  padding: 10px;
}

.message.streaming .stream-answer > .board-widget:not(.board-widget-playable) .inline-board {
  width: min(100%, 300px);
  margin: 0 auto;
}

.stream-board-placeholder {
  display: block;
}

.stream-board-skeleton {
  width: 220px;
  max-width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 3px solid #1f1e1b;
  border-radius: 10px;
  background-color: #eeeed2;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .24), rgba(255, 255, 255, 0)),
    conic-gradient(#789a59 25%, #eeeed2 0 50%, #789a59 0 75%, #eeeed2 0);
  background-size: 80px 100%, 25% 25%;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .25);
  animation: board-skeleton-sheen 1.1s linear infinite;
}

.stream-board-placeholder .board-step-list span {
  width: 54px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .055);
}

@keyframes widget-spin {
  to { transform: rotate(360deg); }
}

@keyframes board-skeleton-sheen {
  from { background-position: -90px 0, 0 0; }
  to { background-position: 310px 0, 0 0; }
}

.move-ref {
  display: inline;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .28);
  border-radius: 0;
  background: transparent;
  color: #f4e3a1;
  padding: 0 1px;
  box-shadow: none;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.move-ref:hover {
  border-bottom-color: #f4e3a1;
}

.line-ref {
  display: inline;
  border: 1px solid rgba(166, 208, 116, .34);
  border-radius: 5px;
  background: rgba(166, 208, 116, .09);
  color: #dbeeb3;
  padding: 0 4px;
  box-shadow: none;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.line-ref:hover {
  background: rgba(166, 208, 116, .16);
  border-color: rgba(166, 208, 116, .55);
}

.game-move-popover {
  position: fixed;
  z-index: 50;
  border: 1px solid rgba(244, 227, 161, .18);
  border-radius: 8px;
  background: #171714;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .24);
}

.game-move-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(244, 227, 161, .12);
  background: rgba(244, 227, 161, .045);
}

.game-move-popover-title {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.game-move-popover-title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-move-popover-title span:first-child {
  color: #f4e3a1;
  font-weight: 850;
}

.game-move-popover-title small {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 750;
}

.game-move-popover-close {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 7px;
  background: rgba(255, 255, 255, .045);
  color: var(--ink);
  cursor: pointer;
}

.game-move-popover-close::before,
.game-move-popover-close::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.game-move-popover-close::before { transform: rotate(45deg); }
.game-move-popover-close::after { transform: rotate(-45deg); }

.game-move-popover-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.chessground-preview {
  width: 220px;
  height: 220px;
  border: 3px solid #1f1e1b;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .25);
}

.move-arrow-label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.engine-position-meta {
  align-self: stretch;
}

.popover-engine {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.popover-engine-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.popover-engine-head strong {
  color: #f4e3a1;
  font-size: 14px;
  font-weight: 900;
}

.popover-engine-depth {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 700;
}

.popover-engine-row {
  display: grid;
  grid-template-columns: 34px 46px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  font-size: 12px;
}

.popover-engine-pv {
  color: var(--subtle);
  font-weight: 850;
}

.popover-engine-eval {
  color: var(--ink);
  font-weight: 850;
}

.popover-engine-line {
  min-width: 0;
  color: #ddd8ce;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.line-ref-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.line-ref-controls button {
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 5px;
}

.line-ref-controls button:disabled {
  opacity: .45;
  cursor: default;
}

.line-ref-controls span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.message.streaming .stream-answer::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 1em;
  margin-left: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 70%, white 30%);
  vertical-align: -2px;
  animation: cursor-pulse 1s ease-in-out infinite;
}

@keyframes cursor-pulse {
  0%, 100% { opacity: .25; }
  50% { opacity: 1; }
}

.line-table {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
  background: var(--panel-raised);
  white-space: normal;
}

.line-row {
  display: grid;
  grid-template-columns: 104px 52px minmax(0, 1fr);
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  align-items: center;
  white-space: normal;
}

.line-row:last-child { border-bottom: 0; }
.line-label { color: var(--muted); font-weight: 750; }
.line-eval { font-weight: 850; text-align: right; }
.line-moves {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; white-space: normal; }
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--tile);
  color: var(--ink);
  padding: 4px 7px;
  font-size: 12px;
  cursor: pointer;
}

.widget-stack {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.widget-stack[hidden] { display: none; }

.board-widget {
  display: block;
  float: right;
  clear: right;
  width: 220px;
  max-width: min(100%, 220px);
  margin: 2px 0 10px 14px;
}

.board-widget-playable {
  float: none;
  clear: both;
  width: min(100%, 560px);
  max-width: 100%;
  margin: 10px 0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: var(--panel-raised);
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
  white-space: normal;
  container-type: inline-size;
}

.board-widget-title {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.board-widget-main {
  display: block;
}

.board-widget-playable .board-widget-main {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px;
}

.board-playthrough {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.board-step-note {
  min-height: 88px;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 8px;
  background: rgba(0, 0, 0, .12);
}

.board-step-kicker {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.board-step-label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.board-step-comment {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.board-step-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 74px;
  overflow: auto;
}

.board-step {
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 6px;
  background: rgba(255, 255, 255, .035);
  color: var(--muted);
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.board-step span {
  margin-right: 3px;
  color: var(--subtle);
}

.board-step.active {
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .12);
  color: var(--ink);
}

.board-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.board-controls button {
  min-width: 58px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 6px;
  background: rgba(255, 255, 255, .05);
  color: var(--ink);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.board-controls button:disabled {
  cursor: default;
  opacity: .45;
}

.inline-position {
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .015));
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
  white-space: normal;
}

.inline-position-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.inline-position-body {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 10px;
  padding: 8px;
  align-items: center;
}

.inline-board, #modal-board {
  border: 3px solid #1f1e1b;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .25);
}

.inline-board { width: 126px; }
#modal-board { width: 260px; }

.inline-board.cg-wrap,
.inline-board.cg-green,
.chessground-preview.cg-wrap,
.chessground-preview.cg-green {
  height: auto;
  aspect-ratio: 1;
}

.cg-green cg-board {
  background-color: #eeeed2;
  background-image: conic-gradient(#789a59 25%, #eeeed2 0 50%, #789a59 0 75%, #eeeed2 0);
  background-size: 25% 25%;
}

.cg-green cg-board square.last-move {
  background-color: rgba(244, 227, 161, .42);
}

.cg-green cg-board square.selected {
  background-color: rgba(77, 122, 52, .5);
}

.board-widget .inline-board {
  width: 220px;
  max-width: 100%;
}

@container (max-width: 480px) {
  .board-widget-playable .board-widget-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .board-widget-playable .inline-board {
    width: min(100%, 300px);
    margin: 0 auto;
  }

  .board-step-note {
    min-height: 0;
  }

  .board-step-list {
    max-height: none;
  }

  .board-controls button {
    flex: 1 1 72px;
  }
}

.inline-position-meta {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.inline-fen {
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 10px;
  background: rgba(0, 0, 0, .14);
  padding: 6px 7px;
  color: var(--subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.html-widget {
  display: block;
  clear: both;
  margin: 10px 0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .015));
  box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}

.html-widget-title {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.html-widget-frame {
  display: block;
  width: 100%;
  border: 0;
  background: var(--panel);
}

.stockfish-widget {
  display: block;
  clear: both;
  margin: 10px 0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel-raised);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}

.stockfish-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stockfish-row {
  display: grid;
  grid-template-columns: 58px 78px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
  font-size: 12px;
}

.stockfish-row:last-child { border-bottom: 0; }
.stockfish-eval { font-weight: 800; color: var(--ink); }
.stockfish-label { color: var(--muted); font-weight: 650; }
.stockfish-moves {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #ddd8ce;
}

.stockfish-empty {
  padding: 10px;
  color: var(--subtle);
  font-size: 12px;
}

.opening-book-widget {
  display: block;
  clear: both;
  margin: 10px 0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel-raised);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}

.opening-book-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.opening-book-name {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.book-row {
  display: grid;
  grid-template-columns: 54px 64px 66px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
  font-size: 12px;
}

.book-row:last-child { border-bottom: 0; }
.book-header { color: var(--muted); font-weight: 700; }
.book-move { color: var(--ink); font-weight: 800; }
.book-played, .book-games {
  color: #ddd8ce;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.book-results {
  display: flex;
  min-width: 0;
  gap: 8px;
  overflow: hidden;
  color: var(--muted);
  white-space: nowrap;
}

.book-empty {
  padding: 10px;
  color: var(--subtle);
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .48);
  z-index: 120;
}

.modal-backdrop.open { display: flex; }

.modal {
  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .42);
  overflow: hidden;
}

.account-connect-modal {
  width: min(520px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-head strong {
  font-family: var(--display-font);
  font-size: 15px;
}

.modal-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  overflow: auto;
}

.account-connect-body {
  display: grid;
  gap: 12px;
  padding: 16px;
  overflow: auto;
}

.modal-board-tools {
  display: grid;
  gap: 8px;
  align-content: start;
}

.setup-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.setup-tools select { grid-column: 1 / -1; }
.setup-status {
  color: var(--subtle);
  font-size: 12px;
  text-align: center;
}

.modal-fields {
  display: grid;
  align-content: start;
  gap: 10px;
}

.game-status {
  min-height: 16px;
  color: var(--muted);
  font-size: 12px;
}

.game-preview {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-raised);
}

.game-preview-head {
  display: grid;
  gap: 2px;
}

.game-preview-head strong {
  color: var(--ink);
  font-size: 13px;
}

.game-preview-head small,
.game-preview-ply {
  color: var(--muted);
  font-size: 12px;
}

.game-preview-moves {
  max-height: 104px;
  overflow: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-right: 2px;
}

.game-preview-move {
  min-height: 28px;
  padding: 4px 7px;
  border-radius: 7px;
  color: var(--muted);
  background: var(--tile);
  box-shadow: none;
  font-size: 12px;
}

.game-preview-move.active {
  color: var(--ink);
  border-color: rgba(148, 201, 91, .45);
  background: rgba(148, 201, 91, .16);
}

.game-preview-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 8px;
}

.recent-games {
  max-height: 156px;
  overflow: auto;
  display: grid;
  gap: 6px;
}

.recent-game {
  width: 100%;
  min-height: 44px;
  display: grid;
  gap: 3px;
  justify-items: start;
  text-align: left;
  background: var(--tile);
  box-shadow: none;
}

.recent-game strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 12px;
}

.recent-game span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 600;
}

.upload-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.upload-option {
  min-height: 58px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  background: var(--tile);
  color: var(--muted);
  box-shadow: none;
}

.upload-option strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.upload-option span {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 600;
}

.source-buttons, .game-entry-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.connect-account-intro {
  display: grid;
  gap: 7px;
  justify-items: start;
  margin-bottom: 10px;
}

.connect-account-intro .connect-games-logos img {
  width: 28px;
  height: 28px;
}

.connect-account-intro strong {
  font-family: var(--display-font);
  font-size: 18px;
}

.connect-account-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.connect-account-fields {
  display: grid;
  gap: 10px;
}

.account-connect-section {
  display: grid;
  gap: 9px;
}

.account-connect-section[hidden] {
  display: none;
}

.account-connect-section-title {
  color: var(--ink);
  font-family: var(--display-font);
  font-size: 13px;
}

.account-section-rule {
  width: 100%;
  height: 1px;
  border: 0;
  margin: 2px 0;
  background: var(--line);
}

.account-section-rule[hidden] {
  display: none;
}

.connected-account-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.connected-account-chip {
  min-width: 0;
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 7px 7px 9px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
}

.connected-account-chip img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.connected-account-chip span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.connected-account-chip strong,
.connected-account-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connected-account-chip strong {
  color: var(--ink);
  font-size: 11px;
}

.connected-account-chip small {
  color: var(--muted);
  font-size: 11px;
}

.connected-account-chip button {
  position: relative;
  width: 23px;
  height: 23px;
  min-height: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  box-shadow: none;
}

.connected-account-chip button::before,
.connected-account-chip button::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  width: 8px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--muted);
}

.connected-account-chip button::before { transform: rotate(45deg); }
.connected-account-chip button::after { transform: rotate(-45deg); }

.account-username-field {
  position: relative;
  display: block;
}

.account-username-field input {
  width: 100%;
  padding-right: 42px;
}

.account-ready-check {
  position: absolute;
  right: 13px;
  top: 50%;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  background: #b64c4c;
  box-shadow: 0 4px 10px rgba(182, 76, 76, .28);
  opacity: 0;
  transform: translateY(-50%) scale(.62);
  transition: opacity .16s ease, transform .22s cubic-bezier(.2, .9, .2, 1.35), background .16s ease, box-shadow .16s ease;
  pointer-events: none;
}

.account-ready-check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  width: 9px;
  height: 2px;
  border: 0;
  border-radius: 2px;
  background: #fff;
  transform: rotate(45deg) scale(.75);
  transform-origin: center;
  transition: transform .2s ease .06s;
}

.account-ready-check::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  width: 9px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transform: rotate(-45deg) scale(.75);
  transform-origin: center;
  transition: transform .2s ease .06s;
}

.account-username-field.is-typing .account-ready-check {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.account-username-field.is-typing .account-ready-check::after {
  transform: rotate(45deg) scale(1);
}

.account-username-field.is-typing .account-ready-check::before {
  transform: rotate(-45deg) scale(1);
}

.account-username-field.is-ready .account-ready-check {
  background: #3ca657;
  box-shadow: 0 4px 10px rgba(60, 166, 87, .28);
}

.account-username-field.is-ready .account-ready-check::after {
  left: 6px;
  top: 4px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  border-radius: 0;
  background: transparent;
  transform: rotate(45deg) scale(1);
}

.account-username-field.is-ready .account-ready-check::before {
  opacity: 0;
  transform: rotate(-45deg) scale(.2);
}

.account-username-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  z-index: 100;
  display: grid;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #24231f;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .34);
}

.account-username-suggestions[hidden] {
  display: none;
}

.account-username-suggestions button {
  min-height: 32px;
  justify-content: flex-start;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  font-size: 13px;
  text-align: left;
}

.account-username-suggestions button:hover,
.account-username-suggestions button.is-active {
  background: rgba(129, 182, 76, .16);
}

.account-username-suggestions button.is-active {
  color: #dff3c0;
}

.source-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--tile);
}

.source-button img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.primary {
  background: linear-gradient(#94c95b, #76a945);
  color: #fff;
  border-color: #6e9f40;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}

.account-connect-body #connect-accounts,
[data-context-section="account"] #connect-accounts {
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid rgba(149, 196, 90, .42);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, rgba(129, 182, 76, .95), rgba(49, 208, 170, .74));
  color: #162012;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, .22),
    0 0 0 1px rgba(255, 255, 255, .04) inset,
    inset 0 1px 0 rgba(255, 255, 255, .18);
  font-family: var(--display-font);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: none;
}

.account-connect-body #connect-accounts:hover,
[data-context-section="account"] #connect-accounts:hover {
  transform: translateY(-1px);
  border-color: rgba(149, 196, 90, .62);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .02)),
    linear-gradient(135deg, var(--accent-strong), #47c99f);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, .26),
    0 0 0 1px rgba(255, 255, 255, .06) inset,
    inset 0 1px 0 rgba(255, 255, 255, .22);
}

.account-connect-body #connect-accounts:disabled,
[data-context-section="account"] #connect-accounts:disabled {
  transform: none;
  opacity: .58;
  box-shadow: none;
}

.link-button {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.white-1e1d7 { background-color: #eeeed2 !important; color: #6f8f4e !important; }
.black-3c85d { background-color: #779954 !important; color: #eeeed2 !important; }

@media (max-width: 1100px) {
  .app, .app.sidebar-collapsed, .app:has(.debug-panel), .app.sidebar-collapsed:has(.debug-panel) {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  aside { display: none; }
  .debug-panel { display: none; }
  main { min-height: 100vh; }
}

@media (max-width: 760px) {
  .inline-position-body, .modal-body, .game-move-popover-body { grid-template-columns: 1fr; }
  .board-widget-playable .board-widget-main { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .game-move-popover {
    z-index: 95;
    left: 10px;
    right: 10px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    top: auto;
    width: auto;
    max-height: min(74svh, 620px);
    display: flex;
    flex-direction: column;
    border-color: rgba(244, 227, 161, .28);
    border-radius: 12px;
    background: #151512;
    box-shadow:
      0 -16px 48px rgba(0, 0, 0, .62),
      0 0 0 1px rgba(244, 227, 161, .08);
  }
  .game-move-popover-head {
    padding: 9px 10px 9px 12px;
    background: #202018;
  }
  .game-move-popover-title {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    font-size: 13px;
  }
  .game-move-popover-title span:last-child {
    color: var(--subtle);
    font-size: 11px;
  }
  .game-move-popover-body {
    flex: 1 1 auto;
    overflow: auto;
    gap: 10px;
    padding: 12px;
    align-items: start;
  }
  .game-move-popover .inline-position-meta {
    font-size: 12px;
  }
  .game-move-popover .inline-fen {
    max-height: 76px;
    overflow: auto;
  }
  .mobile-sidebar-toggle {
    position: fixed;
    top: calc(12px + env(safe-area-inset-top, 0px));
    left: 12px;
    z-index: 80;
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(47, 46, 43, .94);
    color: var(--ink);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .24);
  }
  .mobile-sidebar-toggle::before,
  .mobile-sidebar-toggle::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform .16s ease, box-shadow .16s ease;
  }
  .mobile-sidebar-toggle::before {
    transform: translateY(-5px);
    box-shadow: 0 5px 0 currentColor;
  }
  .mobile-sidebar-toggle::after {
    transform: translateY(5px);
  }
  .app.mobile-sidebar-open .mobile-sidebar-toggle::before {
    transform: rotate(45deg);
    box-shadow: none;
  }
  .app.mobile-sidebar-open .mobile-sidebar-toggle::after {
    transform: rotate(-45deg);
  }
  .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, .48);
    box-shadow: none;
  }
  .mobile-sidebar-backdrop[hidden] {
    display: none;
  }
  .app.mobile-sidebar-open #react-sidebar aside {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 70;
    width: min(82vw, 320px);
    display: flex;
    min-height: 100svh;
    box-shadow: 18px 0 48px rgba(0, 0, 0, .36);
  }
  .app.mobile-sidebar-open #react-sidebar aside .brand {
    justify-content: space-between;
    padding-left: 64px;
  }
  .app.mobile-sidebar-open #react-sidebar aside .brand-name,
  .app.mobile-sidebar-open #react-sidebar aside .side-body {
    display: flex;
  }
  .app.mobile-sidebar-open #react-sidebar aside .side-body {
    flex-direction: column;
  }
  .app.mobile-sidebar-open #react-sidebar aside .sidebar-toggle {
    display: none;
  }
  .messages {
    padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px));
  }
  .messages.has-chat {
    padding-top: calc(66px + env(safe-area-inset-top, 0px));
  }
  .top-auth-actions {
    top: 12px;
    right: 12px;
  }
  .top-auth-actions button {
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 13px;
  }
  .top-auth-login {
    color: #172112;
    background: var(--accent-strong);
    border-color: var(--accent-strong);
  }
  .top-auth-login:hover {
    color: #172112;
    background: #a5d269;
  }
  .top-auth-signup {
    display: none;
  }
  .composer {
    position: fixed;
    bottom: env(safe-area-inset-bottom, 0px);
    left: 0;
    right: 0;
  }
  .composer-inner {
    border-radius: 18px;
    padding: 7px 9px;
  }
  .attachment-menu {
    top: auto;
    bottom: calc(100% + 10px);
    max-height: min(360px, calc(100svh - 174px - env(safe-area-inset-bottom, 0px)));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .onboarding-card {
    top: calc(50% + 72px);
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .onboarding-actions {
    justify-content: stretch;
  }
  .onboarding-actions button {
    flex: 1 1 130px;
  }
  .inline-board, #modal-board { width: min(260px, 100%); margin: 0 auto; }
  .board-widget-playable .inline-board { width: min(100%, 300px); }
  .board-widget-playable .board-controls button { flex: 1 1 72px; }
  .chessground-preview {
    width: min(280px, 100%);
    height: auto;
    aspect-ratio: 1;
    margin: 0 auto;
  }
  .ugc-board { width: min(260px, 100%); margin: 0 auto; }
  .ugc-main { grid-template-columns: 1fr; }
  .ugc-board-col { border-right: none; border-bottom: 1px solid var(--line); }
  .ugc-moves { max-height: 160px; }
}

/* ─── User Game Card ──────────────────────────────────────────────────────── */

.user-game-bubble {
  background: var(--panel-raised) !important;
  border: 1px solid var(--line) !important;
  padding: 0 !important;
  overflow: hidden;
  max-width: 560px;
  width: min(560px, 90vw);
}

.user-game-text {
  padding: 10px 12px 6px;
  font-size: 0.92rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.user-game-card {
  display: flex;
  flex-direction: column;
}

/* Header: players vs result */
.ugc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 6px;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.ugc-players {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.ugc-vs {
  font-size: 10px;
  color: var(--subtle);
  font-weight: 700;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  text-transform: uppercase;
}

.ugc-result {
  font-size: 12px;
  font-weight: 800;
  color: #f4e3a1;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.ugc-player {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 160px;
}

.ugc-player--won .ugc-player-name { color: var(--accent-strong); }
.ugc-player--lost .ugc-player-name { color: #e05c5c; }

.ugc-piece {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.ugc-piece--white { color: var(--ink); filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.ugc-piece--black { color: #3a3835; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)) drop-shadow(0 0 1px rgba(255,255,255,.15)); }

.ugc-player-name {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

.ugc-elo {
  font-size: 11px;
  color: var(--subtle);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Meta row */
.ugc-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 8px;
  padding: 5px 12px 6px;
  font-size: 11px;
  color: var(--subtle);
  border-bottom: 1px solid var(--line);
}

.ugc-meta-item + .ugc-meta-item::before {
  content: "·";
  margin-right: 4px;
  opacity: 0.4;
}

.ugc-time { color: #f4e3a1; font-weight: 700; }
.ugc-eco {
  color: var(--flare);
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main body: board + move list */
.ugc-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.ugc-board-col {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  padding: 8px 8px 0;
  gap: 6px;
}

.ugc-board {
  width: 260px;
  height: 260px;
  flex-shrink: 0;
}

/* Navigation bar */
.ugc-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 2px 8px;
  background: transparent;
}

.ugc-nav-btn {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
  color: var(--muted);
  border-radius: 5px;
  width: 26px;
  height: 24px;
  font-size: 12px;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
  line-height: 1;
}

.ugc-nav-btn:hover {
  background: rgba(255,255,255,.1);
  color: var(--ink);
}

.ugc-nav-btn:active { transform: scale(0.93); }

.ugc-nav-label {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--subtle);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  font-weight: 650;
}

/* Move list */
.ugc-moves {
  display: grid;
  align-content: start;
  max-height: 308px; /* 260px board + 8px top pad + 6px gap + ~34px nav */
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 6px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.ugc-moves-empty {
  padding: 10px 12px;
  color: var(--subtle);
  font-size: 11px;
}

.ugc-move-row {
  display: grid;
  grid-template-columns: 24px 1fr 1fr;
  align-items: center;
  gap: 0;
}

.ugc-move-num {
  padding: 2px 4px 2px 8px;
  font-size: 10px;
  color: var(--subtle);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
  user-select: none;
}

.ugc-move-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 3px 5px;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.1s, color 0.1s;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ugc-move-btn:hover {
  background: rgba(255,255,255,.07);
  color: var(--ink);
}

.ugc-move-btn--active {
  background: rgba(129, 182, 76, .18);
  color: var(--accent-strong);
  font-weight: 800;
}

.ugc-move-btn--active:hover {
  background: rgba(129, 182, 76, .26);
}

