.ps-game {
  display: grid;
  gap: 14px;
}

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

.ps-stat {
  min-width: 0;
  border: 1px solid #d7dde6;
  border-radius: 8px;
  background: #fbfcfe;
  padding: 9px 10px;
}

.ps-stat span {
  display: block;
  color: #667085;
  font-size: 12px;
  line-height: 1.25;
}

.ps-stat strong {
  display: block;
  margin-top: 2px;
  color: #17202a;
  font-size: 22px;
  line-height: 1.15;
}

.ps-brief,
.ps-status {
  border: 1px solid #d7dde6;
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  padding: 10px 12px;
  font-size: 15px;
}

.ps-stage {
  display: grid;
  gap: 10px;
}

.ps-shaft {
  display: grid;
  gap: 8px;
  border: 1px solid #d7dde6;
  border-radius: 8px;
  background: linear-gradient(180deg, #eef7ff 0%, #fff 46%, #f8fafc 100%);
  padding: 10px;
  overflow: hidden;
}

.ps-floor {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 50px;
}

.ps-floor-label {
  color: #667085;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.ps-floor-nodes {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}

.ps-node {
  min-width: 38px;
  min-height: 38px;
  border: 1px solid #cfd6df;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: #fff;
  color: #475467;
  font-size: 14px;
  font-weight: 800;
}

.ps-floor-future .ps-node {
  opacity: 0.45;
}

.ps-node-path {
  border-color: #2f8f83;
  background: #d7f4ef;
  color: #0f4f49;
}

.ps-node-current {
  background: #155e75;
  border-color: #155e75;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(21, 94, 117, 0.16);
}

.ps-node-branch {
  background: #fff1f0;
  border-color: #b42318;
  color: #7a271a;
  opacity: 1;
}

.ps-node-zero {
  background: #147d4f;
  border-color: #147d4f;
  color: #fff;
}

.ps-route {
  display: grid;
  gap: 6px;
  border: 1px dashed #a7b0be;
  border-radius: 8px;
  background: #fbfcfe;
  padding: 10px;
}

.ps-route-label {
  color: #667085;
  font-size: 13px;
  font-weight: 750;
}

.ps-route-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 36px;
  align-items: center;
}

.ps-route-empty {
  color: #98a2b3;
  font-size: 14px;
}

.ps-route-brick {
  min-width: 40px;
  min-height: 36px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  background: #2f8f83;
  color: #fff;
  font-weight: 850;
}

.ps-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 10px;
}

.ps-brick {
  min-height: 86px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: #17202a;
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 10px 8px;
  box-shadow: 0 8px 18px rgba(20, 31, 50, 0.08);
  touch-action: manipulation;
}

.ps-brick span {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.ps-brick strong {
  font-size: 26px;
  line-height: 1;
}

.ps-brick-one {
  background: #fff7ed;
  border-color: #fed7aa;
}

.ps-brick-four {
  background: #e7f6ef;
  border-color: #7bc6b8;
}

.ps-brick-nine {
  background: #eef4ff;
  border-color: #b8c7ff;
}

.ps-brick-used {
  box-shadow: 0 0 0 4px rgba(47, 143, 131, 0.18), 0 8px 18px rgba(20, 31, 50, 0.08);
}

.ps-brick-wrong {
  border-color: #b42318;
  background: #fff1f0;
}

.ps-brick-muted,
.ps-brick:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.ps-brick:focus-visible,
.ps-btn:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.28);
  outline-offset: 2px;
}

.ps-status-good {
  border-color: #147d4f;
  background: #e7f6ef;
  color: #0f5132;
}

.ps-status-warn {
  border-color: #b45309;
  background: #fff7ed;
  color: #7c2d12;
}

.ps-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ps-btn {
  min-height: 46px;
  border: 1px solid #d7dde6;
  border-radius: 8px;
  background: #fff;
  color: #17202a;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}

.ps-btn-primary {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

@media (max-width: 520px) {
  .ps-topline {
    gap: 7px;
  }

  .ps-stat {
    padding: 8px;
  }

  .ps-stat strong {
    font-size: 20px;
  }

  .ps-shaft {
    padding: 8px;
  }

  .ps-floor {
    grid-template-columns: 38px 1fr;
    gap: 6px;
  }

  .ps-floor-label {
    font-size: 12px;
  }

  .ps-node {
    min-width: 34px;
    min-height: 34px;
    font-size: 13px;
  }

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

  .ps-brick {
    min-height: 76px;
    padding: 8px 6px;
  }

  .ps-brick strong {
    font-size: 24px;
  }
}

@media (max-width: 380px) {
  .ps-floor {
    grid-template-columns: 1fr;
  }

  .ps-floor-label {
    min-height: 20px;
  }

  .ps-node {
    min-width: 32px;
  }

  .ps-actions {
    grid-template-columns: 1fr;
  }
}
