:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #64748b;
  --line: #d9e1ea;
  --panel: #ffffff;
  --page: #f2f4f7;
  --accent: #176bff;
  --accent-strong: #0f55cf;
  --green: #16a34a;
  --danger: #bd2434;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--page);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

.appShell {
  height: 100vh;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
}

.sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.brand {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.brandMark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #176bff, #14b8a6);
  font-weight: 800;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 18px;
  line-height: 1.15;
}

h2 {
  font-size: 14px;
}

.brand p,
.statusLine,
.sideStats span,
.compactField,
.urlField,
.lotPanel p,
.lotPanel dt {
  color: var(--muted);
  font-size: 13px;
}

.navList {
  padding: 14px 10px;
  display: grid;
  gap: 6px;
}

.navItem {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #475569;
  text-align: left;
  padding: 0 14px;
  cursor: pointer;
}

.navItem.active {
  background: #dbeafe;
  color: #155be8;
}

.navItem:focus-visible,
.leaderboardRow:focus-visible,
.lotRow:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sideStats {
  margin: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.sideStats div {
  padding: 10px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.sideStats div:last-child {
  border-right: 0;
}

.sideStats strong {
  display: block;
  font-size: 16px;
}

.sideAuth {
  padding: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.profileSetup,
.leaderboardBox {
  margin: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 9px;
  min-width: 0;
}

.profileSetup {
  max-height: 360px;
  overflow: auto;
}

.profileSetup.isVerified .compactModes,
.profileSetup.isVerified #profileUsernameField,
.profileSetup.isVerified #profileWalletField,
.profileSetup.isVerified #startProfileVerificationButton,
.profileSetup.isVerified #profileDisplayField {
  display: none;
}

.compactModes {
  gap: 6px;
}

.compactModes .toolButton {
  flex: 1;
  min-height: 32px;
  padding: 0 8px;
  font-size: 13px;
}

.verificationBox {
  display: grid;
  gap: 8px;
}

.verificationBox textarea {
  min-width: 0;
  width: 100%;
  font-size: 12px;
}

.verificationActions {
  flex-wrap: wrap;
}

.profileSummary {
  min-width: 0;
}

.profileSummary:empty {
  display: none;
}

.profileSummary dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.profileSummary div {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.profileSummary dt {
  color: var(--muted);
  font-size: 11px;
}

.profileSummary dd {
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.myLots {
  display: grid;
  gap: 7px;
}

.myLots h3 {
  margin: 0;
  font-size: 12px;
}

.myLots ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.leaderboardBox {
  margin-top: 0;
}

.leaderboardBox ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.leaderboardBox li,
.myLots li {
  min-width: 0;
}

.leaderboardRow,
.lotRow {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: baseline;
  padding: 7px;
  text-align: left;
}

.leaderboardRow:hover,
.lotRow:hover {
  border-color: var(--line);
  background: rgba(45, 212, 191, 0.08);
}

.leaderboardRow span,
.lotRow span,
.leaderboardRow strong,
.lotRow strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboardRow em,
.lotRow em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.leaderboardBox li:not(:has(button)) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: baseline;
  font-size: 13px;
}

.leaderboardBox li span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboardBox li em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.workspace {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 58px 34px minmax(0, 1fr) auto auto auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
}

.liveDot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #22c55e;
}

.liveDot::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
}

.topActions,
.row,
.modeGroup {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticker {
  overflow: hidden;
  white-space: nowrap;
  background: #111827;
  color: #f8fafc;
  display: flex;
  align-items: center;
}

.ticker span {
  display: inline-block;
  padding-left: 100%;
  animation: ticker 24s linear infinite;
  font-size: 13px;
}

@keyframes ticker {
  to {
    transform: translateX(-100%);
  }
}

.stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #f7f2f2;
}

#board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  image-rendering: pixelated;
}

.zoomRail {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  min-height: 210px;
  padding: 8px 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  display: grid;
  justify-items: center;
  gap: 8px;
  z-index: 5;
}

#zoomSlider {
  width: 150px;
  transform: rotate(-90deg);
  margin: 56px 0;
  accent-color: var(--accent);
}

.zoomButton,
.iconButton {
  width: 34px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #1f2937;
  cursor: pointer;
}

.minimap {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 146px;
  height: 146px;
  padding: 3px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.2);
  z-index: 5;
}

#minimapCanvas {
  width: 140px;
  height: 140px;
  border-radius: 13px;
  display: block;
  background: #f8fafc;
}

.toolDock,
.postPanel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.2);
  z-index: 10;
}

.postPanel {
  align-items: stretch;
  background: #1f2937;
  flex-wrap: wrap;
}

.pricingBox {
  min-width: 230px;
  display: grid;
  gap: 4px;
  color: #f8fafc;
}

.pricingBox strong {
  color: var(--gold, #facc15);
}

.pricingBox span {
  color: #cbd5e1;
  font-size: 12px;
}

.projectFields {
  width: min(680px, 100%);
  border: 1px solid #334155;
  border-radius: 8px;
  margin: 0;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.projectFields legend {
  padding: 0 6px;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 700;
}

.projectFields p {
  color: #93a2b5;
  font-size: 12px;
}

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

.projectFields textarea {
  min-width: 100%;
}

.projectFields.locked {
  opacity: 0.62;
}

.toolButton,
.button {
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #ffffff;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.toolButton.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.button.danger {
  border-color: #f3b8c0;
  color: var(--danger);
}

.button.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.button:disabled,
.toolButton:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.compactField,
.urlField {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.compactField {
  width: 76px;
}

.urlField {
  flex: 1;
}

input,
select,
textarea {
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 7px 9px;
  min-width: 0;
}

input[type="color"] {
  padding: 3px;
}

textarea {
  min-width: 320px;
  flex: 1;
  resize: vertical;
}

.selectionMeter {
  min-width: 118px;
  display: grid;
  gap: 2px;
}

.selectionMeter strong {
  font-size: 20px;
  line-height: 1;
}

.selectionMeter span {
  color: #cbd5e1;
  font-size: 12px;
}

.lotPanel {
  position: absolute;
  right: 22px;
  top: 22px;
  width: 280px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.16);
  z-index: 6;
  display: grid;
  gap: 10px;
}

.lotProject {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.06);
}

.projectHeader {
  display: flex;
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.projectHeader img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.projectHeader div {
  display: grid;
  min-width: 0;
}

.projectHeader strong,
.projectHeader span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.lotProject code {
  color: #facc15;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.lotPanel dl {
  margin: 0;
  display: grid;
  gap: 5px;
}

.lotPanel dl div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px;
}

.lotPanel dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.statusLine {
  min-height: 24px;
  padding: 0 14px 8px;
  background: #0f172a;
  color: #cbd5e1;
}

.hidden {
  display: none !important;
}

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

  .sidebar {
    display: none;
  }

  .toolDock,
  .postPanel {
    flex-wrap: wrap;
  }

  textarea {
    min-width: 100%;
  }

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

/* Dark product skin: intentionally distinct from the reference site's white canvas shell. */
:root {
  color-scheme: dark;
  --ink: #f4f7fb;
  --muted: #95a3b4;
  --line: #2b343f;
  --panel: #14181f;
  --page: #0b0e13;
  --accent: #2dd4bf;
  --accent-strong: #14b8a6;
  --green: #22c55e;
  --danger: #fb7185;
  --gold: #facc15;
}

body {
  color: var(--ink);
  background: var(--page);
}

.sidebar {
  background: #11151c;
  border-right-color: #2a323d;
}

.brand,
.sideAuth {
  border-color: #2a323d;
}

.brandMark {
  color: #11151c;
  background: linear-gradient(135deg, #facc15, #2dd4bf);
}

.brand p,
.statusLine,
.sideStats span,
.compactField,
.urlField,
.lotPanel p,
.lotPanel dt {
  color: #93a2b5;
}

.navItem {
  color: #a8b3c3;
}

.navItem.active {
  background: #182d2d;
  color: #67e8f9;
}

.sideStats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-color: #2a323d;
  background: #0d1117;
}

.sideStats div {
  border-right-color: #2a323d;
  border-bottom: 1px solid #2a323d;
}

.sideStats div:nth-child(2n) {
  border-right: 0;
}

.sideStats div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.sideStats strong {
  color: #f8fafc;
}

.profileSetup,
.leaderboardBox,
.lotProject {
  background: #0d1117;
  border-color: #2a323d;
}

.profileSetup h2,
.leaderboardBox h2 {
  color: #f8fafc;
}

.profileSetup p,
.leaderboardBox li,
.leaderboardBox li em,
.leaderboardRow,
.leaderboardRow em,
.lotRow,
.lotRow em,
.profileSummary dt {
  color: #93a2b5;
}

.profileSummary div {
  border-color: #2a323d;
  background: #11151c;
}

.profileSummary dd,
.myLots h3,
.leaderboardRow strong,
.lotRow strong {
  color: #f8fafc;
}

.workspace {
  background: #0b0e13;
}

.topbar {
  background: #11151c;
  border-bottom-color: #2a323d;
}

.ticker {
  background: #05070a;
  color: #facc15;
  border-bottom: 1px solid #2a323d;
}

.stage {
  background: #0c0f14;
}

.zoomRail,
.minimap,
.lotPanel {
  background: rgba(17, 21, 28, 0.94);
  border: 1px solid #2a323d;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

#minimapCanvas {
  background: #ffffff;
}

.zoomButton,
.iconButton,
.toolButton,
.button {
  background: #1a2029;
  border-color: #3a4654;
  color: #f4f7fb;
}

.toolButton.active {
  background: #0f766e;
  border-color: #2dd4bf;
  color: #ecfeff;
}

.button.primary {
  background: #d6a90f;
  border-color: #facc15;
  color: #15120a;
}

.button.primary:hover {
  background: #facc15;
}

.button.danger {
  background: #22131a;
  border-color: #fb7185;
  color: #fecdd3;
}

.button:disabled,
.toolButton:disabled {
  opacity: 0.42;
}

.toolDock,
.postPanel,
.statusLine {
  background: #080b10;
  color: #f4f7fb;
  border-top: 1px solid #2a323d;
}

.postPanel {
  background: #10151d;
}

input,
select,
textarea {
  background: #11151c;
  border-color: #3a4654;
  color: #f4f7fb;
}

input::placeholder,
textarea::placeholder {
  color: #6f7d8e;
}

.selectionMeter span {
  color: #93a2b5;
}

.selectionMeter strong {
  color: #facc15;
}

.lotPanel {
  color: #f4f7fb;
}

.lotPanel dd {
  color: #e2e8f0;
}
